
:root {
--primary: #0066ff;
--primary-dark: #0052cc;
--secondary: #00c2ff;
--dark: #0a1930;
--dark-2: #132f4c;
--light: #f5f9ff;
--gray: #8a9bb5;
--text: #1a2b48;
--success: #00c48c;
--danger: #ff4757;
--warning: #ffa502;
--shadow: 0 4px 20px rgba(0, 102, 255, 0.08);
--shadow-hover: 0 10px 40px rgba(0, 102, 255, 0.15);
--radius: 14px;
--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
background: var(--light);
color: var(--text);
line-height: 1.6;
}

/* ===== HEADER ===== */
header {
background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
color: white;
position: sticky;
top: 0;
z-index: 1000;
box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.top-bar {
background: rgba(0,0,0,0.3);
font-size: 0.85rem;
padding: 6px 0;
text-align: center;
}

.nav-container {
max-width: 1400px;
margin: 0 auto;
padding: 16px 24px;
display: flex;
align-items: center;
gap: 24px;
}

.logo {
font-size: 1.6rem;
font-weight: 800;
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
white-space: nowrap;
}

.logo-icon {
background: linear-gradient(135deg, var(--primary), var(--secondary));
padding: 8px 12px;
border-radius: 10px;
font-size: 1.2rem;
}

.search-bar {
flex: 1;
position: relative;
max-width: 600px;
}

.search-bar input {
width: 100%;
padding: 12px 48px 12px 20px;
border-radius: 30px;
border: none;
background: rgba(255,255,255,0.1);
color: white;
font-size: 0.95rem;
transition: var(--transition);
}

.search-bar input::placeholder { color: rgba(255,255,255,0.6); }
.search-bar input:focus {
outline: none;
background: rgba(255,255,255,0.2);
box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.3);
}

.search-bar button {
position: absolute;
right: 6px;
top: 50%;
transform: translateY(-50%);
background: var(--primary);
border: none;
color: white;
width: 36px;
height: 36px;
border-radius: 50%;
cursor: pointer;
transition: var(--transition);
}

.search-bar button:hover { background: var(--primary-dark); }

.nav-actions {
display: flex;
gap: 12px;
align-items: center;
}

.nav-btn {
background: rgba(255,255,255,0.08);
border: none;
color: white;
padding: 10px 16px;
border-radius: 10px;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
font-size: 0.9rem;
transition: var(--transition);
position: relative;
}

.nav-btn:hover { background: rgba(255,255,255,0.15); }

.cart-count {
background: var(--danger);
color: white;
border-radius: 50%;
width: 22px;
height: 22px;
font-size: 0.75rem;
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
}

/* ===== NAV CATEGORIES ===== */
.nav-categories {
background: var(--dark-2);
border-top: 1px solid rgba(255,255,255,0.05);
}

.categories-list {
max-width: 1400px;
margin: 0 auto;
padding: 0 24px;
display: flex;
gap: 4px;
overflow-x: auto;
scrollbar-width: none;
}

.categories-list::-webkit-scrollbar { display: none; }

.cat-link {
color: rgba(255,255,255,0.8);
padding: 12px 18px;
cursor: pointer;
white-space: nowrap;
font-size: 0.9rem;
transition: var(--transition);
border-bottom: 3px solid transparent;
}

.cat-link:hover, .cat-link.active {
color: white;
border-bottom-color: var(--secondary);
}

/* ===== HERO ===== */
.hero {
background: linear-gradient(135deg, #0a1930 0%, #0052cc 100%);
color: white;
padding: 80px 24px;
position: relative;
overflow: hidden;
}

.hero::before {
content: '';
position: absolute;
top: -50%;
right: -10%;
width: 600px;
height: 600px;
background: radial-gradient(circle, rgba(0,194,255,0.3) 0%, transparent 70%);
border-radius: 50%;
}

.hero-content {
max-width: 1400px;
margin: 0 auto;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 40px;
align-items: center;
position: relative;
z-index: 1;
}

.hero h1 {
font-size: 3rem;
line-height: 1.1;
margin-bottom: 20px;
font-weight: 800;
}

.hero h1 span {
background: linear-gradient(135deg, var(--secondary), #fff);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}

.hero p {
font-size: 1.15rem;
opacity: 0.9;
margin-bottom: 30px;
}

.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
padding: 14px 28px;
border-radius: 10px;
border: none;
cursor: pointer;
font-size: 1rem;
font-weight: 600;
transition: var(--transition);
display: inline-flex;
align-items: center;
gap: 8px;
}

.btn-primary {
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,102,255,0.4); }

.btn-outline {
background: transparent;
color: white;
border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: white; }

.hero-visual {
font-size: 12rem;
text-align: center;
filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
animation: float 4s ease-in-out infinite;
}

@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-20px); }
}

/* ===== FEATURES ===== */
.features {
max-width: 1400px;
margin: -40px auto 0;
padding: 0 24px;
position: relative;
z-index: 2;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 20px;
}

.feature-card {
background: white;
padding: 24px;
border-radius: var(--radius);
box-shadow: var(--shadow);
display: flex;
align-items: center;
gap: 16px;
transition: var(--transition);
}

.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.feature-icon {
font-size: 2rem;
width: 50px;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, var(--primary), var(--secondary));
border-radius: 12px;
color: white;
}

.feature-text h4 { font-size: 0.95rem; margin-bottom: 2px; }
.feature-text p { font-size: 0.85rem; color: var(--gray); }

/* ===== MAIN CONTENT ===== */
.main {
max-width: 1400px;
margin: 60px auto;
padding: 0 24px;
}

.section-title {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
flex-wrap: wrap;
gap: 16px;
}

.section-title h2 {
font-size: 2rem;
color: var(--dark);
position: relative;
padding-left: 16px;
}

.section-title h2::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 6px;
height: 30px;
background: linear-gradient(180deg, var(--primary), var(--secondary));
border-radius: 3px;
}

.filter-bar {
display: flex;
gap: 12px;
flex-wrap: wrap;
}

.filter-btn {
padding: 8px 18px;
border-radius: 20px;
border: 2px solid #e0e8f5;
background: white;
cursor: pointer;
font-size: 0.9rem;
transition: var(--transition);
color: var(--text);
}

.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
background: var(--primary);
color: white;
border-color: var(--primary);
}

/* ===== PRODUCTS GRID ===== */
.products-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: 24px;
}

.product-card {
background: white;
border-radius: var(--radius);
overflow: hidden;
box-shadow: var(--shadow);
transition: var(--transition);
cursor: pointer;
position: relative;
}

.product-card:hover {
transform: translateY(-6px);
box-shadow: var(--shadow-hover);
}

.product-badge {
position: absolute;
top: 12px;
left: 12px;
background: var(--danger);
color: white;
padding: 4px 10px;
border-radius: 6px;
font-size: 0.75rem;
font-weight: 700;
z-index: 2;
}

.product-badge.new { background: var(--success); }
.product-badge.hot { background: var(--warning); }

.product-image {
height: 200px;
background: linear-gradient(135deg, #eef3fb 0%, #dce5f5 100%);
display: flex;
align-items: center;
justify-content: center;
font-size: 5rem;
position: relative;
overflow: hidden;
}

.product-image::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(135deg, transparent 50%, rgba(0,102,255,0.05) 100%);
}

.product-info { padding: 20px; }

.product-category {
font-size: 0.75rem;
color: var(--primary);
text-transform: uppercase;
font-weight: 600;
letter-spacing: 0.5px;
margin-bottom: 6px;
}

.product-name {
font-size: 1rem;
font-weight: 600;
color: var(--dark);
margin-bottom: 8px;
line-height: 1.3;
min-height: 2.6em;
}

.product-rating {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 12px;
font-size: 0.85rem;
color: var(--gray);
}

.stars { color: var(--warning); }

.product-price {
display: flex;
align-items: baseline;
gap: 8px;
margin-bottom: 14px;
}

.price-current {
font-size: 1.4rem;
font-weight: 800;
color: var(--dark);
}

.price-old {
font-size: 0.95rem;
color: var(--gray);
text-decoration: line-through;
}

.add-to-cart {
width: 100%;
padding: 10px;
background: var(--dark);
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
font-weight: 600;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}

.add-to-cart:hover { background: var(--primary); }

/* ===== CATEGORIES SECTION ===== */
.categories-section {
margin: 80px 0;
}

.categories-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 20px;
}

.category-card {
background: white;
padding: 30px 20px;
border-radius: var(--radius);
text-align: center;
cursor: pointer;
transition: var(--transition);
box-shadow: var(--shadow);
border: 2px solid transparent;
}

.category-card:hover {
transform: translateY(-6px);
border-color: var(--primary);
box-shadow: var(--shadow-hover);
}

.category-icon {
font-size: 3rem;
margin-bottom: 12px;
}

.category-card h3 {
font-size: 1rem;
color: var(--dark);
margin-bottom: 4px;
}

.category-card p {
font-size: 0.85rem;
color: var(--gray);
}

/* ===== BANNER PROMO ===== */
.promo-banner {
background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
color: white;
padding: 50px 40px;
border-radius: var(--radius);
display: grid;
grid-template-columns: 1fr auto;
gap: 30px;
align-items: center;
margin: 60px 0;
position: relative;
overflow: hidden;
}

.promo-banner::before {
content: '';
position: absolute;
right: -100px;
top: -100px;
width: 400px;
height: 400px;
background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
border-radius: 50%;
}

.promo-banner h2 {
font-size: 2rem;
margin-bottom: 10px;
position: relative;
}

.promo-banner p {
opacity: 0.95;
margin-bottom: 20px;
position: relative;
}

.promo-emoji {
font-size: 8rem;
position: relative;
animation: float 3s ease-in-out infinite;
}

/* ===== CART SIDEBAR ===== */
.cart-overlay {
position: fixed;
inset: 0;
background: rgba(10, 25, 48, 0.6);
backdrop-filter: blur(4px);
z-index: 2000;
opacity: 0;
pointer-events: none;
transition: var(--transition);
}

.cart-overlay.active { opacity: 1; pointer-events: all; }

.cart-sidebar {
position: fixed;
top: 0;
right: 0;
width: 100%;
max-width: 420px;
height: 100vh;
background: white;
z-index: 2001;
transform: translateX(100%);
transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
display: flex;
flex-direction: column;
}

.cart-sidebar.active { transform: translateX(0); }

.cart-header {
padding: 20px 24px;
background: var(--dark);
color: white;
display: flex;
justify-content: space-between;
align-items: center;
}

.cart-header h3 { font-size: 1.2rem; }

.close-cart {
background: rgba(255,255,255,0.1);
border: none;
color: white;
width: 36px;
height: 36px;
border-radius: 8px;
cursor: pointer;
font-size: 1.2rem;
transition: var(--transition);
}

.close-cart:hover { background: rgba(255,255,255,0.2); }

.cart-items {
flex: 1;
overflow-y: auto;
padding: 20px;
}

.cart-item {
display: flex;
gap: 14px;
padding: 14px;
background: var(--light);
border-radius: 12px;
margin-bottom: 12px;
position: relative;
}

.cart-item-img {
width: 70px;
height: 70px;
background: white;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 2.2rem;
flex-shrink: 0;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
font-size: 0.9rem;
font-weight: 600;
margin-bottom: 4px;
color: var(--dark);
}

.cart-item-price {
color: var(--primary);
font-weight: 700;
font-size: 0.95rem;
margin-bottom: 8px;
}

.qty-controls {
display: flex;
align-items: center;
gap: 8px;
}

.qty-btn {
width: 26px;
height: 26px;
border-radius: 6px;
border: 1px solid #d0d8e8;
background: white;
cursor: pointer;
font-weight: 700;
transition: var(--transition);
}

.qty-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

.qty-value { font-weight: 600; min-width: 20px; text-align: center; }

.remove-item {
position: absolute;
top: 10px;
right: 10px;
background: none;
border: none;
color: var(--danger);
cursor: pointer;
font-size: 1.1rem;
opacity: 0.6;
transition: var(--transition);
}

.remove-item:hover { opacity: 1; }

.cart-empty {
text-align: center;
padding: 60px 20px;
color: var(--gray);
}

.cart-empty-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.5; }

.cart-footer {
padding: 20px 24px;
border-top: 1px solid #e8eef7;
background: white;
}

.cart-summary {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
font-size: 0.95rem;
}

.cart-total {
display: flex;
justify-content: space-between;
margin: 16px 0;
padding-top: 16px;
border-top: 2px dashed #e8eef7;
font-size: 1.3rem;
font-weight: 800;
color: var(--dark);
}

.checkout-btn {
width: 100%;
padding: 16px;
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
border: none;
border-radius: 10px;
font-size: 1rem;
font-weight: 700;
cursor: pointer;
transition: var(--transition);
}

.checkout-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,102,255,0.3); }

/* ===== MODAL ===== */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(10, 25, 48, 0.7);
backdrop-filter: blur(6px);
z-index: 3000;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
opacity: 0;
pointer-events: none;
transition: var(--transition);
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
background: white;
border-radius: var(--radius);
max-width: 800px;
width: 100%;
max-height: 90vh;
overflow-y: auto;
transform: scale(0.9);
transition: var(--transition);
}

.modal-overlay.active .modal { transform: scale(1); }

.modal-content {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 30px;
padding: 30px;
}

.modal-image {
background: linear-gradient(135deg, #eef3fb 0%, #dce5f5 100%);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 10rem;
min-height: 300px;
}

.modal-info h2 {
font-size: 1.6rem;
margin-bottom: 10px;
color: var(--dark);
}

.modal-info .product-rating { margin: 12px 0; }

.modal-description {
color: var(--gray);
margin: 16px 0;
line-height: 1.7;
}

.modal-features {
list-style: none;
margin: 16px 0;
}

.modal-features li {
padding: 6px 0;
padding-left: 24px;
position: relative;
font-size: 0.9rem;
}

.modal-features li::before {
content: '✓';
position: absolute;
left: 0;
color: var(--success);
font-weight: 700;
}

.modal-price {
font-size: 2rem;
font-weight: 800;
color: var(--primary);
margin: 20px 0;
}

.close-modal {
position: absolute;
top: 16px;
right: 16px;
background: white;
border: none;
width: 40px;
height: 40px;
border-radius: 50%;
cursor: pointer;
font-size: 1.2rem;
box-shadow: var(--shadow);
z-index: 10;
}

/* ===== FOOTER ===== */
footer {
background: var(--dark);
color: white;
padding: 60px 24px 20px;
margin-top: 80px;
}

.footer-content {
max-width: 1400px;
margin: 0 auto;
display: grid;
grid-template-columns: 2fr 1fr 1fr 1fr;
gap: 40px;
margin-bottom: 40px;
}

.footer-col h4 {
margin-bottom: 18px;
font-size: 1.05rem;
color: var(--secondary);
}

.footer-col p, .footer-col a {
color: rgba(255,255,255,0.7);
font-size: 0.9rem;
text-decoration: none;
display: block;
margin-bottom: 10px;
transition: var(--transition);
}

.footer-col a:hover { color: white; padding-left: 4px; }

.social-links {
display: flex;
gap: 12px;
margin-top: 16px;
}

.social-links a {
width: 40px;
height: 40px;
background: rgba(255,255,255,0.08);
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.2rem;
margin: 0;
}

.social-links a:hover { background: var(--primary); padding-left: 0; }

.footer-bottom {
max-width: 1400px;
margin: 0 auto;
padding-top: 20px;
border-top: 1px solid rgba(255,255,255,0.1);
text-align: center;
color: rgba(255,255,255,0.5);
font-size: 0.85rem;
}

/* ===== TOAST ===== */
.toast {
position: fixed;
bottom: 30px;
right: 30px;
background: var(--success);
color: white;
padding: 16px 24px;
border-radius: 10px;
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
z-index: 5000;
transform: translateX(150%);
transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
display: flex;
align-items: center;
gap: 12px;
font-weight: 600;
}

.toast.show { transform: translateX(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
.hero-content { grid-template-columns: 1fr; text-align: center; }
.hero h1 { font-size: 2.2rem; }
.hero-visual { font-size: 7rem; }
.modal-content { grid-template-columns: 1fr; }
.modal-image { font-size: 6rem; min-height: 200px; }
.footer-content { grid-template-columns: 1fr 1fr; }
.promo-banner { grid-template-columns: 1fr; text-align: center; }
.promo-emoji { font-size: 5rem; }
}

@media (max-width: 600px) {
.nav-container { flex-wrap: wrap; }
.search-bar { order: 3; width: 100%; max-width: 100%; }
.hero { padding: 50px 20px; }
.hero h1 { font-size: 1.8rem; }
.footer-content { grid-template-columns: 1fr; }
.section-title h2 { font-size: 1.5rem; }
.nav-btn span:not(.cart-count) { display: none; }
}