/* Demo E-commerce Store Styles */
:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --success: #4caf50;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --border: #e6ebf1;
    --bg-light: #f6f9fc;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Header */
header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

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

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

.cart-link {
    position: relative;
    background: var(--primary);
    color: white !important;
    padding: 8px 16px;
    border-radius: 8px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.page-title {
    font-size: 32px;
    margin-bottom: 32px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

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

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

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

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

.btn-success {
    background: var(--success);
    color: white;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
}

/* Cart */
.cart-items {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

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

.cart-item-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-price {
    color: var(--text-secondary);
    font-size: 14px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    font-weight: 600;
}

.quantity {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.remove-btn {
    color: #f44336;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
}

.cart-summary {
    background: var(--bg-light);
    padding: 24px;
    border-radius: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 16px;
}

.summary-total {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    border-top: 2px solid var(--border);
    padding-top: 16px;
    margin-top: 16px;
}

/* Checkout Form */
.checkout-form {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-cart h2 {
    font-size: 24px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .cart-item {
        flex-direction: column;
    }

    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
}
