/* ===== Global Styles ===== */
:root {
    --primary-color: #008000;
    --primary-dark: #006400;
    --primary-light: #90EE90;
    --secondary-color: #FF4444;
    --text-dark: #2c3e50;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* ===== Header ===== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 14px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-links a {
    color: var(--white);
    margin-left: 20px;
    transition: opacity 0.3s;
}

.top-bar-links a:hover {
    opacity: 0.8;
}

.main-header {
    padding: 20px 0;
}

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

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
    width: auto;
}

.search-bar {
    flex: 1;
    max-width: 600px;
}

.search-form {
    display: flex;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    overflow: hidden;
}

.search-form input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    outline: none;
}

.search-form button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-form button:hover {
    background: var(--primary-dark);
}

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

.header-action {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.3s;
    position: relative;
}

.header-action:hover {
    color: var(--primary-color);
}

.header-action i {
    font-size: 24px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* ===== Navigation ===== */
.nav-bar {
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.nav-content {
    display: flex;
    align-items: center;
    padding: 0;
}

.browse-btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 30px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s;
}

.browse-btn:hover {
    background: var(--primary-dark);
}

.main-nav {
    display: flex;
    list-style: none;
    margin-left: 30px;
    gap: 30px;
}

.main-nav a {
    display: block;
    padding: 15px 0;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* ===== Category Icons ===== */
.categories-section {
    padding: 40px 0;
    background: var(--white);
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--text-dark);
}

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

.category-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.category-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.category-card h3 {
    font-size: 16px;
    margin-top: 10px;
    color: var(--text-dark);
}

/* ===== Products Grid ===== */
.products-section {
    padding: 60px 0;
    background: var(--bg-light);
}

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

.view-all-btn {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.view-all-btn:hover {
    gap: 10px;
}

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

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: var(--bg-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-badge.featured {
    background: var(--primary-color);
}

.product-badge.new {
    background: #3498db;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    color: #FFA500;
    display: flex;
    gap: 2px;
}

.rating-count {
    color: var(--text-light);
    font-size: 13px;
}

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

.current-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.original-price {
    font-size: 16px;
    color: var(--text-light);
    text-decoration: line-through;
}

.discount-badge {
    background: var(--secondary-color);
    color: var(--white);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.add-to-cart-btn {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
}

/* ===== Banner ===== */
.hero-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 60px 0;
    margin: 20px 0;
    border-radius: 16px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-btn {
    background: var(--white);
    color: var(--primary-color);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 18px;
    display: inline-block;
    transition: transform 0.3s;
}

.hero-btn:hover {
    transform: scale(1.05);
}

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

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

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Product Details ===== */
.product-details-section {
    padding: 40px 0;
}

.product-details-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.product-images-container {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.main-product-image {
    width: 100%;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-light);
    margin-bottom: 20px;
}

.main-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumbnails {
    display: flex;
    gap: 15px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-color);
}

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

.product-details-info h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.stock-status {
    color: var(--primary-color);
    font-weight: 600;
}

.stock-status.out-of-stock {
    color: var(--secondary-color);
}

.product-description {
    margin: 30px 0;
    line-height: 1.8;
    color: var(--text-light);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
}

.quantity-controls {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-controls button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s;
}

.quantity-controls button:hover {
    background: var(--border-color);
}

.quantity-controls input {
    width: 60px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.buy-buttons {
    display: flex;
    gap: 15px;
}

.buy-now-btn {
    flex: 1;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.buy-now-btn:hover {
    opacity: 0.9;
}

.specifications {
    margin: 40px 0;
}

.specifications table {
    width: 100%;
    border-collapse: collapse;
}

.specifications td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.specifications td:first-child {
    font-weight: 600;
    width: 200px;
}

/* ===== Reviews ===== */
.reviews-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

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

.review-card {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.reviewer-name {
    font-weight: 600;
}

.review-date {
    color: var(--text-light);
    font-size: 14px;
}

.review-text {
    line-height: 1.7;
    color: var(--text-light);
}

/* ===== Shop Page ===== */
.shop-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    padding: 40px 0;
}

.filters-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
}

.filter-group input[type="checkbox"] {
    margin-right: 8px;
}

.price-range {
    display: flex;
    gap: 10px;
}

.price-range input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

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

.sort-select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
}

/* ===== Cart ===== */
.cart-section {
    padding: 40px 0;
}

.cart-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

.cart-items {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
}

.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.remove-item {
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 20px;
}

.cart-summary {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.summary-row.total {
    font-size: 20px;
    font-weight: bold;
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
}

.checkout-btn {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    .search-bar {
        width: 100%;
        max-width: 100%;
    }
    
    .main-nav {
        display: none;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-details-container {
        grid-template-columns: 1fr;
    }
    
    .shop-container {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .cart-container {
        grid-template-columns: 1fr;
    }
}

