/* Amazon Clone CSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Amazon Ember', Arial, sans-serif;
    background-color: #E3E6E6;
    color: #0F1111;
    line-height: 1.4;
}

/* Header Styles */
.header {
    background-color: #131921;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-bar {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    gap: 20px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
}

.amazon-logo {
    color: #FFFFFF;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.delivery-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #FFFFFF;
    font-size: 12px;
    padding: 5px;
    border: 1px solid transparent;
    border-radius: 2px;
    cursor: pointer;
}

.delivery-location:hover {
    border-color: #FFFFFF;
}

.deliver-to {
    font-size: 12px;
    color: #CCCCCC;
}

.location {
    font-weight: bold;
    font-size: 14px;
}

/* Search Box */
.nav-center {
    flex: 1;
    max-width: 800px;
}

.search-box {
    display: flex;
    align-items: center;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
}

.search-category {
    background-color: #F3F3F3;
    border: none;
    padding: 0 10px;
    font-size: 12px;
    border-right: 1px solid #D5D9D9;
    cursor: pointer;
}

.search-input {
    flex: 1;
    border: none;
    padding: 0 10px;
    font-size: 14px;
    outline: none;
}

.search-btn {
    background-color: #FF9900;
    border: none;
    padding: 0 15px;
    height: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background-color: #FF7700;
}

/* Navigation Right */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-link {
    color: #FFFFFF;
    padding: 5px 10px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 2px;
}

.nav-link:hover {
    border-color: #FFFFFF;
}

.nav-line-1 {
    font-size: 12px;
    color: #CCCCCC;
}

.nav-line-2 {
    font-size: 14px;
    font-weight: bold;
}

.nav-cart {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #FFFFFF;
    padding: 5px 10px;
    cursor: pointer;
    position: relative;
}

.nav-cart:hover {
    border: 1px solid #FFFFFF;
    border-radius: 2px;
}

.cart-count {
    background-color: #FF9900;
    color: #0F1111;
    font-size: 14px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    position: absolute;
    top: 0;
    left: 20px;
}

/* Secondary Navigation */
.nav-secondary {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    gap: 20px;
    background-color: #232F3E;
    color: #FFFFFF;
    font-size: 14px;
}

.nav-item {
    padding: 5px 10px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 2px;
}

.nav-item:hover {
    border-color: #FFFFFF;
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50px;
    transform: translateY(-50%);
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.slide-content h2 {
    font-size: 48px;
    margin-bottom: 10px;
}

.slide-content p {
    font-size: 20px;
    margin-bottom: 20px;
}

.shop-now-btn {
    background-color: #FF9900;
    color: #0F1111;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.shop-now-btn:hover {
    background-color: #FF7700;
}

/* Carousel Controls */
.carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.carousel-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: #FFFFFF;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    pointer-events: all;
    transition: background-color 0.3s;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator.active {
    background-color: #FFFFFF;
}

/* Categories Section */
.categories {
    padding: 40px 20px;
    background-color: #FFFFFF;
}

.categories h2 {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.category-card h3 {
    font-size: 18px;
    color: #0F1111;
}

/* Featured Products Section */
.featured-products {
    padding: 40px 20px;
    background-color: #E3E6E6;
}

.featured-products h2 {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.product-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #0F1111;
}

.rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.stars {
    color: #FF9900;
    font-size: 14px;
}

.rating-count {
    color: #007185;
    font-size: 14px;
}

.price {
    font-size: 20px;
    font-weight: bold;
    color: #B12704;
    margin-bottom: 15px;
}

.add-to-cart {
    background-color: #FF9900;
    color: #0F1111;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.add-to-cart:hover {
    background-color: #FF7700;
}

/* Footer */
.footer {
    background-color: #232F3E;
    color: #FFFFFF;
    margin-top: 40px;
}

.footer-back-to-top {
    text-align: center;
    padding: 15px;
    background-color: #37475A;
}

.footer-back-to-top button {
    background-color: #37475A;
    color: #FFFFFF;
    border: 1px solid #FFFFFF;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.footer-back-to-top button:hover {
    background-color: #48576A;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #FFFFFF;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #DDDDDD;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

.footer-bottom {
    background-color: #131921;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #37475A;
}

.footer-logo {
    margin-bottom: 10px;
}

.footer-logo .amazon-logo {
    color: #FFFFFF;
    font-size: 20px;
    font-weight: bold;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.footer-links a {
    color: #DDDDDD;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

.footer-copyright {
    font-size: 12px;
    color: #DDDDDD;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-bar {
        flex-direction: column;
        gap: 10px;
    }

    .nav-center {
        order: 3;
        max-width: 100%;
    }

    .nav-right {
        order: 2;
    }

    .delivery-location {
        display: none;
    }

    .nav-secondary {
        overflow-x: auto;
        white-space: nowrap;
    }

    .slide-content {
        left: 20px;
        right: 20px;
        text-align: center;
    }

    .slide-content h2 {
        font-size: 32px;
    }

    .slide-content p {
        font-size: 16px;
    }

    .category-grid,
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .nav-bar {
        padding: 10px;
    }

    .search-box {
        height: 35px;
    }

    .hero {
        height: 400px;
    }

    .slide-content h2 {
        font-size: 24px;
    }

    .slide-content p {
        font-size: 14px;
    }

    .carousel-controls {
        padding: 0 10px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .categories,
    .featured-products {
        padding: 20px 10px;
    }

    .category-grid,
    .product-grid {
        grid-template-columns: 1fr;
    }
}