/* ════════════════════════════════════════════════════════════════
   AHARA SHOP — Comprehensive WooCommerce styles
   Shop archive · Product cards · Related · Home featured fix
   ════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   1. SHOP ARCHIVE HEADER (editorial)
   ───────────────────────────────────────────── */

body .ah2-shop { background: var(--ah-cream); min-height: 60vh; }

body .ah2-shop-header { background: var(--ah-cream); padding: 56px 28px 36px; border-bottom: 0.5px solid var(--ah-line); }
body .ah2-shop-header-inner { max-width: 1440px; margin: 0 auto; }

body .ah2-bcrumb { font-family: 'Tenor Sans', sans-serif; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ah-text-mute); margin-bottom: 18px; }
body .ah2-bcrumb a { color: var(--ah-text-mute); text-decoration: none; transition: color 0.18s; }
body .ah2-bcrumb a:hover { color: var(--ah-ochre); }
body .ah2-bcrumb-sep { margin: 0 8px; color: var(--ah-text-soft); }

body .ah2-shop-title { font-family: 'Cormorant Garamond', serif; font-size: 56px; font-weight: 300; line-height: 1.0; letter-spacing: -0.02em; color: var(--ah-ink); margin: 0 0 14px; text-transform: capitalize; }

body .ah2-shop-desc { font-family: 'Tenor Sans', sans-serif; font-size: 15px; line-height: 1.7; color: var(--ah-text-mute); max-width: 640px; margin: 0; }

/* ─────────────────────────────────────────────
   2. SHOP BODY LAYOUT — sidebar + grid
   ───────────────────────────────────────────── */

body .ah2-shop-body {
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 28px 80px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: flex-start;
}

/* ─────────────────────────────────────────────
   3. SIDEBAR FILTERS
   ───────────────────────────────────────────── */

body .ah2-filters { background: transparent; position: sticky; top: 24px; }
body .ah2-filters-form { display: flex; flex-direction: column; gap: 28px; }
body .ah2-filter-block { padding-bottom: 24px; border-bottom: 0.5px solid var(--ah-line); }
body .ah2-filter-block:last-child { border-bottom: none; }
body .ah2-filter-sort-mobile { display: none; }
body .ah2-filter-sort-mobile select { width: 100%; padding: 10px 12px; font-family: 'Tenor Sans', sans-serif; font-size: 13px; border: 0.5px solid var(--ah-line-md); background: white; color: var(--ah-ink); }

body .ah2-filter-h { font-family: 'Tenor Sans', sans-serif; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ah-ink); margin: 0 0 14px; font-weight: 400; }

body .ah2-filter-cats { list-style: none; padding: 0; margin: 0; }
body .ah2-filter-cats li { margin-bottom: 8px; }
body .ah2-filter-cats a {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Tenor Sans', sans-serif; font-size: 13.5px; color: var(--ah-text);
  text-decoration: none; padding: 4px 0; transition: color 0.18s;
}
body .ah2-filter-cats a:hover { color: var(--ah-ochre); }
body .ah2-filter-cats a.is-active { color: var(--ah-terra); font-weight: 500; }
body .ah2-filter-cats a.is-active::before { content: '— '; }

body .ah2-filter-count { font-size: 11px; color: var(--ah-text-soft); letter-spacing: 0.04em; }

body .ah2-filter-scroll { max-height: 260px; overflow-y: auto; padding-right: 8px; scrollbar-width: thin; }
body .ah2-filter-scroll::-webkit-scrollbar { width: 4px; }
body .ah2-filter-scroll::-webkit-scrollbar-thumb { background: var(--ah-line-md); border-radius: 0; }

body .ah2-filter-check {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
  cursor: pointer; font-family: 'Tenor Sans', sans-serif; font-size: 13px; color: var(--ah-text);
  transition: color 0.18s;
}
body .ah2-filter-check:hover { color: var(--ah-ochre); }
body .ah2-filter-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; border: 0.5px solid var(--ah-line-md); background: white;
  cursor: pointer; flex-shrink: 0; position: relative;
  margin: 0;
}
body .ah2-filter-check input[type="checkbox"]:checked { background: var(--ah-ink); border-color: var(--ah-ink); }
body .ah2-filter-check input[type="checkbox"]:checked::after {
  content: ''; position: absolute; top: 2px; left: 5px; width: 4px; height: 8px;
  border-right: 1.5px solid var(--ah-parch); border-bottom: 1.5px solid var(--ah-parch);
  transform: rotate(45deg);
}
body .ah2-filter-check-name { flex: 1; }

body .ah2-filter-price { display: flex; align-items: center; gap: 8px; }
body .ah2-filter-price input {
  flex: 1; min-width: 0; width: 100%;
  padding: 9px 10px; font-family: 'Tenor Sans', sans-serif; font-size: 13px;
  border: 0.5px solid var(--ah-line-md); background: white; color: var(--ah-ink);
  outline: none; transition: border-color 0.18s;
}
body .ah2-filter-price input:focus { border-color: var(--ah-ochre); }
body .ah2-filter-price-sep { color: var(--ah-text-soft); }
body .ah2-filter-price-go {
  margin-top: 10px; width: 100%;
  padding: 10px; background: var(--ah-ink); color: var(--ah-parch); border: none;
  font-family: 'Tenor Sans', sans-serif; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  cursor: pointer; transition: background 0.18s;
}
body .ah2-filter-price-go:hover { background: var(--ah-ochre); color: var(--ah-ink); }

body .ah2-filter-clear {
  display: inline-block; font-family: 'Tenor Sans', sans-serif; font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ah-terra);
  text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid var(--ah-ochre);
}
body .ah2-filter-clear:hover { color: var(--ah-ink); border-color: var(--ah-ink); }

/* ─────────────────────────────────────────────
   4. SHOP TOPBAR (above grid)
   ───────────────────────────────────────────── */

body .ah2-shop-topbar {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 24px;
  padding-bottom: 20px; border-bottom: 0.5px solid var(--ah-line);
  margin-bottom: 32px;
}

body .ah2-filter-toggle {
  display: none; align-items: center; gap: 8px;
  padding: 9px 14px; background: white; border: 0.5px solid var(--ah-line-md);
  font-family: 'Tenor Sans', sans-serif; font-size: 12px; letter-spacing: 0.1em;
  color: var(--ah-ink); cursor: pointer;
}

body .ah2-shop-results { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
body .ah2-shop-count { font-family: 'Tenor Sans', sans-serif; font-size: 13px; color: var(--ah-text-mute); }

body .ah2-shop-chips { display: flex; gap: 6px; flex-wrap: wrap; }
body .ah2-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 12px; background: var(--ah-parch); color: var(--ah-ink);
  font-family: 'Tenor Sans', sans-serif; font-size: 11.5px; letter-spacing: 0.04em;
  text-decoration: none; transition: background 0.18s;
}
body .ah2-chip:hover { background: var(--ah-ochre); }
body .ah2-chip-x { font-size: 14px; line-height: 1; opacity: 0.6; }

body .ah2-shop-sort { display: flex; align-items: center; gap: 10px; }
body .ah2-shop-sort label { font-family: 'Tenor Sans', sans-serif; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ah-text-mute); }
body .ah2-shop-sort select {
  padding: 8px 28px 8px 12px; font-family: 'Tenor Sans', sans-serif; font-size: 13px;
  border: 0.5px solid var(--ah-line-md); background: white; color: var(--ah-ink);
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%231A1208' d='M5 6L0 0h10z'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center;
}
body .ah2-shop-sort select:focus { outline: none; border-color: var(--ah-ochre); }

/* ─────────────────────────────────────────────
   5. PRODUCT GRID (.products) — and individual cards
   ───────────────────────────────────────────── */

body .ah2-shop-main .products,
body.woocommerce ul.products,
body .ah2-related ul.products {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 28px !important;
}

body .ah2-shop-main ul.products li.product,
body .ah2-related ul.products li.product,
body ul.products li.ah2-card {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  float: none !important;
  background: transparent !important;
}

/* Product card */
body li.ah2-card .ah2-card-link {
  display: block; text-decoration: none; color: var(--ah-ink);
  transition: transform 0.28s ease;
}
body li.ah2-card:hover .ah2-card-link { transform: translateY(-3px); }

body .ah2-card-img {
  position: relative;
  width: 100%;
  padding-top: 125%;  /* 4:5 aspect ratio */
  background: var(--ah-cream-warm);
  overflow: hidden;
  margin-bottom: 16px;
}
body .ah2-card-img img,
body .ah2-card-img-main {
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important;
  object-fit: contain !important;
  padding: 22px !important;
  box-sizing: border-box !important;
  transition: transform 0.5s ease !important;
  border-radius: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  max-height: none !important;
}
body li.ah2-card:hover .ah2-card-img-main { transform: scale(1.04); }
body .ah2-card-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ah-text-soft); font-size: 32px; }

/* Badges */
body .ah2-card-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 4px 9px; font-family: 'Tenor Sans', sans-serif; font-size: 9.5px;
  letter-spacing: 0.18em; text-transform: uppercase; line-height: 1;
}
body .ah2-badge-sale { background: var(--ah-terra); color: var(--ah-parch); }
body .ah2-badge-new { background: var(--ah-ink); color: var(--ah-parch); }
body .ah2-badge-oos { background: var(--ah-text-soft); color: white; }

body .ah2-card-body { padding: 0 4px; }
body .ah2-card-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ah-terra); margin-bottom: 6px;
}
body .ah2-card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px; font-weight: 400; line-height: 1.3; color: var(--ah-ink);
  margin: 0 0 10px; min-height: 2.6em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
body .ah2-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

body .ah2-card-price {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 15px; color: var(--ah-ink);
  display: flex; flex-direction: column; line-height: 1.2;
}
body .ah2-card-price del { color: var(--ah-text-soft); font-size: 13px; opacity: 0.8; }
body .ah2-card-price ins { text-decoration: none; color: var(--ah-terra); }
body .ah2-card-price .woocommerce-Price-amount { color: var(--ah-ink); font-weight: 400; }
body .ah2-card-price del .woocommerce-Price-amount { color: var(--ah-text-soft); }
body .ah2-card-price ins .woocommerce-Price-amount { color: var(--ah-terra); }
body .ah2-card-price-tba { font-size: 12px; color: var(--ah-text-mute); font-style: italic; }

body .ah2-card-add {
  width: 34px; height: 34px;
  background: var(--ah-ink); color: var(--ah-parch);
  border: none; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s ease;
  flex-shrink: 0;
}
body .ah2-card-add:hover { background: var(--ah-ochre); color: var(--ah-ink); transform: scale(1.08); }

/* ─────────────────────────────────────────────
   6. PAGINATION
   ───────────────────────────────────────────── */

body .ah2-shop-pagination { margin-top: 56px; padding-top: 32px; border-top: 0.5px solid var(--ah-line); text-align: center; }
body .ah2-shop-pagination .page-numbers {
  list-style: none; padding: 0; margin: 0;
  display: inline-flex; gap: 4px;
}
body .ah2-shop-pagination .page-numbers li { list-style: none; }
body .ah2-shop-pagination .page-numbers a,
body .ah2-shop-pagination .page-numbers span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px;
  padding: 0 12px;
  font-family: 'Tenor Sans', sans-serif; font-size: 13px;
  color: var(--ah-ink); text-decoration: none;
  border: 0.5px solid var(--ah-line-md); background: white;
  transition: all 0.18s;
}
body .ah2-shop-pagination .page-numbers a:hover { background: var(--ah-ink); color: var(--ah-parch); }
body .ah2-shop-pagination .page-numbers .current { background: var(--ah-ink); color: var(--ah-parch); border-color: var(--ah-ink); }

/* ─────────────────────────────────────────────
   7. EMPTY STATE
   ───────────────────────────────────────────── */

body .ah2-shop-empty { text-align: center; padding: 80px 28px; }
body .ah2-shop-empty h3 { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 300; color: var(--ah-ink); margin: 0 0 12px; }
body .ah2-shop-empty p { font-family: 'Tenor Sans', sans-serif; font-size: 14px; color: var(--ah-text-mute); margin: 0 0 28px; }

/* ─────────────────────────────────────────────
   8. RELATED PRODUCTS (single product page)
   ───────────────────────────────────────────── */

body .ah2-related {
  max-width: 1440px; margin: 80px auto;
  padding: 0 28px;
}
body .ah2-related-head { margin-bottom: 36px; }
body .ah2-related .ah2-h2 { font-family: 'Cormorant Garamond', serif; font-size: 36px; font-weight: 300; line-height: 1.1; color: var(--ah-ink); margin: 8px 0 0; }

/* ─────────────────────────────────────────────
   9. HOME PAGE FEATURED PRICE FIX
   Force the existing .ah2-feat-price to show price text
   ───────────────────────────────────────────── */

body .ah2-feat-card .ah2-feat-img {
  position: relative !important;
  width: 100% !important;
  padding-top: 125% !important;
  height: 0 !important;
  background: var(--ah-cream-warm) !important;
  margin-bottom: 16px !important;
  overflow: hidden !important;
}
body .ah2-feat-card .ah2-feat-img img {
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important;
  object-fit: contain !important;
  padding: 24px !important;
  box-sizing: border-box !important;
  max-width: none !important; max-height: none !important;
}
body .ah2-feat-card .ah2-feat-body h4 {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  margin: 0 0 6px !important;
  color: var(--ah-ink) !important;
}
body .ah2-feat-card .ah2-feat-price {
  display: block !important;
  font-family: 'Tenor Sans', sans-serif !important;
  font-size: 15px !important;
  color: var(--ah-ink) !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  margin: 4px 0 0 !important;
}
body .ah2-feat-card .ah2-feat-price * {
  color: var(--ah-ink) !important;
  font-size: 15px !important;
  text-decoration: none !important;
}
body .ah2-feat-card .ah2-feat-price del,
body .ah2-feat-card .ah2-feat-price del * {
  color: var(--ah-text-soft) !important;
  font-size: 13px !important;
  text-decoration: line-through !important;
}
body .ah2-feat-card .ah2-feat-price ins,
body .ah2-feat-card .ah2-feat-price ins * {
  color: var(--ah-terra) !important;
}

/* ─────────────────────────────────────────────
   10. RESPONSIVE
   ───────────────────────────────────────────── */

@media (max-width: 1280px) {
  body .ah2-shop-main .products,
  body.woocommerce ul.products,
  body .ah2-related ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 1024px) {
  body .ah2-shop-body { grid-template-columns: 1fr; gap: 24px; }
  body .ah2-filters {
    position: fixed; top: 0; left: -100%; width: 88%; max-width: 360px;
    height: 100vh; background: var(--ah-cream); z-index: 9999;
    padding: 28px 24px; overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
  }
  body .ah2-filters.ah2-filters-open { left: 0; }
  body .ah2-filter-toggle { display: inline-flex; }
  body .ah2-shop-topbar { grid-template-columns: auto 1fr auto; }
  body .ah2-shop-title { font-size: 40px; }
  body.ah2-noscroll { overflow: hidden; }
  body .ah2-filter-sort-mobile { display: block; }
}

@media (max-width: 768px) {
  body .ah2-shop-main .products,
  body.woocommerce ul.products,
  body .ah2-related ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
  body .ah2-shop-title { font-size: 32px; }
  body .ah2-card-name { font-size: 15px; }
  body .ah2-card-price { font-size: 14px; }
  body .ah2-shop-topbar { grid-template-columns: 1fr auto; gap: 12px; }
  body .ah2-shop-results { grid-column: 1 / -1; }
  body .ah2-shop-sort label { display: none; }
  body .ah2-shop-header { padding: 32px 20px 24px; }
  body .ah2-shop-body { padding: 24px 20px 60px; }
}

@media (max-width: 480px) {
  body .ah2-card-img { padding-top: 100%; }
  body .ah2-card-img img,
  body .ah2-card-img-main { padding: 14px !important; }
}
