/* CSS Reset and Variables */
:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --text: #333;
    --gray: #95a5a6;
    --success: #27ae60;
    --transition: all 0.3s ease;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--text);
    background-color: #f9f9f9;
    line-height: 1.6;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    background-color: var(--secondary);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

.btn-accent {
    background-color: var(--accent);
}

.btn-accent:hover {
    background-color: #c0392b;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background-color: var(--secondary);
    color: white;
}

/* Header Styles */
.top-bar {
    background-color: var(--dark);
    color: white;
    padding: 8px 0;
    font-size: 0.9rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
}

.header-main {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
    border-radius: 50%;
}

.no-products,
.error {
    text-align: center;
    width: 100%;
    padding: 2rem;
    color: #666;
}

/* Rating styles */
.product-rating {
    margin-top: 8px;
    min-height: 24px;
}

.stars {
    color: #ffd700;
    font-size: 1.1em;
}

.rating-count {
    font-size: 0.9em;
    color: #666;
    margin-left: 4px;
}

.no-reviews-text {
    color: #888;
    font-size: 0.9em;
}

.error-text {
    color: #d32f2f;
    font-size: 0.9em;
}

.rating-loader {
    font-size: 0.9em;
    color: #888;
}

.nav-links {
    display: flex;
}

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

.nav-links a {
    font-weight: bold;
    transition: var(--transition);
    padding: 5px 0;
}

.nav-links a:hover {
    color: var(--secondary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition);
}

.product-badge {
    display: inline-block;
    margin: 5px 0;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
    background: #333;
    color: white;
}

.product-badge[style*="background: #ff4757"] {
    animation: pulse 2s infinite;
    margin-left: 10px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

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

.header-actions {
    display: flex;
    align-items: center;
}

.header-actions a {
    margin-left: 20px;
    font-size: 1.2rem;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent);
    color: white;
    font-size: 0.7rem;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Slider */
.hero-slider {
    background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%);
    color: white;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.slider-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.slider-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slider-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.slider-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.slider-btns .btn {
    min-width: 150px;
}

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

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

.section-title h2 {
    font-size: 2rem;
    color: var(--primary);
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary);
}

.categories-grid {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 0;
    scroll-behavior: smooth;
}

.category-card {
    flex: 0 0 200px;
    /* Fixed width for each card */
    max-width: 200px;
    scroll-snap-align: start;
    /* Optional: Snap to each card */
    transition: transform 0.2s ease;
}

.category-card:hover {
    transform: scale(1.03);
    /* Optional hover effect */
}

/* Optional: Style the scrollbar (for Webkit browsers) */
.categories-grid::-webkit-scrollbar {
    height: 8px;
    border-radius: 10px;
    background-color: #f1f1f1;
}

.categories-grid::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
}

.category-img {
    height: 200px;
    overflow: hidden;
}

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

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

.category-content {
    padding: 20px;
    text-align: center;
    background-color: white;
}

.category-content h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

/* Products Section */
.products {
    padding: 60px 0;
    background-color: var(--light);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.products-filter {
    display: flex;
    gap: 15px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

/* Enhanced Hero Section */
.hero-slider {
    background:
        linear-gradient(135deg, rgba(10, 10, 10, 0.85) 0%, rgba(30, 30, 30, 0.75) 100%),
        url('https://images.unsplash.com/photo-1601924994987-69e26d50dc26?ixlib=rb-4.0.3&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 120px 0;
}

.slider-content {
    max-width: 650px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    animation: fadeInUp 1s ease-out;
}

.slider-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to right, #e6dace, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slider-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #f0f0f0;
    max-width: 500px;
}

.slider-btns {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-accent {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(180, 134, 11, 0.4);
}

.btn-accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(180, 134, 11, 0.6);
}

.btn-outline {
    background: transparent;
    color: #090909;
    border: 2px solid rgba(8, 8, 8, 0.5);
}

.btn-outline:hover {
    background: rgba(18, 18, 18, 0.1);
    border-color: #5d5b5b;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .slider-content {
        padding: 30px;
        text-align: center;
    }

    .slider-content h1 {
        font-size: 2.5rem;
    }

    .slider-btns {
        justify-content: center;
    }

    .hero-slider {
        padding: 80px 20px;
    }
}

/* Slick Carousel Overrides */
.products-grid.slick-initialized {
    display: block;
}

.products-grid.slick-slider {
    margin-bottom: 20px;
}

.products-grid .slick-slide {
    margin: 0 10px;
}

.products-grid .slick-dots {
    bottom: -30px;
}

.product-card {
    background-color: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--accent);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.product-img {
    height: 250px;
    overflow: hidden;
    position: relative;
}

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

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

.product-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    padding: 10px;
    transform: translateY(100%);
    transition: var(--transition);
}

.product-card:hover .product-actions {
    transform: translateY(0);
}

.product-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 5px;
    cursor: pointer;
    transition: var(--transition);
}

.product-action-btn:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.product-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--dark);
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-current {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--accent);
}

.price-original {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 0.9rem;
}

/* Newsletter */
.newsletter {
    padding: 80px 0;
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.9)), url('https://images.unsplash.com/photo-1523381294911-8d3cead13475?ixlib=rb-4.0.3&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
}

.newsletter h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.newsletter p {
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 1rem;
}

.newsletter-form button {
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0 30px;
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 60px 0 0;
}

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

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    transition: var(--transition);
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--secondary);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    margin-bottom: 15px;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .slider-content h1 {
        font-size: 2.5rem;
    }

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

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: var(--transition);
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0);
    }

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

    .slider-content h1 {
        font-size: 2rem;
    }

    .slider-btns {
        flex-direction: column;
        align-items: center;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-form input,
    .newsletter-form button {
        border-radius: var(--radius);
        width: 100%;
    }
}

@media (min-width: 768px) {
    .categories-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        overflow-x: hidden;
    }

    .category-card {
        flex: none;
        max-width: none;
    }
}

@media (max-width: 576px) {
    .logo {
        font-size: 1.5rem;
    }

    .header-actions a {
        margin-left: 15px;
        font-size: 1.1rem;
    }

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

    @media (max-width: 768px) {
        .products-grid {
            grid-template-columns: repeat(2, 1fr);
            /* Show 2 cards per row */
            gap: 10px;
            /* Slightly tighter spacing */
        }

        .product-card {
            width: 100%;
            /* Ensure cards fill the column */
        }

        .product-img {
            height: 180px;
            /* Adjust image height for mobile */
        }

        .product-title {
            font-size: 1rem;
        }

        .price-current,
        .price-original {
            font-size: 0.9rem;
        }

        .product-category {
            font-size: 0.8rem;
        }

        .product-info {
            padding: 15px;
        }

        .product-actions {
            padding: 8px;
        }

        .product-action-btn {
            width: 35px;
            height: 35px;
        }
    }

    /* Small Mobile Devices */
    @media (max-width: 576px) {
        .products-grid {
            grid-template-columns: repeat(2, 1fr);
            /* Still 2 cards per row */
            gap: 8px;
        }

        .product-img {
            height: 150px;
        }

        .product-title {
            font-size: 0.9rem;
        }

        .price-current,
        .price-original {
            font-size: 0.85rem;
        }
    }
}