/**
 * Site-wide polish — typography, header, footer, search, notices, mobile.
 * Spec: DM Sans headings, Inter body; H1 80 / H2 60 / H3 25; body/btn 16px; labels 18px.
 */

:root {
  --font-display: "DM Sans", sans-serif;
  --font-body: Inter, sans-serif;
  --type-h1: 80px;
  --type-h2: 60px;
  --type-h3: 25px;
  --type-body: 16px;
  --type-label: 18px;
  --type-btn: 16px;
  --header-h: 78px;
}

/* —— Typography —— */
body,
p,
li,
td,
th,
input,
select,
textarea {
  font-family: var(--font-body) !important;
  font-size: var(--type-body) !important;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6,
.product_title,
.woocommerce div.product .product_title {
  font-family: var(--font-display) !important;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

h1, .page-head h1 { font-size: clamp(42px, 6vw, var(--type-h1)) !important; }
h2 { font-size: clamp(32px, 4.5vw, var(--type-h2)) !important; }
h3, .product-card-premium h3 { font-size: var(--type-h3) !important; }

.eyebrow,
.field-label,
label:not(.consent),
.woocommerce form .form-row label,
.tradition-index {
  font-family: var(--font-body) !important;
  font-size: var(--type-label) !important;
  letter-spacing: 0.08em;
}

/* Card meta stays compact — do not force 18px label size */
.card-category,
.card-volume,
.card-art-caption,
.card-number {
  font-family: var(--font-body) !important;
  font-size: 8px !important;
  letter-spacing: 0.1em;
  line-height: 1.3 !important;
}

.btn,
button.btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.card-bottom .button,
.single_add_to_cart_button,
.checkout-button {
  font-family: var(--font-body) !important;
  font-size: var(--type-btn) !important;
  letter-spacing: 0.08em;
}

/* —— Header: always pinned top (no transparent→solid on scroll) —— */
html {
  scroll-padding-top: var(--header-h);
}

html.admin-bar {
  --header-offset: 32px;
}

@media screen and (max-width: 782px) {
  html.admin-bar {
    --header-offset: 46px;
  }
}

:root {
  --header-offset: 0px;
}

body {
  padding-top: 0;
}

/* Non-hero pages: clear the fixed header */
body:not(.home) #main,
body.woocommerce-page #main,
.site-main--commerce {
  padding-top: calc(var(--header-h) + 12px);
}

body.home #main {
  padding-top: 0;
}

#header,
header#header,
header#header.solid {
  position: fixed !important;
  top: var(--header-offset, 0px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
  height: auto !important;
  padding: 14px clamp(18px, 3vw, 40px) !important;
  margin: 0 !important;
  background: #100d0e !important;
  border-bottom: 1px solid #ffffff14 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  transition: none !important;
  overflow: visible !important;
}

#header .brand {
  position: relative;
  z-index: 2;
}

#header nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

#header nav .menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 1.6vw, 28px);
  margin: 0;
  padding: 8px 18px;
  list-style: none;
  border: 1px solid #ffffff14;
  border-radius: 999px;
  background: #ffffff08;
}

#header nav .menu a {
  font-family: var(--font-body) !important;
  font-size: 11px !important;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

#header nav .menu a:hover,
#header nav .menu a.active,
#header nav .menu .current-menu-item > a {
  color: var(--text) !important;
  border-bottom-color: var(--gold);
}

#header .header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#header .icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #ffffff18;
  border-radius: 50%;
  background: #ffffff08;
  box-shadow: none !important;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#header .icon-btn:hover {
  background: #c5a47322;
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: none !important;
}

#header .account-link,
#header #search-open {
  display: none !important;
}

#header .cart-link,
#header .cart-link--icon {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0 !important;
  border: 1px solid #ffffff18;
  border-radius: 50%;
  background: #ffffff08;
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#header .cart-link:hover,
#header .cart-link--icon:hover {
  border-color: var(--gold);
  background: #c5a47318;
  color: var(--gold);
}

#header .cart-link .cart-ico {
  display: block;
  width: 20px;
  height: 20px;
}

#header .cart-link span,
#header #bag-count {
  position: absolute;
  top: -2px;
  right: -2px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: #100d0e;
  color: var(--gold);
  font-size: 10px !important;
  line-height: 1;
  letter-spacing: 0;
}

@media (max-width: 980px) {
  #header .menu-toggle {
    display: grid !important;
  }

  #header nav {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    flex: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 18px 20px 24px !important;
    background: #100d0e !important;
    border-bottom: 1px solid #ffffff14 !important;
    z-index: 10001 !important;
  }

  #header nav.open {
    display: flex !important;
  }

  #header nav .menu {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  #header nav .menu li {
    border-bottom: 1px solid #ffffff10;
  }

  #header nav .menu a {
    display: block !important;
    padding: 14px 4px !important;
    font-size: 13px !important;
    letter-spacing: 0.12em;
    border-bottom: 0 !important;
  }
}

/* —— Search dialog —— */
#search-dialog {
  width: min(720px, calc(100vw - 32px));
  padding: 28px 28px 24px !important;
  border: 1px solid #ffffff18 !important;
  border-radius: 20px !important;
  background: linear-gradient(165deg, #24161d 0%, #151013 100%) !important;
  box-shadow: none !important;
  color: var(--text);
}

#search-dialog::backdrop {
  background: #0a0708cc;
  backdrop-filter: blur(6px);
}

#search-dialog .dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

#search-dialog .eyebrow {
  color: var(--gold) !important;
  font-size: 11px !important;
  letter-spacing: 0.16em;
}

#search-dialog label {
  display: block;
  font-family: var(--font-display) !important;
  font-size: 28px !important;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--text) !important;
  text-transform: none;
}

#search-dialog .search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 18px;
  border: 1px solid #ffffff22;
  border-radius: 14px;
  background: #100d0e;
}

#search-dialog .search-field input {
  flex: 1;
  border: 0 !important;
  background: transparent !important;
  color: var(--text) !important;
  font-size: 16px !important;
  min-height: 48px;
  box-shadow: none !important;
  outline: 0 !important;
}

#search-dialog .search-field .icon-btn,
#search-dialog [data-close] {
  width: 46px;
  height: 46px;
  border-radius: 12px !important;
  border: 1px solid #ffffff22;
  background: #1b1417;
  box-shadow: none !important;
}

#search-dialog .search-field .icon-btn:hover,
#search-dialog [data-close]:hover {
  background: var(--gold);
  color: #1a1114;
  border-color: var(--gold);
}

/* —— Footer —— */
footer {
  margin-top: 40px;
  border-top: 1px solid #ffffff12;
  background: linear-gradient(180deg, #151013 0%, #100d0e 40%);
}

.footer-top {
  display: grid !important;
  grid-template-columns: 1.35fr 1fr 1fr 1.2fr;
  gap: 40px 32px;
  padding: 64px 0 48px !important;
}

.footer-brand p {
  font-family: var(--font-display) !important;
  font-size: 28px !important;
  line-height: 1.25;
  color: var(--text) !important;
  margin-top: 22px;
}

.footer-brand p em {
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-style: italic;
  color: var(--gold);
}

footer h3 {
  font-family: var(--font-body) !important;
  font-size: 11px !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold) !important;
  margin-bottom: 18px !important;
}

.footer-menu a,
.footer-contact a {
  font-size: 15px !important;
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-menu a:hover,
.footer-contact a:hover {
  color: var(--gold);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0 !important;
  border-top: 1px solid #ffffff12;
}

.footer-bottom {
  display: flex !important;
  justify-content: center !important;
  align-items: center;
  padding: 18px 0 36px !important;
  border-top: 1px solid #ffffff10;
  font-size: 12px !important;
  color: var(--muted);
  text-align: center;
}

.footer-bottom .footer-credit {
  margin: 0 !important;
  color: var(--muted);
  font-size: 12px !important;
  line-height: 1.4 !important;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.footer-bottom .footer-credit a,
.footer-bottom .footer-credit a:not(.brand) {
  display: inline !important;
  margin: 0 !important;
  font-size: 12px !important;
  line-height: inherit !important;
  color: var(--text) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom .footer-credit a:hover {
  color: var(--gold) !important;
}

@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 600px) {
  .footer-top {
    grid-template-columns: 1fr !important;
  }
}

/* —— Contact consent checkbox —— */
.consent {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  margin: 18px 0 22px !important;
  text-align: left !important;
  justify-content: flex-start !important;
}

.consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 20px;
  width: 20px !important;
  height: 20px !important;
  margin: 2px 0 0 !important;
  border: 1.5px solid #c5a473 !important;
  border-radius: 4px !important;
  background: #1b1417 !important;
  cursor: pointer;
  position: relative;
}

.consent input[type="checkbox"]:checked {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
}

.consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #1a1114;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.consent span {
  flex: 1;
  font-size: 14px !important;
  line-height: 1.55;
  color: var(--muted);
  text-align: left !important;
}

/* —— FAQ bottles: taller + tight V overlap (hero/cards/tradition untouched) —— */
.roe-faq .faq-visual {
  height: 620px !important;
}

.roe-faq .faq-bottle-ginger {
  height: 510px !important;
  width: 62% !important;
  left: 2% !important;
  right: auto !important;
  top: 56px !important;
  transform: rotate(-16deg) !important;
  z-index: 1;
}

.roe-faq .faq-bottle-sorrel {
  height: 510px !important;
  width: 62% !important;
  right: 2% !important;
  left: auto !important;
  top: 36px !important;
  transform: rotate(12deg) !important;
  z-index: 2;
}

.roe-faq .faq-visual .bottle-portrait,
.roe-faq .faq-bottle-ginger .bottle-portrait,
.roe-faq .faq-bottle-sorrel .bottle-portrait {
  height: 100% !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  display: block !important;
}

@media (max-width: 1150px) {
  .roe-faq .faq-visual { height: 540px !important; }
  .roe-faq .faq-bottle-ginger,
  .roe-faq .faq-bottle-sorrel {
    height: 440px !important;
    width: 56% !important;
  }
}

@media (max-width: 900px) {
  .roe-faq .faq-visual { height: 480px !important; }
  .roe-faq .faq-bottle-ginger {
    height: 380px !important;
    width: 54% !important;
    left: -2% !important;
    top: 55px !important;
  }
  .roe-faq .faq-bottle-sorrel {
    height: 380px !important;
    width: 54% !important;
    right: -2% !important;
    top: 35px !important;
  }
}

@media (max-width: 600px) {
  .roe-faq .faq-visual { height: 380px !important; }
  .roe-faq .faq-bottle-ginger {
    height: 300px !important;
    width: 50% !important;
    left: 0 !important;
    top: 35px !important;
  }
  .roe-faq .faq-bottle-sorrel {
    height: 300px !important;
    width: 50% !important;
    right: 0 !important;
    top: 18px !important;
  }
}

/* —— Shop chips —— */
.woo-toolbar .chip,
.toolbar .chip,
.filter-buttons .chip,
a.chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 6px 14px !important;
  font-family: var(--font-body) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.06em !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* —— Woo notices below fixed header —— */
.woocommerce-notices-wrapper,
.woocommerce .woocommerce-notices-wrapper {
  position: relative;
  z-index: 20;
  width: min(1320px, calc(100% - 48px));
  margin: calc(var(--header-h) + 16px) auto 0 !important;
  padding: 0 !important;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin: 0 0 14px !important;
  padding: 16px 18px !important;
  background: #1a1317 !important;
  border: 1px solid #ffffff18 !important;
  border-left: 3px solid var(--gold) !important;
  border-radius: 12px;
  color: var(--text) !important;
  box-shadow: none !important;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
  display: none !important;
}

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-message a.button {
  margin: 0 !important;
  min-height: 40px;
  padding: 10px 16px !important;
  background: var(--gold) !important;
  color: #1a1114 !important;
  border: 0 !important;
  float: none !important;
}

body.single-product .site-main--commerce,
body.woocommerce-cart .site-main--commerce,
body.woocommerce-checkout .site-main--commerce {
  padding-top: 12px;
}

/* —— Cash on delivery readable —— */
.woocommerce-checkout #payment .payment_box,
.woocommerce-checkout #payment div.payment_box {
  background: #24161d !important;
  border: 1px solid #ffffff18 !important;
  border-radius: 10px;
  color: var(--text) !important;
  padding: 14px 16px !important;
}

.woocommerce-checkout #payment .payment_box p,
.woocommerce-checkout #payment .payment_box *,
.woocommerce-checkout #payment div.payment_box::before {
  color: var(--text) !important;
}

.woocommerce-checkout #payment div.payment_box::before {
  border-color: transparent transparent #24161d !important;
}

/* —— Thank you —— */
.woo-thankyou {
  padding-top: 40px;
  padding-bottom: 70px;
}

.woocommerce-order-overview {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  gap: 0 !important;
  margin: 28px 0 40px !important;
  padding: 0 !important;
  list-style: none !important;
  border: 1px solid #ffffff14;
  border-radius: 16px;
  overflow: hidden;
  background: #1a1317;
}

.woocommerce-order-overview li {
  margin: 0 !important;
  padding: 22px 20px !important;
  border: 0 !important;
  border-right: 1px solid #ffffff12 !important;
  border-top: 0 !important;
}

.woocommerce-order-overview li:last-child {
  border-right: 0 !important;
}

.woocommerce-order-overview li strong {
  display: block;
  margin-top: 8px;
  font-size: 16px !important;
  color: var(--text);
}

.woocommerce-order-details,
.woocommerce-customer-details {
  background: #1a1317;
  border: 1px solid #ffffff14;
  border-radius: 16px;
  padding: 28px 26px;
  margin-bottom: 24px;
}

.woocommerce-order-details + .woocommerce-customer-details,
.woo-thankyou-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .woocommerce-order-details + .woocommerce-customer-details,
  .woo-thankyou-grid {
    grid-template-columns: 1fr;
  }
}

/* —— Find Roe button row —— */
.find-grid .email-row,
#location-form .email-row {
  display: flex !important;
  align-items: stretch !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
}

.find-grid .email-row button,
#location-form .email-row button {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  white-space: nowrap !important;
  min-height: 48px;
  padding: 12px 18px !important;
}

.find-grid .email-row button .roe-ico,
#location-form .email-row button .roe-ico,
.find-grid .email-row button > span,
#location-form .email-row button > span,
.find-grid .email-row button svg {
  display: inline-flex !important;
  align-items: center !important;
  vertical-align: middle !important;
  margin: 0 0 0 6px !important;
  float: none !important;
  width: auto !important;
  height: auto !important;
}

.find-grid .email-row button,
#location-form .email-row button,
.email-row button.btn {
  width: auto !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

/* —— Legal pages: no horizontal scroll —— */
.legal-layout,
.reading,
.woo-pdp-below,
.page-head {
  max-width: 100%;
  overflow-x: hidden;
}

.legal-nav,
.good-to-know,
.legal-chips {
  display: flex;
  flex-wrap: wrap !important;
  gap: 10px 14px;
  max-width: 100%;
  overflow-x: visible !important;
}

.legal-nav a,
.good-to-know a {
  white-space: normal;
}

/* —— Mobile: 1 product per row —— */
@media (max-width: 600px) {
  .product-grid,
  .woocommerce ul.products,
  .woocommerce-page ul.products,
  ul.products,
  .woocommerce .related ul.products,
  .woo-pdp-related ul.products {
    grid-template-columns: 1fr !important;
  }

  body {
    font-size: 16px !important;
  }

  h1, .page-head h1 { font-size: clamp(36px, 10vw, 52px) !important; }
  h2 { font-size: clamp(28px, 8vw, 40px) !important; }

  .woocommerce-checkout .woocommerce-additional-fields,
  .woocommerce-checkout #order_comments_field {
    margin-top: 18px !important;
    margin-bottom: 18px !important;
  }

  .woocommerce-checkout .woocommerce-additional-fields h3 {
    margin: 0 0 12px !important;
  }

  .woocommerce-checkout #order_comments {
    min-height: 110px !important;
  }
}

/* Checkout mobile spacing */
@media (max-width: 768px) {
  .woocommerce-checkout .col2-set,
  .woocommerce-checkout .woocommerce-billing-fields,
  .woocommerce-checkout .woocommerce-shipping-fields,
  .woocommerce-checkout .woocommerce-additional-fields {
    margin-bottom: 20px !important;
  }
  .woocommerce-checkout .woocommerce-additional-fields {
    padding-top: 8px !important;
  }
}

/* —— Blog —— */
.roe-blog-list {
  display: grid;
  gap: 28px;
}

.roe-blog-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: center;
  padding: 18px;
  border: 1px solid #ffffff14;
  border-radius: 18px;
  background: #1a1317;
}

.roe-blog-card__media {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  min-height: 220px;
  background: #151013;
}

.roe-blog-card__media img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.roe-blog-card__body h2 {
  font-size: 28px !important;
  margin: 10px 0 12px;
}

.roe-blog-card__body h2 a:hover {
  color: var(--gold);
}

.roe-single__hero {
  margin: 0 0 32px;
  border-radius: 18px;
  overflow: hidden;
}

.roe-single__hero img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.roe-single__content {
  max-width: 720px;
  font-size: 16px !important;
  line-height: 1.85;
  padding-bottom: 80px;
}

@media (max-width: 800px) {
  .roe-blog-card {
    grid-template-columns: 1fr;
  }
}

/* —— Legal pages —— */
.roe-legal-page {
  padding-bottom: 80px;
}

.legal-nav {
  margin: 0 0 36px;
  padding: 22px;
  border: 1px solid #ffffff14;
  border-radius: 16px;
  background: #1a1317;
}

.legal-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.legal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #ffffff22;
  border-radius: 999px;
  font-size: 13px !important;
  color: var(--muted);
  background: #151013;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.legal-chip:hover,
.legal-chip.is-active {
  color: #1a1114;
  background: var(--gold);
  border-color: var(--gold);
}

.roe-legal-content {
  max-width: 720px;
  font-size: 16px !important;
  line-height: 1.85;
}

.roe-legal-content h2 {
  font-size: 28px !important;
  margin: 32px 0 12px;
}

/* SPA legal — hide tab strip, show single doc */
.legal-layout .legal-tabs,
.legal-layout [role="tablist"] {
  display: flex;
  flex-wrap: wrap !important;
  gap: 10px;
  max-width: 100%;
  overflow: visible !important;
}
