/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background-color: #4CAF50;
    bottom: -10px;
    left: 25%;
}

.section-title p {
    color: #666;
    font-size: 1.1rem;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo h1 {
    color: #333;
    font-size: 1.8rem;
}

.logo span {
    color: #4CAF50;
}

.nav-links ul {
    display: flex;
}

.nav-links ul li {
    margin: 0 15px;
}

.nav-links ul li a {
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links ul li a:hover {
    color: #4CAF50;
}

.login-btn, .signup-btn {
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 500;
}

.login-btn {
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.signup-btn {
    background-color: #4CAF50;
    color: white;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ff6b6b;
    color: white;
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#openMenu, #closeMenu {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.cart-header h2 {
    color: #333;
}

.close-cart {
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-items {
    padding: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #4CAF50;
    font-weight: 500;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    background-color: #f1f1f1;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.quantity-value {
    margin: 0 10px;
}

.remove-item {
    color: #ff6b6b;
    cursor: pointer;
    margin-left: 10px;
}

.cart-total {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-total h3 {
    margin-bottom: 15px;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.checkout-btn:hover {
    background-color: #45a049;
}

/* Hero Section */
.hero {
    height: 80vh;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    height: 100%;
    position: relative;
}

.carousel {
    height: 100%;
    width: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 1;
    width: 80%;
    max-width: 800px;
}

.carousel-content h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.carousel-content p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 2;
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    z-index: 2;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: white;
}

/* Features Section */
.features {
    padding: 80px 5%;
    background-color: white;
}

.features-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: #4CAF50;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.feature-card p {
    color: #666;
}

/* Categories Section */
.categories {
    padding: 80px 5%;
    background-color: #f9f9f9;
}

.categories-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.category-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.discount-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff6b6b;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: 500;
    z-index: 1;
}

.category-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.category-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.category-info p {
    margin-bottom: 15px;
    opacity: 0.8;
}

/* Products Section */
.products {
    padding: 80px 5%;
    background-color: white;
}

.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    background-color: white;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.product-info p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.product-price {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.price {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4CAF50;
    margin-right: 10px;
}

.old-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-to-cart-btn:hover {
    background-color: #45a049;
}

.coming-soon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #f5f5f5; /* optional: light background */
    min-height: 300px; /* adjust as needed */
}

.coming-soon-content {
    max-width: 80%;
}

.coming-soon .add-to-cart-btn {
    cursor: not-allowed;
    opacity: 0.6;
}


/* Footer */
.footer {
    background-color: #222;
    color: #fff;
    padding: 50px 5% 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h2, .footer-section h3 {
    color: white;
    margin-bottom: 20px;
}

.footer-section span {
    color: #4CAF50;
}

.footer-section p {
    margin-bottom: 20px;
    color: #ccc;
}

.social-icons a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background-color: #333;
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    text-align: center;
    line-height: 35px;
    transition: background-color 0.3s ease;
}

.social-icons a:hover {
    background-color: #4CAF50;
}

.footer-section.links ul li {
    margin-bottom: 10px;
}

.footer-section.links ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-section.links ul li a:hover {
    color: #4CAF50;
}

.footer-section.contact p {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.footer-section.contact p i {
    margin-right: 10px;
    color: #4CAF50;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
}

/* Horizontal auto-scrolling section */
.sliding-categories .sliding-track {
    display: flex;
    gap: 20px;
    animation: scroll-left 30s linear infinite;
    width: max-content;
  }
  
  .sliding-categories {
    overflow: hidden;
    position: relative;
  }
  
  /* Slide animation */
  @keyframes scroll-left {
    0% {
      transform: translateX(0%);
    }
    100% {
      transform: translateX(-50%);
    }
  }
  
  /* Optional: Duplicate cards for smooth infinite scroll */
  .sliding-track > .category-card {
    min-width: 280px;
    flex: 0 0 auto;
  }
  

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: white;
        z-index: 1001;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links ul {
        flex-direction: column;
        padding: 50px 20px;
    }

    .nav-links ul li {
        margin: 15px 0;
    }

    #openMenu, #closeMenu {
        display: block;
    }

    #closeMenu {
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .carousel-content h2 {
        font-size: 2rem;
    }

    .carousel-content p {
        font-size: 1rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .cart-sidebar {
        width: 300px;
    }
}

@media screen and (max-width: 480px) {
    .carousel-content h2 {
        font-size: 1.5rem;
    }

    .carousel-content p {
        font-size: 0.9rem;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .cart-sidebar {
        width: 280px;
    }
}
