/* ==========================================================================
   PTAH PUBLICATIONS — design system
   Palette: void black / aged gold / initiatory blue-white glow
   Type: Cormorant Garamond + Marcellus (display) / Jost (body)
   ========================================================================== */

:root {
  --ptah-black:      #060606;
  --ptah-black-2:    #0d0d0d;
  --ptah-black-3:    #141414;
  --ptah-gold:       #c9a24b;
  --ptah-gold-bright:#e8c874;
  --ptah-gold-dim:   #8a7238;
  --ptah-blue:       #3fa9ff;
  --ptah-blue-glow:  #79c8ff;
  --ptah-ivory:      #ece6d8;
  --ptah-ivory-dim:  #a8a396;
  --ptah-line:       rgba(201,162,75,0.22);

  --font-display: 'Marcellus', 'Cormorant Garamond', Georgia, serif;
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-body:    'Jost', -apple-system, sans-serif;

  --container: 1180px;
  --radius: 2px;

  /* Max width of a carousel cover. The card is wider than this on purpose,
     so titles can run past the edges of the image. */
  --ptah-cover-w: 220px;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ptah-black);
  color: var(--ptah-ivory);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ptah-gold); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--ptah-gold-bright); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ptah-ivory);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.2em; color: var(--ptah-ivory-dim); }
/* <strong>/<b> default to font-weight:bolder, which is RELATIVE to what they
   inherit. With body at 300, bolder computes to 400 — indistinguishable from
   normal. Headings inherit 400, so bolder gives 700 there, which is why bold
   appeared to work in headings but not body copy. Set it explicitly.
   600 is a real loaded weight in both Jost and Cormorant Garamond, so no
   browser-synthesised faux bold. */
strong, b { font-weight: 600; }

/* Cormorant Garamond also loads 700 — use it where serif body copy needs
   more punch than 600 gives. */
.woocommerce-tabs .panel strong,
.woocommerce-tabs .panel b,
.ptah-long-body strong,
.ptah-cat-desc strong,
.ptah-product-intro strong { font-weight: 700; }
/* trying to get it to actually look bold by chnaging color */
.woocommerce-tabs .panel strong,
.woocommerce-tabs .panel b,
.ptah-long-body strong,
.ptah-cat-desc strong,
.ptah-product-intro strong {
  font-weight: 700;
  color: var(--ptah-ivory);
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ptah-gold-dim);
}

/* ---------- Texture: faint radiating glow behind key sections ---------- */
.ptah-glow-bg {
  position: relative;
}
.ptah-glow-bg::before {
  content: "";
  position: absolute;
  top: -200px; left: 50%;
  width: 900px; height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(63,169,255,0.10) 0%, rgba(63,169,255,0) 60%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Header ---------- */
.ptah-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6,6,6,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ptah-line);
}
.ptah-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  max-width: var(--container); margin: 0 auto;
}
.ptah-logo { display: flex; align-items: center; gap: 12px; }
.ptah-logo img { height: 44px; width: auto; }
.ptah-logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.18em;  
  color: var(--ptah-gold-dim);
}
.ptah-logo-text small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--ptah-gold-dim);
  margin-top: 2px;
}
.ptah-menu {
  list-style: none; display: flex; gap: 36px; margin: 0; padding: 0;
}
.ptah-menu a {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ptah-ivory-dim);
}
.ptah-menu a:hover { color: var(--ptah-gold-bright); }
.ptah-header-actions { display: flex; align-items: center; gap: 22px; }
.ptah-cart-link {
  font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ptah-ivory); border: 1px solid var(--ptah-line);
  padding: 8px 16px; border-radius: var(--radius);
}
.ptah-cart-link:hover { border-color: var(--ptah-gold); color: var(--ptah-gold-bright); }

.ptah-menu-toggle { display: none; background: none; border: none; color: var(--ptah-ivory); font-size: 1.6rem; cursor: pointer; }

@media (max-width: 860px) {
  .ptah-menu { display: none; }
  .ptah-menu.is-open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ptah-black-2); border-bottom: 1px solid var(--ptah-line);
    padding: 12px 32px 20px;
  }
  .ptah-menu.is-open li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
  .ptah-menu-toggle { display: block; }
}

/* ---------- Hero ---------- */
.ptah-hero {
  text-align: center;
  padding: 120px 32px 90px;
  position: relative;
}
.ptah-hero .eyebrow { display: block; margin-bottom: 18px; }
.ptah-hero h1 { max-width: 820px; margin: 0 auto 22px; }
.ptah-hero p.lede {
  max-width: 620px; margin: 0 auto 34px;
  font-family: var(--font-serif); font-size: 1.15rem; font-style: italic;
  color: var(--ptah-ivory-dim);
}
.ptah-divider {
  width: 1px; height: 60px; margin: 0 auto 12px;
  background: linear-gradient(to bottom, transparent, var(--ptah-blue-glow), transparent);
  box-shadow: 0 0 12px var(--ptah-blue-glow);
}
.ptah-divider-padded {
  width: 1px; height: 60px; margin: 42px auto 42px;
  background: linear-gradient(to bottom, transparent, var(--ptah-blue-glow), transparent);
  box-shadow: 0 0 12px var(--ptah-blue-glow);
}

/* ---------- Buttons ---------- */
.ptah-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 15px 34px;
  border: 1px solid var(--ptah-gold);
  color: var(--ptah-gold-bright);
  border-radius: var(--radius);
  background: transparent;
  transition: all .3s ease;
  cursor: pointer;
}
.ptah-btn:hover {
  background: var(--ptah-gold);
  color: var(--ptah-black);
  box-shadow: 0 0 24px rgba(201,162,75,0.35);
}
.ptah-btn-solid {
  background: var(--ptah-gold); color: var(--ptah-black);
}
.ptah-btn-solid:hover { background: var(--ptah-gold-bright); }

/* ---------- Section framing ---------- */
.ptah-section { padding: 90px 32px; }
.ptah-section-tight { padding: 50px 32px; }
.ptah-section-title { text-align: center; margin-bottom: 60px; }
.ptah-section-title .eyebrow { display: block; margin-bottom: 12px; }

/* Section headings as an oversized eyebrow: body font, uppercase, wide
   tracking, gold. Scoped rather than global so author names in the card
   grids (also h2) keep the display serif.
   .ptah-h2-eyebrow is a utility for Heading blocks added in the WP editor —
   set it under Advanced → Additional CSS class(es). */
.ptah-section-title h2,
.ptah-carousel-title h2,
.ptah-h2-eyebrow {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ptah-ivory);
  line-height: 1.4;
  /* Letter-spacing leaves a trailing gap after the last character, which
     shifts centred text off-centre. This pushes it back. */
  text-indent: 0.22em;
}
.ptah-rule {
  border: none; height: 1px;
  background: var(--ptah-line);
  margin: 0;
}

/* ---------- Codex volume grid (front page) ---------- */
.ptah-volumes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 30px;
  max-width: var(--container); margin: 0 auto;
}
.ptah-volume-card {
  border: 1px solid var(--ptah-line);
  background: linear-gradient(160deg, var(--ptah-black-2) 0%, var(--ptah-black) 100%);
  padding: 40px 26px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform .35s ease, border-color .35s ease;
}
.ptah-volume-card:hover {
  transform: translateY(-6px);
  border-color: var(--ptah-gold);
}
.ptah-volume-card .num {
  font-family: var(--font-display);
  font-size: 0.75rem; letter-spacing: 0.3em;
  color: var(--ptah-gold-dim);
  margin-bottom: 16px;
}
.ptah-volume-card h3 {
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.ptah-volume-card p { font-size: 0.88rem; margin-bottom: 0; }

/* ---------- WooCommerce: shop grid ---------- */
.ptah-shop-wrap { padding: 60px 32px 100px; max-width: var(--container); margin: 0 auto; }
ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  list-style: none; margin: 0; padding: 0;
}
@media (max-width: 900px) { ul.products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { ul.products { grid-template-columns: 1fr; } }

ul.products li.product {
  background: var(--ptah-black-2);
  border: 1px solid var(--ptah-line);
  padding: 26px 22px 30px;
  text-align: center;
  transition: border-color .3s ease, transform .3s ease;
}
ul.products li.product:hover {
  border-color: var(--ptah-gold);
  transform: translateY(-4px);
}
ul.products li.product img {
  margin: 0 auto 20px;
  max-height: 320px; width: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: var(--ptah-ivory);
  margin: 10px 0 6px;
}
ul.products li.product .price {
  font-family: var(--font-body);
  color: var(--ptah-gold);
  font-size: 0.95rem;
}
ul.products li.product .price del { color: var(--ptah-ivory-dim); }
ul.products li.product .button {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 12px 22px;
  border: 1px solid var(--ptah-gold-dim);
  color: var(--ptah-gold-bright);
  background: transparent;
  border-radius: var(--radius);
}
ul.products li.product .button:hover {
  background: var(--ptah-gold);
  color: var(--ptah-black);
  border-color: var(--ptah-gold);
}
.woocommerce-result-count,
.woocommerce-ordering { color: var(--ptah-ivory-dim); }
.woocommerce-ordering select {
  background: var(--ptah-black-2); color: var(--ptah-ivory);
  border: 1px solid var(--ptah-line); padding: 8px 12px;
}

/* ---------- WooCommerce: single product ---------- */
/* Float layout: cover left, summary wrapping around it, tabs full width below.
   This was a 2-column grid, which forced the summary into a narrow column and
   dropped .woocommerce-tabs into the first cell of row two instead of letting
   it span. Both symptoms, one cause. */
.woocommerce div.product { display: block; }
.woocommerce div.product::after { content: ""; display: table; clear: both; }

/* #wpgs-gallery covers the Product Gallery Slider plugin; the first selector
   is core WooCommerce. Harmless once the plugin is removed. */
.woocommerce div.product > .woocommerce-product-gallery,
.woocommerce div.product > #wpgs-gallery {
  float: left;
  width: 300px;
  /* Gallery plugins set width inline from JS, which a plain rule can't beat. */
  max-width: 300px !important;
  min-width: 0 !important;
  margin: 6px 48px 30px 0;
  overflow: visible !important;
}
.woocommerce div.product > .woocommerce-product-gallery img,
.woocommerce div.product > #wpgs-gallery img {
  width: 100%;
  height: auto;
}

/* Plain block, no BFC, so its lines flow around the float. Do not add
   overflow, flex or grid here — any of those turn it back into a column. */
.woocommerce div.product > .summary {
  display: block;
  width: auto;
  float: none;
  margin: 0;
}

/* Tabs span the full width beneath both. */
.woocommerce div.product > .woocommerce-tabs {
  clear: both;
  width: 100%;
}

/* dont show desc title */
.woocommerce-Tabs-panel--description > h2:first-child { display: none; }

@media (max-width: 800px) {
  .woocommerce div.product > .woocommerce-product-gallery,
  .woocommerce div.product > #wpgs-gallery {
    float: none;
    width: 100%;
    margin: 0 auto 36px;
  }
}

.woocommerce div.product .woocommerce-product-gallery img {
  border: 1px solid var(--ptah-line);
}
.woocommerce div.product .summary h1.product_title {
  font-size: 2rem; margin-bottom: 10px;
}
.woocommerce div.product .summary .price {
  font-size: 1.3rem; color: var(--ptah-gold);
  font-family: var(--font-display);
}
.woocommerce div.product .summary .woocommerce-product-details__short-description {
  color: var(--ptah-ivory-dim);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin: 20px 0;
}
/* Space between the quantity input and the Acquire button. Hidden inputs and
   inline <script> tags inside this form are display:none, so they never
   become flex items. */
.woocommerce div.product form.cart {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.woocommerce div.product form.cart .quantity { margin: 0; }

.woocommerce div.product form.cart .button {
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 16px 36px;
  background: var(--ptah-gold); color: var(--ptah-black);
  border: none; border-radius: var(--radius); cursor: pointer;
}
.woocommerce div.product form.cart .button:hover { background: var(--ptah-gold-bright); }
.woocommerce div.product .quantity input {
  background: var(--ptah-black-2); border: 1px solid var(--ptah-line);
  color: var(--ptah-ivory); padding: 12px; width: 60px;
}

.woocommerce-tabs ul.tabs {
  list-style: none; display: flex; gap: 30px; border-bottom: 1px solid var(--ptah-line);
  padding: 0 0 14px; margin: 60px 0 30px;
}
.woocommerce-tabs ul.tabs li a {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem;
  color: var(--ptah-ivory-dim);
}
.woocommerce-tabs ul.tabs li.active a { color: var(--ptah-gold-bright); }
.woocommerce-tabs ul.tabs li a { cursor: pointer; }

/* Tab panels. WooCommerce's own stylesheet is disabled via the
   woocommerce_enqueue_styles filter in functions.php, so anything not styled
   here renders as raw browser default. */
.woocommerce-tabs .panel {
  color: var(--ptah-ivory-dim);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.85;
  padding-bottom: 40px;
}
.woocommerce-tabs .panel p { margin-bottom: 1.2em; }
.woocommerce-tabs .panel h2,
.woocommerce-tabs .panel h3 { color: var(--ptah-ivory); margin-top: 1.6em; }
.woocommerce-tabs .panel > h2:first-child { margin-top: 0; }


/* Category links under the buy button. */
.product_meta {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--ptah-line);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--ptah-ivory-dim);
  clear: left;
}
.product_meta a { color: var(--ptah-gold); }

/* ---------- Reviews ---------- */
.woocommerce-Reviews-title { font-size: 1.4rem; margin-bottom: 20px; }
.woocommerce-noreviews { color: var(--ptah-ivory-dim); }
.woocommerce-Reviews .comment-reply-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ptah-ivory);
  margin: 30px 0 18px;
}
.woocommerce-Reviews .comment-form label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ptah-ivory-dim);
  margin-bottom: 8px;
}
.woocommerce-Reviews .comment-form input[type="text"],
.woocommerce-Reviews .comment-form input[type="email"],
.woocommerce-Reviews .comment-form textarea,
.woocommerce-Reviews .comment-form select {
  width: 100%;
  max-width: 620px;
  background: var(--ptah-black-2);
  border: 1px solid var(--ptah-line);
  color: var(--ptah-ivory);
  font-family: var(--font-body);
  padding: 12px;
  border-radius: var(--radius);
}
.woocommerce-Reviews .comment-form p { margin-bottom: 18px; }

/* Star rating selector — these are <a> elements, unstyled without WC's CSS. */
.woocommerce-Reviews .stars { margin: 0 0 18px; }
.woocommerce-Reviews .stars a {
  display: inline-block;
  margin-right: 6px;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  color: var(--ptah-gold-dim);
}
.woocommerce-Reviews .stars a:hover { color: var(--ptah-gold-bright); }

.woocommerce-Reviews .form-submit input[type="submit"] {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 32px;
  background: transparent;
  border: 1px solid var(--ptah-gold);
  color: var(--ptah-gold-bright);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .3s ease;
}
.woocommerce-Reviews .form-submit input[type="submit"]:hover {
  background: var(--ptah-gold);
  color: var(--ptah-black);
}

/* ---------- Cart / checkout ---------- */
.woocommerce table.shop_table {
  border: 1px solid var(--ptah-line); border-collapse: collapse; width: 100%;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  border-bottom: 1px solid var(--ptah-line);
  padding: 16px; color: var(--ptah-ivory-dim);
}
.woocommerce #payment, .woocommerce-checkout-review-order {
  background: var(--ptah-black-2); border: 1px solid var(--ptah-line); padding: 30px;
}
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="tel"],
.woocommerce input[type="password"],
.woocommerce select,
.woocommerce textarea {
  background: var(--ptah-black-2);
  border: 1px solid var(--ptah-line);
  color: var(--ptah-ivory);
  padding: 12px 14px;
  border-radius: var(--radius);
}
.woocommerce #place_order,
.woocommerce a.button, .woocommerce button.button {
  background: var(--ptah-gold); color: var(--ptah-black);
  border: none; padding: 15px 30px;
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.8rem;
  border-radius: var(--radius);
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce #place_order:hover {
  background: var(--ptah-gold-bright);
}
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  background: var(--ptah-black-2) !important;
  border-top-color: var(--ptah-gold) !important;
  color: var(--ptah-ivory) !important;
}

/* ---------- Footer ---------- */
.ptah-footer {
  border-top: 1px solid var(--ptah-line);
  padding: 70px 32px 40px;
  text-align: center;
}
.ptah-footer-mark { height: 36px; width: auto; margin: 0 auto 20px; opacity: 0.45; }
.ptah-footer-menu {
  list-style: none; display: flex; justify-content: center; gap: 28px;
  margin: 0 0 30px; padding: 0; flex-wrap: wrap;
}
.ptah-footer-menu a { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ptah-ivory-dim); }
.ptah-footer-widgets {
  display: flex; justify-content: center; gap: 60px; margin-bottom: 30px; flex-wrap: wrap;
}
.ptah-footer-widget-title {
  font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ptah-gold-dim);
}
.ptah-footer-copy { font-size: 0.75rem; color: var(--ptah-ivory-dim); letter-spacing: 0.05em; }

/* ---------- Generic page/post content ---------- */
.ptah-content { max-width: 780px; margin: 0 auto; padding: 80px 32px; }
.ptah-content h1 { text-align: center; margin-bottom: 40px; }
.ptah-content p { font-size: 1.02rem; }

/* ==========================================================================
   SINGLE PRODUCT — Volume Page
   ========================================================================== */

.ptah-product-header {
  text-align: center;
  padding: 90px 32px 60px;
  overflow: hidden;
}
.ptah-product-header .eyebrow { display: block; margin-bottom: 14px; }
.ptah-product-title {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  letter-spacing: 0.18em;
  margin-bottom: 16px;
}
.ptah-product-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ptah-ivory-dim);
  margin: 0 auto 30px;
  max-width: 600px;
}

/* Two-column layout */
/* Float layout so the buy column wraps around the cover, matching the
   category pages. A grid here forced the text into a rigid narrow column. */
.ptah-product-body {
  display: block;
  padding-top: 70px;
  padding-bottom: 80px;
}
.ptah-product-body::after { content: ""; display: table; clear: both; }

.ptah-product-cover {
  float: left;
  width: 300px;
  margin: 6px 48px 30px 0;
}

/* Plain block, no BFC, so its lines flow around the float. Do not add
   overflow, flex or grid here — any of those turn it back into a column. */
.ptah-product-buy { display: block; }

@media (max-width: 860px) {
  .ptah-product-cover {
    float: none;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 40px;
  }
}

/* Cover image */
.ptah-cover-img {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.75),
    0 0 0 1px var(--ptah-line);
}
.ptah-cover-gallery {
  display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap;
}
.ptah-gallery-thumb {
  width: 72px; height: 72px; object-fit: cover;
  border: 1px solid var(--ptah-line); cursor: pointer;
  opacity: 0.7; transition: opacity .2s;
}
.ptah-gallery-thumb:hover { opacity: 1; }

/* Buy column */
.ptah-edition-badge {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ptah-blue);
  border: 1px solid rgba(63,169,255,0.35);
  padding: 5px 12px;
  margin-bottom: 18px;
}
.ptah-price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--ptah-gold);
  margin-bottom: 22px;
}
.ptah-price del { color: var(--ptah-ivory-dim); font-size: 1.1rem; }
.ptah-product-intro {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--ptah-ivory-dim);
  margin-bottom: 28px;
}
.ptah-add-to-cart { margin-bottom: 28px; }

/* WooCommerce add-to-cart button override specifically on single product */
.ptah-product .single_add_to_cart_button {
  display: inline-block;
  font-family: var(--font-body) !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  padding: 17px 40px !important;
  margin: 20px !important;
  background: var(--ptah-gold) !important;
  color: var(--ptah-black) !important;
  border: none !important;
  border-radius: var(--radius) !important;
  cursor: pointer !important;
  transition: background .25s ease, box-shadow .25s ease !important;
}
.ptah-product .single_add_to_cart_button:hover {
  background: var(--ptah-gold-bright) !important;
  box-shadow: 0 0 28px rgba(201,162,75,0.4) !important;
}

/* Trust list */
.ptah-trust {
  list-style: none; padding: 0; margin: 0;
  border-top: 1px solid var(--ptah-line);
  padding-top: 22px;
  /* A block box with a border overlaps a float rather than wrapping around
     it, so this rule would otherwise draw its border across the cover. */
  clear: left;
}
.ptah-trust li {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ptah-ivory-dim);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  padding-left: 16px;
  position: relative;
}
.ptah-trust li::before {
  content: "·";
  position: absolute; left: 0;
  color: var(--ptah-gold-dim);
}

/* Long description */
.ptah-product-long {
  padding-bottom: 80px;
}
.ptah-long-body {
  max-width: 720px; margin: 0 auto;
  font-family: var(--font-serif);
  font-size: 1.06rem;
  line-height: 1.9;
}
.ptah-long-body .eyebrow { display: block; margin-bottom: 22px; }
.ptah-long-body p { color: var(--ptah-ivory-dim); }
.ptah-long-body h2, .ptah-long-body h3 { margin-top: 2em; }

/* Codex nav — other volumes */
.ptah-codex-nav {
  padding-bottom: 100px;
}

/* ==========================================================================
   HOME PAGE — front-page.php
   ========================================================================== */

.ptah-home-hero {
  padding: 30px 32px 30px;
  text-align: center;
}

.ptah-home-hero .ptah-divider {
  margin-bottom: 0px;
}

.ptah-home-pitch {
  padding-top: 0px;
}

.ptah-home-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
}

/* The global `img { display: block }` rule (top of this file) makes images
   ignore text-align:center, so every hero image must be centred explicitly.
   This targets BOTH output paths: the theme fallback <img class="ptah-home-mark">
   AND the WP custom-logo markup <a class="custom-logo-link"><img class="custom-logo">. */
.ptah-home-logo-wrap .ptah-home-mark,
.ptah-home-logo-wrap .custom-logo,
.ptah-home-logo-wrap img {
  width: 400px;
  max-width: 90vw;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.88;
}

.ptah-home-logo-wrap .custom-logo-link {
  display: block;
  width: 200px;
  max-width: 90vw;
  margin-left: auto;
  margin-right: auto;
}

.ptah-home-wordmark {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5rem);
  letter-spacing: 0.28em;
  margin: 0;
  line-height: 1;
}

.ptah-home-wordmark span {
  display: block;
  font-size: 0.38em;
  letter-spacing: 0.42em;
  color: var(--ptah-gold);
  margin-top: 8px;
}

/* The hero logo carries the page's <h1>; zero the default heading margin so
   wrapping the image in a heading changes nothing about hero spacing. */
.ptah-home-title {
  margin: 0;
  line-height: 0;
}

/* Styled to match the <h3> this replaced, so the hero looks identical while the
   markup stays correct — a tagline is descriptive text, not a section heading. */
.ptah-home-lede {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ptah-ivory);
  margin: 0 0 0.5em;
}

/* Pitch section */
.ptah-home-pitch-inner {
  display: block;
  text-align: center;
}

.ptah-home-pitch-emblem { display: none; }

.ptah-home-pitch-text h2 {
  margin-bottom: 24px;
}

.ptah-home-pitch-text p {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Block-editor output inside the editable pitch section ----
   The pitch body now comes from the WP page editor, so style the blocks
   Gutenberg emits to match the hand-written markup they replaced. */
.ptah-home-pitch-text > *:first-child { margin-top: 0; }
.ptah-home-pitch-text .eyebrow { display: block; margin-bottom: 12px; }
.ptah-home-pitch-text ul:not(.ptah-carousel-track),.ptah-home-pitch-text ol {
  max-width: 640px;
  margin: 0 auto 1.2em;
  text-align: left;
  color: var(--ptah-ivory-dim);
}
.ptah-home-pitch-text figure,
.ptah-home-pitch-text .wp-block-image { margin: 0 auto 1.2em; }
.ptah-home-pitch-text .wp-block-group,
.ptah-home-pitch-text .wp-block-columns { background: transparent; }
.ptah-home-pitch-text .wp-block-buttons { justify-content: center; }
.ptah-home-pitch-text .wp-block-button__link {
  background: transparent;
  border: 1px solid var(--ptah-gold);
  color: var(--ptah-gold-bright);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: var(--radius);
  padding: 15px 34px;
}
.ptah-home-pitch-text .wp-block-button__link:hover {
  background: var(--ptah-gold);
  color: var(--ptah-black);
  box-shadow: 0 0 24px rgba(201,162,75,0.35);
}

/* Ghost variant for Button blocks. WordPress puts a block's Additional CSS
   class on the outer .wp-block-button wrapper, not on the <a>, so the class
   must be matched there and the link targeted as a descendant. */
.ptah-home-pitch-text .wp-block-button.ptah-btn-ghost .wp-block-button__link {
  border-color: var(--ptah-line);
  color: var(--ptah-ivory-dim);
}
.ptah-home-pitch-text .wp-block-button.ptah-btn-ghost .wp-block-button__link:hover {
  background: transparent;
  border-color: var(--ptah-gold);
  color: var(--ptah-gold-bright);
  box-shadow: none;
}

.ptah-home-cta-row {
  display: flex;
  justify-content: center;   /* ← add this line */
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.ptah-btn-ghost {
  border-color: var(--ptah-line);
  color: var(--ptah-ivory-dim);
}
.ptah-btn-ghost:hover {
  border-color: var(--ptah-gold);
  color: var(--ptah-gold-bright);
  background: transparent;
}

.ptah-home-emblem-img {
  display: none;
}

/* ==========================================================================
   AUTHOR GRID — used on home page & archive-product.php
   ========================================================================== */

.ptah-author-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 36px;
  max-width: var(--container);
  margin: 0 auto;
}

.ptah-author-grid--large-ORIGINAL-I-CHANGED {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 50px;
}
.ptah-author-grid--large {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 50px;
}
.ptah-author-card--large .ptah-author-card-img {
  height: 420px;
  object-position: center 15%;
}
.ptah-author-card-ORIGINAL-I-CHANGED {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ptah-line);
  background: var(--ptah-black-2);
  overflow: hidden;
  border-radius: var(--radius);
  transition: border-color .3s ease, transform .3s ease;
}
.ptah-author-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ptah-line);
  background: var(--ptah-black-2);
  overflow: hidden;
  border-radius: var(--radius);
  transition: border-color .3s ease, transform .3s ease;
}

.ptah-author-card:hover {
  border-color: var(--ptah-gold);
  transform: translateY(-6px);
}

.ptah-author-card-img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: top center;
}

.ptah-author-card--large .ptah-author-card-img { height: 340px; }

.ptah-author-card-placeholder {
  width: 100%;
  height: 260px;
  background: var(--ptah-black-3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ptah-author-card-placeholder--large { height: 340px; }
.ptah-author-card-placeholder img { display: none; }

.ptah-author-card-body {
  padding: 28px 26px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ptah-author-card-body h2,
.ptah-author-card-body h3 { margin-bottom: 10px; }

.ptah-author-card-body p  {
  font-size: 0.92rem;
  flex: 1;
}

.ptah-author-card-cta {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ptah-gold);
  margin-top: 18px;
  display: block;
}

/* Archive sub-heading */
.ptah-archive-sub {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ptah-ivory-dim);
  margin: 0 auto;
  max-width: 500px;
  text-align: center;
}

/* ==========================================================================
   CATEGORY PAGES — taxonomy-product_cat.php
   ========================================================================== */

.ptah-cat-wrap { min-height: 60vh; }

.ptah-breadcrumb {
  padding: 20px 32px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ptah-ivory-dim);
}
.ptah-breadcrumb a { color: var(--ptah-gold-dim); }
.ptah-breadcrumb a:hover { color: var(--ptah-gold-bright); }
.ptah-breadcrumb-sep { margin: 0 8px; color: var(--ptah-line); }

/* Category hero */
.ptah-cat-header {
  border-bottom: 1px solid var(--ptah-line);
  padding: 70px 0 60px;
}

.ptah-cat-header-inner { display: block; }
.ptah-cat-header-inner::after { content: ""; display: table; clear: both; }

.ptah-cat-portrait {
  float: left;
  width: 300px;
  margin: 6px 42px 26px 0;
}

.ptah-cat-header-text .ptah-divider { clear: both; }

@media (max-width: 800px) {
  .ptah-cat-header-inner { grid-template-columns: 1fr; }
  .ptah-cat-portrait {
    float: none;
    width: 100%;
    max-width: 300px;
    margin: 0 0 28px;
  }
  .ptah-cat-desc { text-align: left; max-width: none; }
}

.ptah-cat-portrait img {
  width: 100%;
  max-width: 300px;
  border: 1px solid var(--ptah-line);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.ptah-cat-header-text h1 { 
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	margin-bottom: 4px; 
}

.ptah-cat-desc {
  color: var(--ptah-ivory-dim);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 1000px;
  margin-bottom: 30px;
  text-align: justify;
  hyphens: auto;
}
/* Without these, multi-paragraph author/category descriptions run together. */
.ptah-cat-desc p { margin-bottom: 1.1em; }
.ptah-cat-desc p:last-child { margin-bottom: 0; }

/* Sub-category grid (series / editions) */
.ptah-subcat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 32px;
}

.ptah-subcat-card {
  border: 1px solid var(--ptah-line);
  background: var(--ptah-black-2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .3s ease, transform .3s ease;
  display: flex;
  flex-direction: column;
}
.ptah-subcat-card:hover {
  border-color: var(--ptah-gold);
  transform: translateY(-5px);
}

.ptah-subcat-card-img-wrap {
  height: auto;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--ptah-black-3);
}
.ptah-subcat-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ptah-subcat-card-img-wrap--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ptah-subcat-card-img-wrap--placeholder img {
  display: none;
}

.ptah-subcat-card-body {
  padding: 22px 20px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ptah-subcat-card-body h3 { margin-bottom: 8px; font-size: 1.1rem; }
.ptah-subcat-card-body p  { font-size: 0.88rem; flex: 1; }

.ptah-subcat-count {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ptah-gold-dim);
  margin-top: 14px;
}

/* ==========================================================================
   AUTHOR PAGE — page-author.php
   ========================================================================== */

.ptah-author-page { min-height: 60vh; }

.ptah-author-page-header {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 70px;
  align-items: start;
  padding-top: 70px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--ptah-line);
}

@media (max-width: 860px) {
  .ptah-author-page-header { grid-template-columns: 1fr; }
}

.ptah-author-portrait-img {
  width: 100%;
  max-width: 320px;
  border: 1px solid var(--ptah-line);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.ptah-author-portrait-placeholder {
  width: 100%;
  max-width: 320px;
  height: 380px;
  background: var(--ptah-black-2);
  border: 1px solid var(--ptah-line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ptah-author-portrait-placeholder img { display: none; }

.ptah-author-page-bio h1 { margin-bottom: 16px; }

.ptah-author-bio-content {
  color: var(--ptah-ivory-dim);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 30px;
  max-width: 600px;
}

/* ==========================================================================
   Block editor content — keep theme background, don't let WP go white
   ========================================================================== */
.ptah-content .wp-block-image {
  text-align: center;
}
.ptah-content .wp-block-image img {
  display: block;
  margin: 0 auto;
}
.ptah-content figure,
.ptah-content .wp-block-group,
.ptah-content .wp-block-cover,
.ptah-content .wp-block-columns {
  background: transparent;
}
.ptah-content h1,
.ptah-content h2,
.ptah-content h3 {
  text-align: center;
}
.ptah-content p {
  text-align: center;
  color: var(--ptah-ivory-dim);
}
.ptah-content .wp-block-buttons {
  justify-content: center;
}
.ptah-content .wp-block-button__link {
  background: transparent;
  border: 1px solid var(--ptah-gold);
  color: var(--ptah-gold-bright);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 2px;
  padding: 15px 34px;
}
.ptah-content .wp-block-button__link:hover {
  background: var(--ptah-gold);
  color: var(--ptah-black);
}

/* ==========================================================================
   PRODUCT CAROUSEL — [ptah_product_carousel]
   Single row, scroll-snap. Three cards at a time on desktop, two on tablet,
   one and a bit on phones (the peek hints that the row scrolls).

   Cover width is capped by --ptah-cover-w so the card stays wider than the
   image and titles can run past its edges. Falls back to 220px if that
   variable isn't declared in :root.
   ========================================================================== */

.ptah-carousel {
  margin: 40px 0;
  text-align: center;
}

.ptah-carousel-title { margin-bottom: 36px; }

/* Arrows sit outside the track, vertically centred on the covers. */

.ptah-carousel-viewport {
  position: relative;
  display: block;
}

.ptah-carousel-track {
  list-style: none;
  margin: 0;
  padding: 4px 2px 12px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * 32px) / 3);
  gap: 32px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  flex: 1 1 auto;
  min-width: 0;

  /* Hide the scrollbar; the arrows and swipe are the affordance. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ptah-carousel-track::-webkit-scrollbar { display: none; }

/* Keyboard focus ring — the track is tabbable so arrow keys can scroll it. */
.ptah-carousel-track:focus-visible {
  outline: 1px solid var(--ptah-gold);
  outline-offset: 4px;
}

.ptah-carousel-item {
  scroll-snap-align: start;
  min-width: 0;
}

.ptah-carousel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 18px 0 0;
  border: 1px solid var(--ptah-line);
  background: var(--ptah-black-2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .3s ease, transform .3s ease;
}
.ptah-carousel-card:hover {
  border-color: var(--ptah-gold);
  transform: translateY(-4px);
}

/* Full width so the whole card stays clickable — align-items:center would
   otherwise shrink this to the width of the image alone. */
.ptah-carousel-card-link {
  display: block;
  width: 100%;
  color: inherit;
}

/* 2:3 keeps book covers uniform without cropping them. */
.ptah-carousel-card-img {
  width: 100%;
  max-width: var(--ptah-cover-w, 220px);
  margin: 0 auto;
  aspect-ratio: 2 / 3;
  background: var(--ptah-black-3);
  overflow: hidden;
}
.ptah-carousel-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ptah-carousel-card-placeholder {
  object-fit: contain;
  opacity: 0.25;
  padding: 20%;
}

.ptah-carousel-card-title {
  font-size: .9rem;
  line-height: 1.35;
  margin: 20px;
  color: var(--ptah-ivory);
}

.ptah-carousel-card-price {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ptah-gold);
  margin: 10px 14px 0;
}
.ptah-carousel-card-price del { opacity: 0.5; margin-right: 6px; }
.ptah-carousel-card-price ins { text-decoration: none; }

/* Push the button to the bottom so cards of differing title lengths align. */
.ptah-carousel-card-cart {
  margin: auto 14px 20px;
  padding-top: 16px;
}
.ptah-carousel-card-cart .button,
.ptah-carousel-card-cart a.button {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 11px 22px;
  border: 1px solid var(--ptah-gold);
  color: var(--ptah-gold-bright);
  background: transparent;
  border-radius: var(--radius);
  transition: all .3s ease;
  cursor: pointer;
}
.ptah-carousel-card-cart .button:hover,
.ptah-carousel-card-cart a.button:hover {
  background: var(--ptah-gold);
  color: var(--ptah-black);
}
.ptah-carousel-card-cart .added_to_cart {
  display: block;
  margin-top: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ptah-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  line-height: 1;
  font-size: 1.6rem;
  font-family: var(--font-display);
  color: var(--ptah-gold-bright);
  background: transparent;
  border: 1px solid var(--ptah-line);
  border-radius: 50%;
  cursor: pointer;
  transition: all .3s ease;
}

.ptah-carousel-prev { left: -45px; }
.ptah-carousel-next { right: -45px; }
.ptah-carousel-arrow:hover:not(:disabled) {
  border-color: var(--ptah-gold);
  background: var(--ptah-gold);
  color: var(--ptah-black);
}
.ptah-carousel-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

@media (max-width: 1000px) {
  .ptah-carousel-track { grid-auto-columns: calc((100% - 24px) / 2); gap: 24px; }
}

@media (max-width: 600px) {
  .ptah-carousel-track { grid-auto-columns: 100%; gap: 18px; }
}

/* Respect reduced-motion preferences for the snap animation. */
@media (prefers-reduced-motion: reduce) {
  .ptah-carousel-track { scroll-behavior: auto; }
  .ptah-carousel-card:hover { transform: none; }
}
