/* ============================================================
   HOLY HAIR CARE — DESIGN SYSTEM
   ============================================================ */

/* ---- TOKENS ---- */
:root {
  --forest: #1E3D2F;
  --pine:   #2E5A47;
  --sage:   #6B8F71;
  --gold:   #D4AF37;
  --cream:  #E8DCC6;
  --ivory:  #F7F4EC;
  --ink:    #222222;

  --font-display: 'Cormorant Garamond', serif;
  --font-body:    'Jost', sans-serif;

  --container: 1100px;
  --radius:    2px;
  --ease:      cubic-bezier(.22,.61,.36,1);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; }
p { margin: 0; }

/* ---- WORDPRESS ALIGNMENT ---- */
.alignleft  { float: left;  margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { clear: both; display: block; margin: 0 auto 1em; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .8rem; color: rgba(34,34,34,.55); margin-top: 6px; }

/* WordPress admin bar offset for sticky header */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

/* ---- UTILITIES ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  display: block;
  width: 34px;
  height: 1px;
  background: var(--gold);
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::before { display: none; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 1.05em 2.6em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn--gold   { background: var(--gold);   color: var(--forest); }
.btn--gold:hover { background: var(--cream); }
.btn--forest { background: var(--forest); color: var(--ivory);  border-color: var(--forest); }
.btn--forest:hover { background: var(--pine); border-color: var(--pine); }
.btn--outline { background: transparent; color: var(--ivory); border-color: rgba(247,244,236,.45); }
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }

/* Focus */
.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---- SKIP LINK ---- */
.skip-link {
  position: absolute; left: -999px; top: auto;
  background: var(--forest); color: var(--ivory);
  padding: 10px 18px; font-size: .85rem; z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---- SPRIG DIVIDER ---- */
.sprig {
  display: flex;
  justify-content: center;
  padding: 48px 0;
}
.sprig svg { width: 38px; height: 38px; color: var(--gold); }

/* ---- SCROLL REVEAL ---- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ivory);
  border-bottom: 1px solid rgba(34,34,34,.07);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 32px;
}

.nav__links { display: flex; gap: 34px; }
.nav__links ul { display: flex; gap: 34px; margin: 0; padding: 0; list-style: none; }
.nav__links a, .nav__links ul li a {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 6px;
}
.nav__links a::after, .nav__links ul li a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--gold);
  transition: width .25s var(--ease);
}
.nav__links a:hover::after, .nav__links ul li a:hover::after { width: 100%; }

/* Logo */
.logo { display: flex; align-items: center; }
.logo__img { height: 54px; width: auto; border-radius: 10px; display: block; }
/* WP custom-logo wrapper */
.logo .custom-logo-link { display: flex; }
.logo .custom-logo { height: 54px; width: auto; border-radius: 10px; }

/* Nav icons */
.nav__icons { display: flex; align-items: center; gap: 18px; }
.icon { width: 20px; height: 20px; }
.nav__icons button, .nav__icons a {
  background: none; border: none; padding: 4px; cursor: pointer;
  color: var(--ink); display: flex; align-items: center;
}
.nav__toggle { display: none; }

/* Cart count badge */
.nav__cart { position: relative; }
.nav__cart-count {
  position: absolute;
  top: -2px; right: -6px;
  width: 16px; height: 16px;
  background: var(--gold);
  color: var(--forest);
  font-size: .6rem;
  font-weight: 700;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}
.nav__cart-count.is-visible { display: flex; }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 22px;
  padding: 24px 32px 32px;
  background: var(--ivory);
  border-top: 1px solid rgba(34,34,34,.07);
}
.mobile-menu ul { display: flex; flex-direction: column; gap: 22px; margin: 0; padding: 0; list-style: none; }
.mobile-menu a, .mobile-menu ul li a {
  font-size: .85rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 500;
}
.mobile-menu.is-open { display: flex; }

@media (max-width: 880px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; background: none; border: none; cursor: pointer; color: var(--ink); padding: 4px; }
  .nav { justify-content: space-between; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { background: var(--forest); }
.hero__banner { position: relative; display: block; width: 100%; line-height: 0; }
.hero__banner img { display: block; width: 100%; height: auto; }
.hero__cta {
  position: absolute;
  left: 7.3%; top: 71.5%;
  width: 21.2%; height: 9.6%;
}
.hero__cta:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* ============================================================
   OUR PROMISE
   ============================================================ */
.promise {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--cream);
}
.promise__content { padding: 96px 64px; max-width: 560px; }
.promise__title { font-size: clamp(2.1rem, 4vw, 3rem); margin-bottom: 36px; line-height: 1.15; }
.promise__list { display: flex; flex-direction: column; gap: 28px; }
.promise__item { display: flex; gap: 20px; align-items: flex-start; }
.promise__icon { flex: none; width: 30px; height: 30px; margin-top: 4px; color: var(--forest); }
.promise__item h3 {
  font-family: var(--font-body);
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--forest);
}
.promise__item p { font-size: .95rem; color: rgba(34,34,34,.72); max-width: 340px; }
.promise__visual { position: relative; min-height: 520px; overflow: hidden; }
.promise__photo { width: 100%; height: 100%; object-fit: cover; object-position: center; }

@media (max-width: 960px) {
  .promise { grid-template-columns: 1fr; }
  .promise__content { padding: 72px 28px; max-width: none; order: 1; }
  .promise__visual { min-height: 340px; order: 0; }
}

/* ============================================================
   RITUAL / PRODUCTS
   ============================================================ */
.ritual { background: var(--ivory); padding: 100px 0; text-align: center; }
.ritual__heading { font-size: clamp(2.1rem, 4vw, 3rem); max-width: 620px; margin: 0 auto 18px; }
.ritual__sub { max-width: 520px; margin: 0 auto 56px; color: rgba(34,34,34,.65); }
.ritual__grid { display: flex; justify-content: center; flex-wrap: wrap; gap: 32px; }
.ritual__cta { margin-top: 48px; }

/* Single featured product card (no WooCommerce) */
.product-card { background: var(--cream); border-radius: var(--radius); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.product-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(30,61,47,.12); }

.product-card--featured {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
  gap: 44px;
  max-width: 680px;
  padding: 36px;
  text-align: left;
}
.product-card__photo { width: 100%; border-radius: 8px; box-shadow: 0 20px 44px rgba(30,61,47,.2); }
.product-card__body { display: flex; flex-direction: column; gap: 14px; }
.product-card__body h3, .product-card__body h3 a { font-size: 1.6rem; color: var(--ink); }
.product-card__body p { color: rgba(34,34,34,.68); font-size: .96rem; }
.product-card__price { font-family: var(--font-body); font-weight: 600; letter-spacing: .1em; color: var(--forest); }
.product-card__body > a, .product-card__body .product-card__cta {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--forest);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 6px;
  align-self: flex-start;
  background: none;
  border-top: none; border-left: none; border-right: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: color .25s var(--ease);
}
.product-card__body > a:hover, .product-card__body .product-card__cta:hover { color: var(--gold); }

/* WooCommerce product card (3-col grid) */
.product-card--woo {
  display: flex;
  flex-direction: column;
  width: 300px;
  max-width: 100%;
  text-align: left;
  padding: 0;
  overflow: hidden;
}
.product-card__img-link { display: block; overflow: hidden; background: var(--ivory); }
.product-card__img-link img {
  width: 100%;
  height: auto;
  object-fit: contain;
  padding: 16px;
  transition: transform .4s var(--ease);
}
.product-card--woo:hover .product-card__img-link img { transform: scale(1.04); }
.product-card--woo .product-card__body { padding: 24px 28px 28px; }
.product-card--woo .product-card__body h3 { font-size: 1.2rem; }

@media (max-width: 880px) { .ritual { padding: 72px 0; } }
@media (max-width: 600px) {
  .product-card--featured {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 340px;
    padding: 32px;
  }
  .product-card__photo { max-width: 160px; margin: 0 auto; }
  .product-card__body { align-items: center; }
}

/* ============================================================
   TESTIMONIAL
   ============================================================ */
.testimonial { background: var(--pine); color: var(--ivory); padding: 110px 0; text-align: center; }
.testimonial__quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-style: italic;
  max-width: 780px;
  margin: 0 auto 28px;
  line-height: 1.5;
}
.testimonial__name { font-size: .78rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter { background: var(--cream); padding: 90px 0; text-align: center; }
.newsletter__title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: 14px; }
.newsletter__text { max-width: 480px; margin: 0 auto 36px; color: rgba(34,34,34,.68); }
.newsletter__form {
  display: flex;
  justify-content: center;
  max-width: 460px;
  margin: 0 auto;
  border: 1px solid var(--forest);
  border-radius: var(--radius);
  overflow: hidden;
}
.newsletter__form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 1.05em 1.4em;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--ink);
}
.newsletter__form input::placeholder { color: rgba(34,34,34,.45); }
.newsletter__form input:focus { outline: none; }
.newsletter__form .btn { border-radius: 0; border: none; }

@media (max-width: 520px) {
  .newsletter__form { flex-direction: column; border: none; gap: 12px; }
  .newsletter__form input { border: 1px solid var(--forest); border-radius: var(--radius); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--forest); color: var(--cream); padding: 80px 0 32px; }
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}
.footer__brand .logo { align-items: flex-start; }
.footer__brand .logo__img { height: 68px; }
.footer__brand .logo .custom-logo { height: 68px; width: auto; }
.footer__brand p { margin-top: 18px; font-size: .88rem; color: rgba(232,220,198,.7); max-width: 280px; }

.footer__heading { font-size: .74rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.footer__links, .footer__links ul { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.footer__links a { font-size: .92rem; color: rgba(232,220,198,.85); transition: color .25s var(--ease); }
.footer__links a:hover { color: var(--gold); }

.footer__social { display: flex; gap: 14px; margin-top: 20px; }
.footer__social a {
  width: 38px; height: 38px;
  border: 1px solid rgba(232,220,198,.35);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--cream);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.footer__social a:hover { border-color: var(--gold); color: var(--gold); }
.footer__social svg { width: 16px; height: 16px; }

.footer__bottom {
  border-top: 1px solid rgba(232,220,198,.15);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .78rem;
  letter-spacing: .05em;
  color: rgba(232,220,198,.55);
}

@media (max-width: 880px) { .footer__top { grid-template-columns: 1fr 1fr; gap: 40px; } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer__top { grid-template-columns: 1fr; } }

/* ============================================================
   GENERIC PAGE CONTENT (page.php, single.php, index.php)
   ============================================================ */
.page-content { padding: 80px 32px; }
.page-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 32px;
  line-height: 1.12;
}
.page-body { max-width: 720px; line-height: 1.85; color: rgba(34,34,34,.82); }
.page-body h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 40px 0 16px; }
.page-body p { margin-bottom: 18px; }
.page-body a { color: var(--forest); border-bottom: 1px solid var(--gold); }

/* Blog index */
.posts-list { display: flex; flex-direction: column; gap: 48px; }
.post-card { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.post-card__thumb img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }
.post-card__meta { font-size: .78rem; letter-spacing: .14em; color: var(--sage); text-transform: uppercase; margin-bottom: 8px; }
.post-card__title { font-size: clamp(1.4rem, 2.5vw, 1.9rem); margin-bottom: 14px; }
.post-card__title a { color: var(--ink); }
.post-card__title a:hover { color: var(--forest); }
.post-card__excerpt { margin-bottom: 24px; color: rgba(34,34,34,.7); }
.pagination { margin-top: 48px; display: flex; gap: 8px; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--cream); border-radius: var(--radius); font-size: .85rem; }
.pagination .current { background: var(--forest); color: var(--ivory); border-color: var(--forest); }

@media (max-width: 720px) { .post-card { grid-template-columns: 1fr; } }

/* Single post hero */
.single-post__hero { margin-bottom: 32px; border-radius: 4px; overflow: hidden; }
.single-post__hero img { width: 100%; max-height: 420px; object-fit: cover; }

/* ============================================================
   WOOCOMMERCE SHOP PAGES
   ============================================================ */
.woo-wrap { padding: 60px 0 100px; }

/* Breadcrumb */
.woocommerce-breadcrumb { font-size: .8rem; color: rgba(34,34,34,.55); margin-bottom: 32px; letter-spacing: .08em; }
.woocommerce-breadcrumb a { color: var(--sage); }

/* Page title */
.woocommerce-products-header__title,
.woocommerce h1.page-title { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 40px; }

/* Product grid */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.woocommerce ul.products li.product {
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.woocommerce ul.products li.product:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(30,61,47,.12); }
.woocommerce ul.products li.product a img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: var(--ivory);
  padding: 16px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  padding: 20px 24px 6px;
  color: var(--ink);
}
.woocommerce ul.products li.product .price {
  display: block;
  padding: 0 24px 16px;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--forest);
  letter-spacing: .08em;
}
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button {
  display: block;
  margin: 0 24px 24px;
  padding: .85em 1.8em;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  background: var(--forest);
  color: var(--ivory);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background .25s var(--ease);
}
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover { background: var(--pine); }

@media (max-width: 880px) { .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .woocommerce ul.products { grid-template-columns: 1fr; } }

/* Single product */
.woocommerce div.product { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }

/* Global WC image rule — never stretch */
.woocommerce img,
.woocommerce div.product img { max-width: 100%; height: auto !important; display: block; }

/* Product gallery */
.woocommerce-product-gallery { position: relative; width: 100%; }
.woocommerce-product-gallery .woocommerce-product-gallery__image { display: block; margin: 0; }
.woocommerce-product-gallery .woocommerce-product-gallery__image img {
  width: 100%;
  height: auto !important;
  display: block;
  border-radius: 8px;
  object-fit: contain;
  background: var(--ivory);
}
/* Thumbnail strip */
.woocommerce-product-gallery .flex-control-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}
.woocommerce-product-gallery .flex-control-nav li { width: 72px; flex: none; }
.woocommerce-product-gallery .flex-control-nav li img {
  width: 100%;
  height: auto !important;
  border-radius: 4px;
  cursor: pointer;
  opacity: .6;
  border: 2px solid transparent;
  transition: opacity .2s, border-color .2s;
  object-fit: contain;
  background: var(--ivory);
  padding: 4px;
}
.woocommerce-product-gallery .flex-control-nav li img.flex-active,
.woocommerce-product-gallery .flex-control-nav li img:hover { opacity: 1; border-color: var(--gold); }
/* Flexslider reset */
.woocommerce-product-gallery .flexslider { margin: 0; border: none; box-shadow: none; border-radius: 8px; overflow: hidden; }
.woocommerce-product-gallery .flex-viewport { max-height: none !important; }

.woocommerce div.product .product_title { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 16px; }
.woocommerce div.product .woocommerce-product-details__short-description { margin: 16px 0 24px; color: rgba(34,34,34,.7); }
.woocommerce div.product .price { font-family: var(--font-body); font-size: 1.3rem; font-weight: 600; color: var(--forest); margin-bottom: 24px; display: block; }
.woocommerce div.product .single_add_to_cart_button,
.woocommerce #respond input#submit {
  background: var(--gold);
  color: var(--forest);
  border: none;
  padding: 1.05em 2.6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background .25s var(--ease);
}
.woocommerce div.product .single_add_to_cart_button:hover { background: var(--cream); }

/* Quantity */
.woocommerce .quantity input { border: 1px solid var(--cream); padding: .6em 1em; font-family: var(--font-body); border-radius: var(--radius); }
.woocommerce form.cart { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* Cart & Checkout */
.woocommerce table.shop_table { width: 100%; border-collapse: collapse; }
.woocommerce table.shop_table th { font-family: var(--font-body); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--forest); padding: 12px 16px; border-bottom: 2px solid var(--cream); text-align: left; }
.woocommerce table.shop_table td { padding: 16px; border-bottom: 1px solid rgba(232,220,198,.6); vertical-align: middle; }
.woocommerce .cart-collaterals { margin-top: 40px; }
.woocommerce .cart_totals h2 { font-size: 1.4rem; margin-bottom: 20px; }
.woocommerce .checkout-button { background: var(--gold) !important; color: var(--forest) !important; border: none !important; padding: 1em 2.4em !important; }

/* Notices */
.woocommerce-message, .woocommerce-info {
  background: var(--cream);
  border-left: 4px solid var(--gold);
  padding: 14px 20px;
  margin-bottom: 24px;
  font-size: .92rem;
}
.woocommerce-error { border-left-color: #c0392b; }

@media (max-width: 760px) { .woocommerce div.product { grid-template-columns: 1fr; gap: 32px; } }

/* ============================================================
   404
   ============================================================ */
.error-404 .page-content { text-align: center; }
