:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --success: #10b981;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
header {
    background: white;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.menu-toggle:active {
    background: var(--background);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.icon-btn {
    padding: 0.5rem;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.icon-btn:active {
    background: var(--background);
}

/* Side Drawer */
.side-drawer {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--surface);
    z-index: 1002;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
}

.side-drawer.open {
    transform: translateX(280px);
}

.side-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.side-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.drawer-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.25rem;
    line-height: 1;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: background 0.2s;
}

.close-btn:active {
    background: var(--background);
}

.side-drawer ul {
    padding: 0.5rem;
    overflow-y: auto;
    flex: 1;
}

.side-drawer li {
    margin-bottom: 0.25rem;
}

.side-drawer a {
    display: block;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text);
    transition: all 0.2s;
}

.side-drawer a:active {
    background: var(--background);
    color: var(--primary);
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 0.75rem 0;
}

/* Floating Cart */
.floating-cart {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    background: var(--primary);
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    z-index: 998;
    transition: transform 0.2s, box-shadow 0.2s;
}

.floating-cart:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.cart-icon {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    min-width: 1.125rem;
    height: 1.125rem;
    border-radius: 0.5625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
    border: 2px solid white;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-block;
    text-align: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:active {
    background: var(--primary-dark);
    transform: translateY(1px);
}

.btn-outline {
    border: 1.5px solid var(--border);
    color: var(--text);
    background: white;
}

.btn-outline:active {
    background: var(--background);
    border-color: var(--primary);
    color: var(--primary);
}

/* Hero */
.hero {
    padding: 3rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero h1 {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.product-card {
    background: var(--surface);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
}

.product-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-sm);
}

.product-image {
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: #fafafa;
    padding: 0.75rem;
}

.product-info {
    padding: 0.875rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.6875rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

.product-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.3;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin-top: auto;
    margin-bottom: 0.75rem;
}

/* Forms */
.form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label,
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text);
}

.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: all 0.2s;
    font-family: inherit;
    background: white;
}

.form-input:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Cart */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.cart-table th,
.cart-table td {
    padding: 0.875rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.cart-table th {
    background: var(--background);
    font-weight: 600;
    color: var(--text);
}

.cart-summary {
    margin-top: 1.5rem;
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.cart-total {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

/* Footer */
footer {
    background: var(--text);
    color: white;
    padding: 3rem 1rem 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.footer-col h3 {
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 0.625rem;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-col a:active {
    color: white;
}

/* Tablet Styles */
@media (min-width: 768px) {
    .header-content {
        padding: 1.125rem 2rem;
    }

    .logo {
        font-size: 1.625rem;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }

    .product-image {
        height: 180px;
    }

    .product-info {
        padding: 1.125rem;
    }

    .product-title {
        font-size: 1rem;
    }

    .container {
        padding: 2rem 1.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.125rem;
    }

    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .header-content {
        padding: 1.25rem 2rem;
    }

    .logo {
        font-size: 1.75rem;
    }

    .header-actions .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }

    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .product-image {
        height: 200px;
    }

    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }

    .product-card:active {
        transform: translateY(-2px);
    }

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

    .floating-cart:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
    }
}