/* ==========================================================================
   Inner pages: listing, search, product, cart, checkout, order success, invoice
   ========================================================================== */

/* ---------- Listing / search ---------- */
.list-shell { gap: 2rem; padding: 1.4rem 0 2.5rem; }
.side-nav { border-radius: var(--r-lg); border-color: var(--line); background: #fff; box-shadow: var(--sh-1); padding: .6rem; top: 150px; }
.side-nav .hd { padding: .7rem .8rem .35rem; }
.side-nav a { border-radius: var(--r-md); padding: .5rem .7rem; transition: background .15s, color .15s; }
.side-nav a .e { background: #f1f1f5; }
.side-nav a.active { background: var(--brand-soft); color: var(--brand-700); box-shadow: inset 3px 0 0 var(--brand); }
.side-nav a.active .e { background: #fff; }
.list-head { padding-bottom: 1rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.list-head h1 { font-size: 1.7rem; }
.list-head h1 small { background: #f1f1f5; border-radius: 999px; padding: .2rem .7rem; margin-left: .4rem; vertical-align: middle; font-size: .78rem !important; }
.crumbs a { color: var(--ink-3); }
.list-head .form-select-sm { border-radius: 999px; padding: .45rem 2rem .45rem 1rem; font-weight: 600; font-size: .84rem; background-color: #fff; }
.filter-chip { padding: .5rem 1rem; box-shadow: var(--sh-1); transition: all .15s; }
.filter-chip:hover { border-color: var(--brand); color: var(--brand); }
.filter-chip.on:hover { color: #fff; }
.noresult { background: #fff; border: 1px dashed #d6d5e0; border-radius: var(--r-xl); padding: 3.5rem 1.5rem; }
.pagination { gap: .3rem; justify-content: center; }
.pagination .page-link { border-radius: var(--r-sm) !important; border: 1px solid var(--line); color: var(--ink-3); font-weight: 600; min-width: 40px; text-align: center; }
.pagination .page-item.active .page-link { color: #fff; }
.filter-panel .f-title { color: var(--ink-3); border-bottom: 1px solid var(--line); padding-bottom: .4rem; }

/* ---------- Product detail ---------- */
.pd-shell { gap: 3rem; padding: 1rem 0 2.5rem; }
.pd-hero { border-radius: var(--r-xl); box-shadow: var(--sh-2); }
.trust-row div { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: .85rem .5rem; box-shadow: var(--sh-1); }
.pd-info h1 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.pd-price { background: #f7f7fa; border: 1px solid #e7e6ee; border-radius: var(--r-lg); padding: 1rem 1.25rem; margin: 1.1rem 0 1.4rem; align-items: center; }
.pd-price b { font-size: 2.1rem; }
.pd-price .off { background: linear-gradient(135deg, #0e7490, #0891b2); border-radius: 999px; padding: .28rem .75rem; }
.var-pill { border-radius: var(--r-md); min-width: 104px; padding: .65rem 1rem; box-shadow: var(--sh-1); position: relative; }
.var-pill.sel { box-shadow: 0 0 0 3px rgba(14, 116, 144, .14); }
.var-pill.sel::after { content: '\F26A'; font-family: 'bootstrap-icons'; position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .75rem; display: grid; place-items: center; }
#pdAdd .btn-add { padding: .8rem 3rem; font-size: .95rem; border-radius: var(--r-md); background: var(--brand); color: #fff; box-shadow: 0 12px 22px -12px rgba(14, 116, 144, .9); }
#pdAdd .btn-add:hover { background: var(--brand-600); }
#pdAdd .btn-add.oos { background: #f3f4f4; color: #8c8b95; box-shadow: none; }
.info-card { border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh-1); padding: 1.3rem 1.5rem; }
.info-card h6 { font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); padding-bottom: .7rem; border-bottom: 1px solid var(--line); margin-bottom: .9rem; }
.info-card dl { gap: .65rem 1rem; }
.tag-pill { border: 1px solid #cfe6ec; }

/* ---------- Cart ---------- */
.cart-title { font-size: 1.7rem; font-weight: 800; letter-spacing: -.035em; margin-bottom: 1.2rem; }
.co-grid { gap: 1.8rem; }
.co-card { padding: 1.4rem 1.5rem; margin-bottom: 1.1rem; border-color: #e9e9ed; }
.c-line { padding: 1rem 0; }
.c-line .nm { font-size: .95rem; color: var(--ink); }
.c-line .nm:hover { color: var(--brand); }
.c-thumb { border-radius: var(--r-md); border: 1px solid rgba(0, 0, 0, .05); }
.bill-row { padding: .38rem 0; font-size: .9rem; }
.bill-row.total { font-size: 1.12rem; border-top: 1.5px dashed #d0cfd8; }
.c-save { background: linear-gradient(135deg, #e8e7f6, #ecf9fb); color: var(--brand-700); border: 1px solid #cfe6ec; border-radius: var(--r-md); }
.btn-checkout { border-radius: var(--r-md); padding: 1rem 1.3rem; font-size: 1rem; box-shadow: 0 16px 28px -14px rgba(14, 116, 144, .9); transition: transform .15s, box-shadow .15s, background .15s; }
.btn-checkout:hover { transform: translateY(-2px); }
.btn-checkout.disabled { box-shadow: none; }
.coupon-box .btn { border-radius: var(--r-md); padding-inline: 1.3rem; }
.coupon-applied { border-radius: var(--r-md); background: #ecf9fb; }

/* ---------- Checkout ---------- */
.co-card h5 { font-size: 1.05rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; }
.co-card h5 .n { width: 30px; height: 30px; box-shadow: 0 6px 12px -6px rgba(14, 116, 144, .8); }
.opt .box { border-radius: var(--r-md); padding: 1rem 1.1rem; box-shadow: var(--sh-1); }
.opt:hover .box { border-color: #9fcbd6; }
.opt input:checked + .box { box-shadow: 0 0 0 3px rgba(14, 116, 144, .14); }
.pay-opt .pi { border-radius: var(--r-md); }
.opt input:checked + .box .pi { background: #fff; color: var(--brand); }
.co-summary .co-card:first-child { border-top: 4px solid var(--brand); }
.sum-item { padding: .4rem 0; }
#placeBtn:disabled { background: #b8b7c4; box-shadow: none; }

/* ---------- Order success / tracking ---------- */
.success-card { display: flex; gap: 1.4rem; align-items: center; background: linear-gradient(135deg, #ecf9fb, #fff); border: 1px solid #cfe6ec; border-radius: var(--r-xl); padding: 1.6rem 1.8rem; box-shadow: var(--sh-2); }
.success-card h3 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.03em; margin: 0 0 .25rem; }
.success-card p { margin: 0; color: var(--ink-3); font-size: .94rem; }
.tick-anim { flex-shrink: 0; width: 72px; height: 72px; color: var(--brand); background: #fff; border-radius: 50%; padding: 10px; box-shadow: 0 0 0 8px rgba(14, 116, 144, .1); }
.tick-anim circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: dash .7s ease forwards; }
.tick-anim path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: dash .45s .55s ease forwards; }
@keyframes dash { to { stroke-dashoffset: 0; } }
.track-hero { border-radius: var(--r-xl); padding: 1.8rem 2rem; box-shadow: var(--sh-2); }
.track-hero .eta-big { background: rgba(255, 255, 255, .16); display: inline-block; padding: .3rem 1rem; border-radius: var(--r-md); font-size: 1.6rem; }
.stepper li.done .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepper li.current .dot { background: var(--accent); border-color: var(--brand); box-shadow: 0 0 0 6px rgba(255, 122, 89, .35); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(255, 122, 89, .12); } }
.stepper::before { background: #e6e5eb; height: 4px; border-radius: 4px; }
.timeline li::before { background: var(--brand); }
.timeline li:first-child::before { box-shadow: 0 0 0 4px rgba(14, 116, 144, .18); }
.otp-card { border-radius: var(--r-lg); }

/* ---------- Invoice ---------- */
.invoice { max-width: 840px; border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 0; overflow: hidden; margin: 1.5rem auto 3rem; border-top: 6px solid var(--brand); }
.invoice > * { margin-left: 2.4rem; margin-right: 2.4rem; }
.inv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; padding-top: 2rem; }
.inv-title { text-align: right; }
.inv-title h4 { font-weight: 800; letter-spacing: .06em; font-size: 1.5rem; margin: 0 0 .4rem; color: var(--ink); }
.inv-paid { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .8rem; border-radius: 999px; background: #fef3c7; color: #92400e; }
.inv-paid.ok { background: #e1dff9; color: #164e63; }
.inv-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem 1.5rem; background: #f6f6fa; border: 1px solid #e4e3ec; border-radius: var(--r-md); padding: 1.1rem 1.3rem; margin-top: 1.6rem; margin-bottom: 1.6rem; }
.inv-meta small { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; margin-bottom: .15rem; }
.inv-meta b { font-size: .92rem; display: block; }
.inv-meta span { font-size: .82rem; color: var(--ink-3); display: block; line-height: 1.5; }
.inv-meta > div:last-child { grid-column: 1 / -1; border-top: 1px dashed #d6d5e0; padding-top: .9rem; }
.inv-table { font-size: .88rem; }
.inv-table thead th { background: var(--ink); color: #fff; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; padding: .65rem .75rem; border: 0; }
.inv-table thead th:first-child { border-radius: 10px 0 0 10px; }
.inv-table thead th:last-child { border-radius: 0 10px 10px 0; }
.inv-table tbody td { padding: .7rem .75rem; border-color: #eeeef2; }
.inv-totals { background: #f6f6fa; border-radius: var(--r-md); padding: .8rem 1.2rem; margin-top: .6rem; }
.invoice .kv.total { font-size: 1.15rem; border-top: 2px solid var(--ink); margin-top: .3rem; padding-top: .7rem; }
.invoice .kv.total span:first-child { color: var(--ink); font-weight: 800; }
.invoice .kv.total span:last-child { color: var(--brand-700); font-weight: 800; }
.inv-foot { margin: 1.8rem 0 0; padding: 1.1rem 2.4rem; background: #f6f6fa; border-top: 1px solid #e4e3ec; text-align: center; }
.inv-foot b { display: block; font-size: .95rem; }
.inv-foot span { font-size: .76rem; color: var(--muted); }

@media (max-width: 991.98px) {
    .list-shell { gap: .9rem; }
    .pd-shell { gap: 1.2rem; }
    .co-grid { gap: 1rem; }
}
@media (max-width: 767.98px) {
    .invoice > * { margin-left: 1.1rem; margin-right: 1.1rem; }
    .inv-foot { margin-left: 0; margin-right: 0; padding: 1rem 1.1rem; }
    .inv-meta { grid-template-columns: 1fr 1fr; }
    .inv-title { text-align: left; }
    .success-card { flex-direction: column; text-align: center; padding: 1.4rem 1.1rem; }
    .success-card .d-flex { justify-content: center; }
    .track-hero { padding: 1.3rem 1.2rem; }
    .pd-price b { font-size: 1.8rem; }
}
@media print {
    body.shop { background: #fff; }
    .invoice { box-shadow: none; margin: 0; max-width: none; border-radius: 0; }
    .inv-table thead th, .inv-meta, .inv-totals, .inv-foot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .shop-header, .bottom-nav, .announce, .cart-fab { display: none !important; }
}
