/* ==========================================================================
   5) PAGES — home, shop, product, cart, checkout, account, login, info pages
   ========================================================================== */

/* ---------- HOME: hero slider (full width, admin-managed) ---------- */
.hero { position: relative; width: 100%; background: #e9eef5; }
.hero-box { position: relative; width: 100%; aspect-ratio: 18 / 5; overflow: hidden; }   /* reserved space = no layout jump */
.hero-box.loading { background: linear-gradient(100deg, #e9eef5 30%, #f6f8fb 50%, #e9eef5 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.hs { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .55s ease, visibility .55s; }
.hs.on { opacity: 1; visibility: visible; z-index: 1; }
.hs a, .hs picture, .hs img { display: block; width: 100%; height: 100%; }
.hs img { object-fit: cover; }
.hs-cap { position: absolute; z-index: 2; left: var(--gutter); bottom: 16%; max-width: min(520px, 70%); color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .55); }
.hs-cap b { display: block; font-size: clamp(15px, 3.4vw, 34px); line-height: 1.25; }
.hs-cap span { display: block; font-size: clamp(11px, 1.8vw, 17px); opacity: .95; margin-top: 4px; }
.hs-cap .btn { margin-top: 10px; min-height: 32px; padding: 0 14px; font-size: 13px; text-shadow: none; }
.hero-dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; }
.hero-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .6); transition: width .2s, background .2s; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.hero-dots button[aria-current="true"] { width: 22px; background: #fff; }
.hero-nav { display: none; }
@media (min-width: 900px) {
  .hero-nav { display: grid; place-items: center; position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .88); box-shadow: var(--shadow); }
  .hero-nav:hover { background: #fff; }
  .hero-prev { left: 16px; } .hero-next { right: 16px; }
  .hero-dots { bottom: 14px; } .hero-dots button { width: 10px; height: 10px; } .hero-dots button[aria-current="true"] { width: 28px; }
}

/* ---------- HOME: top categories + partners (auto-sliding rails) ---------- */
.cat-rail .rail { gap: 14px; }
.cat-item { width: 82px; display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; color: var(--text); font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.cat-item:hover { text-decoration: none; color: var(--brand-dark); }
.cat-bubble { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--brand-soft); color: var(--brand); border: 3px solid #fff; box-shadow: var(--shadow-sm); transition: transform .18s; }
.cat-item:hover .cat-bubble { transform: scale(1.06); }
.cat-bubble img { width: 100%; height: 100%; object-fit: cover; }
.cat-bubble .ic { width: 30px; height: 30px; }
.cat-item:nth-child(6n+2) .cat-bubble:not(.has-img) { background: var(--accent-soft); color: var(--accent-dark); }
.cat-item:nth-child(6n+3) .cat-bubble:not(.has-img) { background: #e3f7ee; color: #0a8a58; }
.cat-item:nth-child(6n+4) .cat-bubble:not(.has-img) { background: #f1eaff; color: #7c3aed; }
.cat-item:nth-child(6n+5) .cat-bubble:not(.has-img) { background: #ffe9ee; color: #e11d48; }
.cat-item span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 900px) { .cat-item { width: 118px; font-size: 14px; } .cat-bubble { width: 92px; height: 92px; } .cat-bubble .ic { width: 40px; height: 40px; } .cat-rail .rail { gap: 22px; } }

.partners-title { text-align: center; margin-bottom: 14px; }
.partners-title h2 { margin: 0; }
.partners-title p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.partner { width: 138px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); display: block; }
.partner img { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (min-width: 900px) { .partner { width: 210px; border-radius: 14px; } .rail.partner-rail { gap: 18px; } }
.home-block { position: relative; }
.flash-label { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent-dark); font-size: 12.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }

/* ---------- SHOP ---------- */
.shop-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 14px; }
.shop-bar h1 { font-size: 20px; margin: 0; line-height: 1.25; }
.shop-bar small { display: block; color: var(--muted); font-size: 13.5px; font-weight: 500; margin-top: 2px; }
.shop-bar .select { width: auto; min-width: 150px; min-height: 42px; font-size: 14.5px; padding: 6px 34px 6px 12px; flex: none; }
@media (min-width: 900px) { .shop-bar h1 { font-size: 26px; } }
.pgrid.is-loading { opacity: .55; pointer-events: none; transition: opacity .15s; }

/* ---------- PRODUCT PAGE ---------- */
.pd { display: grid; gap: 20px; margin-top: 8px; }
@media (min-width: 900px) { .pd { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; } }
.pd-gallery { min-width: 0; }
.pd-main { aspect-ratio: 1 / 1; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: grid; place-items: center; }
.pd-main img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.pd-thumbs::-webkit-scrollbar { display: none; }
.pd-thumbs button { flex: none; width: 66px; height: 66px; padding: 0; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.pd-thumbs button[aria-current="true"] { border-color: var(--brand); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info h1 { font-size: 22px; line-height: 1.4; }   /* the product page shows the full name */
@media (min-width: 900px) { .pd-info h1 { font-size: 28px; } }
.pd-cat { display: inline-block; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--brand-dark); background: var(--brand-soft); padding: 2px 12px; border-radius: 999px; }
.pd-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.pd-price strong { font-size: 30px; color: var(--brand-dark); font-weight: 800; }
.pd-price s { color: var(--muted); font-size: 17px; }
.pd-price .off { background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.pd-short { color: var(--text-2); }
.pd-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); margin: 10px 0 16px; }
.pd-buy { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.pd-buy .btn { flex: 1; min-width: 150px; }
.pd-trust { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 16px; }
.pd-trust div { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); font-size: 13.5px; font-weight: 600; }
.pd-trust .ic { color: var(--brand); width: 22px; height: 22px; }
.pd-sections { display: grid; gap: 14px; margin-top: 26px; }
.pd-box { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.pd-box h2 { font-size: 19px; }
.pd-list { list-style: none; display: grid; gap: 8px; }
.pd-list li { display: flex; gap: 10px; align-items: flex-start; }
.pd-list .ic { color: var(--ok); margin-top: 3px; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 38%; color: var(--muted); font-weight: 600; background: var(--bg); }
.why-grid { display: grid; gap: 10px; } @media (min-width: 700px) { .why-grid { grid-template-columns: repeat(3, 1fr); } }
.why-grid div { background: var(--bg); border-radius: var(--r); padding: 14px; } .why-grid b { display: block; margin-bottom: 4px; }

/* ---------- CART ---------- */
.co-grid { display: grid; gap: 18px; align-items: start; }
@media (min-width: 960px) { .co-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 26px; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; }
.panel > h2 { font-size: 18px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-i { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 14px; font-style: normal; font-weight: 800; }
.cart-line { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-line:last-child { border-bottom: 0; }
.cart-line .cl-img { width: 70px; height: 70px; border-radius: 12px; overflow: hidden; background: var(--bg); display: block; }
.cart-line .cl-img img { width: 100%; height: 100%; object-fit: cover; }
.cl-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; color: var(--text); }
.cl-name:hover { text-decoration: none; color: var(--brand-dark); }
.cl-price { color: var(--muted); font-size: 13.5px; }
.cl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.cl-total { font-weight: 800; color: var(--brand-dark); }
.cl-del { border: 0; background: none; color: var(--danger); padding: 6px; border-radius: 8px; }
.cl-del:hover { background: var(--danger-soft); }
.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
@media (min-width: 960px) { .summary { position: sticky; top: calc(var(--hdr-h) + 16px); } }
.summary h2 { font-size: 18px; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; color: var(--text-2); }
.sum-line.total { border-top: 1.5px dashed var(--line-2); margin-top: 6px; padding-top: 12px; font-size: 19px; font-weight: 800; color: var(--text); }
.sum-line.total span:last-child { color: var(--brand-dark); }
.free-ship { font-size: 13px; color: var(--ok); background: var(--ok-soft); border-radius: 10px; padding: 8px 12px; margin-top: 8px; }

/* ---------- CHECKOUT (full product names, no cutting) ---------- */
.sum-items { display: grid; gap: 12px; margin-bottom: 8px; }
.sum-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.sum-item img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--bg); }
.full-name { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; line-height: 1.45; font-weight: 600; font-size: 14.5px; }
.sum-item small { color: var(--muted); display: block; }
.sum-item b { white-space: nowrap; }
.pay-options { display: grid; gap: 10px; }
.pay-opt { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1.5px solid var(--line-2); border-radius: var(--r); cursor: pointer; background: #fff; }
.pay-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.pay-opt input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.pay-opt b { display: block; } .pay-opt small { color: var(--muted); }
.pay-note { margin-top: 12px; font-size: 14px; color: var(--text-2); }
.order-success { text-align: center; max-width: 560px; margin: 24px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 20px; }
.os-ic { width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.os-ic .ic { width: 38px; height: 38px; }
.os-ref { display: inline-block; font-size: 22px; font-weight: 800; letter-spacing: .5px; background: var(--bg); padding: 6px 18px; border-radius: 12px; margin: 8px 0 14px; }
.os-rows { text-align: left; display: grid; gap: 8px; margin: 14px 0; }
.os-rows div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }

/* ---------- LOGIN / ACCOUNT ---------- */
.auth-card { max-width: 460px; margin: 22px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 18px; gap: 4px; }
.tabs button { min-height: 40px; border: 0; border-radius: 9px; background: none; font-weight: 700; color: var(--muted); }
.tabs button[aria-selected="true"] { background: #fff; color: var(--brand-dark); box-shadow: var(--shadow-sm); }
.acc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.acc-head h1 { margin: 0; font-size: 22px; }
.order-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; margin-bottom: 12px; }
.oc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.oc-top b { font-size: 16px; }
.oc-meta { color: var(--muted); font-size: 13.5px; margin: 4px 0 10px; }
.oc-items { display: grid; gap: 8px; margin-bottom: 10px; }
.oc-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.oc-item img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--bg); }
.oc-item .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px dashed var(--line-2); padding-top: 10px; }

/* ---------- INFO PAGES (about / contact / faq) ---------- */
.info-hero { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: var(--on-navy); padding: 34px 0; text-align: center; }
.info-hero h1 { color: inherit; margin-bottom: 6px; } .info-hero p { margin: 0 auto; max-width: 620px; opacity: .88; }
.grid-2 { display: grid; gap: 18px; } @media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.contact-cards { display: grid; gap: 12px; margin: 18px 0; } @media (min-width: 700px) { .contact-cards { grid-template-columns: repeat(3, 1fr); } }
.cc { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.cc .ic { color: var(--brand); width: 26px; height: 26px; margin-top: 2px; } .cc b { display: block; } .cc span, .cc a { color: var(--text-2); font-size: 14.5px; }
.map-frame { width: 100%; height: 300px; border: 0; border-radius: var(--r-lg); background: var(--bg); }
.stat-row { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin: 18px 0; } @media (min-width: 760px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat-row div { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; text-align: center; }
.stat-row b { display: block; font-size: 26px; color: var(--brand-dark); }
.about-img { width: 100%; border-radius: var(--r-lg); display: block; }
.not-found { text-align: center; padding: 70px 16px; } .not-found .big { font-size: 90px; font-weight: 800; color: var(--brand); line-height: 1; }
.gallery-4 { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 12px 0 8px; }
.gallery-4 img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); display: block; }
@media (min-width: 800px) { .gallery-4 { grid-template-columns: repeat(4, 1fr); } }
