/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Modern Tech Theme */
    --primary: #0066ff;
    --primary-dark: #0052cc;
    --primary-light: #3385ff;
    --secondary: #ff3366;
    --accent: #00d4ff;
    
    --bg-main: #0a0e1a;
    --bg-card: #151b2e;
    --bg-elevated: #1e2740;
    --bg-hover: #252e4a;
    
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #64748b;
    
    --border-color: #2d3748;
    --border-light: #1a202c;
    
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    
    /* Typography */
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Space Mono', monospace;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(0, 102, 255, 0.3);
}

body {
    font-family: var(--font-primary);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Header Styles */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) 0;
    gap: var(--spacing-xl);
}

.brand-logo {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-logo a {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: opacity 0.2s;
}

.brand-logo a:hover {
    opacity: 0.8;
}

/* Search */
.search-container {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1.25rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: var(--font-primary);
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-button:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-primary);
}

.action-button:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.cart-button {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: var(--secondary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    min-width: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

/* Navigation */
.main-nav {
    border-top: 1px solid var(--border-light);
    overflow-x: auto;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) 0;
}

.nav-link {
    padding: 0.625rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    white-space: nowrap;
    display: block;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(0, 102, 255, 0.1);
}

/* Main Container */
.app-container {
    min-height: calc(100vh - 400px);
}

.page {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content Wrapper */
.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-xl);
}

/* Filters Sidebar */
.filters-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    height: fit-content;
    position: sticky;
    top: 140px;
}

.filter-section {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--border-light);
}

.filter-section:last-of-type {
    border-bottom: none;
    margin-bottom: var(--spacing-lg);
}

.filter-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.filter-checkbox:hover {
    background: var(--bg-elevated);
}

.filter-checkbox input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.filter-checkbox span {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Price Range */
.price-range-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.price-input {
    flex: 1;
    padding: 0.75rem 0.875rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: var(--font-primary);
    transition: all 0.2s;
    min-width: 0;
}

.price-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.price-input::placeholder {
    color: var(--text-muted);
}

.price-separator {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1.125rem;
}

.apply-filter-button {
    padding: 0.625rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-primary);
}

.apply-filter-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.clear-filters-button {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-primary);
}

.clear-filters-button:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--primary);
}

/* Products Main */
.products-main {
    flex: 1;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.products-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-count {
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-family: var(--font-mono);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: var(--bg-elevated);
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-category-badge {
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    padding: 0.375rem 0.75rem;
    background: rgba(0, 102, 255, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--radius-md);
    letter-spacing: 0.05em;
}

.product-info {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    line-height: 1.3;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
    font-size: 0.875rem;
}

.product-rating-value {
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-mono);
}

.product-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: auto;
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s;
}

.quantity-selector:hover {
    border-color: var(--primary);
}

.quantity-btn {
    padding: 0.625rem 0.875rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    width: 3.5rem;
    text-align: center;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--font-mono);
    padding: 0.625rem 0.5rem;
}

.add-to-cart-btn {
    flex: 1;
    padding: 0.75rem 1.25rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

/* Page Container */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-lg);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-xl);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cart Page */
.cart-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--spacing-xl);
}

.cart-items-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: var(--spacing-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all 0.2s;
}

.cart-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-elevated);
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.cart-item-category {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.cart-item-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--spacing-md);
}

.remove-item-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--error);
    border: 1px solid var(--error);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-primary);
}

.remove-item-btn:hover {
    background: var(--error);
    color: white;
}

/* Cart Summary */
.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    height: fit-content;
    position: sticky;
    top: 140px;
}

.cart-summary h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.summary-row.total {
    border-bottom: none;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--border-color);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.summary-row.total span:last-child {
    color: var(--primary);
    font-family: var(--font-mono);
}

.checkout-button {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: var(--spacing-lg);
    transition: all 0.2s;
    font-family: var(--font-primary);
}

.checkout-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.continue-shopping-button {
    width: 100%;
    padding: 1rem;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: var(--spacing-md);
    transition: all 0.2s;
    font-family: var(--font-primary);
}

.continue-shopping-button:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
}

/* Empty Cart */
.empty-cart-message {
    text-align: center;
    padding: var(--spacing-2xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
}

.empty-cart-message svg {
    color: var(--text-muted);
    margin-bottom: var(--spacing-xl);
}

.empty-cart-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.empty-cart-message p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

/* Auth Pages */
.auth-container {
    min-height: calc(100vh - 400px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-xl);
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--spacing-xl);
    text-align: center;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-input {
    padding: 0.875rem 1rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: all 0.2s;
}

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

.form-input::placeholder {
    color: var(--text-muted);
}

.error-message {
    padding: 0.875rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: var(--radius-md);
    color: var(--error);
    font-size: 0.875rem;
}

.success-message {
    padding: 0.875rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
    color: var(--success);
    font-size: 0.875rem;
}

.submit-button {
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-primary);
    margin-top: var(--spacing-md);
}

.submit-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.auth-footer {
    text-align: center;
    margin-top: var(--spacing-lg);
    color: var(--text-secondary);
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--primary-light);
}

.demo-credentials {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.demo-credentials p {
    margin: 0.25rem 0;
    color: var(--text-secondary);
}

.demo-credentials strong {
    color: var(--text-primary);
}

/* Profile Page */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.logout-button {
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--error);
    border: 1px solid var(--error);
    border-radius: var(--radius-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-primary);
}

.logout-button:hover {
    background: var(--error);
    color: white;
}

.profile-content {
    display: grid;
    gap: var(--spacing-xl);
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
}

.profile-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.info-row {
    display: flex;
    gap: var(--spacing-lg);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-light);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 100px;
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Order History */
.order-history-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.order-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all 0.2s;
}

.order-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.order-number {
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--primary);
}

.order-date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.order-customer {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.order-customer div {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.order-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.order-item {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.125rem;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
}

.order-total span:last-child {
    color: var(--primary);
    font-family: var(--font-mono);
}

.no-orders-message {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
}

/* Checkout Page */
.checkout-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--spacing-xl);
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.checkout-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.delivery-options,
.payment-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.radio-option {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.radio-option:hover {
    border-color: var(--primary);
}

.radio-option input[type="radio"] {
    margin-top: 0.25rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.radio-label {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.option-description {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.checkbox-option {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-top: var(--spacing-md);
}

.checkbox-option input[type="checkbox"] {
    accent-color: var(--primary);
    cursor: pointer;
}

.payment-fields {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-light);
}

.place-order-button {
    padding: 1.25rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-primary);
    margin-top: var(--spacing-lg);
}

.place-order-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Checkout Summary */
.checkout-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    height: fit-content;
    position: sticky;
    top: 140px;
}

.checkout-summary h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
}

.checkout-items-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    max-height: 300px;
    overflow-y: auto;
}

.checkout-item {
    display: flex;
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

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

.checkout-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-elevated);
}

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

.checkout-item-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

.checkout-item-details {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.summary-totals {
    border-top: 2px solid var(--border-color);
    padding-top: var(--spacing-lg);
}

/* Order Confirmation */
.confirmation-container {
    min-height: calc(100vh - 400px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
}

.confirmation-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.success-icon {
    margin: 0 auto var(--spacing-xl);
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.confirmation-card h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
}

.confirmation-card p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xl);
}

.confirmation-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

.primary-button,
.secondary-button {
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-primary);
    font-size: 1rem;
}

.primary-button {
    background: var(--primary);
    color: white;
    border: none;
}

.primary-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.secondary-button {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.secondary-button:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-2xl);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    z-index: 10000;
    animation: slideInUp 0.3s ease-out, fadeOut 0.3s ease-in 2.7s;
    pointer-events: none;
}

.toast-notification svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .cart-content,
    .checkout-content {
        grid-template-columns: 1fr;
    }
    
    .cart-summary,
    .checkout-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
    }
    
    .search-container {
        order: 3;
        width: 100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
    }
    
    .cart-item-controls {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .action-button span {
        display: none;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .auth-card {
        padding: var(--spacing-xl);
    }
}
