:root {
    --primary-color: #007AFF;
    --secondary-color: #1c1c1e;
    --background-color: #f5f5f7;
    --card-bg: #ffffff;
    --text-main: #1d1d1f;
    --text-secondary: #86868b;
    --border-color: #d2d2d7;
    --success-color: #34c759;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --container-width: 1200px;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Hero Section */
.hero {
    height: 600px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    margin-bottom: 60px;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 32px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0066d6;
    transform: scale(1.02);
}

/* Categories */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 80px;
}

.category-card {
    position: relative;
    height: 300px;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.category-card:hover img {
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    display: flex;
    align-items: flex-end;
    padding: 24px;
}

.category-overlay h3 {
    color: white;
    font-size: 1.5rem;
}

/* Products */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
    margin-bottom: 80px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.3s;
    border: 1px solid transparent;
}

.product-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border-color);
}

.product-image {
    height: 280px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-image img {
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-price {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Footer */
footer {
    background: #111;
    color: #f5f5f7;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #86868b;
}

.footer-col ul li a:hover {
    color: white;
}

.copyright {
    text-align: center;
    color: #424245;
    font-size: 0.8rem;
    padding-top: 20px;
    border-top: 1px solid #333;
}

/* Cart Page */
.cart-container {
    padding: 40px 0;
}

.cart-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    gap: 20px;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
}

.cart-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
}

.remove-btn {
    color: #ff3b30;
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-summary {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    margin-top: 32px;
    text-align: right;
}

.total-price {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 60px 0;
}

.detail-image {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.detail-price {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 32px;
    font-weight: 600;
}

.detail-desc {
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Checkout */
.checkout-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: var(--radius);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}
