/* 
    ULTRA-COMPACT & STYLISH DESIGN
    Minimal waste space with maximum impact
*/
:root {
    --primary-color: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --secondary-color: #f59e0b;
    --secondary-gradient: linear-gradient(135deg, #f59e0b, #f97316);
    --accent-color: #10b981;
    --accent-gradient: linear-gradient(135deg, #10b981, #34d399);
    --warning-color: #ef4444;
    --warning-gradient: linear-gradient(135deg, #ef4444, #f87171);
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --gray-light: #e5e7eb;
    --gray-medium: #9ca3af;
    --gray-dark: #4b5563;

    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --border-light: rgba(255, 255, 255, 0.2);
    --shadow-soft: 8px 8px 20px #d1d9e6, -8px -8px 20px #ffffff;
    --shadow-hard: 4px 4px 10px #d1d9e6, -4px -4px 10px #ffffff;
    --shadow-inset: inset 3px 3px 8px #d1d9e6, inset -3px -3px 8px #ffffff;
    --shadow-hover: 10px 10px 25px #c9d1de, -10px -10px 25px #ffffff;
    --shadow-glow: 0 6px 20px rgba(99, 102, 241, 0.12);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 5px;
    --radius-round: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    font-family: 'Poppins', 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--dark-color);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Ultra Compact Hero Section */
.hero-section {
    padding: 30px 0 20px 0;
    margin: 15px 0 10px 0;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    z-index: 1;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
    padding: 20px;
}

.hero-text-content {
    text-align: left;
}

.hero-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 5s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-image-container img {
    max-width: 100%;
    height: auto;
    max-height: 350px;
    filter: drop-shadow(0 10px 30px rgba(99, 102, 241, 0.2));
    transition: transform 0.3s ease;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.1;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--gray-dark);
    margin-bottom: 20px;
    line-height: 1.5;
    font-weight: 400;
    max-width: 500px;
}

/* Ultra Compact Product Card */
.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);
}

.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);
}

.badge-new {
    background: var(--accent-gradient);
}

.badge-discount {
    background: var(--warning-gradient);
}

.badge-variants {
    background: var(--primary-gradient);
}

.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-color);
    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 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark-color);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.original-price {
    font-size: 12px;
    color: var(--gray-medium);
    text-decoration: line-through;
}

.discount-percent {
    font-size: 10px;
    color: var(--accent-color);
    font-weight: 700;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
}

/* Ultra Attractive SKU Display */
.sku-container {
    margin: auto 0 10px 0;
    /* Auto margin top/bottom centers it */
    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-label i {
    font-size: 12px;
    color: var(--primary-color);
}

.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%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.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);
}

.sku-code i {
    font-size: 9px;
    opacity: 0.7;
}

/* Compact Add to Cart Button */
.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);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.1);
    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 - Minimal */
.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);
}

/* Scrollable Products */
.products-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 15px 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    margin: 0 -10px;
}

.products-scroll::-webkit-scrollbar {
    height: 4px;
    background: transparent;
}

.products-scroll::-webkit-scrollbar-track {
    background: transparent;
    margin: 0 10px;
}

.products-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
}

.scroll-product-card {
    min-width: 250px;
    width: 250px;
    flex-shrink: 0;
}

/* Compact Section Headers */
.section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 5px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-main-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-subtitle {
    font-size: 12px;
    color: var(--gray-medium);
    font-weight: 400;
}

.section-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-hard);
    color: var(--primary-color);
    font-size: 16px;
}

/* Stats Counter - Compact */
.stats-counter {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hard);
    min-width: 90px;
}

.stat-number {
    font-size: 20px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 10px;
    color: var(--gray-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category Navigation - Compact */
.category-navigation {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 15px 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-soft);
}

.categories-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px;
    scrollbar-width: none;
}

.category-tab {
    background: var(--bg-card);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 12px;
    color: var(--dark-color);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-hard);
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-tab:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.category-tab.active {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-2px);
}

.product-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

/* Compact Buttons */
.neu-btn {
    background: var(--bg-card);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-hard);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--dark-color);
}

.neu-btn-primary {
    background: var(--primary-gradient);
    color: white;
}

/* View All Link - Compact */
.view-all-link {
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-hard);
    font-size: 12px;
}

.view-all-link:hover {
    transform: translateX(4px);
    background: var(--primary-gradient);
    color: white;
}

/* Image Fallback */
.image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f2f5, #e5e7eb);
    color: var(--gray-medium);
    border-radius: var(--radius-sm);
    font-size: 10px;
    flex-direction: column;
    gap: 8px;
}

.image-fallback i {
    font-size: 24px;
    opacity: 0.3;
}

/* Compact Product Grid */
.compact-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

/* Minimal Spacing Class */
.ultra-compact {
    margin-top: -5px !important;
    margin-bottom: -5px !important;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.category-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-hard);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-primary);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-hard);
}

.category-card:hover .category-icon {
    background: var(--primary-gradient);
}

.category-icon i {
    font-size: 24px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon i {
    color: white;
}

.category-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.category-count {
    font-size: 11px;
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 10px;
    border-radius: 10px;
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .scroll-product-card {
        min-width: 220px;
    }
}

@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .hero-text-content {
        text-align: center;
    }

    .hero-image-container {
        order: -1;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        margin: 0 auto 20px;
    }

    .product-card {
        height: 300px;
    }

    .scroll-product-card {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 20px 0 15px 0;
        margin: 10px 0;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .section-main-title {
        font-size: 18px;
    }

    .product-card {
        height: 325px;
        /* Professional compact height */
        padding: 10px;
    }

    .product-image-container {
        height: 190px;
        /* Vertical but balanced */
        margin-bottom: 10px;
    }

    .scroll-product-card {
        min-width: 180px;
    }

    .stats-counter {
        gap: 10px;
    }

    .stat-item {
        min-width: 70px;
        padding: 8px;
    }

    .stat-number {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .view-all-link {
        align-self: flex-start;
        font-size: 11px;
        padding: 6px 12px;
    }

    /* Standardize Card Height & Layout */
    .product-card {
        height: 345px !important;
        /* Increased height to ensure button fits completely */
        padding: 6px;
        padding-bottom: 10px;
        /* Extra bottom padding for button */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 4px;
    }

    .product-image-container {
        height: 140px !important;
        margin-bottom: 0px;
        flex-shrink: 0;
    }

    /* Center Content */
    .product-info {
        text-align: center;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        align-items: center;
        gap: 2px;
        width: 100%;
    }

    .product-name {
        font-size: 11px;
        height: 28px;
        line-height: 1.3;
        margin-bottom: 4px;
        width: 100%;
        overflow: hidden;
    }

    .product-price-container {
        justify-content: center;
        width: 100%;
        margin-bottom: 4px;
        min-height: 40px;
        display: flex;
        align-items: center;
    }

    /* Explicitly center the inner price row */
    .price-row {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        /* Allow wrapping if needed */
        gap: 6px;
        width: 100%;
    }

    .current-price {
        font-size: 14px;
    }

    /* Ensure SKU fits tightly */
    .sku-code {
        margin-bottom: 6px !important;
        /* Space before button */
        padding: 2px 6px;
        font-size: 10px;
    }

    .add-to-cart-btn {
        padding: 8px 4px;
        font-size: 11px;
        margin-top: auto;
        width: 100%;
        white-space: nowrap;
        /* Prevent text wrap */
    }

    /* Hide SKU label on mobile to save space */
    .sku-label {
        display: none;
    }

    .sku-code {
        font-size: 10px;
        padding: 3px 6px;
        margin-bottom: 5px;
    }

    /* Force Trending/Scroll cards to similar width as Grid */
    .scroll-product-card {
        min-width: 165px;
        width: 165px;
    }

    /* Force Grid to be exactly 2 columns */
    .compact-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Categories Grid also 2 columns */
    .categories-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding-bottom: 0;
    }

    .categories-grid .category-card {
        min-width: auto;
    }
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-float {
    animation: float 5s ease-in-out infinite;
}

/* ADD THESE CSS STYLES FOR PRICE DISPLAY */
.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.mrp-price {
    font-size: 12px;
    color: var(--gray-medium);
    text-decoration: line-through;
    font-weight: 500;
}

.sale-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark-color);
    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);
}

/* Remove old price container styles that conflict */
.product-price-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

/* Remove these conflicting styles */
.current-price,
.original-price,
.discount-percent {
    display: none !important;
}