:root {
    --primary: #6C5CE7;
    --primary-dark: #5a4bd6;
    --secondary: #FD79A8;
    --accent: #00CEC9;
    --dark: #2D3436;
    --gray: #636E72;
    --light: #F8F9FA;
    --white: #FFFFFF;
    --success: #00B894;
    --error: #D63031;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,.08);
    --font: 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--dark); background: var(--light); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header { background: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.logo { display: flex; align-items: center; gap: .75rem; font-weight: 800; font-size: 1.4rem; color: var(--dark); }
.logo img { width: 44px; height: 44px; }
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav a { color: var(--dark); font-weight: 600; transition: color .2s; }
.main-nav a:hover { color: var(--primary); }
.cart-link { position: relative; }
.cart-badge { background: var(--secondary); color: #fff; font-size: .7rem; padding: .15rem .45rem; border-radius: 999px; margin-left: .25rem; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 3px; background: var(--dark); border-radius: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .65rem 1.25rem; border-radius: var(--radius); font-weight: 700; font-family: var(--font); font-size: .95rem; border: 2px solid transparent; cursor: pointer; transition: all .2s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--dark); color: #fff; }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-light { background: #fff; color: var(--primary); }
.btn-sm { padding: .45rem .85rem; font-size: .85rem; }
.btn-lg { padding: .85rem 1.75rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-family: var(--font); }
.btn-link.danger { color: var(--error); }

/* Hero */
.hero { background: linear-gradient(135deg, #6C5CE7 0%, #a29bfe 50%, #FD79A8 100%); color: #fff; padding: 4rem 0; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.hero-badge { display: inline-block; background: rgba(255,255,255,.2); padding: .35rem 1rem; border-radius: 999px; font-size: .85rem; margin-bottom: 1rem; }
.hero h1 { font-size: 2.75rem; line-height: 1.15; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; opacity: .95; margin-bottom: 1.5rem; max-width: 480px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual { position: relative; height: 280px; }
.hero-card { position: absolute; width: 100px; height: 100px; background: rgba(255,255,255,.2); border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 3rem; backdrop-filter: blur(4px); animation: float 3s ease-in-out infinite; }
.hero-card-1 { top: 20%; left: 10%; }
.hero-card-2 { top: 40%; right: 15%; animation-delay: .5s; }
.hero-card-3 { bottom: 10%; left: 35%; animation-delay: 1s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Sections */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--white); }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.section-head h2 { font-size: 1.75rem; }
.page-header { background: var(--white); padding: 2.5rem 0; text-align: center; border-bottom: 1px solid #eee; }
.page-header h1 { font-size: 2.25rem; margin-bottom: .5rem; }

/* Categories */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.25rem; }
.category-card { background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; transition: transform .2s; color: var(--dark); }
.category-card:hover { transform: translateY(-4px); color: var(--primary); }
.category-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.category-card h3 { font-size: 1rem; margin-bottom: .35rem; }
.category-card p { font-size: .85rem; color: var(--gray); }

/* Products */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.product-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; }
.product-card:hover { transform: translateY(-4px); }
.product-image { position: relative; aspect-ratio: 1; background: #f0f0f0; display: block; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: .75rem; left: .75rem; padding: .25rem .6rem; border-radius: 6px; font-size: .75rem; font-weight: 700; color: #fff; }
.badge.sale { background: var(--error); }
.badge.featured { background: var(--accent); top: auto; bottom: .75rem; }
.product-body { padding: 1.25rem; }
.product-category { font-size: .8rem; color: var(--gray); text-transform: uppercase; letter-spacing: .5px; }
.product-body h3 { font-size: 1rem; margin: .35rem 0 .75rem; }
.product-body h3 a { color: var(--dark); }
.product-body h3 a:hover { color: var(--primary); }
.product-price { margin-bottom: 1rem; }
.price-old { text-decoration: line-through; color: var(--gray); margin-right: .5rem; font-size: .9rem; }
.price-current { font-weight: 800; color: var(--primary); font-size: 1.1rem; }
.product-price.large .price-current { font-size: 1.75rem; }

/* Promo */
.promo-banner { background: var(--dark); color: #fff; padding: 2.5rem 0; }
.promo-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.promo-inner h2 { font-size: 1.5rem; margin-bottom: .5rem; }

/* Shop */
.shop-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; }
.shop-sidebar { background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); height: fit-content; }
.filter-list { list-style: none; }
.filter-list a { display: block; padding: .5rem 0; color: var(--gray); font-weight: 600; }
.filter-list a.active, .filter-list a:hover { color: var(--primary); }
.shop-toolbar { display: flex; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.search-input, .qty-input { padding: .6rem 1rem; border: 2px solid #e0e0e0; border-radius: var(--radius); font-family: var(--font); }
.search-input { flex: 1; min-width: 200px; }
.results-count { color: var(--gray); margin-bottom: 1rem; font-size: .9rem; }
.pagination { display: flex; gap: .5rem; margin-top: 2rem; justify-content: center; }
.pagination a { padding: .5rem .85rem; background: var(--white); border-radius: 8px; color: var(--dark); font-weight: 600; box-shadow: var(--shadow); }
.pagination a.active { background: var(--primary); color: #fff; }

/* Product detail */
.breadcrumb { font-size: .9rem; color: var(--gray); margin-bottom: 2rem; }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.main-image { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 1; object-fit: cover; width: 100%; background: #f0f0f0; }
.product-info h1 { font-size: 2rem; margin: .5rem 0 1rem; }
.product-short { color: var(--gray); margin: 1rem 0; }
.stock-status { font-weight: 700; margin-bottom: 1.5rem; }
.stock-status.in-stock { color: var(--success); }
.stock-status.out-stock { color: var(--error); }
.add-cart-form .qty-row { margin-bottom: 1rem; }
.product-description { background: var(--white); padding: 2rem; border-radius: var(--radius); margin-bottom: 3rem; }
.related-products h2 { margin-bottom: 1.5rem; }

/* Cart & Checkout */
.cart-layout, .checkout-layout, .contact-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }
.cart-table { width: 100%; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border-collapse: collapse; overflow: hidden; }
.cart-table th, .cart-table td { padding: 1rem; text-align: left; border-bottom: 1px solid #eee; }
.cart-product { display: flex; align-items: center; gap: 1rem; }
.cart-product img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }
.cart-summary, .checkout-form-wrap { background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.cart-summary h3 { margin-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; padding: .5rem 0; }
.summary-row.total { font-weight: 800; font-size: 1.15rem; border-top: 2px solid #eee; margin-top: .5rem; padding-top: 1rem; }
.summary-note { font-size: .85rem; color: var(--gray); margin-top: 1rem; text-align: center; }
.cart-actions { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.checkout-item { display: flex; justify-content: space-between; padding: .5rem 0; font-size: .9rem; border-bottom: 1px solid #eee; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { display: block; font-weight: 700; margin-bottom: .35rem; font-size: .9rem; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: .7rem 1rem; border: 2px solid #e0e0e0; border-radius: var(--radius); font-family: var(--font); font-size: 1rem; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.contact-form { background: var(--white); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-item { margin-bottom: 1.25rem; }
.contact-item strong { display: block; margin-bottom: .25rem; }

/* Alerts & Empty */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius); margin: 1rem auto; max-width: 1200px; }
.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.success-box { text-align: center; background: var(--white); padding: 3rem; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 560px; margin: 0 auto; }
.success-icon { width: 64px; height: 64px; background: var(--success); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 1rem; }

/* Footer */
.site-footer { background: var(--dark); color: #dfe6e9; padding: 3rem 0 0; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; padding-bottom: 2rem; }
.footer-logo { width: 50px; margin-bottom: 1rem; }
.site-footer h4 { color: #fff; margin-bottom: 1rem; }
.site-footer a { display: block; color: #b2bec3; margin-bottom: .5rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #636E72; padding: 1.25rem 0; text-align: center; font-size: .9rem; }

/* Responsive */
@media (max-width: 900px) {
    .hero-inner, .product-detail-grid, .cart-layout, .checkout-layout, .contact-layout, .shop-layout { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .hero-visual { display: none; }
    .nav-toggle { display: flex; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 1rem; box-shadow: var(--shadow); }
    .main-nav.open { display: flex; }
    .site-header .container { position: relative; }
    .form-grid { grid-template-columns: 1fr; }
}
