/* NEOMORPHIC UI VARIABLES */
:root {
    --primary-color: #9b2ea5;
    /* Match Vishakha Fabrics Purple */
    --primary-gradient: linear-gradient(135deg, #9b2ea5, #d946ef);
    --bg-primary: #f9f4f1;
    /* Match Beige Background */
    --bg-card: #f9f4f1;
    --text-dark: #333333;
    --text-gray: #6b7280;
    --shadow-light: -6px -6px 14px rgba(255, 255, 255, 0.7);
    --shadow-dark: 6px 6px 14px rgba(209, 205, 199, 0.3);
    --shadow-inset: inset 4px 4px 8px rgba(209, 205, 199, 0.3), inset -4px -4px 8px rgba(255, 255, 255, 0.7);
    --radius: 16px;

    /* Variables needed for ported product card */
    --secondary-gradient: linear-gradient(135deg, #f59e0b, #f97316);
    --accent-color: #10b981;
    --accent-gradient: linear-gradient(135deg, #10b981, #34d399);
    --warning-gradient: linear-gradient(135deg, #ef4444, #f87171);
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 5px;
    --radius-round: 20px;
    --shadow-hard: 4px 4px 10px #d1d9e6, -4px -4px 10px #ffffff;
    --shadow-hover: 10px 10px 25px #c9d1de, -10px -10px 25px #ffffff;
    --shadow-glow: 0 6px 20px rgba(99, 102, 241, 0.12);
    --gray-dark: #4b5563;
    --gray-medium: #9ca3af;
}

body {
    background-color: var(--bg-primary);
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
    padding-bottom: 80px;
    /* Space for mobile nav */
}

.seller-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 15px;
}

/* --- NEOMORPHIC HEADER BAR --- */
.seller-header-bar {
    background: var(--bg-card);
    padding: 20px 30px;
    border-radius: 0 0 20px 20px;
    /* Rounded bottom only */
    box-shadow: none;
    /* Removed heavy shadow for clean look */
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -15px 40px -15px;
    /* Full width negative margin */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-content-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.shop-icon-box {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    background: var(--bg-card);
    box-shadow: var(--shadow-inset);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 24px;
}

.shop-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-card);
    box-shadow: var(--shadow-inset);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 24px;
}

.seller-details {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 30px;
    /* Shift text slightly right */
}

.seller-details h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--primary-color);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.seller-meta {
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 500;
    margin-top: 5px;
}

.header-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 5px 15px;
    background: var(--bg-card);
    border-radius: 10px;
    box-shadow: var(--shadow-inset);
}

.stat-val {
    font-weight: 700;
    color: var(--primary-color);
}

.stat-lbl {
    font-size: 0.7rem;
    color: var(--text-gray);
}

/* --- CATEGORIES GRID (PROPER MOBILE VIEW) --- */
.category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 10px 5px;
}

.cat-card {
    background: var(--bg-card);
    padding: 15px 10px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-light), var(--shadow-dark);
    transition: transform 0.2s;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.cat-card:active {
    box-shadow: var(--shadow-inset);
    transform: scale(0.98);
}

.cat-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-card);
    box-shadow: var(--shadow-inset);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 8px;
}

.cat-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.2;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-count {
    font-size: 0.75rem;
    color: white;
    background: var(--primary-gradient);
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(99, 102, 241, 0.25);
    min-width: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
}

/* --- PRODUCT GRID (Standardized) --- */
.neomorphic-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 40px 0 20px;
    text-align: center;
    display: block;
    border-left: none;
}

/* HORIZONTAL SCROLL FOR PRODUCTS */
.products-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    /* Space for shadow/scrollbar */
    padding-left: 5px;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.products-scroll::before,
.products-scroll::after {
    content: '';
    margin: auto;
}

.products-scroll::-webkit-scrollbar {
    height: 4px;
}

.products-scroll::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
}

.products-scroll::-webkit-scrollbar-track {
    background: transparent;
}

/* Ultra Compact Product Card (Ported Styles) */
.product-card-wrapper {
    flex-shrink: 0;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: var(--shadow-hard);
    height: 400px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 250px;
    max-width: 250px;
    flex-shrink: 0;
    /* Important */
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
}

.product-image-container {
    height: 250px;
    width: 100%;
    background: linear-gradient(135deg, var(--bg-primary), #f8fafc);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.product-image {
    height: 100%;
    width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.15);
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.product-badge {
    font-size: 9px;
    font-weight: 700;
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius-round);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-hard);
}

.badge-trending {
    background: var(--secondary-gradient);
}

.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.3;
    height: 34px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price-container,
.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.mrp-price {
    font-size: 12px;
    color: var(--text-gray);
    text-decoration: line-through;
    font-weight: 500;
}

.sale-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.discount-badge {
    font-size: 11px;
    color: var(--accent-color);
    font-weight: 700;
    background: rgba(16, 185, 129, 0.1);
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.sku-container {
    margin: auto 0 10px 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sku-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

.sku-code {
    font-size: 13px;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    background: #f3f4f6;
    color: var(--primary-color);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid #d1d5db;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
    max-width: 100%;
}

.sku-code:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(99, 102, 241, 0.1);
}

.add-to-cart-btn {
    background: var(--secondary-gradient);
    color: white;
    border: none;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-hard);
    margin-top: auto;
}

.add-to-cart-btn:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 6px 6px 15px rgba(99, 102, 241, 0.2), -6px -6px 15px rgba(255, 255, 255, 0.8);
}

.quick-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.product-card:hover .quick-actions {
    opacity: 1;
    transform: translateX(0);
}

.quick-action-btn {
    width: 28px;
    height: 28px;
    background: var(--bg-card);
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-medium);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-hard);
    font-size: 11px;
}

.quick-action-btn:hover {
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.1);
}

.image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f2f5, #e5e7eb);
    color: var(--text-gray);
    border-radius: var(--radius-sm);
    font-size: 10px;
    flex-direction: column;
    gap: 8px;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .seller-header-bar {
        flex-direction: column;
        gap: 15px;
        padding: 20px 15px;
    }

    .header-content-left {
        width: 100%;
        justify-content: flex-start;
    }

    .header-stats {
        width: 100%;
        justify-content: center;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        padding-top: 15px;
        gap: 15px;
    }

    .stat-item {
        flex: none;
        min-width: 60px;
    }

    /* Mobile Categories */
    .category-grid {
        display: flex;
        flex-wrap: nowrap;
        /* Force single row */
        overflow-x: auto;
        gap: 15px;
        grid-template-columns: none;
        padding-bottom: 10px;
        scrollbar-width: thin;
        justify-content: flex-start;
        /* Reset desktop centering */
    }

    .category-grid::before,
    .category-grid::after {
        content: '';
        margin: auto;
    }

    .cat-card {
        padding: 10px 5px;
        min-width: 110px;
        max-width: 110px;
        flex-shrink: 0;
    }

    .cat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .cat-name {
        font-size: 0.75rem;
        height: 40px;
    }

    /* Product Card Mobile Overrides */
    .products-scroll {
        gap: 15px;
    }

    .product-card {
        height: 325px !important;
        min-width: 180px;
        max-width: 180px;
        padding: 10px;
    }

    .product-image-container {
        height: 190px !important;
        margin-bottom: 10px;
    }

    .sku-label {
        display: none;
    }

    .sku-code {
        font-size: 10px;
        padding: 3px 6px;
        margin-bottom: 5px;
    }

    .add-to-cart-btn {
        padding: 8px 4px;
        font-size: 11px;
    }
}