/* ---------- products.css (complete) ---------- */
/* Design tokens */
:root {
  --accent: #0f766e;
  --accent-2: #14b8a6;
  --muted: #6b7280;
  --bg: #f9fafb;
  --card-shadow: 0 12px 30px rgba(2,6,23,0.06);
  --card-shadow-strong: 0 22px 60px rgba(2,6,23,0.10);
  --page-max: 1200px;
  --radius: 12px;
  --ease: cubic-bezier(.2,.9,.3,1);
}

/* Reset / base */
* { box-sizing: border-box; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
html, body { height:100%; margin:0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial; background-color: #f0faf9; color:#071617; }
.wrap { max-width: var(--page-max); margin:0 auto; padding: 0 20px; }

/* ---------- HERO / TOP ---------- */
.products-hero {
  background: linear-gradient(180deg,#f0faf9 0%, rgba(15,119,110,0.02) 100%);
  padding: 28px 0 18px;
  border-bottom: 1px solid rgba(11,18,32,0.03);
}
.hero-wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 20px; }
.breadcrumb { font-size:0.95rem; color:var(--muted); margin-bottom:12px; }
.breadcrumb a { color: #0b5560; text-decoration:none; }
.breadcrumb .sep { margin: 0 8px; color:#9aa3a6; }

.hero-grid { display:grid; grid-template-columns: 1fr 420px; gap:28px; align-items: center; }
.hero-left { display:flex; flex-direction:column; gap:8px; }
.hero-title { font-size:2.1rem; margin:0; font-weight:800; color:#071617; }
.hero-lead { color:var(--muted); max-width:760px; line-height:1.5; margin:0; }

.hero-actions { display:flex; gap:12px; align-items:center; margin-top:8px; flex-wrap:wrap; }
.btn { padding:10px 14px; border-radius:10px; font-weight:700; cursor:pointer; border:none; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
.btn.primary { background: linear-gradient(90deg,var(--accent),var(--accent-2)); color:#fff; box-shadow: 0 12px 30px rgba(15,119,110,0.08); }
.btn.ghost { background:transparent; border:1px solid rgba(11,18,32,0.06); color:#071617; }

.sort-select { padding:8px 10px; border-radius:8px; border:1px solid rgba(11,18,32,0.06); background:#fff; font-weight:600; }

.tag-pills { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.pill { background:transparent; border:1px solid rgba(11,18,32,0.06); padding:8px 12px; border-radius:999px; font-weight:700; color:#063f3a; cursor:pointer; transition: transform .14s var(--ease), box-shadow .14s var(--ease); }
.pill:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(2,6,23,0.06); }
.pill.active { background: linear-gradient(90deg,var(--accent),var(--accent-2)); color:#fff; border-color:transparent; box-shadow:0 12px 30px rgba(15,119,110,0.08); }

.hero-media { border-radius:14px; overflow:hidden; box-shadow:0 22px 60px rgba(2,6,23,0.06); background:linear-gradient(180deg,#fff,#f7fffb); padding:6px; }
.hero-media img { width:100%; height:260px; object-fit:cover; display:block; border-radius:10px; }

/* ✅ FIX: make everything under hero use the same page background */
main {
  background-color: #f0faf9;
}

/* ---------- MAIN GRID (filters + products) ---------- */
/* Content grid uses wrap spacing, main.page provides padding bottom to avoid footer overlap */
.content-grid { display:grid; grid-template-columns: 300px 1fr; gap:28px; margin-top:20px; align-items:start; margin-bottom:32px; }

/* ---------- SIDEBAR (now sticky) ---------- */
.filters {
  position: sticky;
  top: var(--header-offset, 110px);
  align-self: start;
  z-index: 6;
  max-height: calc(100vh - var(--header-offset, 110px) - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-right: 8px;
}

/* Custom scrollbar (subtle) */
.filters::-webkit-scrollbar { width: 10px; }
.filters::-webkit-scrollbar-thumb { background: rgba(2,6,23,0.06); border-radius: 8px; }
.filters::-webkit-scrollbar-track { background: transparent; }

.site-footer, #footer-placeholder { z-index: 20; position: relative; }

@media (max-width: 1100px) {
  .filters { position: static; top: auto; max-height: none; overflow: visible; padding-right: 0; z-index: auto; }
}

/* ---------- FILTER CARD / DEFAULTS ---------- */
.filter-card { background:#fff; padding:18px; border-radius:12px; box-shadow:var(--card-shadow); margin-bottom:16px; border:1px solid rgba(11,18,32,0.03); }
.filter-card h4 { margin:0 0 8px; font-size:1.05rem; color:#062b2a; }
.filter-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.filter-btn { background:#fff; border:1px solid rgba(11,18,32,0.06); padding:8px 10px; border-radius:8px; text-align:left; cursor:pointer; font-weight:600; }
.filter-btn.active { background: linear-gradient(90deg,var(--accent),var(--accent-2)); color:#fff; border-color:transparent; box-shadow:0 8px 20px rgba(15,119,110,0.06); }

.chk { display:block; margin-bottom:8px; color:var(--muted); font-weight:600; }
.chk input { margin-right:8px; }

/* ---------- SIDEBAR: Popular Collections + Help & Tools ---------- */
.collections-card .collections-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.collection-item {
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 10px;
  padding: 8px;
  background: linear-gradient(180deg,#fff,#fbfffe);
  border: 1px solid rgba(11,18,32,0.04);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: transform .16s ease, box-shadow .16s ease;
}
.collection-item img {
  width: 56px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(2,6,23,0.04);
}
.collection-item span { font-weight:700; color:#053c39; }
.collection-item:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(2,6,23,0.06); }

/* collection CTA */
.collection-cta { margin-top:12px; }

/* help-card */
.help-card .help-actions { display:flex; flex-direction:column; gap:10px; }
.btn.full { width:100%; justify-content:center; padding:10px 12px; }
.help-card hr { border: none; height: 1px; background: linear-gradient(90deg, rgba(11,18,32,0.02), rgba(11,18,32,0.04)); margin:12px 0; }
.tool-links { display:flex; flex-direction:column; gap:8px; margin-top:8px; }
.tool-link { color: #0b5560; font-weight:700; text-decoration:none; padding:6px 0; }
.tool-link:hover { text-decoration:underline; }

.offers-card .offers-list { padding-left: 14px; margin: 8px 0 0; color: #2b4f4b; }

/* ---------- PRODUCTS AREA ---------- */
.products-area { min-height:200px; }
.category-nav { display:flex; gap:8px; margin-bottom:18px; flex-wrap:wrap; }
.nav-btn { padding:8px 12px; border-radius:999px; border:1px solid rgba(11,18,32,0.06); background:#fff; cursor:pointer; font-weight:700; }

.categories-root { display:flex; flex-direction:column; gap:36px; }

.category-block { margin-bottom:8px; }
.category-block .category-header { margin-bottom:16px; }
.category-block h2 { margin:0 0 6px; color:#062b2a; font-size:1.4rem; }
.category-intro { margin:0 0 12px; color:var(--muted); }

/* product grid inside category */
.product-grid { display:grid; gap:20px; grid-template-columns: repeat(3, 1fr); align-items:start; }

/* product card */
.product-card {
  background:#fff; border-radius:12px; box-shadow: 0 10px 30px rgba(2,6,23,0.04);
  overflow:hidden; transition: transform .18s var(--ease), box-shadow .18s var(--ease); display:flex; flex-direction:column; min-height:240px;
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0 22px 60px rgba(2,6,23,0.08); }
/* ----- Fix: consistent image container for product cards (replace existing .card-media rules) ----- */
.card-media {
  width: 100%;
  height: 160px;                 /* fixed visual height for all cards */
  min-height: 140px;
  display: block;
  overflow: hidden;
  border-radius: 12px 12px 0 0;  /* match product card rounded corners */
  background: linear-gradient(180deg,#f7fffe,#ffffff); /* subtle fallback background */
  box-shadow: 0 8px 18px rgba(2,6,23,0.03);
  position: relative;
}

/* make images fill the container consistently */
.card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;        /* cover keeps aspect and fills area */
  object-position: center;
  border-radius: 0;         /* keep the image flush inside the rounded container */
}

/* small alt-text fallback styling if an image fails to load */
.card-media img[alt] {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

/* keep same look for see-all inline image (if you used inline styles) */
.see-all-card .card-media img {
  height: 150px;            /* keep the slightly shorter height used for see-all cards */
  object-fit: cover;
}

.badge {
  position:absolute; top:8px; right:8px;
  background: linear-gradient(90deg,var(--accent),var(--accent-2));
  color:#fff; padding:6px 8px; border-radius:999px; font-weight:700; font-size:0.85rem;
  box-shadow:0 8px 20px rgba(15,119,110,0.08);
}

.product-body { padding:14px; display:flex; flex-direction:column; gap:8px; margin-top:auto; }
.product-body h4 { margin:0; font-size:1.02rem; color:#073737; }
.product-body .muted { color:var(--muted); font-size:0.95rem; margin:0; }

.product-meta { display:flex; gap:10px; align-items:center; margin-top:8px; }
.btn.small { padding:8px 10px; font-weight:700; border-radius:8px; }

/* ---------- SEE-ALL CARD (IMAGE + VIEW ALL) ---------- */
.see-all-card {
  background: linear-gradient(180deg,#ffffff,#fbfffe);
  border: 1px dashed rgba(15,119,110,0.08);
  border-radius:12px;
  overflow: hidden;
  display:flex;
  flex-direction:column;
  min-height:220px;
  justify-content: flex-start;
  align-items: stretch;
  padding: 0;
  box-shadow: 0 12px 30px rgba(2,6,23,0.04);
}

/* image area on top */
.see-all-card .see-all-media {
  width: 100%;
  height: 140px;
  overflow: hidden;
  display:block;
  background: #f3fffb;
}
.see-all-card .see-all-media img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* body area */
.see-all-card .see-all-body {
  padding: 16px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.see-all-card .see-all-body h4 { margin:0; color:#063f3a; font-size:1.05rem; }
.see-all-card .see-all-body .muted { margin:0; color:var(--muted); }

.see-all-card .view-all-btn {
  width: max-content;
  margin-top: 8px;
}

/* load more */
.load-more-wrap { display:flex; justify-content:center; margin:28px 0; }

/* ---------- QUICK VIEW MODAL ---------- */
.modal { position:fixed; inset:0; display:none; align-items:center; justify-content:center; background: rgba(2,6,23,0.45); z-index:1200; padding:24px; }
.modal[aria-hidden="false"] { display:flex; }
.modal-inner { background:#fff; border-radius:12px; padding:18px; width:100%; max-width:980px; box-shadow: 0 30px 80px rgba(2,6,23,0.3); position:relative; }
.modal-close { position:absolute; right:12px; top:10px; background:transparent; border:none; font-size:18px; cursor:pointer; }
.modal-grid { display:grid; grid-template-columns: 1fr 420px; gap:18px; align-items:start; }
.modal-media img { width:100%; height:320px; object-fit:cover; border-radius:10px; box-shadow: var(--card-shadow); }
.features { list-style:none; padding:0; margin:10px 0 0; }
.features li { margin:6px 0; color:#143836; font-weight:600; }

.book-form label { display:block; margin-bottom:10px; font-weight:600; color:#023a36; }
.book-form input { width:100%; padding:10px 12px; border-radius:8px; border:1px solid rgba(11,18,32,0.06); margin-top:6px; }



/* ---------- RESPONSIVENESS ---------- */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; text-align:center; }
  .hero-right { order:2; }
  .hero-left { order:1; }
  .content-grid { grid-template-columns: 1fr; }
  .filters { order:2; position: static; top: auto; }
  .product-grid { grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-media img { height:240px; }
  .see-all-card { min-height: 200px; }
}
@media (max-width: 760px) {
  .collection-item img { width:48px; height:36px; }
  .hero-media img { height:160px; }
  .card-media img { height:140px; }
  .modal-media img { height:200px; }
  #footer-placeholder .wrap { flex-direction: column; gap: 18px; padding-bottom: 8px; }
}

/* ---------- ACCESSIBILITY / UTILITIES ---------- */
.muted { color:var(--muted); }
.visually-hidden { position:absolute!important; height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap; }

.flash-highlight { box-shadow: 0 0 0 6px rgba(20,184,166,0.06) inset, 0 14px 40px rgba(15,119,110,0.06); transition: box-shadow .24s ease; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Sticky social logos ---------- */
.sticky-social {
  position: fixed;
  right: 24px;
  bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1400;
}

.sticky-social .sticky-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(0,0,0,0.35);
  border: 2px solid #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

/* platform colors */
.sticky-social .sticky-wa { background: #25D366; }
.sticky-social .sticky-ig { background: #E1306C; }
.sticky-social .sticky-fb{ background:#1877F2; }  /* Facebook */
.sticky-social .sticky-icon:hover {
  transform: translateY(-3px) scale(1.03);
  opacity: 0.96;
  box-shadow: 0 16px 30px rgba(0,0,0,0.4);
}

@media (max-width: 640px) {
  .sticky-social {
    right: 16px;
    bottom: 90px;
  }
}
