/*
 * product-layout.css — AV Horeca Solutions
 * Product category pages: tea-coffee-milk, table-top-electrical,
 * table-top-induction, bulk-induction, pots-pans,
 * copper-serveware, buffet-products
 *
 * Phase 5 — uses current design system tokens from global.css
 * DO NOT add product layout rules to global.css.
 */


/* =============================================================
   PAGE HERO (.ph)
   ============================================================= */

.ph {
  background: var(--ink);
  padding: 56px 0 48px;
}

.ph-in {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Breadcrumb inside dark hero */
.bc {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.bc a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.2s;
}

.bc a:hover { color: var(--gold); }

/* Override global .lbl / .sec-title / .sec-desc inside dark hero */
.ph .lbl { color: var(--gold); }

.ph .sec-title {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.85rem;
}

.ph .sec-title span { color: var(--gold); }

.ph .sec-desc {
  color: rgba(255,255,255,0.72);
  max-width: 640px;
}


/* =============================================================
   CATEGORY HERO INTRO BLOCK (.cat-hero)
   ============================================================= */

.cat-hero {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 2.5rem;
}

.cat-hero-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.cat-hero-desc {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 680px;
}

.cat-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.chip {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--ember);
  background: rgba(184,82,10,0.08);
  border: 1px solid rgba(184,82,10,0.18);
  border-radius: 100px;
  padding: 0.28rem 0.75rem;
}

.cat-hero-btns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}


/* =============================================================
   BUTTON BASE + PRODUCT-PAGE VARIANTS
   ============================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  line-height: 1;
  transition: opacity 0.18s, transform 0.18s;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); }

.btn.b-wa { background: #25D366; color: #fff; }
.btn.b-wa:hover { background: #1EBD5A; opacity: 1; }

.btn.b-ol {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}
.btn.b-ol:hover { border-color: var(--ember); color: var(--ember); opacity: 1; }

.btn.b-wh { background: #fff; color: var(--ember); font-weight: 700; }
.btn.b-wh:hover { background: rgba(255,255,255,0.92); opacity: 1; }

.btn.b-tr {
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: #fff;
}
.btn.b-tr:hover { background: rgba(255,255,255,0.18); opacity: 1; }


/* =============================================================
   PRODUCT SECTIONS (.prod-sec)
   ============================================================= */

.prod-sec {
  margin-bottom: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--border-light);
}

.prod-sec:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}


/* =============================================================
   PRODUCT SECTION HEADER (.ps-*)
   ============================================================= */

.ps-hdr {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0 0 1rem 1rem;
  border-left: 3px solid var(--ember);
}

.ps-ic {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.ps-ttl {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.ps-sub {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.5;
}

.ps-badge {
  margin-left: auto;
  flex-shrink: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  align-self: flex-start;
  white-space: nowrap;
}

.ps-badge.t-hero {
  background: rgba(184,82,10,0.1);
  color: var(--ember);
  border: 1px solid rgba(184,82,10,0.2);
}


/* =============================================================
   PRODUCT GRID (.pg)
   ============================================================= */

.pg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}


/* =============================================================
   PRODUCT CARDS (.pf-card)
   ============================================================= */

.pf-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.pf-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/*
 * Reset global .hero section styles — global.css defines .hero as the
 * dark homepage hero. Here it is a card modifier, so we override.
 */
.pf-card.hero {
  background-color: #fff;
  background-image: none;
  padding: 0;
  border-color: rgba(184,82,10,0.28);
  box-shadow: 0 2px 16px rgba(184,82,10,0.08);
}

/* .fast is a visual indicator only — no structural override needed */


/* =============================================================
   CARD IMAGE (.pf-img)
   ============================================================= */

.pf-img {
  aspect-ratio: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-light);
  border-radius: var(--r-md);
  flex-shrink: 0;
  overflow: hidden;
}

.pf-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}


/* =============================================================
   CARD BODY (.pf-body)
   ============================================================= */

.pf-body {
  padding: 1.1rem 1.1rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 1.4rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  border: 1px solid transparent;
}

.tag.t-hero {
  background: rgba(184,82,10,0.09);
  color: var(--ember);
  border-color: rgba(184,82,10,0.2);
}

.tag.t-fast {
  background: rgba(26,107,66,0.09);
  color: var(--trust);
  border-color: rgba(26,107,66,0.2);
}

.pf-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.pf-desc {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.845rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}


/* =============================================================
   MODEL TABLE (.table-wrap / .mt)
   ============================================================= */

.table-wrap {
  overflow-x: auto;
  margin-top: 0.6rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-light);
  -webkit-overflow-scrolling: touch;
}

.mt {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.78rem;
}

.mt thead { background: var(--surface-2); }

.mt th {
  text-align: left;
  padding: 0.45rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.mt td {
  padding: 0.4rem 0.7rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-light);
}

.mt tr:last-child td { border-bottom: none; }

.mt td.model {
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--ember);
  font-weight: 500;
  white-space: nowrap;
}

.pop {
  font-size: 0.63rem;
  font-weight: 700;
  color: var(--ember);
  background: rgba(184,82,10,0.08);
  border: 1px solid rgba(184,82,10,0.18);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 5px;
  vertical-align: middle;
}


/* =============================================================
   CARD FOOTER (.pf-foot)
   ============================================================= */

.pf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1.1rem;
  border-top: 1px solid var(--border-light);
  background: var(--surface-1);
  flex-shrink: 0;
}

.pf-price {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.tbd {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* WhatsApp enquire button inside card footer */
.wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: #25D366;
  color: #fff;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s, transform 0.18s;
  min-height: 36px;
}

.wa-btn:hover { background: #1EBD5A; transform: translateY(-1px); }




/* =============================================================
   EXIT INTENT POPUP
   ============================================================= */

.exit-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.exit-popup {
  max-width: 420px;
  width: 90%;
  background: white;
  border-radius: var(--r-lg);
  padding: 2rem;
  text-align: center;
  position: relative;
}

.exit-popup h3 {
  color: var(--ink);
}

.exit-popup-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  background: rgba(0,0,0,0.06);
  border: none;
  color: var(--ink);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.exit-popup-close:hover { background: rgba(0,0,0,0.12); }

.exit-popup-icon {
  font-size: 2.25rem;
  margin-bottom: 0.6rem;
}

.exit-popup-desc {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.1rem;
}


/* =============================================================
   RESPONSIVE
   ============================================================= */

@media (max-width: 900px) {
  .pg { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .ph          { padding: 42px 0 34px; }
  .cat-hero    { padding: 1.35rem 1.5rem; }
  .cat-hero-name { font-size: 1.1rem; }
  .ps-hdr      { flex-wrap: wrap; }
  .ps-badge    { margin-left: 0; }
  .prod-sec    { margin-bottom: 2.5rem; padding-bottom: 2.5rem; }
}

@media (max-width: 540px) {
  .ph          { padding: 32px 0 26px; }
  .ph-in       { padding: 0 16px; }
  .cat-hero    { border-radius: var(--r-md); padding: 1.1rem; }
  .pg          { grid-template-columns: 1fr; }
  .pf-foot     { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .wa-btn      { justify-content: center; }
  .cat-hero-btns { flex-direction: column; }
  .table-wrap  { border: none; }
  .mt thead    { display: none; }
  .mt td       { display: block; padding: 3px 0; border-top: none; }
  .mt td.model { margin-top: 8px; font-weight: 700; }
  .mt tr       { display: block; border-top: 1px solid var(--border-light); padding: 6px 0; }
  .mt tr:first-child { border-top: none; }
}

/* =============================================================
   WA STICKY BAR — hidden on product pages (mob-bar handles CTAs)
   ============================================================= */
.wa-sticky-bar { display: none !important; }

/* =============================================================
   PRICE ANCHOR
   ============================================================= */
.pf-price-anchor {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: rgba(250,249,246,0.60);
  margin-bottom: 0.5rem;
}
.pf-price-anchor strong {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #FAF9F6;
}

/* ============================================================
   MOBILE AUDIT FIXES
   ============================================================ */

/* WhatsApp card button — was explicitly 36px, raise to 44px */
.wa-btn { min-height: 44px; }

/* Product page generic buttons — 44px on small screens */
@media (max-width: 540px) {
  .btn { min-height: 44px; padding: 0.75rem 1.2rem; }
}

/* Product hero image bar */
.ph-hero-img {
  width: 100%;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.ph-hero-img img {
  max-width: 480px;
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: var(--r-md);
}

@media (max-width: 768px) {
  .ph-hero-img {
    padding: 20px 16px;
  }
  .ph-hero-img img {
    max-width: 300px;
  }
}
