/* ============================================================ */
/* 1. ПЕРЕМЕННЫЕ (цвета, шрифты, отступы)                      */
/* ============================================================ */

:root {
  --primary: #2d6a4f;
  --primary-dark: #1e4f3a;
  --gold: #d4a373;
  --gold-dark: #c4956a;
  --dark: #0b0b0f;
  --light: #f9fbf7;
  --text: #000000;
  --white: #ffffff;
  
  --container: 1280px;
  --header-height: 80px;
  --header-height-mobile: 60px;
  
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 20px;
  --transition: 0.25s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--text); background: var(--white); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

.btn { display: inline-block; padding: 14px 36px; border-radius: 30px; font-weight: 700; border: none; cursor: pointer; transition: all var(--transition); }
.btn:hover { transform: translateY(-2px); opacity: 0.9; }
.btn-green { background: var(--primary); color: var(--white); }
.btn-green:hover { background: var(--primary-dark); }
.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-sm { padding: 10px 24px; font-size: 14px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }

.card { background: var(--white); border: 1px solid #6C3B9E; border-radius: var(--radius); padding: 20px; transition: all var(--transition); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card img { width: 100%; height: 180px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.card h3 { font-size: 18px; font-weight: 700; margin: 10px 0; color: #000; }
.card p { font-size: 14px; color: #555; line-height: 1.6; }

.breadcrumbs { position: sticky; top: var(--header-height); z-index: 100; background: var(--white); padding: 12px 24px; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.95rem; transition: all 0.3s ease; }
.breadcrumbs a { color: #000; font-weight: 500; }
.breadcrumbs a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumbs .sep { color: #999; }
.breadcrumbs.hidden { transform: translateY(-100%); opacity: 0; }

.hero-main { position: relative; min-height: 80vh; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--dark); padding: 60px 20px; overflow: hidden; }
.hero-main .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-main .overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.65); }
.hero-main .content { position: relative; z-index: 2; max-width: 800px; }
.hero-main h1 { color: #fff; font-size: clamp(28px, 5vw, 48px); font-weight: 800; margin-bottom: 20px; text-shadow: 0 2px 8px rgba(0,0,0,0.7); }
.hero-main p { color: #ddd; font-size: clamp(16px, 2vw, 20px); line-height: 1.8; margin-bottom: 30px; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }

.hero-catalog { padding: 40px 0 60px; background: #f8faf7; border-bottom: 1px solid #e5e7eb; }
.hero-catalog .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.hero-catalog .badge { display: inline-block; background: #e8f0e0; color: var(--primary); font-size: 0.8rem; font-weight: 600; padding: 6px 16px; border-radius: 30px; margin-bottom: 16px; }
.hero-catalog h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; line-height: 1.2; margin-bottom: 16px; color: #000; }
.hero-catalog .subtitle { font-size: 1.25rem; color: #374151; margin-bottom: 20px; }
.hero-catalog .stats { display: flex; gap: 32px; margin: 24px 0; }
.hero-catalog .stats .num { font-size: 2rem; font-weight: 700; color: var(--primary); }

.hero-product { padding: 20px 0 40px; background: var(--white); }
.hero-product .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.hero-product h1 { font-size: clamp(24px, 3vw, 36px); font-weight: 800; color: #000; }
.hero-product .price { font-size: 28px; font-weight: 700; color: var(--primary); }

.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 20px; }
.catalog-item { background: var(--white); border-radius: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); overflow: hidden; transition: transform 0.2s; border: 1px solid #6C3B9E; }
.catalog-item:hover { transform: translateY(-6px); }
.catalog-item img { width: 100%; height: 220px; object-fit: cover; }
.catalog-item .info { padding: 24px; text-align: center; }
.catalog-item .tag { display: inline-block; background: #e8f0e0; color: var(--primary); font-size: 0.75rem; font-weight: 600; padding: 4px 14px; border-radius: 30px; margin-bottom: 8px; }
.catalog-item h3 { font-size: 1.4rem; font-weight: 700; margin: 8px 0; color: #000; }

.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 20px; background: var(--white); border-radius: 16px; border: 1px solid #6C3B9E; max-width: var(--container); margin: 0 auto; }
.product-grid h1 { font-size: 28px; font-weight: 800; color: #000; margin: 0 0 8px; line-height: 1.2; }
.product-grid .price { font-size: 28px; font-weight: 700; color: var(--primary); }
.product-grid .old-price { font-size: 18px; color: #999; text-decoration: line-through; margin-right: 12px; }
.product-grid .btn { padding: 12px 32px; font-size: 16px; }
.product-grid .btn-sm { padding: 8px 20px; font-size: 14px; }

.custom-footer-global { background: var(--dark); color: var(--white); padding: 40px 0 20px; margin-top: 40px; border-top: 2px solid var(--primary); }
.footer-container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-col h2 { font-size: 18px; font-weight: 700; color: var(--white); margin: 0 0 16px; text-align: left; }
.footer-col p, .footer-col ul li, .footer-col div { color: rgba(255,255,255,0.8); font-size: 14px; line-height: 1.8; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.8); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 16px; margin-bottom: 12px; }
.footer-social a { color: rgba(255,255,255,0.8); font-weight: 500; font-size: 14px; transition: color var(--transition); }
.footer-social a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; flex-wrap: wrap; gap: 12px; }
.footer-bottom-left { color: rgba(255,255,255,0.6); font-size: 13px; }
.footer-bottom-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-bottom-right a { color: rgba(255,255,255,0.6); font-size: 13px; transition: color var(--transition); }
.footer-bottom-right a:hover { color: var(--gold); }
.footer-bottom-right span { color: rgba(255,255,255,0.3); }

.cart-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99999; justify-content: center; align-items: center; padding: 20px; }
.cart-modal[aria-hidden="false"] { display: flex; }
.cart-modal-content { background: var(--white); border-radius: 20px; max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 30px; position: relative; color: #000; }
.close-cart-btn { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 24px; cursor: pointer; color: #000; }
.cart-item { padding: 12px 0; border-bottom: 1px solid #eee; }
.cart-item strong { color: #000; }
.cart-item .cart-qty-btn { background: #f0f0f0; border: 1px solid #ddd; border-radius: 4px; padding: 4px 12px; font-size: 16px; cursor: pointer; }
.cart-item .cart-qty-input { text-align: center; padding: 4px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; width: 60px; }
.cart-remove-btn { background: #e74c3c; color: var(--white); border: none; border-radius: 4px; padding: 4px 12px; font-size: 12px; cursor: pointer; margin-top: 4px; }
.empty-cart { color: #666; text-align: center; padding: 40px 0; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; color: #000; }
.form-group input, .form-group textarea { width: 100%; padding: 10px 12px; border: 2px solid #ddd; border-radius: 8px; font-size: 14px; font-family: inherit; background: var(--white); color: #000; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.radio-group { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-group label { font-weight: 400; display: flex; align-items: center; gap: 6px; color: #000; }
.agree-checkbox-wrapper { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.agree-checkbox-wrapper label { font-size: 14px; color: #000; }
.agree-checkbox-wrapper a { color: var(--primary); text-decoration: underline; }
.submit-btn { background: var(--primary); color: var(--white); border: none; border-radius: 8px; padding: 12px 20px; font-size: 16px; font-weight: 700; cursor: pointer; transition: background var(--transition); }
.submit-btn:hover { background: var(--primary-dark); }
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: #1f6392; color: var(--white); padding: 14px 28px; border-radius: 12px; font-weight: 600; z-index: 999999; box-shadow: 0 4px 20px rgba(0,0,0,0.3); max-width: 90%; text-align: center; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --header-height: var(--header-height-mobile); }
  
  .grid-2, .grid-4 { grid-template-columns: 1fr; gap: 16px; }
  .hero-catalog .grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-catalog .stats { gap: 16px; flex-wrap: wrap; }
  .hero-product .grid { grid-template-columns: 1fr; gap: 24px; }
  .product-grid { grid-template-columns: 1fr; padding: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom-right { justify-content: center; }
  .breadcrumbs { padding: 10px 16px; font-size: 0.85rem; top: var(--header-height-mobile); }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-item img { height: 180px; }
  .product-grid h1 { font-size: 22px; }
  .product-grid .price { font-size: 22px; }
  .hero-catalog h1 { font-size: 24px; }
  .hero-catalog .stats .num { font-size: 1.5rem; }
}