/* E-commerce Lite Template */
:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary: #3b82f6;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --light-gray: #e5e7eb;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background-color: white;
    padding-top: 40px; /* For demo banner */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; }

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header p {
    color: var(--gray);
    font-size: 1.125rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-add-cart {
    background-color: var(--dark);
    color: white;
    width: 100%;
    margin-top: 1rem;
}

.btn-add-cart:hover {
    background-color: #374151;
}

/* Top Bar */
.top-bar {
    background-color: var(--dark);
    color: white;
    padding: 10px 0;
    font-size: 0.875rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    gap: 2rem;
}

.top-bar-left span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-bar-right {
    display: flex;
    gap: 1rem;
}

.top-bar-right a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.top-bar-right a:hover {
    color: var(--primary);
}

/* Header */
.header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--dark);
}

.logo-main {
    color: var(--dark);
}

.logo-accent {
    color: var(--primary);
}

.search-box {
    flex: 0 1 500px;
}

.search-box form {
    display: flex;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 1rem;
}

.search-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
}

.header-actions {
    display: flex;
    gap: 1.5rem;
}

.action-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

.action-link:hover {
    color: var(--primary);
}

.action-link i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.action-link span {
    font-size: 0.875rem;
}

.cart-link {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--danger);
    color: white;
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation */
.main-nav {
    background-color: var(--light);
    border-bottom: 1px solid var(--light-gray);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background-color: var(--light);
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
    margin-bottom: 3rem;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    z-index: 2;
    color: white;
    max-width: 500px;
}

.slide-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.slide-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.5), transparent);
}

/* Features */
.features {
    padding: 3rem 0;
    background-color: var(--light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--gray);
}

/* Products */
.products-section {
    padding: 5rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.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(-10px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(20px);
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.action-btn:hover {
    background-color: var(--primary);
    color: white;
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--danger);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-badge.new {
    background-color: var(--primary);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.old-price {
    font-size: 0.875rem;
    color: var(--gray);
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.product-rating i {
    color: var(--warning);
}

.rating-count {
    color: var(--gray);
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

/* Categories */
.categories {
    padding: 5rem 0;
    background-color: var(--light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.category-card {
    position: relative;
    height: 300px;
    border-radius: var(--radius);
    overflow: hidden;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 2rem;
}

.category-overlay h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.category-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.category-link:hover {
    color: var(--primary);
}

/* Newsletter */
.newsletter {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
}

.newsletter h2,
.newsletter p {
    color: white;
}

.newsletter p {
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
}

.newsletter-form button {
    white-space: nowrap;
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-col p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.5rem;
}

.footer-col a {
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: rgba(255,255,255,0.7);
}

.footer-bottom a {
    color: var(--primary);
    text-decoration: none;
}

.payment-methods {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.payment-methods i {
    color: rgba(255,255,255,0.7);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    transition: var(--transition);
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray);
    cursor: pointer;
}

.cart-items {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--light-gray);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.total-price {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 992px) {
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .search-box {
        order: 3;
        flex: 1 1 100%;
    }
    
    .hero-slider {
        height: 400px;
    }
    
    .slide-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 180px;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 1000;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: 1rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}