:root {
    --primary-red: #D72027;
    --dark-black: #111111;
    --gray-text: #666666;
    --light-gray: #F5F7FA;
    --white: #FFFFFF;
    --card-bg: #F8F9FA;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--white);
    color: var(--dark-black);
    line-height: 1.6;
    padding-top: 140px; /* Space for fixed header */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Fixed Header Styles */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 5%;
    gap: 30px;
}

.logo-container {
    flex: 0 0 220px;
}

.logo {
    font-size: 32px;
    font-weight: 800;
    text-decoration: none;
    color: var(--dark-black);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    position: relative;
    letter-spacing: -1px;
}

.logo-e {
    color: var(--primary-red);
    position: relative;
}

.logo-e::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    width: 38px;
    height: 5px;
    background: var(--primary-red);
    border-radius: 1px;
}

.logo-8 {
    color: var(--primary-red);
    margin-left: 5px;
}

.logo-dot {
    font-weight: 400;
    text-transform: lowercase;
    font-size: 18px;
    margin-left: 2px;
}

.search-container {
    flex: 1;
    max-width: 700px;
}

.search-form {
    display: flex;
    background: #F0F2F5;
    border-radius: 8px;
    padding: 2px;
    border: 1px solid #E0E0E0;
    transition: var(--transition);
}

.search-form:focus-within {
    border-color: var(--primary-red);
    background: #FFF;
    box-shadow: 0 0 0 4px rgba(215, 32, 39, 0.05);
}

.search-form input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 20px;
    font-size: 15px;
    outline: none;
}

.search-form button {
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 6px;
    width: 45px;
    height: 45px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.search-form button:hover {
    background: #b51a21;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 0 0 auto;
}

.header-icon {
    font-size: 22px;
    color: #333;
    text-decoration: none;
    position: relative;
    transition: var(--transition);
}

.header-icon:hover {
    color: var(--primary-red);
    transform: translateY(-2px);
}

.cart-icon .cart-badge {
    position: absolute;
    top: -10px;
    right: -12px;
    background: var(--primary-red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #EEE;
    cursor: pointer;
    transition: var(--transition);
}

.user-avatar:hover {
    border-color: var(--primary-red);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Nav Styles */
.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 5%;
    border-top: 1px solid #F0F2F5;
    background: var(--white);
    position: relative;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 5px;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after, .nav-links li a.active::after {
    width: 100%;
}

.nav-links li a:hover {
    color: var(--primary-red);
}

.hot-sale {
    position: absolute;
    right: 5%;
}

.hot-sale a {
    background: var(--primary-red);
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(215, 32, 39, 0.2);
}

/* Hero Section - Amazon-Style Slider Carousel */
.hero-slider-wrapper {
    margin: 20px 5%;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.hero-slider {
    position: relative;
    min-height: 480px;
    width: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    transform: scale(0.97);
    pointer-events: none;
}

.hero-full-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
    transform: scale(1);
    pointer-events: auto;
}

.brand-tag {
    color: var(--primary-red);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    display: block;
}

.main-title {
    font-size: 64px;
    font-weight: 900;
    color: var(--dark-black);
    line-height: 1.1;
    margin: 0 0 15px 0;
    letter-spacing: -1.5px;
}

.promo-specials {
    font-size: 18px;
    color: #444;
    font-weight: 600;
    margin-bottom: 25px;
}

.bank-promo {
    background: white;
    border: 1px solid #E5E8ED;
    border-radius: 8px;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #333;
    margin-bottom: 30px;
}

.bank-promo i {
    color: var(--primary-red);
    font-size: 16px;
}

.shop-now-btn {
    background: var(--primary-red);
    color: white;
    padding: 16px 40px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(215, 32, 39, 0.25);
    width: max-content;
}

.shop-now-btn:hover {
    background: var(--dark-black);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* Styled Square Image Container matching Amazon image card */
.hero-image-card {
    flex: 0 0 350px;
    height: 350px;
    background: white;
    border: 8px solid white;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.hero-image-card:hover {
    transform: translateY(-6px) rotate(1deg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.hero-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.hero-image-card:hover img {
    transform: scale(1.05);
}

/* Slider Controls */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.9);
    border: 1px solid #E5E8ED;
    border-radius: 50%;
    color: var(--dark-black);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.slider-arrow:hover {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
    box-shadow: 0 6px 18px rgba(215, 32, 39, 0.3);
}

.slider-arrow.prev { left: 25px; }
.slider-arrow.next { right: 25px; }

.slider-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dots .dot {
    width: 8px;
    height: 8px;
    background: rgba(0,0,0,0.15);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.slider-dots .dot.active {
    width: 24px;
    border-radius: 10px;
    background: var(--primary-red);
}

/* Categories */
.categories-section {
    padding: 60px 0;
}

.category-scroll-container {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: 85px;
    gap: 20px 25px;
    overflow-x: auto;
    padding: 10px 5px;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.category-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Category Slider Wrapper */
.category-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.category-scroll-arrow {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    color: #333;
    display: none; /* hidden by default (mobile) */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
    font-size: 15px;
}

.category-scroll-arrow:hover {
    background: var(--primary-red);
    color: #fff;
    border-color: var(--primary-red);
    transform: translateY(-50%) scale(1.08);
}

.category-scroll-arrow.prev {
    left: -22px;
}

.category-scroll-arrow.next {
    right: -22px;
}

@media (min-width: 901px) {
    .category-scroll-arrow {
        display: flex; /* show on desktop */
    }
    
    .category-scroll-container {
        grid-template-rows: 1fr !important; /* Force single row on desktop */
        grid-auto-flow: column;
        grid-auto-columns: 110px; /* Larger width for items on desktop */
        gap: 0 35px; /* Only horizontal gap on desktop */
        overflow-x: auto;
        padding: 15px 10px;
    }
    
    /* Increase sizes on desktop */
    .category-icon-circle {
        width: 85px !important;
        height: 85px !important;
        margin-bottom: 12px !important;
    }
    
    .category-icon-circle i {
        font-size: 32px !important;
    }
    
    .category-item-label {
        font-size: 13px !important;
        max-width: 100px !important;
    }
    
    /* Visual rendering order for single row on desktop */
    .category-scroll-container .category-item:nth-child(1) { order: 1; }   /* Live Now */
    .category-scroll-container .category-item:nth-child(2) { order: 7; }   /* Home */
    .category-scroll-container .category-item:nth-child(3) { order: 2; }   /* Mobiles */
    .category-scroll-container .category-item:nth-child(4) { order: 8; }   /* Travel */
    .category-scroll-container .category-item:nth-child(5) { order: 3; }   /* Prime */
    .category-scroll-container .category-item:nth-child(6) { order: 9; }   /* Daily Needs */
    .category-scroll-container .category-item:nth-child(7) { order: 4; }   /* Fashion */
    .category-scroll-container .category-item:nth-child(8) { order: 10; }  /* Beauty */
    .category-scroll-container .category-item:nth-child(9) { order: 5; }   /* Electronics */
    .category-scroll-container .category-item:nth-child(10) { order: 11; } /* Kids & Toys */
    .category-scroll-container .category-item:nth-child(11) { order: 6; }  /* Sports */
    .category-scroll-container .category-item:nth-child(12) { order: 12; } /* See All */
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.category-item:hover {
    transform: translateY(-4px);
}

.category-icon-circle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px solid #cbd5e0;
}

.category-item:hover .category-icon-circle {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.category-icon-circle img {
    width: 75%;
    height: 75%;
    object-fit: contain;
    border-radius: 50%;
}

.category-icon-circle i {
    font-size: 24px;
}

.category-item-label {
    font-size: 11px;
    font-weight: 700;
    color: #444;
    line-height: 1.3;
    max-width: 80px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Individual Circle Colors & Styles */
.live-now-circle {
    background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%) !important;
    border-color: #ff9100 !important;
    color: #FFF;
    display: flex;
    flex-direction: column;
}

.prime-day-text {
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.travel-circle {
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%) !important;
    border-color: #009688 !important;
    color: #009688;
}

.prime-circle {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%) !important;
    border-color: #ffb300 !important;
    color: #ffb300;
}

.beauty-circle {
    background: linear-gradient(135deg, #fdf2f8 0%, #fbcfe8 100%) !important;
    border-color: #db2777 !important;
    color: #db2777;
}

.see-all-circle {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%) !important;
    border-color: #9e9e9e !important;
    color: #616161;
}

/* Mobile responsive category overrides */
@media (max-width: 900px) {
    .categories-section {
        padding: 20px 0 10px;
    }
    .category-scroll-container {
        gap: 15px 20px;
    }
}

/* Trending Products */
.trending-section {
    padding: 40px 0 80px;
}

.section-title {
    font-size: 32px;
    margin-bottom: 35px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title::before {
    content: '';
    width: 6px;
    height: 35px;
    background: var(--primary-red);
    border-radius: 10px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #F0F2F5;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: transparent;
    transform: translateY(-8px);
}

.product-image {
    background: #F8F9FA;
    border-radius: 15px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.product-image img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.15, 0.85, 0.45, 1);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.badge.sale, .badge.discount { background: var(--primary-red); color: #FFF; }

.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark-black);
    margin-bottom: 10px;
}

.product-rating {
    color: #FFB300;
    font-size: 13px;
    margin-bottom: 20px;
}

.btn-shop {
    text-align: center;
    padding: 12px;
    background: transparent;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    text-decoration: none;
    color: #444;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
}

.product-card:hover .btn-shop {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

/* Promo Banners */
.promo-banners {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 40px 0;
}

.banner {
    border-radius: 30px;
    padding: 50px;
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
}

.banner-left {
    background: #E3F2FD;
}

.banner-right {
    background: linear-gradient(135deg, #FF7043 0%, #F4511E 100%);
    color: white;
}

.banner-content {
    flex: 1;
    position: relative;
    z-index: 5;
}

.banner h3 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
}

.banner-img {
    position: absolute;
    right: 30px;
    bottom: 0;
    width: 250px;
}

.banner-img img { width: 100%; object-fit: contain; }

/* Service Benefits */
.service-benefits {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 60px 0;
    border-top: 1px solid #EEE;
}

.benefit-item {
    text-align: center;
    padding: 20px;
}

.benefit-icon {
    font-size: 40px;
    color: var(--primary-red);
    margin-bottom: 15px;
}

/* Footer */
.footer {
    background: #111;
    color: white;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 80px;
}

.footer-col h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 15px; }
.footer-col ul li a {
    color: #AAA;
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 8px;
}

.newsletter h3 { margin-bottom: 20px; }
.subscribe-form {
    display: flex;
    background: #222;
    border-radius: 8px;
    overflow: hidden;
    padding: 5px;
}

.subscribe-form input {
    background: transparent;
    border: none;
    padding: 12px 15px;
    color: white;
    flex: 1;
    outline: none;
}

.subscribe-form button {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Bottom Navigation for Mobile (App-like feel) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    z-index: 2000;
    padding: 12px 10px;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #F0F2F5;
}

.bottom-nav-item {
    text-decoration: none;
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    transition: var(--transition);
}

.bottom-nav-item i {
    font-size: 22px;
}

.bottom-nav-item.active {
    color: var(--primary-red);
}

.bottom-nav-item:active {
    transform: scale(0.9);
}

/* Responsive & Mobile Optimization */
@media (max-width: 1100px) {
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    body { padding-top: 130px; padding-bottom: 70px; } /* Space for fixed bottom nav and two-row mobile header */
    .container { padding: 0 15px; }
    
    .header-top { 
        padding: 10px 15px; 
        gap: 10px 15px; 
        flex-wrap: wrap;
    }
    
    .logo-container {
        flex: 1;
        order: 1;
    }
    
    .logo { font-size: 24px; }
    .logo-e::before { width: 30px; height: 4px; top: -5px; }
    
    .header-actions {
        order: 2;
        gap: 15px;
    }
    .header-actions .header-icon:not(.cart-icon) { display: none; }
    .user-avatar { width: 35px; height: 35px; }
    
    .search-container { 
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        order: 3;
    }
    
    .search-form input {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .search-form button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .hero-slider-wrapper { margin: 10px 15px; border-radius: 20px; }
    .hero-slider { min-height: 300px; }
    .hero-slide { padding: 0; }
    .slider-arrow { width: 40px; height: 40px; font-size: 14px; }
    .slider-arrow.prev { left: 10px; }
    .slider-arrow.next { right: 10px; }
    
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    
    .promo-banners { grid-template-columns: 1fr; gap: 15px; }
    .banner { padding: 30px; min-height: 220px; }
    .banner h3 { font-size: 26px; }
    .banner-img { width: 140px; }

    .service-benefits { grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 40px 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    
    .main-nav { display: none; }
    .bottom-nav { display: flex; }
    
    .footer-bottom { flex-direction: column; text-align: center; gap: 20px; }
}

@media (max-width: 600px) {
    .hero-slider { min-height: 200px; }
    .hero-slide { padding: 0; }
    .slider-arrow { display: none; }
    .slider-dots { bottom: 15px; }
}

@media (max-width: 480px) {
    .hero-slider { min-height: 140px; }
    .category-grid, .product-grid { gap: 10px; }
    .category-card { padding: 20px 10px; }
    .category-thumb img { width: 80px; height: 80px; }
    .product-card { padding: 12px; }
    .product-image { height: 160px; }
    .product-name { font-size: 14px; }
    .product-price { font-size: 18px; }
}
