:root {
    --brand: #b2140a;
    --brand-2: #f6e4d2;
    --ink: #1e1e1e;
    --muted: #6b7280;
    --card: #ffffff;
    --bg: #faf7f3;
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Inter, system-ui, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg)
}

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

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

/* Top bar */
.topbar {
    background: var(--brand);
    color: #fff;
    padding: .5rem .75rem;
    font-size: .9rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center
}

.dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%
}

.topbar marquee {
    width: 100%
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid #eee
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    gap: 1rem
}

.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 800;
    font-size: 1.1rem
}

.brand img {
    height: 34px;
    width: auto
}

.navlinks {
    display: flex;
    gap: 1rem;
    align-items: center
}

.navlinks a {
    padding: .4rem .6rem;
    border-radius: 8px;
    color: #374151
}

.navlinks a:hover {
    background: #f3f4f6
}

.cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--brand);
    color: #fff;
    border: 0;
    padding: .55rem .8rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #111;
    color: #fff;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: .75rem
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 16px
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px
}

.col-3 {
    grid-column: span 3
}

.col-4 {
    grid-column: span 4
}

.col-6 {
    grid-column: span 6
}

.col-12 {
    grid-column: span 12
}

@media(max-width:1024px) {

    .col-3,
    .col-4,
    .col-6 {
        grid-column: span 6
    }
}

@media(max-width:640px) {

    .col-3,
    .col-4,
    .col-6 {
        grid-column: span 12
    }
}

/* Card */
.card {
    background: var(--card);
    border: 1px solid #eee;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
    display: flex;
    flex-direction: column
}

.card-head {
    position: relative;
    background: #fff
}

.media-slider {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden
}

.media-track {
    display: flex;
    height: 100%;
    transition: transform .35s ease
}

.media-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff
}

.media-slide img,
.media-slide video,
.media-slide iframe {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.thumbs {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #eee;
    overflow: auto
}

.thumb {
    width: 60px;
    height: 60px;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    flex: 0 0 auto;
    background: #fafafa
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.thumb.active {
    border-color: var(--brand)
}

.card-body {
    padding: 14px 16px 18px
}

.title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 6px
}

.muted {
    color: var(--muted);
    font-size: .92rem
}

.price-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 14px
}

.price {
    font-size: 1.15rem;
    font-weight: 800
}

.mrp {
    color: #9ca3af;
    text-decoration: line-through
}

.chip {
    font-size: .78rem;
    background: var(--brand-2);
    color: #7a3d05;
    border-radius: 999px;
    padding: 3px 8px
}

.cta {
    display: flex;
    gap: 10px
}

.btn {
    border: 0;
    border-radius: 10px;
    padding: .6rem .8rem;
    font-weight: 700;
    cursor: pointer
}

.btn.primary {
    background: var(--brand);
    color: #fff
}

.btn.ghost {
    background: #f3f4f6;
    color: #111
}

/* Cart Drawer */
.drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    border-left: 1px solid #eee;
    box-shadow: -8px 0 24px rgba(0, 0, 0, .08);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right .3s ease
}

.drawer.open {
    right: 0
}

.drawer-header {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.drawer-body {
    flex: 1;
    overflow: auto;
    padding: 10px 14px
}

.cart-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    align-items: center
}

.cart-item img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #eee
}

.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden
}

.qty button {
    background: #f9fafb;
    border: 0;
    padding: .3rem .55rem;
    cursor: pointer
}

.qty input {
    width: 40px;
    text-align: center;
    border: 0;
    padding: .35rem 0
}

.remove {
    background: transparent;
    border: 0;
    color: #ef4444;
    cursor: pointer
}

.drawer-footer {
    border-top: 1px solid #eee;
    padding: 12px 16px
}

.summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 700
}

.w-100 {
    width: 100%
}

/* Checkout Popup */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100
}

.overlay.open {
    display: flex
}

.popup {
    background: #fff;
    width: 420px;
    max-width: 92vw;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    overflow: hidden
}

.popup h3 {
    margin: 0;
    padding: 14px 16px;
    border-bottom: 1px solid #eee
}

.popup .body {
    padding: 14px 16px
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px
}

.field input,
.field textarea {
    padding: .7rem .8rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: .95rem
}

.popup .actions {
    display: flex;
    gap: 10px;
    padding: 0 16px 16px
}

/* Media badge */
.badge-video {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: .75rem;
    padding: 4px 8px;
    border-radius: 999px
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    background: none;
    border: 0;
    font-size: 28px;
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100vh;
    background: #fff;
    padding: 1.5rem;
    box-shadow: 4px 0 14px rgba(0, 0, 0, .15);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: left .3s ease;
    z-index: 999;
}

.mobile-menu a {
    padding: .6rem 0;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
    color: #111;
}

.mobile-menu.open {
    left: 0;
}

/* mobile visibility rules */
@media(max-width:800px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}