/* ===================================================================
   TAZRIRT information pages (About, Contact, policies, FAQ, Trade,
   Wholesale). Loaded only on pages that carry the custom field
   _tz_pg_kind (see novamira-sandbox/tazrirt-pages.php). Root: .tz-pg
   Same colours and fonts as the Home and Custom Rugs pages.
   The page text is written in the block editor; the classes below can
   be put on blocks (Advanced > Additional CSS class):
     tz-pg-lead    opening paragraph
     tz-pg-glance  summary box (a Group with a list)
     tz-pg-cards   a Group of Groups (tz-pg-card) shown as cards
     tz-pg-steps   a numbered list shown as steps
     tz-pg-note    a highlighted note (paragraph or Group)
     tz-pg-split   a Group with a picture and a Group of text, side by side
                   (add tz-pg-split--rev to put the picture on the right)
     tz-pg-wide    lets a block use the full width of the page
   =================================================================== */

body.tz-info-view { overflow-x: clip; }   /* lets the "On this page" list stay in view (position: sticky) */

.tz-pg {
  --cream: #FAF7F2; --sand: #EFE3D3; --forest: #303B32; --blush: #F3E2D8; --terracotta: #98452F;
  --dark: #241F1A; --ink: #3B332B; --muted: #5A5045; --gold: #D9A56A; --line: #E4D8C8;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;
  width: 100%; flex: 1 1 100%; max-width: 100%;
  background: var(--cream); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.7;
}
.tz-pg *, .tz-pg *::before, .tz-pg *::after { box-sizing: border-box; }

/* ---------- Header ---------- */
.tz-pg .tz-pg__hero { padding: 64px 24px 44px; text-align: center; background: linear-gradient(180deg, #F3E8D9 0%, var(--cream) 100%); border-bottom: 1px solid var(--line); }
.tz-pg .tz-pg__hero-in { max-width: 860px; margin: 0 auto; }
.tz-pg .tz-pg__eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: 0.22em; text-transform: uppercase; color: var(--terracotta); }
.tz-pg .tz-pg__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(38px, 5vw, 58px); line-height: 1.08; letter-spacing: -0.005em; color: var(--dark); }
.tz-pg .tz-pg__updated { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Body ---------- */
/* (Astra's page-builder layout resets max-width on this level: hence the long selector) */
body.tz-info-view .entry-content .tz-pg > .tz-pg__body { max-width: 1128px; margin: 0 auto; padding: 52px 24px 92px; }
.tz-pg .tz-pg__body--toc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; align-items: start; }
.tz-pg .tz-pg__content { min-width: 0; }
.tz-pg .tz-pg__content > * { max-width: 760px; }
.tz-pg--contact .tz-pg__content > *, .tz-pg--service .tz-pg__content > * { max-width: none; }
/* contact, services and a FAQ without a list: one centred column */
body.tz-info-view .entry-content .tz-pg--contact > .tz-pg__body, body.tz-info-view .entry-content .tz-pg--service > .tz-pg__body { max-width: 848px; }
.tz-pg .tz-pg__content > .tz-pg-wide, .tz-pg .tz-pg__content > .tz-pg-split, .tz-pg .tz-pg__content > .tz-pg-cards,
.tz-pg .tz-pg__content > .tz-pg-products, .tz-pg .tz-pg__content > .tz-pg-methods, .tz-pg .tz-pg__content > .tz-pg-help { max-width: none; }

/* "On this page" */
.tz-pg .tz-pg__toc { position: sticky; top: 28px; padding: 4px 0 4px 18px; border-left: 1px solid var(--line); font-size: 15px; line-height: 1.45; }
.tz-pg .tz-pg__toc-title { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.tz-pg .tz-pg__toc ol { list-style: none; margin: 0; padding: 0; }
.tz-pg .tz-pg__toc li { margin: 0 0 9px; padding: 0; }
.tz-pg .tz-pg__toc a, .tz-pg .tz-pg__toc a:hover, .tz-pg .tz-pg__toc a:focus { color: var(--ink); text-decoration: none; }
.tz-pg .tz-pg__toc a:hover { color: var(--terracotta); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Text ---------- */
.tz-pg .tz-pg__content h2 { margin: 56px 0 14px; font-family: var(--font-display); font-weight: 700; font-size: clamp(27px, 3vw, 34px); line-height: 1.18; color: var(--dark); scroll-margin-top: 28px; }
.tz-pg .tz-pg__content h3 { margin: 30px 0 8px; font-family: var(--font-display); font-weight: 700; font-size: 23px; line-height: 1.25; color: var(--dark); }
.tz-pg .tz-pg__content > :first-child, .tz-pg .tz-pg__content > :first-child > :first-child { margin-top: 0; }
.tz-pg .tz-pg__content p { margin: 0 0 16px; }
.tz-pg .tz-pg__content ul, .tz-pg .tz-pg__content ol { margin: 0 0 18px; padding: 0 0 0 22px; }
.tz-pg .tz-pg__content li { margin: 0 0 7px; }
.tz-pg .tz-pg__content a { color: var(--terracotta); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tz-pg .tz-pg__content a:hover { color: #7C3521; }
.tz-pg .tz-pg__content strong { color: var(--dark); }
.tz-pg .tz-pg__content .tz-pg-lead { font-size: 20px; line-height: 1.62; color: var(--dark); margin-bottom: 24px; }

/* summary box */
.tz-pg .tz-pg-glance { margin: 28px 0 36px; padding: 26px 28px 14px; background: #FFFFFF; border: 1px solid var(--line); border-left: 3px solid var(--terracotta); border-radius: 10px; }
.tz-pg .tz-pg-glance h2, .tz-pg .tz-pg-glance h3 { margin: 0 0 12px; font-family: var(--font-body); font-weight: 600; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--terracotta); }
.tz-pg .tz-pg-glance ul { margin-bottom: 12px; }

/* note */
.tz-pg .tz-pg-note { margin: 22px 0; padding: 18px 22px; background: var(--blush); border-radius: 10px; color: var(--dark); }
.tz-pg .tz-pg-note > :last-child, .tz-pg p.tz-pg-note { margin-bottom: 22px; }
.tz-pg .tz-pg-note p:last-child { margin-bottom: 0; }
.tz-pg div.tz-pg-note { margin: 48px 0 8px; padding: 32px 34px; border-radius: 14px; }
.tz-pg .tz-pg__content div.tz-pg-note > :first-child { margin-top: 0; }

/* cards */
.tz-pg .tz-pg-cards, .tz-pg .tz-pg-cards > .wp-block-group__inner-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 26px; margin-bottom: 26px; }
.tz-pg .tz-pg-cards:has(> .wp-block-group__inner-container) { display: block; }
.tz-pg .tz-pg-card { margin: 0; padding: 24px 24px 10px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; }
.tz-pg .tz-pg-card h3 { margin-top: 0; }

/* steps */
.tz-pg .tz-pg__content ol.tz-pg-steps { list-style: none; counter-reset: tzstep; margin: 24px 0 28px; padding: 0; }
.tz-pg .tz-pg__content ol.tz-pg-steps > li { counter-increment: tzstep; position: relative; margin: 0 0 14px; padding: 18px 20px 18px 70px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; }
.tz-pg .tz-pg__content ol.tz-pg-steps > li::before { content: counter(tzstep); position: absolute; left: 18px; top: 16px; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1; color: var(--cream); background: var(--terracotta); }

/* tables */
.tz-pg .tz-pg-table, .tz-pg .wp-block-table { margin: 22px 0 26px; overflow-x: auto; -webkit-overflow-scrolling: touch; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; }
.tz-pg .tz-pg__content table { width: 100%; min-width: 460px; margin: 0; border: 0; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.tz-pg .tz-pg__content th, .tz-pg .tz-pg__content td { padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tz-pg .tz-pg__content tbody tr:last-child th, .tz-pg .tz-pg__content tbody tr:last-child td { border-bottom: 0; }
.tz-pg .tz-pg__content thead th { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); background: #F7F1E8; }
.tz-pg .tz-pg__content tbody th { font-weight: 600; color: var(--dark); }

/* questions */
.tz-pg .wp-block-details { margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.tz-pg .wp-block-details summary { position: relative; list-style: none; cursor: pointer; padding: 17px 40px 17px 0; font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.3; color: var(--dark); }
.tz-pg .wp-block-details summary::-webkit-details-marker { display: none; }
.tz-pg .wp-block-details summary::after { content: ''; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -8px; border-right: 1.5px solid var(--terracotta); border-bottom: 1.5px solid var(--terracotta); transform: rotate(45deg); transition: transform 200ms ease; }
.tz-pg .wp-block-details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.tz-pg .wp-block-details summary:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: 4px; }
.tz-pg .wp-block-details > :not(summary) { margin-left: 0; margin-right: 0; }
.tz-pg .wp-block-details > :last-child:not(summary) { margin-bottom: 20px; }

/* pictures */
.tz-pg .wp-block-image { margin: 30px 0; }
.tz-pg .wp-block-image img { display: block; width: 100%; height: auto; border-radius: 14px; }
.tz-pg .wp-block-image figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }

/* picture + text */
.tz-pg .tz-pg-split, .tz-pg .tz-pg-split > .wp-block-group__inner-container { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; margin-top: 56px; margin-bottom: 56px; }
.tz-pg .tz-pg-split:has(> .wp-block-group__inner-container) { display: block; }
.tz-pg .tz-pg-split .wp-block-image { margin: 0; }
.tz-pg .tz-pg-split .wp-block-image img { aspect-ratio: 5 / 4; object-fit: cover; }
.tz-pg .tz-pg-split--rev > .wp-block-image, .tz-pg .tz-pg-split--rev > .wp-block-group__inner-container > .wp-block-image { order: 2; }
.tz-pg .tz-pg-split h2 { margin-top: 0; }

/* buttons */
.tz-pg .tz-pg-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 26px; }
.tz-pg .tz-pg__content a.tz-pg-btn, .tz-pg .tz-pg__content .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 10px 26px; border-radius: 8px; border: 1px solid transparent;
  font-family: var(--font-body); font-size: 15.5px; font-weight: 600; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.tz-pg .tz-pg-btn svg { flex: none; width: 20px; height: 20px; }
.tz-pg .tz-pg__content .wp-block-button__link { background: var(--terracotta); color: var(--cream); }
.tz-pg .tz-pg__content .wp-block-button__link:hover { background: #7C3521; color: var(--cream); }
body.tz-info-view .tz-pg .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--dark); border: 1px solid rgba(36,31,26,0.45); }
body.tz-info-view .tz-pg .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--dark); border-color: var(--dark); color: var(--cream); }
.tz-pg .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 28px; }
.tz-pg .tz-pg__content a.tz-pg-btn--wa { background: var(--forest); color: var(--cream); }
.tz-pg .tz-pg__content a.tz-pg-btn--wa:hover { background: #222B24; color: var(--cream); }
.tz-pg .tz-pg__content a.tz-pg-btn--line { background: transparent; color: var(--dark); border-color: rgba(36,31,26,0.45); }
.tz-pg .tz-pg__content a.tz-pg-btn--line:hover { background: var(--dark); border-color: var(--dark); color: var(--cream); }
.tz-pg .tz-pg__content a.tz-pg-btn--light { background: var(--cream); color: var(--dark); }
.tz-pg .tz-pg__content a.tz-pg-btn--light:hover { background: #FFFFFF; color: var(--dark); }
.tz-pg .tz-pg__content a.tz-pg-btn--ghost { background: transparent; color: var(--cream); border-color: rgba(250,247,242,0.55); }
.tz-pg .tz-pg__content a.tz-pg-btn--ghost:hover { border-color: var(--cream); background: rgba(250,247,242,0.08); color: var(--cream); }
.tz-pg .tz-pg__content a.tz-pg-btn:focus-visible, .tz-pg .tz-pg__content .wp-block-button__link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* contact methods */
.tz-pg .tz-pg-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; margin: 28px 0; max-width: none !important; }
.tz-pg .tz-pg-method { display: flex; flex-direction: column; align-items: flex-start; padding: 26px 26px 28px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; }
.tz-pg .tz-pg-method__icon { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 50%; background: var(--blush); color: var(--terracotta); }
.tz-pg .tz-pg-method__icon svg { width: 22px; height: 22px; }
.tz-pg .tz-pg__content .tz-pg-method__title { margin: 0 0 6px; }
.tz-pg .tz-pg__content .tz-pg-method__text { margin: 0 0 10px; font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.tz-pg .tz-pg__content .tz-pg-method__value { margin: 0 0 18px; font-weight: 600; color: var(--dark); overflow-wrap: anywhere; }
.tz-pg .tz-pg-method .tz-pg-btn { margin-top: auto; }

/* forms */
.tz-pg .tz-pg-form { margin: 30px 0; max-width: none; padding: 30px 30px 26px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; }
.tz-pg .tz-pg__content .tz-pg-form__title { margin: 0 0 6px; font-size: 27px; }
.tz-pg .tz-pg__content .tz-pg-form__intro { margin: 0 0 16px; font-size: 15.5px; color: var(--muted); }
.tz-pg .tz-pg-form .wpforms-container {
  margin: 0; font-family: var(--font-body);
  --wpforms-field-border-radius: 8px; --wpforms-field-border-color: #CFC2B0; --wpforms-field-background-color: #FFFFFF; --wpforms-field-text-color: #241F1A;
  --wpforms-label-color: #241F1A; --wpforms-label-sublabel-color: #5A5045; --wpforms-label-error-color: #A32A1B;
  --wpforms-button-border-radius: 8px; --wpforms-button-background-color: #98452F; --wpforms-button-text-color: #FAF7F2;
  --wpforms-field-size-input-height: 48px; --wpforms-field-size-font-size: 16px; --wpforms-label-size-font-size: 15px; --wpforms-button-size-font-size: 16px; --wpforms-button-size-height: 52px;
}
.tz-pg .tz-pg-form .wpforms-container .wpforms-field { padding: 0 0 16px; }
.tz-pg .tz-pg-form .wpforms-container .wpforms-field-label { margin-bottom: 6px; font-weight: 600; }
.tz-pg .tz-pg-form .wpforms-container input[type=text], .tz-pg .tz-pg-form .wpforms-container input[type=email], .tz-pg .tz-pg-form .wpforms-container input[type=number],
.tz-pg .tz-pg-form .wpforms-container select, .tz-pg .tz-pg-form .wpforms-container textarea { width: 100%; max-width: 100%; font-family: var(--font-body); }
.tz-pg .tz-pg-form .wpforms-container textarea { min-height: 132px; }
.tz-pg .tz-pg-form .wpforms-container .wpforms-submit-container { padding: 4px 0 0; }
.tz-pg .tz-pg-form .wpforms-container button[type=submit] { min-width: 200px; padding: 0 28px; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; text-transform: none; cursor: pointer; }
.tz-pg .tz-pg-form .wpforms-confirmation-container-full, .tz-pg .tz-pg-form div[submit-success] > .wpforms-confirmation-container-full { margin: 0; padding: 18px 20px; background: #EEF3EC; border: 1px solid #C9D8C5; border-radius: 10px; color: var(--dark); }
.tz-pg .tz-pg-form .wpforms-confirmation-container-full p:last-child { margin-bottom: 0; }

/* rugs */
.tz-pg .tz-pg__content ul.tz-pg-products { list-style: none; margin: 28px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 380px)); gap: 24px; }
.tz-pg .tz-pg-product { margin: 0; display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tz-pg .tz-pg-product__media { display: block; aspect-ratio: 4 / 3; background: var(--sand); overflow: hidden; }
.tz-pg .tz-pg-product__media img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.tz-pg .tz-pg-product__body { display: flex; flex-direction: column; align-items: flex-start; flex: 1 1 auto; padding: 20px 22px 24px; }
.tz-pg .tz-pg__content .tz-pg-product__title { margin: 0 0 6px; font-size: 22px; }
.tz-pg .tz-pg__content .tz-pg-product__title a { color: var(--dark); text-decoration: none; }
.tz-pg .tz-pg__content .tz-pg-product__price { margin: 0 0 16px; color: var(--muted); }
.tz-pg .tz-pg-product .tz-pg-btn { margin-top: auto; }

/* closing band */
.tz-pg .tz-pg-help { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 64px 0 0; padding: 34px 38px; background: var(--forest); border-radius: 16px; color: var(--cream); }
.tz-pg .tz-pg__content .tz-pg-help__title { margin: 0 0 6px; font-size: 30px; color: var(--cream); }
.tz-pg .tz-pg__content .tz-pg-help__text { margin: 0; color: rgba(250,247,242,0.84); }
.tz-pg .tz-pg-help__actions { display: flex; flex-wrap: wrap; gap: 12px; flex: none; }

/* ---------- About: a little more air ---------- */
body.tz-info-view .entry-content .tz-pg--about > .tz-pg__body { max-width: 1160px; }

/* ---------- Small screens ---------- */
@media (max-width: 960px) {
  .tz-pg .tz-pg__body--toc { display: block; }
  .tz-pg .tz-pg__toc { position: static; margin: 0 0 34px; padding: 20px 22px 12px; border: 1px solid var(--line); border-radius: 12px; background: #FFFFFF; }
}
@media (max-width: 760px) {
  .tz-pg { font-size: 16.5px; }
  .tz-pg .tz-pg__hero { padding: 44px 20px 32px; }
  body.tz-info-view .entry-content .tz-pg > .tz-pg__body { padding: 36px 20px 68px; }
  .tz-pg .tz-pg__content .tz-pg-lead { font-size: 18.5px; }
  .tz-pg .tz-pg__content h2 { margin-top: 44px; }
  .tz-pg .tz-pg-split, .tz-pg .tz-pg-split > .wp-block-group__inner-container { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 40px; margin-bottom: 40px; }
  .tz-pg .tz-pg-split--rev > .wp-block-image, .tz-pg .tz-pg-split--rev > .wp-block-group__inner-container > .wp-block-image { order: 0; }
  .tz-pg .tz-pg-form { padding: 22px 18px 20px; }
  .tz-pg .tz-pg-glance { padding: 22px 20px 10px; }
  .tz-pg .tz-pg-help { flex-direction: column; align-items: flex-start; padding: 28px 22px; margin-top: 48px; }
  .tz-pg .tz-pg-help__actions, .tz-pg .tz-pg-actions, .tz-pg .wp-block-buttons { width: 100%; }
  .tz-pg .tz-pg-help__actions .tz-pg-btn, .tz-pg .tz-pg-actions .tz-pg-btn, .tz-pg .tz-pg-method .tz-pg-btn, .tz-pg .wp-block-buttons .wp-block-button, .tz-pg .wp-block-buttons .wp-block-button__link, .tz-pg .tz-pg-product .tz-pg-btn { width: 100%; }
  .tz-pg .tz-pg-form .wpforms-container button[type=submit] { width: 100%; }
  .tz-pg .tz-pg__content ol.tz-pg-steps > li { padding: 62px 18px 16px; }
  .tz-pg .tz-pg__content ol.tz-pg-steps > li::before { top: 16px; }
}
