/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header Styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-links a {
    text-decoration: none;
    color: #2c3e50;
    margin: 0 1rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #3498db;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0.5rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: all 0.3s;
    width: 250px;
}

.search-box input:focus {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.search-box i {
    position: absolute;
    right: 1rem;
    color: #666;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
    color: #2c3e50;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1441986300917-64674bd600d8?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 60px;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.shop-now {
    padding: 1rem 2rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.3s;
}

.shop-now:hover {
    background-color: #2980b9;
}

/* Categories Section */
.categories {
    padding: 4rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.categories h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card {
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    text-align: center;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 8px 8px 0 0;
}

.category-card i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.category-card h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    margin: 0;
}

/* Product Filters */
.product-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 25px;
    background-color: #f1f1f1;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: #3498db;
    color: white;
}

/* Products Section */
.products {
    padding: 4rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.products h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* Product Image Container */
.product-image-container {
    width: 100%;
    height: 300px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 1rem;
    display: block;
    margin: 0 auto;
}

/* Add fallback for missing images */
.product-image:not([src]),
.product-image[src=""] {
    content: url('https://via.placeholder.com/300x300?text=No+Image');
    background-color: #f8f9fa;
    padding: 1rem;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.product-rating {
    margin-bottom: 0.5rem;
    color: #f1c40f;
}

.product-rating .fa-star {
    margin-right: 2px;
}

.product-rating span {
    color: #666;
    font-size: 0.9rem;
    margin-left: 5px;
}

.product-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.add-to-cart {
    width: 100%;
    padding: 0.8rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background-color: #2980b9;
}

/* Deals Section */
.deals {
    padding: 4rem 5%;
    background-color: #f1f1f1;
}

.deals h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.deal-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.deal-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: bold;
}

.deal-info {
    padding: 1.5rem;
}

.deal-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.deal-end {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.shop-now-btn {
    width: 100%;
    padding: 0.8rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.shop-now-btn:hover {
    background-color: #2980b9;
}

/* Newsletter Section */
.newsletter {
    background-color: #2c3e50;
    color: white;
    padding: 4rem 5%;
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter p {
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    outline: none;
}

.newsletter-form button {
    padding: 1rem 2rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.newsletter-form button:hover {
    background-color: #2980b9;
}

/* Cart Modal */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin: 1rem 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.cart-total {
    text-align: right;
    margin-top: 1rem;
    font-size: 1.2rem;
}

.checkout-btn {
    padding: 0.8rem 1.5rem;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background-color: #27ae60;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 3rem 5%;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #3498db;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-methods {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        margin: 1rem 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-right {
        margin-top: 1rem;
        flex-direction: column;
        align-items: center;
    }

    .search-box input {
        width: 100%;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Ensure images maintain aspect ratio */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Add fallback background for images */
.product-image:not([src]) {
    background: linear-gradient(45deg, #f3f3f3 25%, #e0e0e0 50%, #f3f3f3 75%);
    background-size: 200% 200%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Deal Images */
.deal-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 8px 8px 0 0;
}

/* Image Containers */
.product-card,
.category-card,
.deal-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.product-card:hover,
.category-card:hover,
.deal-card:hover {
    transform: translateY(-5px);
} 