:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg: #f4f4f5;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --success: #10b981;
    --danger: #ef4444;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

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

/* Navbar */
.navbar {
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary);
}

nav a {
    text-decoration: none;
    color: var(--text);
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary);
}

.badge {
    background: var(--danger);
    color: white;
    padding: 0.1rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

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

.product-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
}

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

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--primary-hover);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.block-btn {
    display: block;
    width: 100%;
}

/* Cart & Checkout */
.cart-page, .checkout-page {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-title {
    font-weight: 600;
}

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

.qty-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
}

.remove-btn {
    color: var(--danger);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.cart-summary {
    margin-top: 2rem;
    text-align: right;
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text);
    color: white;
    padding: 1rem 2rem;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.checkout-success {
    text-align: center;
    padding: 3rem;
}

/* Media Queries */
@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }
}
