/* ============================================================
   style.css - Global Styles
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: #f8fafc;
    color: #0f172a;
    padding: 2rem 1.5rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== Top Bar ===== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9edf2;
}

.brand {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand i {
    color: #3b82f6;
    -webkit-text-fill-color: #3b82f6;
    margin-right: 6px;
}

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

.nav-link {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.6rem;
    border-radius: 60px;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.nav-link:hover {
    border-color: #94a3b8;
    box-shadow: 0 8px 18px -8px rgba(0,0,0,0.08);
}

.badge {
    background: #1e293b;
    color: white;
    border-radius: 40px;
    padding: 0.1rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===== Messages ===== */
.message {
    background: #f1f5f9;
    padding: 0.8rem 1.5rem;
    border-radius: 60px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #3b82f6;
    font-weight: 500;
}

/* ===== Product Grid ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0 3rem;
}

.product-card {
    background: white;
    border-radius: 28px;
    padding: 1.5rem 1rem 1.8rem;
    box-shadow: 0 8px 24px -12px rgba(0,0,0,0.08);
    transition: 0.2s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f5f9;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 32px -16px rgba(0,0,0,0.12);
    border-color: #dbe1e9;
}

.product-img {
    background: #f1f5f9;
    border-radius: 24px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.8rem;
    color: #1e293b;
    margin-bottom: 1rem;
}

.product-name {
    font-weight: 600;
    font-size: 1.15rem;
}

.product-price {
    margin: 0.4rem 0 0.8rem;
    font-weight: 500;
    color: #0f172a;
    font-size: 1.2rem;
}

.product-price span {
    font-weight: 400;
    color: #64748b;
    font-size: 0.8rem;
    margin-left: 4px;
}

/* ===== Quantity Selector ===== */
.qty-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0.5rem 0 1rem;
}

.qty-btn {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 40px;
    font-size: 1.2rem;
    font-weight: 400;
    cursor: pointer;
    transition: 0.1s;
    color: #1e293b;
}

.qty-btn:hover {
    background: #e2e8f0;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 0.3rem 0;
    font-weight: 500;
    font-size: 1rem;
    background: white;
}

.qty-input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* ===== Buttons ===== */
.actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.btn {
    border: none;
    padding: 0.6rem 0.9rem;
    border-radius: 60px;
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
    transition: 0.15s;
    cursor: pointer;
    flex: 1 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f8fafc;
    text-decoration: none;
    color: #0f172a;
}

.btn-primary {
    background: #0f172a;
    border: 1px solid #0f172a;
    color: white;
}

.btn-primary:hover {
    background: #1e293b;
}

.btn-outline {
    background: transparent;
    border: 1px solid #d0d8e3;
}

.btn-outline:hover {
    background: #f1f5f9;
}

.btn-success {
    background: #0f172a;
    color: white;
    border: 1px solid #0f172a;
}

.btn-success:hover {
    background: #1e293b;
}

.btn-danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
}

.btn-danger:hover {
    background: #fecaca;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ===== Cart Page ===== */
.cart-container {
    background: white;
    border-radius: 32px;
    padding: 2rem;
    border: 1px solid #e9edf2;
    box-shadow: 0 6px 18px -10px rgba(0,0,0,0.04);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 10px;
}

.cart-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-name {
    font-weight: 500;
}

.cart-item-price {
    color: #475569;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-qty .qty-btn {
    width: 28px;
    height: 28px;
    font-size: 1rem;
}

.cart-item-qty .qty-input {
    width: 44px;
    padding: 0.2rem 0;
    font-size: 0.9rem;
}

.cart-total {
    font-weight: 600;
    font-size: 1.3rem;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 2px dashed #e2e8f0;
    text-align: right;
}

.cart-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 1.2rem;
    flex-wrap: wrap;
}

.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.empty-cart i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.empty-cart a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

/* ===== Footer ===== */
.footer {
    margin-top: 3rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    border-top: 1px solid #e9edf2;
    padding-top: 2rem;
}

.footer a {
    color: #3b82f6;
    text-decoration: none;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-link {
        justify-content: center;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 1rem 0;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .cart-actions .btn {
        justify-content: center;
    }
}