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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e5e7eb;
    background-color: #111827;
}

.navbar {
    background-color: #1f2937;
    color: white;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #374151;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.cart-icon {
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 5px;
    transition: background-color 0.3s;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
}

.cart-icon:hover {
    background-color: rgba(255,255,255,0.1);
}

#cart-count {
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    min-width: 20px;
    text-align: center;
}

main {
    margin-top: 80px;
    padding: 2rem 0;
}

.hero {
    padding: 4rem 2rem;
    background-color: #1f2937;
    border-bottom: 1px solid #374151;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-header {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-header h1 {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 700;
    color: #f9fafb;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.hero-header p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: #9ca3af;
    font-weight: 400;
    line-height: 1.4;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-card {
    background-color: #111827;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: #4f46e5;
    background-color: #1f2937;
}

.metric-value {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #f9fafb;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.metric-label {
    font-size: 0.875rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.products {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.products h3 {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 3rem;
    color: #f9fafb;
    font-weight: 600;
    line-height: 1.2;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 3rem;
}

.product-card {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-2px);
    border-color: #4f46e5;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h4 {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: #f9fafb;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-card p {
    padding: 0 1.5rem;
    color: #9ca3af;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.price {
    padding: 0 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 1.5rem;
}

.add-to-cart {
    width: calc(100% - 3rem);
    margin: 0 1.5rem 1.5rem;
    padding: 1rem;
    background-color: #4f46e5;
    color: white;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    min-height: 44px;
    touch-action: manipulation;
}

.add-to-cart:hover {
    background-color: #4338ca;
    transform: translateY(-1px);
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: #1f2937;
    border-left: 1px solid #374151;
    transition: right 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 1rem 1.5rem;
    background-color: #111827;
    color: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #374151;
    min-height: 60px;
}

.cart-header h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: bold;
    margin: 0;
}

.close-cart {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.close-cart:hover {
    color: #f9fafb;
}

.cart-items {
    flex: 1;
    padding: 1rem 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #374151;
    min-height: 80px;
    gap: 1rem;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.item-info {
    flex: 1;
    margin-left: 1rem;
}

.item-info h5 {
    margin-bottom: 0.5rem;
    color: #f9fafb;
    font-weight: 600;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    background-color: #4f46e5;
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background-color: #4338ca;
}

.remove-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    min-height: 44px;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.cart-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #374151;
    background-color: #111827;
    min-height: 100px;
}

.cart-total {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #f9fafb;
    font-weight: 600;
}

.checkout-btn {
    width: 100%;
    padding: 1.25rem;
    background-color: #10b981;
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 56px;
    touch-action: manipulation;
}

.checkout-btn:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}

.cart-overlay.active {
    display: block;
}

.empty-cart {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}

/* Mobile First Approach - Base styles are mobile */
/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .nav-container {
        padding: 0 1.5rem;
    }
    
    .hero-header h1 {
        font-size: 2.25rem;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 1.5rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .nav-container {
        padding: 0 2rem;
    }
    
    .hero-header h1 {
        font-size: 2.75rem;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    .cart-sidebar {
        width: 400px;
        right: -400px;
    }
    
    .cart-sidebar.open {
        right: 0;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero-header h1 {
        font-size: 3rem;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-header h1 {
        font-size: 3.5rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

/* Mobile specific styles */
@media (max-width: 575px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero-header h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-header p {
        font-size: 1.1rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .metric-card {
        padding: 1.5rem;
    }
    
    .metric-value {
        font-size: 2rem;
    }
    
    .products {
        padding: 2rem 1rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-sidebar.open {
        right: 0;
    }
}