:root {
  --black: #1A1A1A;
  --dark: #2C2C2C;
  --gold: #C8A45C;
  --gold-hover: #B8943D;
  --bg: #F5F3F0;
  --bg-card: #FFFFFF;
  --text: #1A1A1A;
  --text-secondary: #6B6B6B;
  --text-light: #999;
  --border: #E0DCD6;
  --border-light: #EEEAE4;
  --green: #25D366;
  --green-hover: #1DA851;
  --danger: #E53935;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-hover: 0 2px 8px rgba(0,0,0,0.12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ========== HEADER ========== */

.header {
  background: var(--black);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 16px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.header-logo-text {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-phone {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.header-phone:hover { color: var(--gold); }

.header-cart-btn {
  position: relative;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.header-cart-btn:hover { color: var(--gold); }

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ========== NAV ========== */

.nav {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.nav-inner {
  display: flex;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar { display: none; }

.nav a {
  color: rgba(255,255,255,0.7);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav a:hover { color: #fff; }

.nav a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 22px;
  cursor: pointer;
  padding: 10px 16px;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--black);
  z-index: 200;
  padding: 80px 24px 24px;
  overflow-y: auto;
}

.mobile-menu.open { display: block; }

.mobile-menu a {
  display: block;
  color: #fff;
  padding: 14px 0;
  font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mobile-menu-close {
  position: absolute;
  top: 14px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

/* ========== MAIN ========== */

.main { flex: 1; }

/* ========== HERO ========== */

.hero {
  background: var(--black);
  color: #fff;
  padding: 64px 0 56px;
  text-align: center;
  position: relative;
}

.hero::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin: 24px auto 0;
}

.hero h1 {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.hero p {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  margin: 0 auto;
}

.hero-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ========== BUTTONS ========== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  line-height: 1;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: var(--gold);
  color: var(--black);
}

.btn-primary:hover {
  background: var(--gold-hover);
  color: var(--black);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-green {
  background: var(--green);
  color: #fff;
}

.btn-green:hover {
  background: var(--green-hover);
  color: #fff;
}

.btn-sm { padding: 7px 14px; font-size: 12px; }

.btn-cart {
  background: var(--black);
  color: #fff;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1;
  min-width: 88px;
  white-space: nowrap;
}

.btn-cart:hover { background: var(--gold); color: var(--black); }

.btn-cart--added {
  background: var(--gold);
  color: var(--black);
}

.btn-cart--added:hover { background: var(--gold-hover); }

/* ========== SECTIONS ========== */

.section {
  padding: 48px 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.section-link {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.section-link:hover { color: var(--gold); }

/* ========== CATEGORIES ========== */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.category-card {
  background: var(--bg-card);
  padding: 24px 16px;
  text-align: center;
  transition: background 0.2s;
}

.category-card:hover {
  background: #FAF8F5;
}

.category-card h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-count {
  font-size: 12px;
  color: var(--text-light);
}

/* ========== PRODUCTS ========== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.product-card {
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  transition: background 0.2s;
  position: relative;
}

.product-card:hover {
  background: #FAF8F5;
}

.product-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #F0EDE8;
}

.product-card-img--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F0EDE8;
  color: #C0B8AD;
}

.product-card-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-article {
  font-size: 10px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.product-card-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
}

.product-card-name a { color: var(--text); }
.product-card-name a:hover { color: var(--gold); }

.product-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 8px;
}

.product-card-price {
  font-size: 14px;
  font-weight: 700;
}

.product-card-price-label {
  font-size: 10px;
  color: var(--text-light);
  font-weight: 400;
  display: block;
}

/* ========== CATALOG PAGE ========== */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
}

.catalog-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  font-size: 13px;
  width: 220px;
  max-width: 100%;
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--font);
  background: #fff;
}

.search-input:focus { border-color: var(--gold); }

.search-input::placeholder { color: #BBB; }

.category-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  background: #fff;
  font-family: var(--font);
  min-width: 160px;
}

.category-select:focus { border-color: var(--gold); }

/* ========== BREADCRUMBS ========== */

.breadcrumbs {
  padding: 14px 0;
  font-size: 12px;
  color: var(--text-light);
}

.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--gold); }

/* ========== PRODUCT DETAIL ========== */

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 16px 0 48px;
}

.product-detail-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #F0EDE8;
}

.product-detail-img--empty {
  width: 100%;
  aspect-ratio: 1;
  background: #F0EDE8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C0B8AD;
}

.product-detail-info h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.product-detail-article {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-detail-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.product-detail-prices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.product-detail-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #F8F6F4;
  font-size: 14px;
}

.product-detail-price-row .price-value {
  font-weight: 700;
  font-size: 16px;
}

.product-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ========== CONTACTS ========== */

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.contact-item {
  background: var(--bg-card);
  padding: 28px 24px;
}

.contact-item h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.contact-item .value {
  font-size: 16px;
  font-weight: 600;
}

.contact-item .value-lg {
  font-size: 22px;
  font-weight: 700;
}

/* ========== EMPTY STATE ========== */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  grid-column: 1 / -1;
}

.empty-state svg {
  margin-bottom: 12px;
  color: var(--text-light);
}

.empty-state h3 {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--text);
}

/* ========== CART DRAWER ========== */

.cart-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 300;
}

.cart-overlay.open { display: block; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: #fff;
  z-index: 301;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}

.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.cart-drawer-header h2 {
  font-size: 16px;
  font-weight: 700;
}

.cart-drawer-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  line-height: 1;
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

.cart-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--text-light);
}

.cart-empty svg { margin: 0 auto 12px; }

.cart-empty p { font-size: 14px; }

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  align-items: flex-start;
}

.cart-item:last-child { border-bottom: none; }

.cart-item-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  background: #F0EDE8;
  flex-shrink: 0;
}

.cart-item-img--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-body {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
}

.cart-item-article {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.15s;
  line-height: 1;
  padding: 0;
}

.cart-qty-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.cart-qty-input {
  width: 36px;
  height: 26px;
  border: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  outline: none;
  -moz-appearance: textfield;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-item-subtotal {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  min-width: 60px;
  text-align: right;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  transition: color 0.2s;
  line-height: 1;
}

.cart-item-remove:hover { color: var(--danger); }

.cart-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-total {
  font-size: 16px;
  font-weight: 700;
  text-align: right;
}

.cart-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.cart-checkout-btn:hover {
  background: var(--green-hover);
  color: #fff;
}

/* ========== FOOTER ========== */

.footer {
  background: var(--black);
  color: rgba(255,255,255,0.6);
  padding: 40px 0 20px;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer p, .footer a {
  font-size: 13px;
  line-height: 2;
  color: rgba(255,255,255,0.5);
}

.footer a { display: block; }
.footer a:hover { color: var(--gold); }

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
  .header-inner { padding: 10px 12px; }
  .header-logo-text { font-size: 13px; }
  .header-phone { font-size: 12px; }
  .header-cart-btn { padding: 8px; }

  .nav-inner { display: none; }
  .nav-toggle { display: block; padding: 12px 16px; }
  .nav { display: flex; align-items: center; padding: 0; }

  .nav-toggle:active { background: rgba(255,255,255,0.08); }

  .hero { padding: 36px 0 32px; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 13px; }

  .section { padding: 32px 0; }
  .section-title { font-size: 17px; }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    border: none;
    background: transparent;
    gap: 0;
  }

  .product-card {
    border: 1px solid var(--border);
    border-right: none;
    border-bottom: none;
  }

  .product-card:nth-child(2n) { border-right: 1px solid var(--border); }

  .product-card-img { height: 120px; }
  .product-card-body { padding: 8px 10px 10px; }
  .product-card-name { font-size: 12px; }
  .product-card-article { font-size: 9px; }
  .product-card-price { font-size: 12px; }
  .btn-cart { min-width: 0; padding: 6px 8px; font-size: 10px; }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    border: none;
    background: transparent;
    gap: 0;
  }

  .category-card {
    border: 1px solid var(--border);
    border-right: none;
    border-bottom: none;
    padding: 16px 10px;
  }

  .category-card:nth-child(2n) { border-right: 1px solid var(--border); }
  .category-card h3 { font-size: 11px; }
  .category-count { font-size: 10px; }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .product-detail-info h1 { font-size: 20px; }

  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header h1 { font-size: 18px; }
  .catalog-controls { width: 100%; }
  .search-input { width: 100%; font-size: 16px; }
  .category-select { width: 100%; font-size: 16px; }

  .contacts-grid { grid-template-columns: 1fr; }
  .contact-item { padding: 20px 16px; }

  .cart-drawer { width: 100vw; }
  .cart-drawer-header { padding: 14px 16px; }
  .cart-drawer-body { padding: 8px 16px; }
  .cart-drawer-footer { padding: 12px 16px; }

  .cart-item { gap: 10px; padding: 10px 0; }
  .cart-item-img { width: 44px; height: 44px; }
  .cart-item-name { font-size: 12px; }

  .cart-qty-btn { width: 32px; height: 32px; font-size: 16px; }
  .cart-qty-input { width: 40px; height: 32px; font-size: 14px; }
  .cart-item-subtotal { min-width: 50px; font-size: 12px; }

  .cart-checkout-btn { padding: 14px; font-size: 15px; }

  .contact-item .value-lg { font-size: 18px; }

  .mobile-menu { padding: 70px 20px 20px; }
  .mobile-menu a { padding: 16px 0; font-size: 15px; }

  .breadcrumbs { padding: 10px 0; font-size: 11px; }

  .hero-buttons .btn { padding: 10px 16px; font-size: 12px; }

  .empty-state { padding: 40px 16px; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .header-phone { display: none; }
  .header-right { gap: 8px; }
  .section-title { font-size: 15px; }
  .hero h1 { font-size: 20px; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
}
