/* ==========================================================
   Enterprise E-Commerce Portal - Meesho Mobile & Web App Edition
   Color Palette:
   - Brand Magenta / Purple: #9c27b0, #800080, #5e17eb
   - Soft Pink Accents: #f43397, #fff0f5
   - UPI Discount Green: #038d63, #e8f8f2
   - Rating Green: #23bb75
   - App Background: #f8f8fb
   - Text Dark: #222222, Muted: #666666
   100% Fluid Zero-Overflow for Samsung Galaxy Z Fold, Mobile & Desktop
   ========================================================== */

:root {
    --meesho-purple: #9c27b0;
    --meesho-purple-dark: #7b1fa2;
    --meesho-purple-light: #f3e5f5;
    --meesho-pink: #f43397;
    --meesho-pink-light: #fff0f5;
    --meesho-green: #038d63;
    --meesho-green-light: #e8f8f2;
    --meesho-rating-green: #23bb75;
    --meesho-bg: #f8f8fb;
    --meesho-card-bg: #ffffff;
    --meesho-text: #222222;
    --meesho-muted: #777777;
    --meesho-border: #eeeeee;
    --shadow-card: 0 1px 4px 0 rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 3px 10px 0 rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--meesho-bg);
    color: var(--meesho-text);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
}

/* ==========================================================
   MEESHO APP HEADER
   ========================================================== */
.meesho-header {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}
.header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 6px 0;
    gap: 10px;
}
.user-profile-header {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--meesho-text);
}
.avatar-header-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--meesho-purple);
    background: #f1f3f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--meesho-purple);
    font-size: 13px;
    flex-shrink: 0;
}
.refer-earn-badge {
    background: var(--meesho-pink-light);
    color: var(--meesho-pink);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    white-space: nowrap;
}
.header-actions-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.balance-coin-pill {
    background: #f1f3f6;
    color: var(--meesho-purple);
    font-size: 12px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}
.balance-m-icon {
    width: 18px;
    height: 18px;
    background: var(--meesho-purple);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
}
.header-icon-link {
    color: #333333;
    font-size: 19px;
    text-decoration: none;
    position: relative;
    display: flex;
    align-items: center;
}
.header-icon-link:hover { color: var(--meesho-purple); }
.header-cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--meesho-pink);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 1.5px solid #ffffff;
}

/* Search Bar (Meesho Signature) */
.meesho-search-bar {
    padding: 6px 0 8px 0;
    width: 100%;
}
.search-input-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #d5d9d9;
    border-radius: var(--radius-md);
    padding: 4px 12px;
    gap: 8px;
    transition: var(--transition);
}
.search-input-box:focus-within {
    border-color: var(--meesho-purple);
    box-shadow: 0 0 0 2px rgba(156, 39, 176, 0.15);
}
.search-input-box input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 13px;
    font-family: inherit;
    color: #222;
    padding: 6px 0;
}
.search-input-box input::placeholder {
    color: #878787;
    font-size: 13px;
}
.search-icon-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 15px;
    cursor: pointer;
}
.search-icon-btn:hover { color: var(--meesho-purple); }

/* Location Pin Bar */
.location-pincode-bar {
    background: #f8fafc;
    border-top: 1px solid #f0f0f0;
    padding: 6px 0;
    font-size: 12px;
    color: #475569;
    font-weight: 600;
}
.loc-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.loc-inner i { color: #2563eb; }

/* ==========================================================
   MEESHO 2-ROW CIRCULAR CATEGORY PILLS (Screenshot 70912.jpg)
   ========================================================== */
.meesho-cat-grid-wrapper {
    background: #ffffff;
    padding: 12px 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-bottom: 10px;
    width: 100%;
}
.meesho-cat-scroll {
    display: grid;
    grid-template-rows: auto auto;
    grid-auto-flow: column;
    grid-auto-columns: 78px;
    gap: 12px 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}
.meesho-cat-scroll::-webkit-scrollbar { display: none; }
.cat-pill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--meesho-text);
    text-align: center;
    transition: transform 0.2s ease;
}
.cat-pill-card:hover { transform: translateY(-2px); }
.cat-pill-thumb {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #f1f3f6;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 4px;
    font-size: 20px;
    color: var(--meesho-purple);
}
.cat-pill-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cat-pill-name {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Sale Countdown Banner */
.meesho-sale-banner {
    background: linear-gradient(90deg, #fff3b0, #ffdf70);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0;
    font-size: 13px;
    font-weight: 700;
    color: #4a3600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.sale-clock-badge {
    background: #331f47;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Recent Orders Feedback Card */
.recent-order-review-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid #e0e0e0;
    padding: 14px 16px;
    margin: 12px 0;
    box-shadow: var(--shadow-card);
}
.ro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.ro-title { font-size: 14px; font-weight: 700; color: #222; }
.ro-viewall { font-size: 12px; font-weight: 800; color: var(--meesho-purple); text-decoration: none; }
.ro-content {
    display: flex;
    align-items: center;
    gap: 14px;
}
.ro-thumb {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
}
.ro-rating-feedback {
    flex: 1;
}
.ro-stars-row {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}
.ro-star-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #c2c2c2;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.ro-star-btn:hover { color: #f59e0b; transform: scale(1.15); }

/* Sticky Filter & Sort Bar (Screenshot 70912.jpg) */
.meesho-sticky-filter-bar {
    position: sticky;
    top: 105px;
    z-index: 990;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.filter-pill-btn {
    background: #ffffff;
    border: 1px solid #d5d9d9;
    border-radius: var(--radius-full);
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}
.filter-pill-btn:hover, .filter-pill-btn.active {
    border-color: var(--meesho-purple);
    color: var(--meesho-purple);
    background: var(--meesho-purple-light);
}

/* ==========================================================
   MEESHO 2-COLUMN PRODUCT GRID & DUAL PRICING (Screenshot 70928)
   ========================================================== */
.meesho-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 12px 0 24px 0;
    width: 100%;
}
.meesho-product-card {
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 0;
}
.meesho-product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.video-badge-corner {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 4px;
    z-index: 2;
}
.wishlist-heart-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888888;
    cursor: pointer;
    z-index: 2;
    transition: var(--transition);
}
.wishlist-heart-btn:hover, .wishlist-heart-btn.active {
    color: var(--meesho-pink);
    background: #fff;
}

.meesho-card-thumb {
    height: 180px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}
.meesho-card-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.meesho-product-card:hover .meesho-card-thumb img {
    transform: scale(1.04);
}

.meesho-card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.meesho-card-title {
    font-size: 13px;
    font-weight: 500;
    color: #333333;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 36px;
}
.meesho-card-title a { color: inherit; text-decoration: none; }
.meesho-card-title a:hover { color: var(--meesho-purple); }

/* Dual Pricing System (Signature Meesho Feature) */
.meesho-dual-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}
.meesho-upi-price {
    font-size: 16px;
    font-weight: 800;
    color: #111111;
}
.meesho-mrp {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
}
.meesho-discount {
    font-size: 11px;
    font-weight: 700;
    color: var(--meesho-green);
}
.upi-discount-badge {
    background: var(--meesho-green-light);
    color: var(--meesho-green);
    font-size: 10px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 2px;
    margin-left: 2px;
}
.cod-price-tag {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 6px;
}

/* Green Rating Pill */
.meesho-rating-pill {
    background: var(--meesho-rating-green);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    width: fit-content;
}
.meesho-rating-count {
    font-size: 11px;
    color: var(--meesho-muted);
    margin-left: 4px;
}

.meesho-card-actions {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

/* ==========================================================
   MEESHO BUTTONS
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: var(--transition);
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-meesho-purple {
    background: var(--meesho-purple);
    color: #ffffff;
}
.btn-meesho-purple:hover {
    background: var(--meesho-purple-dark);
    color: #ffffff;
}
.btn-meesho-outline {
    background: #ffffff;
    border: 1px solid var(--meesho-purple);
    color: var(--meesho-purple);
}
.btn-meesho-outline:hover {
    background: var(--meesho-purple-light);
}

.btn-sm { padding: 6px 10px; font-size: 11px; }
.btn-lg { padding: 12px 22px; font-size: 14px; font-weight: 800; }
.btn-block { width: 100%; display: flex; }

/* ==========================================================
   MEESHO 5-TAB BOTTOM NAVIGATION BAR (Screenshots)
   ========================================================== */
.meesho-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    z-index: 1050;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
.meesho-nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #777777;
    font-size: 10px;
    font-weight: 600;
    gap: 3px;
    position: relative;
    width: 20%;
}
.meesho-nav-tab i { font-size: 18px; }
.meesho-nav-tab.active {
    color: var(--meesho-purple);
    font-weight: 800;
}
.meesho-m-logo-tab {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--meesho-purple);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
}

/* ==========================================================
   MULTI-DEVICE RESPONSIVENESS (Samsung Z Fold, Mobile, Desktop)
   ========================================================== */
@media (max-width: 1024px) {
    .meesho-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    body { padding-bottom: 65px !important; }
    .meesho-bottom-nav { display: flex; }
    .floating-wa-btn { bottom: 65px !important; right: 14px !important; }
    .meesho-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .meesho-card-thumb { height: 160px; }
    .meesho-card-title { font-size: 12px; height: 32px; }
    .meesho-upi-price { font-size: 14px; }
}

/* Samsung Galaxy Z Fold Cover Screen (≤ 380px) */
@media (max-width: 380px) {
    .meesho-products-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .meesho-card-thumb { height: 190px; }
    .refer-earn-badge { display: none; }
}
