/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Header Styles */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #007bff;
}

.nav-icons {
    display: flex;
    gap: 1.5rem;
}

.nav-icons a {
    color: #333;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.nav-icons a:hover {
    color: #007bff;
}

/* Product Detail Styles */
.product-detail-container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.product-images {
    position: relative;
}

.main-image {
    margin-bottom: 1rem;
}

.main-image img {
    width: 100%;
    height: 400px;
    object-fit: contain;
}

.thumbnail-images {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail {
    width: 80px;
    height: 80px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    object-fit: contain;
    border: 1px solid #eee;
}

.thumbnail.active {
    opacity: 1;
    border-color: #007bff;
}

.thumbnail:hover {
    opacity: 1;
}

.product-info {
    padding: 0 1rem;
    text-align: left;
}

.product-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 600;
    text-align: left;
}

.product-price {
    margin-bottom: 2rem;
    padding: 1rem 0;
    text-align: left;
}

.current-price {
    font-size: 1.8rem;
    color: #e74c3c;
    font-weight: 700;
}

.product-description {
    margin-bottom: 2rem;
    padding: 1rem 0;
    text-align: left;
}

.product-description h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

.product-description p {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
}

.product-quantity {
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.product-quantity h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    color: #333;
    transition: all 0.3s ease;
}

.quantity-selector button:hover {
    background: #f5f5f5;
}

.quantity-input {
    width: 70px;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 1.1rem;
    font-weight: 500;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.add-to-cart-btn, .buy-now-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
}

.add-to-cart-btn {
    background-color: #007bff;
    color: white;
}

.buy-now-btn {
    background-color: #28a745;
    color: white;
}

.add-to-cart-btn:hover {
    background-color: #0056b3;
}

.buy-now-btn:hover {
    background-color: #218838;
}

/* Footer Styles */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 3rem 5% 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    color: #ecf0f1;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #007bff;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Cart Icon Styles */
.cart-icon {
    position: relative;
    display: inline-block;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 992px) {
    .product-detail-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .product-detail-container {
        margin-top: 80px;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .current-price {
        font-size: 1.5rem;
    }
    
    .product-description h3,
    .product-quantity h3 {
        font-size: 1.2rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .add-to-cart-btn, .buy-now-btn {
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        justify-content: flex-start;
    }
    
    .main-image img {
        height: 300px;
    }
}

/* Most Viewed Products Section */
.most-viewed-products {
    padding: 50px 0;
    background-color: #f9f9f9;
}

.most-viewed-products .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.most-viewed-products .section-title {
    text-align: center;
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
    font-weight: 600;
}

.most-viewed-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.most-viewed-products .product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.most-viewed-products .product-card:hover {
    transform: translateY(-5px);
}

.most-viewed-products .product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.most-viewed-products .product-info {
    padding: 15px;
}

.most-viewed-products .product-name {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.most-viewed-products .product-price {
    color: #e74c3c;
    font-weight: 600;
    font-size: 18px;
}

@media (max-width: 768px) {
    .most-viewed-products .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .most-viewed-products .section-title {
        font-size: 24px;
    }
}

/* Nav Icons Styles */
#searchToggle {
    color: #333;
    font-size: 1.2rem;
    transition: color 0.3s ease;
    cursor: pointer;
    z-index: 1001;
}

#searchToggle:hover {
    color: #3498db;
}