/* ====================== GLOBAL STYLES ====================== */
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    --primary: #10b981;     /* Emerald Green */
    --accent: #f97316;      /* Orange */
}

body {
    font-family: 'Inter', system_ui, sans-serif;
}

/* Smooth transitions */
* {
    transition: all 0.2s ease;
}

/* ====================== NAVBAR ====================== */
nav a {
    position: relative;
}

nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #10b981;
    transition: width 0.3s ease;
}

nav a:hover:after {
    width: 100%;
}

/* ====================== PRODUCT CARD ====================== */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.dark .product-card {
    background: #1e2937;
    border-color: #334155;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.product-image {
    height: 180px;
    object-fit: cover;
    width: 100%;
}

.product-info {
    padding: 16px;
}

.product-name {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ====================== BUTTONS ====================== */
.btn-primary {
    background-color: #10b981;
    color: white;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #059669;
}

.btn-accent {
    background-color: #f97316;
    color: white;
    font-weight: 600;
}

.btn-accent:hover {
    background-color: #ea580c;
}

/* ====================== GRID LAYOUTS ====================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 20px;
}

/* Mobile: 2 columns */
@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* ====================== HERO SECTION ====================== */
.hero-bg {
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
}

/* ====================== CATEGORY BUTTONS ====================== */
.category-btn {
    padding: 10px 24px;
    border-radius: 9999px;
    font-weight: 500;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
}

.dark .category-btn {
    border-color: #475569;
    background: #1e2937;
    color: #cbd5e1;
}

.category-btn.active {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

/* ====================== CART & MODAL ====================== */
.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.dark .cart-item {
    border-color: #475569;
}

/* ====================== FOOTER & MISC ====================== */
footer a:hover {
    color: #10b981;
}

/* Dark mode improvements */
.dark {
    color-scheme: dark;
}

/* Tailwind custom utilities */
@layer utilities {
    .text-balance {
        text-wrap: balance;
    }
    
    .input-focus {
        @apply focus:ring-2 focus:ring-emerald-500 focus:border-transparent;
    }
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 768px) {
    .product-card .product-image {
        height: 160px;
    }
    
    h1 {
        font-size: 2.25rem;
    }
}

/* Loading animation */
.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}