:root {
    --navy: #0F2A4A;
    --navy-deep: #081b30;
    --gold: #F5A623;
    --gold-soft: #FFD37E;
    --emerald: #1B7A43;
    --sky: #2E6DA4;
    --cream: #FAF7F0;
    --paper: #FFFFFF;
    --ink: #12202f;
    --ink-soft: #4a5a6b;
    --line: rgba(15, 42, 74, 0.12);
    --shadow: 0 20px 50px -20px rgba(15, 42, 74, 0.35);
    --danger: #c0392b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

h1,
h2,
h3,
h4 {
    font-family: 'Sora', sans-serif;
    color: var(--navy);
}

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
}

header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 247, 240, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .3s ease;
}

header.scrolled {
    box-shadow: 0 8px 30px -14px rgba(15, 42, 74, 0.25);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 32px;
    max-width: 1180px;
    margin: 0 auto;
}

.brand img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
}

.brand-name {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--navy);
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-name span {
    color: var(--gold);
}

.brand-tag {
    font-size: 0.56rem;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

nav.links {
    display: flex;
    gap: 34px;
    align-items: center;
}

nav.links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink);
    position: relative;
    padding: 4px 0;
}

nav.links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width .25s ease;
}

nav.links a:hover::after {
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--navy);
    color: #fff;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    border: 1px solid var(--navy);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -10px rgba(15, 42, 74, 0.5);
}

.btn.gold {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy-deep);
}

.btn.gold:hover {
    box-shadow: 0 12px 24px -10px rgba(245, 166, 35, 0.6);
}

.btn.ghost {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--navy);
}

.btn.ghost:hover {
    background: var(--navy);
    color: #fff;
}

.btn.small {
    padding: 8px 16px;
    font-size: 0.78rem;
}

.nav-cta {
    padding: 8px 16px !important;
    border-radius: 999px !important;
    font-size: 0.76rem !important;
    letter-spacing: 0.02em;
}

.nav-cta.gold {
    box-shadow: 0 4px 14px -6px rgba(245, 166, 35, 0.55);
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
}

.burger span {
    width: 24px;
    height: 2px;
    background: var(--navy);
    display: block;
}

.stock-pill.in { background: rgba(27, 122, 67, 0.12); color: var(--emerald); }

.stock-pill.low { background: rgba(245, 166, 35, 0.18); color: #a5680a; }

.product-card.out-of-stock .img-wrap img { filter: grayscale(60%); opacity: 0.7; }

.review-locked-note { font-size: 0.86rem; color: var(--ink-soft); margin: 0; }

.pp-related-title {
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: 22px;
}

.product-card .img-wrap {
    aspect-ratio: 1/1;
    background: #f0ede5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-card .body .rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.admin-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.admin-modal.open .admin-modal-card {
    transform: translateY(0);
}

.admin-modal-card .modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--navy);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease;
}

.admin-modal-card .modal-close:hover {
    background: var(--cream);
}

.admin-modal-card h2 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.delivery-breakdown {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    margin: 4px 0 14px;
    background: rgba(15, 42, 74, 0.03);
}

.delivery-breakdown .db-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--ink-soft);
    padding: 4px 0;
}

.delivery-breakdown .db-row.db-grand {
    border-top: 1px dashed var(--line);
    margin-top: 4px;
    padding-top: 8px;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    color: var(--navy);
}

.delivery-breakdown .db-row span:last-child {
    font-weight: 600;
}

.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy-deep);
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 0.88rem;
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease, transform .35s ease;
    z-index: 600;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: var(--emerald);
}

.toast.error {
    background: #c0392b;
}

footer {
    background: var(--navy-deep);
    color: #c3cfdb;
    padding: 48px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-brand img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.footer-brand span {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: #fff;
}

footer p.about {
    font-size: 0.85rem;
    color: #93a3b4;
    max-width: 280px;
}

footer h5 {
    color: #fff;
    font-family: 'Sora', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 14px;
}

footer ul li {
    margin-bottom: 8px;
    font-size: 0.85rem;
}

footer ul li a:hover {
    color: var(--gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.78rem;
    color: #6f8296;
}

.social-row {
    display: flex;
    gap: 12px;
}

.social-row a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease;
}

.social-row a:hover {
    background: var(--gold);
    color: var(--navy-deep);
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.icon-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--gold);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--cream);
}

.account-chip .avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--navy), var(--sky));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.72rem;
    overflow: hidden;
    flex-shrink: 0;
}

.account-chip .name {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--navy);
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    color: var(--ink-soft);
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
}

.btn.google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 11px 16px;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: box-shadow .2s ease, transform .2s ease;
}

.auth-switch-line {
    text-align: center;
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-top: 14px;
}

.auth-switch-line button {
    background: none;
    border: none;
    color: var(--sky);
    font-weight: 700;
    cursor: pointer;
    padding: 0 3px;
}

.auth-loading {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-top: 8px;
}

.spin {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--line);
    border-top-color: var(--sky);
    animation: spin .7s linear infinite;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    max-height: 46vh;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
}

.cart-item .thumb {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1ede3;
    flex-shrink: 0;
}

.cart-item .info {
    flex: 1;
    min-width: 0;
}

.cart-item .info .nm {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item .info .pr {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    color: var(--emerald);
    font-weight: 700;
}

.qty-stepper {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px;
}

.qty-stepper span {
    min-width: 16px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
}

.cart-item .remove-btn {
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px 4px;
    flex-shrink: 0;
}

.cart-empty {
    text-align: center;
    padding: 30px 10px;
    color: var(--ink-soft);
    font-size: 0.85rem;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--line);
    padding-top: 14px;
    margin-bottom: 14px;
}

.cart-total-row .lbl {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: var(--navy);
    font-size: 0.88rem;
}

.cart-total-row .amt {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--emerald);
    font-size: 1.05rem;
}
