:root {
  --green: #029931;
  --green-hover: #028028;
  --black: #000000;
  --white: #ffffff;
  --gray-bg: #F3F3F3;
  --gray-text: #8B8B8B;
  --sale-red: #FF7C7C;
  --radius: 12px;
  --radius-pill: 24px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== HEADER ===== */
.site-header {
  background: var(--white);
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-logo {
  flex-shrink: 0;
  width: 8%;
  min-width: 50px;
  transition: transform 0.2s;
}
.header-logo:hover { transform: scale(0.95); }
.header-logo img { width: 100%; height: auto; display: block; }
.header-brand {
  font-size: 42px;
  font-weight: 800;
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-phone {
  font-size: 36px;
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-phone:hover { color: var(--green); }
.header-whatsapp {
  flex-shrink: 0;
  transition: transform 0.2s;
}
.header-whatsapp:hover { transform: scale(0.9); }
.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  flex-shrink: 0;
}
.burger span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--black);
  border-radius: 2px;
  position: absolute;
  transition: 0.3s;
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 10px; }
.burger span:nth-child(3) { top: 20px; }

/* ===== FILTERS ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  padding: 24px 0;
}
.filter-btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--green);
  background: var(--gray-bg);
  color: var(--green);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-btn:hover {
  background: var(--green);
  color: var(--white);
}
.filter-btn.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* ===== PRODUCTS GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding-bottom: 40px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 0 10px rgba(0,0,0,0.12);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}
.product-card:hover {
  box-shadow: 0 0 10px rgba(0,0,0,0.18);
}
.product-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 15px;
}
.product-img-placeholder {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 15px;
  overflow: hidden;
  background: var(--gray-bg);
}
.product-img-placeholder svg { width: 100%; height: 100%; }
.product-name {
  font-size: 20px;
  font-weight: 600;
  margin: 25px 0;
  line-height: 1.3;
}
.product-name a { text-decoration: none; color: var(--black); }
.product-name a:hover { color: var(--green); }
.product-desc {
  font-size: 13px;
  font-weight: 300;
  color: var(--black);
  margin-bottom: auto;
  line-height: 1.4;
}
.product-price {
  font-size: 30px;
  font-weight: 600;
  color: var(--green);
  margin: 12px 0;
}
.price-old {
  text-decoration: line-through;
  color: var(--gray-text);
  font-size: 16px;
  font-weight: 400;
  margin-right: 8px;
}
.price-sale { color: var(--sale-red); }
.product-btn {
  display: block;
  width: 100%;
  padding: 21px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: transparent;
  color: var(--green);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 25px;
  text-align: center;
}
.product-btn:hover, .product-btn.added {
  background: var(--green);
  color: var(--white);
}

/* ===== GALLERY CAROUSEL ===== */
.gallery-section { padding: 25px 0 40px; }
.gallery-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item {
  flex: 0 0 calc(25% - 9px);
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.3;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}
.gallery-dot.active { opacity: 1; }

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--black);
  color: var(--white);
  padding: 32px 0 0;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { height: 40px; border-radius: 6px; }
.footer-name { font-weight: 700; font-size: 1.1rem; }
.footer-contacts { display: flex; gap: 20px; align-items: center; }
.footer-phone {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}
.footer-wa {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  padding: 14px 0;
  font-size: 0.85rem;
  opacity: 0.5;
}

/* ===== CART (header) ===== */
.header-cart {
  flex-shrink: 0;
  position: relative;
  color: var(--black);
  text-decoration: none;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-cart:hover { transform: scale(1.1); color: var(--green); }
.header-cart .cart-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  background: var(--sale-red);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-item { flex: 0 0 calc(33.33% - 8px); }
}
@media (max-width: 768px) {
  .header-brand { font-size: 16px; }
  .header-phone { font-size: 14px; }
  .header-whatsapp svg { width: 28px; height: 28px; }
  .header-phone, .header-whatsapp { display: none; }
  .site-header.menu-open .header-phone,
  .site-header.menu-open .header-whatsapp { display: flex; }
  .site-header.menu-open .header-phone { font-size: 16px; }
  .site-header.menu-open .header-whatsapp svg { width: 34px; height: 34px; }
  .burger { display: block; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .product-card { padding: 12px; }
  .product-name { font-size: 17px; margin: 16px 0 12px; }
  .product-price { font-size: 22px; }
  .product-btn { padding: 14px; font-size: 14px; }
  .filter-btn { font-size: 14px; padding: 7px 14px; }
  .gallery-item { flex: 0 0 calc(50% - 6px); }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .footer-contacts { flex-direction: column; gap: 8px; }
}

/* ===== ORDER PAGE ===== */
.order-section { padding: 40px 0 60px; }
.order-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}
.order-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-text);
}
.order-back-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 28px;
  background: var(--green);
  color: var(--white);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}
.order-back-btn:hover { background: var(--green-hover); }
.order-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}
.order-items {
  background: var(--gray-bg);
  border-radius: var(--radius);
  padding: 24px;
}
.order-items h3 {
  font-size: 18px;
  margin-bottom: 16px;
}
.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 15px;
}
.order-item-name { flex: 1; font-weight: 500; }
.order-item-qty { margin: 0 12px; color: var(--gray-text); }
.order-item-price { font-weight: 600; white-space: nowrap; }
.order-total {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 700;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px solid #ddd;
  color: var(--green);
}
.order-form {
  background: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  padding: 28px;
}
.order-form h3 {
  font-size: 18px;
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}
.form-group input[type="text"],
.form-group input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus {
  border-color: var(--green);
}
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--green);
}
.form-check label {
  font-size: 13px;
  line-height: 1.4;
  color: var(--gray-text);
}
.form-check label a {
  color: var(--green);
}
.order-submit-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}
.order-submit-btn:hover { background: var(--green-hover); }
.order-submit-btn:disabled {
  background: #aaa;
  cursor: not-allowed;
}
.order-success {
  text-align: center;
  padding: 20px 0;
}
.order-success p {
  font-size: 18px;
  margin-bottom: 8px;
}
.order-success p:first-child {
  font-weight: 700;
  color: var(--green);
}
@media (max-width: 768px) {
  .order-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .order-title { font-size: 24px; }
}
