/* =====================================================
   responsive.css - phones, iPhones, tablets, laptops
   + scroll motion (loads after luxe.css)
   ===================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { overflow-x: hidden; }
img, video, iframe { max-width: 100%; }
/* 16px inputs stop iOS Safari zooming on focus */
input, select, textarea { font-size: 16px; }
.btn, button { touch-action: manipulation; }

/* ---------- Scroll progress line ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, #B8935A, #E3C58F); transform: scaleX(0); transform-origin: left; z-index: 2000; pointer-events: none; }

/* ---------- Header: hide on scroll down, show on scroll up ---------- */
.main-header { transition: transform .45s cubic-bezier(.22,.61,.36,1), background .3s, box-shadow .3s; will-change: transform; }
.main-header.hide { transform: translate3d(0, -110%, 0); }
/* The header must never change height on scroll: a height change near the 20px threshold shifts the page and
   re-triggers the scroll handler, which made the header and announcement bar flicker at the top of the page. */
.main-header, .main-header.scrolled { padding-top: 16px; padding-bottom: 16px; transition: transform .45s cubic-bezier(.22,.61,.36,1), background-color .3s, box-shadow .3s; }
.main-header.scrolled { box-shadow: 0 8px 30px rgba(42,26,20,.08); }
html { overflow-anchor: none; }

/* ---------- Burger + mobile menu ---------- */
.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--color-border); background: transparent; align-items: center; justify-content: center; flex-direction: column; gap: 5px; border-radius: 2px; padding: 0; }
.burger span { display: block; width: 18px; height: 1.5px; background: var(--color-dark); transition: transform .3s, opacity .2s; }
.burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.mobile-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg-primary); border-bottom: 1px solid var(--color-border); box-shadow: 0 24px 40px rgba(42,26,20,.12); padding: 6px 20px 18px; display: none; flex-direction: column; max-height: calc(100dvh - 120px); overflow-y: auto; }
.mobile-nav.open { display: flex; animation: navIn .35s cubic-bezier(.22,.61,.36,1) both; }
@keyframes navIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.mobile-nav a { padding: 16px 4px; border-bottom: 1px solid var(--color-border); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; }
.mobile-nav .mobile-nav-cta { margin-top: 14px; border: 0; background: var(--color-dark); color: #F5EDE4; text-align: center; padding: 15px; letter-spacing: 1.5px; }

/* ---------- Reveal motion ---------- */
.reveal { opacity: 0; transform: translate3d(0, 44px, 0); transition: opacity 1.1s cubic-bezier(.16,.84,.3,1) var(--d, 0ms), transform 1.1s cubic-bezier(.16,.84,.3,1) var(--d, 0ms); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; will-change: auto; }
.reveal-img { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s cubic-bezier(.77,0,.18,1); overflow: hidden; }
.reveal-img.in { clip-path: inset(0); }
.custom-img-card img { transform: scale(1.1); will-change: transform; }
.section-header .section-title::after { transform: scaleX(0); transition: transform 1s cubic-bezier(.22,.61,.36,1) .35s; }
.section-header.in .section-title::after { transform: scaleX(1); }
.no-motion .reveal-img, html.no-motion .reveal-img { clip-path: none; }
.no-motion .main-header { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-img { opacity: 1; transform: none; clip-path: none; transition: none; }
  .section-header .section-title::after { transform: none; transition: none; }
  .main-header { transition: none; }
  .custom-img-card img { transform: none; }
}

/* ---------- Product modal: fixed footer overlap + image framing ---------- */
.modal-overlay { padding: 12px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
.modal-content-wrapper { width: 100%; max-width: 920px; max-height: calc(100dvh - 24px); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
.modal-gallery { aspect-ratio: 1 / 1; height: auto; min-height: 0; position: sticky; top: 0; align-self: start; overflow: hidden; }
.modal-gallery img { position: absolute; inset: 0; object-position: center; }
.modal-gallery .emoji-tile { position: absolute; inset: 0; min-height: 0; }
.modal-info-panel { padding: 40px 36px 32px; min-width: 0; }
.modal-title { font-size: clamp(26px, 3.4vw, 34px); padding-right: 44px; line-height: 1.15; }
.modal-close-btn { top: 14px; right: 14px; position: absolute; }
.switch-container { flex-wrap: wrap; gap: 10px; }
.switch-label-details > div { display: flex; flex-direction: column; gap: 2px; }
.switch-title, .switch-subtitle { display: block; }
.weight-selector { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.modal-footer { flex-wrap: wrap; gap: 14px; }
.qty-selector { flex: 0 0 auto; }
.modal-price-panel { flex: 1 1 100px; min-width: 90px; }
.modal-footer > .flex { flex: 1 1 100% !important; display: flex; gap: 10px; }
.modal-add-to-cart-btn { white-space: nowrap; padding: 16px 20px; }
.btn-whatsapp-inquiry { flex: 0 0 56px; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Cart drawer ---------- */
.cart-drawer { height: 100dvh; max-width: 480px; padding-bottom: env(safe-area-inset-bottom); }
.cart-items-container { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.checkout-form-container { -webkit-overflow-scrolling: touch; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.whatsapp-bubble { bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px)); right: max(20px, env(safe-area-inset-right)); }

/* ---------- Product grid + category tabs ---------- */
.product-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.category-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs .tab-btn { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
.search-filter-container { flex-wrap: wrap; gap: 12px; }
.search-input-wrapper { flex: 1 1 260px; min-width: 0; }

/* ---------- Laptops / large tablets (<= 1024) ---------- */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .burger { display: inline-flex; }
  .main-header .container { gap: 10px; }
  .nav-actions { display: flex; align-items: center; gap: 8px; }
  #mobile-cart-btn { display: none !important; }
  .cart-icon-btn { display: inline-flex !important; }
  .hero2-grid { gap: 36px; }
}

/* ---------- Tablets (<= 900) ---------- */
@media (max-width: 900px) {
  .hero2 { padding: 56px 0 110px; }
  .hero2-grid { grid-template-columns: 1fr; text-align: center; }
  .hero2-copy > p { margin-left: auto; margin-right: auto; }
  .hero-btns, .hero-points { justify-content: center; }
  .hero2-visual { padding: 18px 18px 0 0; }
  .frame { width: min(400px, 88%); }
  .trust-strip { grid-template-columns: repeat(2, 1fr); gap: 22px 10px; }
  .trust-strip > div { border-left: 0; padding: 0; }
  .corp-grid { grid-template-columns: repeat(2, 1fr); }
  .corp-form-wrap { grid-template-columns: 1fr; padding: 28px; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .shops-grid, .custom-grid, .contact-grid { grid-template-columns: 1fr; }
  .custom-img-card { height: auto; aspect-ratio: 4 / 3; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-gallery { position: relative; aspect-ratio: 4 / 3; }
  .modal-info-panel { padding: 26px 22px 24px; }
}

/* ---------- Phones (<= 600) ---------- */
@media (max-width: 600px) {
  .container { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .announcement-bar { font-size: 10px; letter-spacing: .6px; padding: 8px 12px; line-height: 1.5; }
  .logo-text { font-size: 17px; letter-spacing: 3px; }
  .logo-tagline { font-size: 8px; letter-spacing: 2px; margin-top: 4px; }
  .nav-logo img { width: 38px; height: 38px; }
  .nav-actions .contact-card-icon { display: none; }
  .hero2 { padding: 40px 0 96px; }
  .hero2::before { inset: 8px; }
  .hero2 h1 { font-size: clamp(34px, 10.5vw, 46px); }
  .hero2-copy > p { font-size: 15.5px; }
  .hero-btns { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-btns .btn { width: 100%; justify-content: center; text-align: center; }
  .hero-points { flex-direction: column; align-items: center; gap: 8px; }
  .frame { width: 84%; }
  .frame::before { inset: -10px; }
  .trust-wrap { margin-top: -44px; }
  .trust-strip { padding: 20px 16px; }
  .trust-strip h4 { font-size: 17px; }
  .corp-section, .shops-section, .steps-section { padding-top: 60px; padding-bottom: 50px; }
  .corp-grid, .steps-grid { grid-template-columns: 1fr; }
  .corp-form { padding: 18px; }
  .corp-form-wrap { padding: 18px; }
  .corp-form-intro h3 { font-size: 28px; }
  .form-row, .corp-form .form-row { grid-template-columns: 1fr !important; }
  .section-title { font-size: clamp(28px, 8vw, 38px); }
  .section-sub { font-size: 14.5px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-content { padding: 12px; }
  .card-title { font-size: 17px; line-height: 1.2; }
  .card-desc { display: none; }
  .card-price { font-size: 20px; }
  .card-tags { max-width: calc(100% - 16px); }
  .card-tag { font-size: 8.5px; letter-spacing: 1px; padding: 3px 6px; }
  .add-btn-sm { width: 34px; height: 34px; }
  .shop-map iframe { height: 220px; }
  .shop-body { padding: 20px; }
  .shop-actions .btn { flex: 1 1 140px; justify-content: center; }
  .local-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-content-wrapper { max-height: 94dvh; border-radius: 14px 14px 0 0; }
  .modal-gallery { aspect-ratio: 1 / 1; }
  .modal-info-panel { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .weight-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-footer { position: sticky; bottom: calc(-1 * (20px + env(safe-area-inset-bottom))); background: var(--bg-primary); margin-left: -16px; margin-right: -16px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 24px rgba(42,26,20,.08); }
  .cart-drawer { max-width: 100%; }
  .pay-options { grid-template-columns: 1fr; }
  .page-hero { padding: 48px 0 56px; }
  .page-body { padding: 48px 0 64px; }
  .page-body h2 { font-size: 27px; }
}

/* ---------- Small phones (<= 380, e.g. iPhone SE / mini) ---------- */
@media (max-width: 380px) {
  .logo-text { font-size: 14px; letter-spacing: 2px; }
  .logo-tagline { font-size: 7px; letter-spacing: 1.4px; }
  .nav-logo img { width: 32px; height: 32px; }
  .nav-logo { gap: 8px; }
  .burger, .cart-icon-btn { width: 38px; height: 38px; }
  .product-grid { gap: 10px; }
  .card-title { font-size: 15px; }
  .hero2 h1 { font-size: 32px; }
  .trust-strip { grid-template-columns: 1fr; }
}

/* ---------- Landscape phones: keep modals reachable ---------- */
@media (max-height: 480px) and (orientation: landscape) {
  .modal-content-wrapper { max-height: 100dvh; border-radius: 0; }
  .modal-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .modal-gallery { aspect-ratio: 1 / 1; position: sticky; }
  .hero2 { padding: 32px 0 80px; }
}

/* ---------- Very large screens ---------- */
@media (min-width: 1500px) { .container { max-width: 1320px; } }

/* sub-pages: header CTA icon-only on small phones */
@media (max-width: 420px) { .nav-actions .btn-primary { padding: 11px 14px !important; font-size: 0; } .nav-actions .btn-primary i { font-size: 16px; margin: 0; } }

/* ---------- Mobile polish (v3) ---------- */
@media (max-width: 600px) {
  .hero-btns { align-items: stretch; width: 100%; margin: 24px 0 18px; }
  .hero-btns .btn, .hero2 .hero-btns .btn { width: 100%; max-width: none; justify-content: center; }
  .hero-pill { font-size: 10px; letter-spacing: 3px; line-height: 1.8; }
  .hero-points { font-size: 13px; gap: 6px; }
  .hero2-copy > p { margin-top: 0; }
  .card-tag { font-size: 9.5px; letter-spacing: .8px; }
  .whatsapp-bubble { width: 54px; height: 54px; font-size: 28px; right: 14px; bottom: max(14px, calc(env(safe-area-inset-bottom) + 8px)); }
  .main-footer { padding-bottom: 92px; }
  .footer-hours li { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 14px; }
  .footer-hours li span { text-align: left; max-width: 100%; }
  .footer-copyright { text-align: left; line-height: 1.7; }
  .faq summary { font-size: 15px; padding: 16px 0; }
  .step { text-align: left; display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; align-items: start; }
  .step span { grid-row: span 2; margin: 0; }
  .step h4 { margin: 2px 0 4px; }
  .local-grid a { padding: 18px; }
  .cart-summary-line { gap: 12px; }
  .cart-summary-line span:last-child { text-align: right; }
  .checkout-form-container { padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
  .cart-drawer-header { padding: 18px 16px; }
  .cart-item-bottom { flex-wrap: wrap; gap: 10px; }
}

/* ---------- Large Android phones and small foldables (400-900 px) ---------- */
@media (min-width: 400px) and (max-width: 900px) {
  .card-desc { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; line-height: 1.5; margin: 6px 0 10px; }
}
@media (min-width: 481px) and (max-width: 900px) {
  .hero-btns { flex-direction: row; justify-content: center; align-items: center; flex-wrap: wrap; width: auto; }
  .hero-btns .btn, .hero2 .hero-btns .btn { width: auto; min-width: 210px; }
  .hero-points { flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 8px 22px; }
  .frame { width: min(380px, 72%); }
  .corp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .local-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-overlay { padding: 0; align-items: center; }
  .modal-content-wrapper { max-width: 560px; border-radius: 6px; }
}
@media (min-width: 400px) and (max-width: 600px) {
  .product-grid { gap: 14px; }
  .section-title { font-size: clamp(30px, 7.6vw, 40px); }
}
@media (min-width: 481px) and (max-width: 900px) {
  .hero-btns { width: 100%; }
  .hero-btns .btn, .hero2 .hero-btns .btn { flex: 1 1 200px; min-width: 0; max-width: 250px; padding-left: 16px; padding-right: 16px; white-space: nowrap; }
}
