*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #9f2089;
    --primary-dark: #7a1869;
    --bg: #f5f5f7;
    --card: #ffffff;
    --text: #1a1a1a;
    --muted: #666;
    --border: #e5e5e5;
    --success: #0a7c42;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 767px) {
    .container--products {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 0.85rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    min-height: 32px;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    line-height: 0;
    padding-left: 0.5rem;
}

.brand-logo svg {
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-left: auto;
}

.header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #3d4152;
    text-decoration: none;
    position: relative;
    padding: 2px;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 0;
}

.header-icon-btn:hover {
    color: var(--primary);
}

.header-cart-btn {
    margin-right: 4px;
}

.header-cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #9f2089;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    box-sizing: border-box;
}

.header-search {
    display: flex;
    align-items: center;
    width: 100%;
    background: #fff;
    border: 1px solid #d4d5d9;
    border-radius: 999px;
    padding: 0.55rem 0.65rem 0.55rem 0.85rem;
    gap: 0.5rem;
}

.header-search-icon {
    display: flex;
    align-items: center;
    color: #8b8b8b;
    flex-shrink: 0;
}

.header-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
    background: transparent;
    min-width: 0;
}

.header-search-input::placeholder {
    color: #9b9b9b;
    font-weight: 400;
}

.header-search-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
    padding-left: 0.15rem;
}

.header-search-extra {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    background: none;
    border: none;
    color: #8b8b8b;
    cursor: pointer;
    border-radius: 50%;
}

.header-search-extra:hover {
    color: #5a5a5a;
    background: #f5f5f5;
}

/* Home page — slightly smaller header (between default and compact) */
.page-home .site-header--compact {
    padding: 0.6rem 0.9rem 0.7rem;
}

.page-home .site-header--compact .header-top {
    margin-bottom: 0.65rem;
    min-height: 28px;
}

.page-home .site-header--compact .brand-logo svg {
    height: 23px;
    width: auto;
}

.page-home .site-header--compact .header-actions {
    gap: 1rem;
}

.page-home .site-header--compact .header-icon-btn svg {
    width: 22px;
    height: 22px;
}

.page-home .site-header--compact .header-cart-badge {
    min-width: 16px;
    height: 16px;
    font-size: 0.62rem;
    line-height: 16px;
    top: -5px;
    right: -7px;
}

.page-home .site-header--compact .header-search {
    padding: 0.48rem 0.55rem 0.48rem 0.75rem;
    gap: 0.4rem;
}

.page-home .site-header--compact .header-search-icon svg,
.page-home .site-header--compact .header-search-extra svg {
    width: 18px;
    height: 18px;
}

.page-home .site-header--compact .header-search-input {
    font-size: 0.85rem;
}

.page-home .site-header--compact .header-search-input::placeholder {
    font-size: 0.85rem;
}

/* Home — sticky bottom navigation */
.page-home {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
}

.page-home .site-footer {
    display: none;
}

.home-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border-top: 1px solid #eaeaef;
    padding: 0.35rem 0 calc(0.35rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 12px rgba(26, 26, 26, 0.06);
}

.home-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.15rem 0.2rem;
    text-decoration: none;
    color: #9b9bb4;
    -webkit-tap-highlight-color: transparent;
}

.home-bottom-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    line-height: 0;
}

.home-bottom-nav__icon svg {
    display: block;
}

.home-bottom-nav__label {
    font-size: 0.62rem;
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
}

.home-bottom-nav__item.is-active {
    color: #353543;
}

.home-bottom-nav__item.is-active .home-bottom-nav__label {
    font-weight: 700;
}

@media (min-width: 768px) {
    .home-bottom-nav__label {
        font-size: 0.68rem;
    }
}

.main-content {
    flex: 1;
    padding: 0 0 2rem;
}

.home-promos {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    background: var(--card);
}

.promo-block {
    display: block;
    line-height: 0;
    text-decoration: none;
}

.promo-block img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

.promo-marquee {
    background: #570d48;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
    padding: 0;
    line-height: 1;
}

.promo-marquee-inner {
    overflow: hidden;
    padding: 0.65rem 0;
}

.promo-marquee-track {
    display: flex;
    align-items: center;
    width: max-content;
    gap: 0;
    animation: promo-marquee-scroll 28s linear infinite;
    will-change: transform;
}

.promo-marquee-item {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: #ffffff;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
    padding: 0 2.75rem;
    letter-spacing: 0.01em;
}

.promo-marquee-hint {
    font-weight: 700;
    margin-left: 0.35rem;
}

@keyframes promo-marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (min-width: 768px) {
    .promo-marquee-inner {
        padding: 0.7rem 0;
    }

    .promo-marquee-item {
        font-size: 0.875rem;
        padding: 0 3.5rem;
    }
}

.home-promos + .container {
    padding-top: 1.25rem;
}

.daily-deals-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 -1rem 0.85rem;
    padding: 0.7rem 1rem;
    background: #ffffff;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
    text-align: center;
}

.daily-deals-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.daily-deals-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: #3f4c6b;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.daily-deals-bolt {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    margin-top: -1px;
}

.daily-deals-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.55rem;
    background: #fff2e8;
    border: 1px solid #ffdab9;
    border-radius: 6px;
    flex-shrink: 0;
}

.daily-deals-bomb {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.daily-deals-countdown {
    font-size: 0.8rem;
    font-weight: 700;
    color: #570d48;
    white-space: nowrap;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}

.section-title.products-for-you {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.85rem;
}

@media (min-width: 768px) {
    .daily-deals-bar {
        margin-left: 0;
        margin-right: 0;
        border-radius: var(--radius);
    }

    .daily-deals-text {
        font-size: 1.05rem;
    }

    .daily-deals-countdown {
        font-size: 0.875rem;
    }
}

@media (min-width: 768px) {
    .site-header {
        padding: 0.85rem 1.25rem 1rem;
    }

    .page-home .site-header--compact {
        padding: 0.65rem 1.1rem 0.75rem;
    }

    .header-search-input {
        font-size: 0.95rem;
    }

    .page-home .site-header--compact .header-search-input,
    .page-home .site-header--compact .header-search-input::placeholder {
        font-size: 0.88rem;
    }
}

.site-footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 3rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero p {
    opacity: 0.95;
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

.page-home .product-grid {
    contain-intrinsic-size: auto 480px;
}

.product-card {
    background: #ffffff;
    border: none;
    border-radius: 4px;
    overflow: hidden;
}

.product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-card-media {
    position: relative;
    background: #f0f0f0;
    overflow: hidden;
    aspect-ratio: 3 / 4;
}

.product-card-media img {
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

/* Home page: square product thumbnails (Meesho-style grid) */
.page-home .product-card-media,
.page-home .product-card-media img {
    aspect-ratio: 1 / 1;
}

.product-card-off-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    min-width: 52px;
    padding: 0.22rem 0.4rem 0.5rem;
    background: #9f2089;
    color: #fff;
    line-height: 1.15;
    clip-path: polygon(
        0 0,
        100% 0,
        100% calc(100% - 7px),
        92% 100%,
        84% calc(100% - 7px),
        76% 100%,
        68% calc(100% - 7px),
        60% 100%,
        52% calc(100% - 7px),
        44% 100%,
        36% calc(100% - 7px),
        28% 100%,
        20% calc(100% - 7px),
        12% 100%,
        4% calc(100% - 7px),
        0 100%
    );
}

.product-card-off-ribbon-text {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    white-space: nowrap;
}

.product-card-mall-badge {
    position: absolute;
    left: 0.35rem;
    bottom: 0.35rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    background: #570d48;
    color: #fff;
    font-size: 0.56rem;
    font-weight: 700;
    padding: 0.12rem 0.3rem 0.12rem 0.15rem;
    border-radius: 3px;
    line-height: 1;
}

.product-card-mall-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.product-card-super-saver {
    position: absolute;
    right: 0.1rem;
    bottom: 0.2rem;
    z-index: 2;
    transform: rotate(-14deg);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.product-card-super-saver-text {
    display: block;
    background: linear-gradient(180deg, #fff44d 0%, #ffd400 100%);
    color: #570d48;
    font-size: 0.44rem;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
    padding: 0.12rem 0.28rem;
    border: 2px solid #570d48;
    border-radius: 2px;
    letter-spacing: 0.03em;
    -webkit-text-stroke: 0.3px #570d48;
}

.product-card-body {
    padding: 0.45rem 0.5rem 0.55rem;
}

.product-card-title {
    font-size: 0.7rem;
    font-weight: 400;
    color: #666;
    line-height: 1.35;
    margin: 0 0 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card-title strong {
    font-weight: 700;
    color: #353543;
}

.product-card-prices {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.2rem 0.3rem;
    margin-bottom: 0.2rem;
}

.product-card-price {
    font-size: 0.92rem;
    font-weight: 700;
    color: #353543;
    letter-spacing: -0.02em;
}

.product-card-mrp {
    font-size: 0.62rem;
    color: #9b9b9b;
    text-decoration: line-through;
}

.product-card-off-text {
    font-size: 0.62rem;
    font-weight: 600;
    color: #9f2089;
}

.product-card-offer-line {
    font-size: 0.65rem;
    font-weight: 600;
    color: #038d63;
    margin: 0 0 0.3rem;
    line-height: 1.25;
}

.product-card-rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.2rem;
}

.product-card-rating-left {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.product-card-trusted-badge {
    display: block;
    width: 55px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
}

.product-card-rating-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    font-size: 0.58rem;
    font-weight: 700;
    color: #fff;
    background: #038d63;
    padding: 0.1rem 0.28rem;
    border-radius: 3px;
    line-height: 1.1;
}

.product-card-rating-pill svg {
    flex-shrink: 0;
}

.product-card-reviews {
    font-size: 0.62rem;
    color: #9b9b9b;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .product-card-body {
        padding: 0.55rem 0.65rem 0.65rem;
    }

    .product-card-title {
        font-size: 0.78rem;
    }

    .product-card-price {
        font-size: 1rem;
    }

    .product-card-off-ribbon-text {
        font-size: 0.65rem;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--card);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.product-detail img {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
}

.product-detail h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.product-detail-prices {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: 1rem 0;
}

.product-detail .price {
    font-size: 1.5rem;
    color: #1a1a1a;
    font-weight: 700;
    margin: 0;
}

.product-detail-prices .product-card-discount {
    margin: 0;
    font-size: 0.95rem;
}

.product-detail .desc {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.qty-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-right: 0.75rem;
}

.cart-table {
    width: 100%;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-collapse: collapse;
    overflow: hidden;
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.cart-table th {
    background: #fafafa;
    font-weight: 600;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-product img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius);
}

.cart-summary {
    margin-top: 1.5rem;
    background: var(--card);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 360px;
    margin-left: auto;
}

.cart-summary .row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cart-summary .total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.form-card {
    background: var(--card);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 520px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
}

.alert-success {
    background: #e6f4ea;
    color: var(--success);
}

.alert-error {
    background: #fce8e6;
    color: #c5221f;
}

.alert-info {
    background: #e8f0fe;
    color: #1967d2;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-state p {
    color: var(--muted);
    margin-bottom: 1rem;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}

.payment-option:has(input:checked) {
    border-color: var(--primary);
    background: #fdf5fc;
}

.order-summary-box {
    background: #fafafa;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.order-summary-box p {
    margin-bottom: 0.35rem;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 1rem; }

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .cart-table {
        font-size: 0.85rem;
    }

    .cart-product img {
        width: 48px;
        height: 48px;
    }
}
