:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #3b82f6;
  --dark: #111827;
  --dark-2: #1f2937;
  --gray: #f3f4f6;
  --gray-2: #e5e7eb;
  --text: #1f2937;
  --muted: #6b7280;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-hover: 0 12px 32px rgba(0,0,0,0.14);
  --transition: 0.2s ease;
  --container: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px; gap: 16px; flex-wrap: wrap;
}
.section-title h2 { font-size: 28px; font-weight: 700; margin: 0; }
.link-blue { color: var(--primary); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.link-blue:hover { color: var(--primary-dark); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 8px; padding: 12px 20px; font-weight: 600;
  transition: var(--transition); font-size: 15px;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-black { background: var(--dark); color: var(--white); }
.btn-black:hover { background: var(--dark-2); }
.btn-outline { background: transparent; border: 2px solid var(--gray-2); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-square { width: 44px; height: 44px; padding: 0; border-radius: 8px; }

header {
  background: var(--dark); color: var(--white); position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.logo { font-size: 22px; font-weight: 800; letter-spacing: 0.5px; color: var(--white); }
.logo span { color: var(--accent); }
nav ul { display: flex; gap: 28px; }
nav a { font-size: 15px; color: #e5e7eb; font-weight: 500; transition: var(--transition); position: relative; }
nav a:hover, nav a.active { color: var(--white); }
nav a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--accent); transition: var(--transition); }
nav a:hover::after, nav a.active::after { width: 100%; }
.header-icons { display: flex; align-items: center; gap: 18px; }
.icon-btn { position: relative; color: #e5e7eb; transition: var(--transition); display: flex; }
.icon-btn:hover { color: var(--white); }
.icon-btn svg { width: 22px; height: 22px; }
.badge {
  position: absolute; top: -6px; right: -6px; background: var(--accent); color: var(--white);
  font-size: 11px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.mobile-menu-btn { display: none; background: none; border: none; color: var(--white); }
.mobile-menu-btn svg { width: 26px; height: 26px; }

.breadcrumbs { padding: 18px 0; font-size: 14px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs span { color: var(--text); font-weight: 500; }

.hero {
  position: relative; background: var(--dark); color: var(--white); overflow: hidden;
}
.hero-slide {
  display: none; min-height: 560px; position: relative; align-items: center;
}
.hero-slide.active { display: flex; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(17,24,39,0.96) 0%, rgba(17,24,39,0.78) 45%, rgba(17,24,39,0.35) 100%);
}
.hero-inner {
  position: relative; z-index: 2; width: 100%; max-width: var(--container); margin: 0 auto;
  padding: 40px 20px; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 40px;
}
.hero-content { max-width: 560px; }
.hero-label { color: var(--accent); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.1; margin: 0 0 18px; }
.hero p { font-size: 18px; color: #d1d5db; margin: 0 0 28px; line-height: 1.6; }
.hero-price { font-size: 24px; font-weight: 700; color: var(--white); margin-left: 16px; }
.hero-image img { max-height: 420px; width: auto; margin: 0 auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4)); }
.hero-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 3; }
.dot { width: 40px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.3); cursor: pointer; transition: var(--transition); }
.dot.active { background: var(--accent); }

.categories-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.category-card {
  background: var(--gray); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: var(--transition); cursor: pointer;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.category-card a { display: flex; flex-direction: column; height: 100%; padding: 20px; }
.category-card img { height: 170px; object-fit: contain; margin-bottom: 16px; background: var(--white); border-radius: 8px; padding: 12px; }
.category-card h3 { font-size: 17px; margin: 0 0 6px; color: var(--text); }
.category-card p { font-size: 13px; color: var(--muted); margin: 0; }

.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gray-2);
  display: flex; flex-direction: column; transition: var(--transition); position: relative;
}
.product-card:hover { box-shadow: var(--shadow-hover); border-color: transparent; }
.product-badge {
  position: absolute; top: 12px; left: 12px; background: var(--accent); color: var(--white);
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; z-index: 1;
}
.product-card img { height: 220px; object-fit: contain; width: 100%; background: var(--gray); padding: 20px; box-sizing: border-box; }
.product-info { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.product-info h3 { font-size: 16px; font-weight: 700; margin: 0 0 10px; }
.product-specs { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.product-specs span { display: flex; align-items: center; gap: 4px; }
.product-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; margin-top: auto; }
.product-price .current { font-size: 20px; font-weight: 800; color: var(--text); }
.product-price .old { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.product-actions { display: flex; gap: 8px; }
.product-actions .btn { flex: 1; }
.btn-fav { background: var(--gray); border: none; width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.btn-fav:hover, .btn-fav.active { background: #fee2e2; color: #ef4444; }
.rating { display: flex; gap: 2px; color: #f59e0b; font-size: 14px; margin-bottom: 8px; }

.value-bar { background: var(--gray); padding: 40px 0; }
.value-bar .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.value-item { display: flex; align-items: center; gap: 14px; }
.value-item svg { width: 40px; height: 40px; color: var(--primary); flex-shrink: 0; }
.value-item h4 { margin: 0 0 2px; font-size: 16px; }
.value-item p { margin: 0; font-size: 13px; color: var(--muted); }

.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.promo-card {
  border-radius: var(--radius); overflow: hidden; min-height: 260px; padding: 36px;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
  background: var(--gray); position: relative;
}
.promo-card.dark { background: var(--dark); color: var(--white); }
.promo-card .promo-text { display: flex; flex-direction: column; justify-content: center; }
.promo-card h3 { font-size: 26px; margin: 0 0 10px; }
.promo-card p { font-size: 15px; margin: 0 0 22px; color: var(--muted); max-width: 320px; }
.promo-card.dark p { color: #d1d5db; }
.promo-card img { max-height: 200px; width: auto; object-fit: contain; }

footer { background: var(--dark); color: #d1d5db; padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px; }
.footer-col h4 { color: var(--white); font-size: 16px; margin: 0 0 18px; }
.footer-col p { font-size: 14px; line-height: 1.6; margin: 0 0 16px; }
.footer-col a { display: block; font-size: 14px; color: #d1d5db; margin-bottom: 10px; transition: var(--transition); }
.footer-col a:hover { color: var(--accent); }
.footer-socials { display: flex; gap: 14px; margin-top: 16px; }
.footer-socials a { display: flex; color: #d1d5db; }
.footer-socials a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid #374151; margin-top: 40px; padding: 20px 0;
  display: flex; justify-content: space-between; font-size: 13px; color: #9ca3af;
}
.footer-bottom a { color: #9ca3af; margin-left: 16px; }
.footer-bottom a:hover { color: var(--white); }

.page-title { font-size: 36px; font-weight: 800; margin: 0 0 8px; }
.page-subtitle { color: var(--muted); margin: 0 0 32px; }

.catalog-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; }
.sidebar { background: var(--gray); border-radius: var(--radius); padding: 24px; height: fit-content; }
.sidebar h3 { font-size: 18px; margin: 0 0 18px; }
.filter-group { margin-bottom: 24px; }
.filter-group h4 { font-size: 14px; margin: 0 0 12px; font-weight: 700; }
.filter-group label { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; cursor: pointer; color: var(--text); }
.filter-group input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
.price-range { display: flex; gap: 10px; }
.price-range input { width: 100%; padding: 8px; border: 1px solid var(--gray-2); border-radius: 6px; font-size: 14px; }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.catalog-toolbar select { padding: 8px 12px; border: 1px solid var(--gray-2); border-radius: 6px; font-size: 14px; }
.view-toggle { display: flex; gap: 6px; }
.view-toggle button { background: var(--white); border: 1px solid var(--gray-2); border-radius: 6px; padding: 6px 10px; }
.view-toggle button.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

.product-detail { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; }
.gallery { display: flex; gap: 16px; }
.thumbnails { display: flex; flex-direction: column; gap: 12px; }
.thumbnails img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 2px solid var(--gray-2); cursor: pointer; }
.thumbnails img.active { border-color: var(--primary); }
.main-image { flex: 1; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gray-2); background: var(--gray); }
.main-image img { width: 100%; height: 480px; object-fit: contain; }
.product-meta h1 { font-size: 32px; margin: 0 0 10px; }
.product-meta .rating { margin-bottom: 14px; }
.product-price-block { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.product-price-block .current { font-size: 32px; font-weight: 800; }
.product-price-block .old { font-size: 18px; color: var(--muted); text-decoration: line-through; }
.stock-badge { display: inline-flex; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.stock-badge.in { background: #dcfce7; color: #166534; }
.stock-badge.out { background: #fee2e2; color: #991b1b; }
.product-actions-row { display: flex; gap: 12px; margin: 24px 0; }
.product-actions-row .qty { display: flex; align-items: center; border: 1px solid var(--gray-2); border-radius: 8px; overflow: hidden; }
.product-actions-row .qty button { width: 40px; height: 44px; border: none; background: var(--gray); font-size: 18px; }
.product-actions-row .qty input { width: 50px; text-align: center; border: none; font-size: 16px; font-weight: 600; }
.trust-badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.trust-badge { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.trust-badge svg { width: 28px; height: 28px; color: var(--primary); flex-shrink: 0; }
.tabs { display: flex; gap: 8px; border-bottom: 2px solid var(--gray-2); margin: 40px 0 24px; }
.tabs button { background: none; border: none; padding: 12px 18px; font-size: 15px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; }
.cart-items { background: var(--white); border: 1px solid var(--gray-2); border-radius: var(--radius); overflow: hidden; }
.cart-item { display: grid; grid-template-columns: 100px 1fr auto auto; gap: 20px; align-items: center; padding: 20px; border-bottom: 1px solid var(--gray-2); }
.cart-item:last-child { border-bottom: none; }
.cart-item img { width: 100px; height: 100px; object-fit: cover; border-radius: 8px; background: var(--gray); }
.cart-item h4 { margin: 0 0 4px; font-size: 16px; }
.cart-item .price { font-weight: 700; font-size: 16px; }
.cart-item .remove { background: none; border: none; color: var(--muted); }
.cart-item .remove:hover { color: #ef4444; }
.cart-summary { background: var(--gray); border-radius: var(--radius); padding: 24px; height: fit-content; }
.cart-summary h3 { margin: 0 0 18px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 15px; }
.summary-row.total { font-size: 20px; font-weight: 800; border-top: 1px solid var(--gray-2); padding-top: 14px; margin-top: 14px; }
.payment-methods { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.payment-methods span { background: var(--white); border: 1px solid var(--gray-2); border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600; }
.upsell { margin-top: 48px; }
.upsell h3 { margin-bottom: 20px; }
.upsell-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.upsell-card { background: var(--white); border: 1px solid var(--gray-2); border-radius: var(--radius); padding: 16px; text-align: center; }
.upsell-card img { height: 120px; object-fit: contain; margin: 0 auto 12px; }
.upsell-card h4 { font-size: 14px; margin: 0 0 8px; }
.upsell-card .price { font-weight: 700; color: var(--primary); margin-bottom: 10px; }

.about-hero { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 48px; }
.about-hero img { width: 100%; height: 400px; object-fit: cover; }
.about-hero-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(17,24,39,0.8) 0%, rgba(17,24,39,0.2) 100%); display: flex; align-items: flex-end; padding: 36px; color: var(--white); }
.about-hero-overlay h2 { font-size: 36px; margin: 0 0 8px; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 48px; }
.feature-card { background: var(--gray); border-radius: var(--radius); padding: 28px; text-align: center; }
.feature-card svg { width: 48px; height: 48px; color: var(--primary); margin-bottom: 16px; }
.feature-card h3 { margin: 0 0 8px; font-size: 18px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; }
.stats-bar { background: var(--dark); color: var(--white); border-radius: var(--radius); padding: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats-bar h3 { font-size: 32px; margin: 0 0 6px; color: var(--accent); }
.stats-bar p { margin: 0; color: #d1d5db; font-size: 14px; }

.contacts-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-info h3 { margin: 0 0 18px; }
.contact-row { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.contact-row svg { width: 24px; height: 24px; color: var(--primary); flex-shrink: 0; }
.contact-row h4 { margin: 0 0 2px; font-size: 15px; }
.contact-row p { margin: 0; color: var(--muted); font-size: 14px; }
.contact-form { background: var(--gray); border-radius: var(--radius); padding: 28px; }
.contact-form h3 { margin: 0 0 18px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid var(--gray-2); border-radius: 8px; font-size: 15px; }
.form-group textarea { min-height: 120px; resize: vertical; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gray-2); height: 400px; margin-top: 32px; }
.map iframe { width: 100%; height: 100%; border: 0; }

.reviews-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.reviews-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.review-card { background: var(--gray); border-radius: var(--radius); padding: 24px; }
.review-header { display: flex; justify-content: space-between; margin-bottom: 12px; }
.review-header h4 { margin: 0; font-size: 16px; }
.review-header span { font-size: 13px; color: var(--muted); }
.review-card p { margin: 0 0 12px; font-size: 15px; }
.review-card .product { font-size: 13px; color: var(--primary); font-weight: 600; }

.search-overlay {
  position: fixed; inset: 0; background: rgba(17,24,39,0.9); z-index: 200; display: none; align-items: flex-start; justify-content: center; padding-top: 120px;
}
.search-overlay.active { display: flex; }
.search-box { background: var(--white); width: 100%; max-width: 640px; border-radius: var(--radius); padding: 24px; }
.search-box input { width: 100%; padding: 14px; border: 2px solid var(--gray-2); border-radius: 8px; font-size: 18px; margin-bottom: 16px; }
.search-results { max-height: 360px; overflow-y: auto; }
.search-result { display: flex; gap: 14px; padding: 10px; border-radius: 8px; cursor: pointer; }
.search-result:hover { background: var(--gray); }
.search-result img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; }
.search-result h4 { margin: 0 0 2px; font-size: 14px; }
.search-result p { margin: 0; color: var(--primary); font-weight: 700; }
.search-close { position: absolute; top: 32px; right: 32px; background: none; border: none; color: var(--white); font-size: 32px; }

.mobile-menu {
  position: fixed; inset: 0; background: var(--dark); z-index: 150; display: none; flex-direction: column; padding: 80px 24px 24px;
}
.mobile-menu.active { display: flex; }
.mobile-menu a { color: var(--white); font-size: 20px; padding: 14px 0; border-bottom: 1px solid #374151; }
.mobile-close { position: absolute; top: 20px; right: 20px; background: none; border: none; color: var(--white); font-size: 28px; }

.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--dark); color: var(--white); padding: 14px 20px; border-radius: 8px;
  box-shadow: var(--shadow-hover); transform: translateY(100px); opacity: 0; transition: 0.3s ease; z-index: 300;
}
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1100px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .cart-layout, .catalog-layout, .product-detail, .contacts-layout { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; padding: 60px 20px; }
  .hero-image { display: none; }
  .hero-slide { min-height: 480px; }
}

@media (max-width: 768px) {
  nav { display: none; }
  .mobile-menu-btn { display: block; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .value-bar .container { grid-template-columns: repeat(2, 1fr); }
  .promo-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .upsell-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 32px; }
  .section { padding: 40px 0; }
  .catalog-toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .gallery { flex-direction: column; }
  .thumbnails { flex-direction: row; }
  .cart-item { grid-template-columns: 80px 1fr; gap: 12px; }
  .cart-item .price, .cart-item .qty, .cart-item .remove { justify-self: end; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr; }
  .value-bar .container { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
