* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Top Banner */
.top-banner {
    background-color: #000;
    color: #fff;
    padding: 10px 0;
    font-size: 13px;
}

.top-banner .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.banner-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4CAF50;
    font-size: 16px;
}

.banner-item.refund-exchange {
    color: #FF69B4;
}

.banner-item.delivery-time {
    color: #FFD700;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, #ff6b00 0%, #ff4500 100%);
    padding: 5px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Main Banner */
.main-banner {
    margin: 0 auto;
    max-width: 1351px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.banner-image {
    width: 55%;
    height: auto;
    display: block;
    object-fit: contain;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 60px;
    width: 60px;
    object-fit: contain;
    background: white;
    border-radius: 10px;
    padding: 5px;
}

/* Categories Dropdown */
.categories-dropdown {
    position: relative;
}

.categories-btn {
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.categories-btn:hover {
    background-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.categories-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    min-width: 280px;
    padding: 15px;
    display: none;
    z-index: 1000;
    max-height: 500px;
    overflow-y: auto;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.category-item:hover {
    background-color: #fff3e6;
    transform: translateX(5px);
}

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff6b00;
}

.category-name {
    font-weight: 600;
    font-size: 14px;
}

/* Search Box */
.search-box {
    flex: 0 1 600px;
    position: relative;
    margin-left: auto;
    margin-right: auto;
}

.search-box input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ff6b00;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:hover {
    background-color: #f8f8f8;
}

.suggestion-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.suggestion-details {
    flex: 1;
}

.suggestion-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.suggestion-price {
    color: #ff6b00;
    font-weight: bold;
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sign-in-btn, .cart-btn {
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.sign-in-btn {
    display: none;
}

.sign-in-btn:hover, .cart-btn:hover {
    background-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.cart-count {
    background-color: #fff;
    color: #ff6b00;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
}

/* Info Box */
.info-box {
    margin: 20px auto;
    max-width: 1351px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 3px solid #4CAF50;
}

.info-header {
    background-color: white;
    padding: 5px;
    text-align: center;
}

.info-header h2 {
    color: #4CAF50;
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

.info-content {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    padding: 5px;
}

.info-benefits {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

.info-benefits i {
    color: white;
}

.separator {
    color: white;
    font-weight: bold;
    opacity: 0.8;
}

/* Mega Deal Banner */
.mega-deal-banner {
    max-width: 1400px;
    margin: 10px auto;
    text-align: center;
}

.mega-deal-banner img {
    width: 100%;
    max-width: 1351px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Product Section */
.product-section {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Product Carousel */
.product-carousel {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.carousel-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border: 2px solid #ff6b00;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    color: #ff6b00;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.carousel-btn:hover {
    background-color: #ff6b00;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 300px);
    gap: 25px;
    margin-top: 30px;
    justify-content: center;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    background-color: #f8f8f8;
}

.product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.current-price {
    font-size: 22px;
    font-weight: bold;
    color: #ff6b00;
}

.original-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

.discount-badge {
    background-color: #ff4444;
    color: white;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

/* Categories Row Section */
.categories-row {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    display: none; /* Hidden on desktop */
}

.categories-scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #ff6b00 #f0f0f0;
}

.categories-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.categories-scroll-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.categories-scroll-container::-webkit-scrollbar-thumb {
    background: #ff6b00;
    border-radius: 10px;
}

.categories-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #ff4500;
}

.category-item-circle {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s;
    min-width: 100px;
}

.category-item-circle:hover {
    transform: translateY(-5px);
}

.category-circle-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ff6b00;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.category-item-circle:hover .category-circle-img {
    border-color: #ff4500;
    box-shadow: 0 6px 15px rgba(255, 107, 0, 0.3);
}

.category-circle-name {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: #333;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-container {
        gap: 20px;
        justify-content: space-between;
    }

    .search-box {
        flex: 1;
        max-width: 500px;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }
    
    /* Hide categories button in mobile view */
    .categories-dropdown {
        display: none;
    }

    /* Show and adjust categories row for mobile */
    .categories-row {
        display: block; /* Show on mobile */
        margin: 5px auto;
        padding: 0 10px;
    }

    .categories-scroll-container {
        gap: 0px; /* Minimal gap for mobile */
        padding: 5px 0;
        scrollbar-width: none;
    }

    .category-item-circle {
        gap: 0px;
    }

    .categories-scroll-container::-webkit-scrollbar {
        display: none;
    }

    .category-circle-img {
        width: 50px;
        height: 50px;
    }

    .category-circle-name {
        font-size: 12px;
    }

    .top-banner .container {
        height: 24px;
        overflow: hidden;
        position: relative;
        display: block;
        padding: 0;
    }

    .banner-item {
        position: absolute;
        width: 100%;
        text-align: center;
        top: 0;
        left: 0;
        will-change: transform, opacity;
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000px;
        justify-content: center;
    }

    .banner-item:nth-child(1) {
        animation: slideFirst 12s cubic-bezier(0.45, 0, 0.55, 1) infinite;
    }

    .banner-item:nth-child(2) {
        animation: slideSecond 12s cubic-bezier(0.45, 0, 0.55, 1) infinite;
    }

    .banner-item:nth-child(3) {
        animation: slideThird 12s cubic-bezier(0.45, 0, 0.55, 1) infinite;
    }

    .main-header {
        padding: 2px 0;
    }

    .header-container {
        gap: 10px;
        flex-wrap: nowrap;
    }

    .search-box {
        order: 1;
        flex: 0 1 250px;
        margin-top: 0;
    }

    .user-actions {
        order: 2;
    }

    .logo img {
        height: 40px;
        width: 40px;
    }

    .search-box input {
        padding: 8px 45px 8px 20px;
    }

    .search-box button {
        padding: 6px 15px;
        background-color: transparent;
        color: #808080;
    }

    .main-banner {
        background-color: transparent !important;
        max-width: none;
        width: 100%;
    }

    .banner-image {
        width: 100%;
    }


    
    .current-price {
        font-size: 16px;
    }

    .info-items {
        flex-direction: column;
    }

    .section-title {
        font-size: 24px;
    }

    .info-box {
        display: none;
    }

    .search-suggestions {
        width: 300px;
        left: -50px;
        right: auto;
    }
}

@media (max-width: 480px) {
    .user-actions {
        gap: 10px;
    }

    .sign-in-btn {
        display: none;
    }
    
    .sign-in-btn, .cart-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .cart-btn {
        padding: 12px;
        font-size: 0;
        position: relative;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cart-btn i {
        display: none;
    }

    .cart-btn::before {
        content: "\f07a";
        font-family: "Font Awesome 6 Free", "Font Awesome 6 Solid";
        font-weight: 900;
        font-size: 20px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .cart-count {
        position: absolute;
        top: -4px;
        right: -4px;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        font-weight: bold;
        border: 2px solid #ff6b00;
    }

    .sign-in-btn {
        display: none;
    }

    .sign-in-btn::before {
        content: "\f007";
        font-family: "Font Awesome 6 Free", "Font Awesome 6 Solid";
        font-weight: 900;
        font-size: 20px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .categories-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

@keyframes slideFirst {
    0%, 28% {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
    33% {
        transform: translate3d(0, -24px, 0);
        opacity: 0;
    }
    100% {
        transform: translate3d(0, -24px, 0);
        opacity: 0;
    }
}

@keyframes slideSecond {
    0%, 28% {
        transform: translate3d(0, 24px, 0);
        opacity: 0;
    }
    33% {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
    61%, 62% {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
    66% {
        transform: translate3d(0, -24px, 0);
        opacity: 0;
    }
    100% {
        transform: translate3d(0, -24px, 0);
        opacity: 0;
    }
}

@keyframes slideThird {
    0%, 62% {
        transform: translate3d(0, 24px, 0);
        opacity: 0;
    }
    66% {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
    94%, 95% {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
    100% {
        transform: translate3d(0, -24px, 0);
        opacity: 0;
    }
}
