@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #9f2089; /* Purple Theme from user reference */
    --primary-light: #fdf2f8;
    --secondary: #038d63; /* Marketplace green for success/ratings */
    --accent-red: #ed3843; /* For discount highlights */
    --bg: #eaeaf2;
    --surface: #ffffff;
    --text: #353543;
    --text-muted: #666666;
    --border: #eaeaf2;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; font-family: inherit; transition: all 0.2s; }

.container {
    max-width: 500px; /* Refined mobile container */
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 50px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

/* Progress Bar */
.checkout-progress {
    display: flex;
    justify-content: space-between;
    padding: 20px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    position: relative;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.step-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.step-item.active .step-number {
    background: var(--primary);
    color: white;
}

.step-item.active .step-label {
    color: var(--primary);
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    z-index: 1;
}

.step-item.completed:not(:last-child)::after {
    background: var(--primary);
}

/* Header */
.header {
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

.menu-icon {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
}

.icon-set {
    display: flex;
    gap: 16px;
}

.icon {
    font-size: 1.4rem;
    cursor: pointer;
}

/* Nav Menu */
#menu-list {
    display: none;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
}

#menu-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

#menu-list li:last-child { border-bottom: none; }
#menu-list a { font-weight: 600; color: var(--text); display: block; }

/* Search Prominent */
.search-prominent {
    background: white;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.search-box-wrap {
    position: relative;
    width: 100%;
}

.search-box-wrap input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
    border-radius: 50px;
    font-size: 0.95rem;
    outline: none;
}

.search-box-wrap svg {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
}

/* Product Card - GRID */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
}

.product-card {
    background: white;
    border: 1px solid #f3e5f5;
    border-radius: 16px;
    overflow: hidden;
    padding: 8px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.product-image {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #f3f4f6;
}

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

.product-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6rem;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.curr-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--secondary);
}

.mrp-price {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.off-badge {
    color: var(--accent-red);
    font-weight: 700;
    font-size: 0.85rem;
}

.special-offer {
    font-size: 0.75rem;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 4px;
}

.delivery-badge {
    background: #f0fdf4;
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
    width: fit-content;
}

.rating-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.rating-val {
    background: var(--secondary);
    color: white;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

/* CHECKOUT REDESIGN */
.checkout-container {
    padding: 20px 16px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

@media (min-width: 800px) {
    .checkout-container {
        flex-direction: row;
        align-items: flex-start;
    }
    .checkout-main {
        flex: 1.5;
    }
    .checkout-sidebar {
        flex: 1;
        position: sticky;
        top: 100px;
    }
}

.checkout-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

.field-group {
    position: relative;
    margin-bottom: 20px;
}

.field-group input, .field-group textarea {
    width: 100%;
    padding: 16px 12px 6px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: transparent;
    transition: all 0.2s;
}

.field-group label {
    position: absolute;
    left: 12px;
    top: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: all 0.2s;
    pointer-events: none;
    font-weight: 500;
}

.field-group input:focus, .field-group input:not(:placeholder-shown) {
    padding-top: 18px;
    padding-bottom: 4px;
    border-color: var(--primary);
}

.field-group input:focus + label, 
.field-group input:not(:placeholder-shown) + label {
    top: 4px;
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
}

.side-summary-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.side-summary-item img {
    width: 60px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
}

/* Category Bar */
.category-bar {
    display: flex;
    gap: 16px;
    padding: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 70px;
    cursor: pointer;
}

.cat-item.active .cat-icon {
    border: 2px solid var(--primary);
    transform: scale(1.05);
}

.cat-item.active span {
    color: var(--primary);
    font-weight: 800;
}

.cat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border);
}

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

.cat-item span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.cat-shop-btn {
    padding: 4px 12px;
    background: #fdf2f8;
    color: var(--primary);
    border: 1px solid #fbcfe8;
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s;
}

.cat-item:hover .cat-shop-btn {
    background: var(--primary);
    color: white;
}

/* Product Detail Page */
.main-img-wrap {
    width: 100%;
    background: black;
    height: 400px;
    overflow: hidden;
}

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

.detail-content {
    padding: 16px;
}

.detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.detail-price-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.detail-curr { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.detail-mrp { text-decoration: line-through; color: var(--text-muted); }
.detail-off { color: var(--accent-red); font-weight: 700; }

/* Reviews Section */
.meter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.meter-bar-bg {
    flex: 1;
    height: 8px;
    background: #f3f4f6;
    border-radius: 10px;
    overflow: hidden;
}

.meter-bar-fill {
    height: 100%;
    background: var(--secondary);
}

.comment-block {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.comment-user { font-weight: 700; font-size: 0.9rem; }
.comment-date { font-size: 0.75rem; color: var(--text-muted); }
.comment-text { margin: 8px 0; font-size: 0.95rem; }

/* Footer */
.footer {
    background: #1a1a2e;
    color: #f5f5f5;
    padding: 32px 16px;
    margin-top: 40px;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.footer-cols h4 { margin-bottom: 12px; font-size: 0.9rem; color: white; }
.footer-cols a { display: block; margin-bottom: 6px; color: #9ca3af; font-size: 0.8rem; }

/* Button Group Marketplace Style */
.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.btn-common {
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.1s;
}

.btn-common:active { transform: scale(0.98); }

.btn-add-to-cart {
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-buy-now {
    background: var(--primary);
    color: white;
}

.icon-btn {
    width: 20px;
    height: 20px;
}

/* Similar Products / Color Selection */
.color-div {
    padding: 16px;
    border-top: 5px solid var(--border);
}

.color-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
}

.color-box {
    width: 60px;
    height: 60px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
}

.color-box.active {
    border-color: var(--primary);
    border-width: 2px;
}

.color-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Size Selection */
.size-div {
    padding: 16px;
    border-top: 5px solid var(--border);
}

.size-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.dress-size {
    padding: 8px 16px;
    border: 1px solid var(--text);
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.dress-size.active {
    background: var(--text);
    color: white;
}

/* Rating Map Detailed */
.rating-map-card {
    padding: 16px;
}

.rating-bar-row {
    display: grid;
    grid-template-columns: 80px 1fr 40px;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.rating-meter-bg {
    height: 8px;
    background: #f0f0f5;
    border-radius: 10px;
    overflow: hidden;
}

.rating-meter-fill {
    height: 100%;
    background: var(--secondary);
}

/* Marketing Tag Card */
.marketing-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-top: 5px solid var(--border);
    border-bottom: 5px solid var(--border);
}

.marketing-item {
    background: white;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.marketing-item img {
    width: 32px;
    height: 32px;
}

.marketing-item span {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text);
}

/* Customer Media Section */
.customer-media {
    padding: 16px;
    border-top: 5px solid var(--border);
}

.media-row {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.media-item {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
}

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


/* Homepage Polish */
.brand-story-wrapper {
    margin: 60px 16px;
    padding: 40px 24px;
    background: #fdf2f8;
    border-radius: 24px;
    text-align: center;
}

.brand-story-wrapper h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--primary);
}

.brand-story-wrapper p {
    color: #9d174d;
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 24px;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first stack */
    gap: 16px;
    text-align: left;
}

@media (min-width: 600px) {
    .story-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.story-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #fbcfe8;
}

.story-card h4 {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.story-card p {
    font-size: 0.8rem;
    color: #be185d;
    margin-bottom: 0;
}

/* Promo Banner Link */
.promo-link {
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease;
}

.promo-link:hover {
    transform: translateY(-2px);
}

.promo-link:active {
    transform: translateY(0);
}

.promo-banner {
    background: #9d174d;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0 16px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Desktop Polish */
@media (min-width: 601px) {
    body { background: #f0f0f5; }
    .container {
        max-width: 1200px;
        background: transparent;
        box-shadow: none;
    }
    .brand-story-wrapper {
        margin: 80px auto;
        max-width: 800px;
    }
}
