/* ===== Ashury layout: mega-menu, mobile nav, hero, homepage sections =====
   Complements base.css. Recreates the storefront's interactive shell. */

/* ---- Header extras ---- */
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; background: none; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }
.header-search { display: inline-flex; }
.header-search form { display: flex; align-items: center; }

/* ---- Mega-menu (desktop) ---- */
.nav-item.has-mega > a::after { content: ""; }
.mega {
  position: absolute; top: calc(100% + 1px); left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: min(760px, 92vw); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 0;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 60;
}
.main-nav > li.has-mega:hover > .mega,
.main-nav > li.has-mega:focus-within > .mega,
.main-nav > li.has-mega > .mega.open {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.mega-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: clamp(1.2rem, 1rem + 1vw, 2.4rem); padding: 1.6rem clamp(1.2rem, 1rem + 1vw, 2rem); }
.mega-title { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold-deep); font-weight: 700; margin-bottom: 0.7rem; }
.mega-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.mega-col li a { font-size: var(--step-0); letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--ink-soft); display: inline-block; padding-block: 2px; }
.mega-col li a:hover { color: var(--ink); }

/* ---- Mobile drawer ---- */
.mobile-nav { position: fixed; inset: 0; z-index: 100; visibility: hidden; overflow: hidden; }
.mobile-nav[aria-hidden="false"] { visibility: visible; }
.mobile-nav .scrim { position: absolute; inset: 0; background: rgba(23,20,15,0.5); opacity: 0; transition: opacity 0.2s ease; }
.mobile-nav[aria-hidden="false"] .scrim { opacity: 1; }
.mobile-nav .panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(88vw, 400px);
  background: var(--bg); box-shadow: var(--shadow); overflow-y: auto;
  transform: translateX(100%); transition: transform 0.24s ease; padding: 1.2rem;
}
.mobile-nav[aria-hidden="false"] .panel { transform: translateX(0); }
.mobile-nav .panel .close { margin-left: auto; display: block; width: 42px; height: 42px; border: 1px solid var(--line); background: none; border-radius: var(--radius); cursor: pointer; }
.m-group { border-bottom: 1px solid var(--line); }
.m-group > button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 0.2rem; font: inherit; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: var(--step--1); background: none; border: 0; cursor: pointer; color: var(--ink); }
.m-group > a { display: block; padding: 0.9rem 0.2rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: var(--step--1); }
.m-sub { display: none; padding: 0 0 0.8rem 0.6rem; }
.m-group.open .m-sub { display: block; }
.m-sub h4 { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold-deep); margin: 0.6rem 0 0.3rem; }
.m-sub a { display: block; padding: 0.35rem 0; color: var(--ink-soft); }

/* ---- Footer column headings (helper emits <h3>) ---- */
.footer-col h3 { color: #fff; font-size: var(--step--1); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; font-size: var(--step--1); }
.footer-col li a { display: inline-block; padding-block: 4px; }
.footer-logo-img { height: 30px; width: auto; filter: brightness(0) invert(1); opacity: 0.95; }

/* ---- Hero ---- */
.hero { padding-block: clamp(2.5rem, 1.6rem + 4vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 1rem + 3vw, 4rem); align-items: center; }
.hero-copy h1 { margin: 0.6rem 0 1rem; max-width: 16ch; }
.hero-lead { font-size: var(--step-1); color: var(--ink-soft); max-width: 46ch; line-height: 1.5; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.hero-chips a { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; padding: 0.45em 0.9em; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: var(--surface); }
.hero-chips a:hover { border-color: var(--ink); color: var(--ink); }
.hero-media { position: relative; aspect-ratio: 4 / 5; background: var(--img-bg); border-radius: var(--radius); overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media .tag { position: absolute; top: 1rem; left: 1rem; background: var(--ink); color: var(--bg); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; padding: 0.4em 0.8em; border-radius: 2px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-media { order: -1; aspect-ratio: 16 / 11; } }

/* ---- Value strip ---- */
.value-strip { border-block: 1px solid var(--line); background: var(--surface); }
.value-strip .row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); padding-block: 1.4rem; }
.value-strip .item { text-align: center; font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; color: var(--ink-soft); }
@media (max-width: 720px) { .value-strip .row { grid-template-columns: repeat(2, 1fr); gap: 1rem; } }

/* ---- Section head ---- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: clamp(1.4rem, 1rem + 1.5vw, 2.4rem); flex-wrap: wrap; }
.section-head h2 { margin: 0.3rem 0 0; }

/* ---- Featured collections (image tiles) ---- */
.collection-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.collection-tile { position: relative; aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; background: var(--img-bg); display: block; }
.collection-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.collection-tile:hover img { transform: scale(1.04); }
.collection-tile .label { position: absolute; inset: auto 0 0 0; padding: 1.4rem 1.2rem 1rem; background: linear-gradient(to top, rgba(23,20,15,0.72), transparent); color: #fff; font-weight: 700; font-size: var(--step-1); letter-spacing: -0.01em; }
@media (max-width: 880px) { .collection-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .collection-grid { grid-template-columns: 1fr; } }

/* ---- Story band ---- */
.story-band { background: var(--ink); color: #ece7dd; }
.story-band h2 { color: #fff; max-width: 22ch; }
.story-band p { color: #c8c1b4; max-width: 60ch; margin-top: 1rem; }
.ingredient-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.8rem; }
.ingredient-tags span { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; padding: 0.45em 0.9em; border: 1px solid rgba(255,255,255,0.22); border-radius: 999px; color: #e6dfd2; }

/* ---- Responsive header ---- */
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .mega { display: none; }
}
/* ---- Page / archive titles + intro ---- */
.page-title { font-size: var(--step-3); margin: 0.3rem 0 0; }
.archive-intro { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.5; max-width: 60ch; margin: 0 0 var(--gap); }
.archive-copy { margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); padding-top: 2rem; border-top: 1px solid var(--line); max-width: 74ch; }

/* ---- Blog single ---- */
.single-post .post-head { margin-bottom: 1.4rem; }
.post-cats { display: inline-block; }
.single-post .post-title { font-size: var(--step-3); margin: 0.5rem 0 0.6rem; max-width: 24ch; }
.post-meta { color: var(--ink-soft); font-size: var(--step--1); }
.post-hero { margin: 1.4rem 0 2rem; border-radius: var(--radius); overflow: hidden; background: var(--img-bg); }
.post-hero img { width: 100%; height: auto; object-fit: cover; }
.post-body { max-width: 72ch; margin-inline: auto; }
.post-related { margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); padding-top: 2rem; border-top: 1px solid var(--line); }
.post-related h2 { font-size: var(--step-2); margin-bottom: 1.2rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.related-item { display: flex; flex-direction: column; gap: 0.6rem; }
.related-media { aspect-ratio: 3 / 2; background: var(--img-bg); border-radius: var(--radius); overflow: hidden; display: block; }
.related-media img { width: 100%; height: 100%; object-fit: cover; }
.related-title { font-weight: 600; line-height: 1.35; }
@media (max-width: 640px) { .related-grid { grid-template-columns: 1fr 1fr; } }

/* ---- Post list (blog index / archives fallback) ---- */
.post-list { display: grid; gap: clamp(1.6rem, 1.2rem + 1.5vw, 2.6rem); max-width: 74ch; }
.post-item .post-title { font-size: var(--step-2); margin-bottom: 0.4rem; }
.post-item .post-title a:hover { color: var(--gold-deep); }
.post-excerpt { color: var(--ink-soft); margin-bottom: 0.6rem; }

/* ---- Pagination ---- */
.pagination, .woocommerce-pagination, .wp-pagenavi { margin-top: clamp(2rem, 1.4rem + 2vw, 3rem); }
.pagination .nav-links, .woocommerce-pagination ul { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; justify-content: center; }
.pagination .page-numbers, .woocommerce-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 0.6rem;
  border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; color: var(--ink); background: var(--surface);
}
.pagination .page-numbers.current, .woocommerce-pagination .page-numbers.current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pagination .page-numbers:hover, .woocommerce-pagination .page-numbers:hover { border-color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .mega, .mobile-nav .panel, .mobile-nav .scrim, .collection-tile img { transition: none; }
}

/* ===== Programmatic SEO pages (best/ingredient/concern/for/guide) + articles ===== */
.prog-feed, .prog-related, .prog-related-products, .faq { margin-top: clamp(2.4rem, 1.8rem + 2vw, 3.6rem); }
.prog-feed-title, .prog-related h2, .prog-related-products h2, .faq h2 { font-size: var(--step-2); margin-bottom: 1.2rem; }
.prog-feed ul.products { margin: 0; }

/* Hub directory grid */
.hub-grid-wrap { margin-top: clamp(1.6rem, 1.2rem + 1.5vw, 2.6rem); }
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.hub-card {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); font-weight: 600; color: var(--ink); line-height: 1.35;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.hub-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.hub-card-arrow { color: var(--gold-deep); flex: none; }
@media (max-width: 860px) { .hub-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .hub-grid { grid-template-columns: 1fr; } }

/* Related reading list */
.prog-related ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1.4rem; }
.prog-related li a { display: inline-block; padding: 0.4rem 0; color: var(--ink-soft); border-bottom: 1px solid transparent; }
.prog-related li a:hover { color: var(--ink); border-bottom-color: var(--gold-deep); }
@media (max-width: 640px) { .prog-related ul { grid-template-columns: 1fr; } }

/* FAQ accordion */
.faq-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item > summary {
  list-style: none; cursor: pointer; padding: 1.1rem 2rem 1.1rem 0; position: relative;
  font-weight: 600; font-size: var(--step-0); color: var(--ink);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: "+"; position: absolute; right: 0.2rem; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--gold-deep); transition: transform 0.2s ease;
}
.faq-item[open] > summary::after { content: "\2212"; }
.faq-a { padding: 0 0 1.2rem; color: var(--ink-soft); max-width: 72ch; }
.faq-a p { margin: 0 0 0.6rem; }

.prog-disclaimer { margin-top: 1.6rem; color: var(--ink-soft); font-size: var(--step--1); }

/* Article meta line */
.article-meta { color: var(--ink-soft); font-size: var(--step--1); margin: 0.3rem 0 1.4rem; }
