:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --accent: #0ea5e9;
    --dark: #1e293b;
    --darker: #0f172a;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --gray-lighter: #e2e8f0;
    --gray-bg: #f1f5f9;
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-bg);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
}

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

.header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    color: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 28px;
    color: var(--accent);
}

.logo h1 {
    font-size: 20px;
    font-weight: 600;
}

.logo h1 span {
    font-weight: 300;
    color: var(--gray-light);
}

.nav {
    display: flex;
    gap: 8px;
}

.nav a {
    color: var(--gray-light);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
}

.user-name i {
    color: var(--accent);
}

.logout-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    color: white;
}

.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 40px;
}

.hero h2 {
    font-size: 42px;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--white);
    border: 2px solid var(--gray-lighter);
    color: var(--gray);
    padding: 10px 22px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
    align-items: stretch;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.product-card.hidden {
    display: none;
}

.product-image {
    height: 180px;
    background: linear-gradient(135deg, var(--gray-bg) 0%, var(--gray-lighter) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.product-unavailable {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    z-index: 10;
}

.no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--gray-light);
}

.no-image i {
    font-size: 48px;
}

.product-info {
    padding: 20px;
    padding-bottom: 80px;
    flex: 1;
    position: relative;
}

.product-actions {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
}

.product-category {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.product-info h3 {
    font-size: 17px;
    margin-bottom: 8px;
    color: var(--dark);
}

.product-info .description {
    color: var(--gray);
    font-size: 13px;
    margin-bottom: 12px;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 15px;
}

.price-item {
    text-align: center;
    padding: 12px 8px;
    background: var(--gray-bg);
    border-radius: 8px;
}

.price-item.highlight {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    color: var(--white);
}

.price-item .label {
    display: block;
    font-size: 10px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.price-item.highlight .label {
    color: rgba(255, 255, 255, 0.9);
}

.price-item .value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.price-item.highlight .value {
    color: var(--white);
}

.product-actions {
    margin-top: auto;
}

.add-to-cart-form {
    margin-top: 0;
}

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

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.add-to-cart-btn.disabled {
    background: var(--gray-light);
    cursor: not-allowed;
}

.add-to-cart-btn.out-of-stock {
    background: var(--danger);
}

.cart-badge {
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 5px;
}

.info-banner {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
    color: white;
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-banner i {
    font-size: 20px;
}

.info-banner a {
    color: white;
    font-weight: 600;
    text-decoration: underline;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius);
}

.no-products i {
    font-size: 64px;
    color: var(--gray-light);
    margin-bottom: 20px;
}

.footer {
    background: var(--dark);
    color: var(--gray-light);
    text-align: center;
    padding: 30px 0;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
}

.message {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h2 {
        font-size: 28px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .price-grid {
        grid-template-columns: 1fr;
    }
    
    .user-menu {
        width: 100%;
        justify-content: center;
    }
}
