:root {
  --primary: #f28c28;
  --secondary: #ffefdb;
  --green: #2f8f5b;
  --green-deep: #163d2d;
  --cream: #fffaf3;
  --dark: #1d1a18;
  --muted: #655e59;
  --line: #f0e2d1;
  --white: #ffffff;
  --danger: #d64c4c;
  --warning: #e4a12e;
  --success: #2fa15c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: var(--cream);
  color: var(--dark);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.container { width: min(1180px, calc(100% - 30px)); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), #ffb15b); color: var(--white); font-weight: 800;
}
.brand-name { font-weight: 800; color: var(--green-deep); }
.brand small { text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.main-nav { display: flex; align-items: center; gap: 24px; color: var(--muted); font-weight: 500; }
.main-nav a:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.search-box {
  display: flex; align-items: center; gap: 8px; background: #f9f1e7; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 12px;
}
.search-box input {
  border: 0; background: transparent; min-width: 180px; outline: none;
}
.search-box button, .btn {
  border: 0; border-radius: 999px; padding: 0.8rem 1.1rem; cursor: pointer; font-weight: 600;
  transition: transform 0.2s ease;
}
.cart-nav { white-space: nowrap; }
.search-box button, .btn-primary {
  background: linear-gradient(135deg, var(--primary), #ffb15b); color: var(--white);
  box-shadow: 0 12px 28px rgba(242, 140, 40, 0.2);
}
.btn-outline { border: 1px solid var(--primary); background: transparent; color: var(--primary); }
.btn-secondary { background: var(--white); color: var(--green-deep); border: 1px solid var(--line); }
.btn:hover, .search-box button:hover { transform: translateY(-1px); }

.hero {
  background: linear-gradient(180deg, #fffaf3, #fffefc 60%, #fff);
  padding: 60px 0 40px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-block; padding: 0.5rem 0.8rem; border-radius: 999px; background: rgba(242,140,40,0.12);
  color: var(--primary); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
}
.text-orange { color: var(--primary); }
.hero-copy h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.05; margin: 18px 0; color: var(--green-deep);
}
.hero-copy p { margin: 0; line-height: 1.7; color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 26px; }
.hero-stats {
  display: flex; gap: 30px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap;
}
.hero-stats li { display: flex; flex-direction: column; gap: 8px; }
.hero-stats strong { font-size: 1.4rem; color: var(--green-deep); }
.hero-stats span { color: var(--muted); }
.hero-visual { position: relative; height: 500px; }
.hero-card {
  position: absolute; overflow: hidden; border-radius: 28px; box-shadow: 0 18px 45px rgba(22,61,45,0.12);
  background: var(--white);
}
.card-main { inset: 0 40px 40px 0; }
.card-main img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; background: var(--white); border-radius: 999px; padding: 0.8rem 1rem;
  box-shadow: 0 18px 28px rgba(22,61,45,0.09); font-weight: 700; color: var(--green-deep);
}
.badge-top { top: 18px; right: 10px; }
.badge-bottom { bottom: 14px; left: 18px; }

.categories, .featured-products, .catalog-hero, .admin-panel { padding-top: 80px; }
.section-heading { margin-bottom: 24px; }
.section-heading h2 { margin: 10px 0 0; font-size: clamp(2rem, 2.7vw, 2.8rem); color: var(--green-deep); }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.category-card, .product-card, .info-card, .newsletter-box, .modal-card, .admin-table-wrap {
  background: var(--white); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 16px 40px rgba(22,61,45,0.07);
}
.category-card { padding: 24px 20px; }
.category-icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-weight: 800;
  background: rgba(242,140,40,0.12); color: var(--primary); margin-bottom: 18px;
}
.category-card h3 { margin: 0 0 8px; color: var(--green-deep); }
.category-card p { margin: 0 0 18px; color: var(--muted); line-height: 1.7; }
.category-card a { color: var(--primary); font-weight: 700; }

.products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.product-card { overflow: hidden; }
.product-image-wrap { position: relative; height: 250px; }
.product-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 12px; left: 12px; font-size: 0.72rem; font-weight: 700; padding: 0.45rem 0.75rem; border-radius: 999px; color: var(--white);
}
.badge-available { background: var(--success); }
.badge-low { background: var(--warning); }
.badge-out { background: var(--danger); }
.product-body { padding: 18px 18px 22px; }
.product-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.72rem; margin-bottom: 14px; }
.product-card h3 { margin: 0 0 8px; color: var(--green-deep); }
.product-card p { margin: 0; color: var(--muted); min-height: 78px; line-height: 1.7; }
.product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.product-footer strong { color: var(--green-deep); font-size: 1.18rem; }
.product-footer a { color: var(--primary); font-weight: 700; }
.add-cart-form { margin-top: 14px; }
.add-cart-form button { width: 100%; }
.add-cart-form button:disabled { opacity: 0.6; cursor: not-allowed; }

.info-section {
  background: linear-gradient(180deg, rgba(242,140,40,0.05), rgba(47,143,91,0.05));
  padding: 80px 0; margin-top: 50px;
}
.info-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 24px; align-items: center; }
.info-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.info-card { padding: 24px 18px; }
.info-card h3 { margin-top: 0; color: var(--green-deep); }
.info-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.location-section { margin-top: 44px; }
.location-section .section-heading p { color: var(--muted); }
.location-map { height: 390px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--white); box-shadow: 0 16px 40px rgba(22,61,45,0.08); }
.location-map iframe { width: 100%; height: 100%; border: 0; }
.location-link { display: inline-block; margin-top: 18px; }

.newsletter { padding: 80px 0; }
.newsletter-box { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 18px; padding: 26px; align-items: center; }
.newsletter-box h2 { margin: 8px 0 0; color: var(--green-deep); }
.newsletter-form {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: center;
}
.newsletter-form input, .catalog-filters input, .catalog-filters select, .form-group input {
  border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem 1rem; width: 100%; outline: none; background: var(--white);
}
.check-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.89rem; }
.check-row a { color: var(--green); text-decoration: underline; }

.catalog-hero { display: grid; gap: 20px; }
.catalog-filters {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 14px; align-items: center; background: var(--white);
  border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(22,61,45,0.05); border-radius: 22px; padding: 18px;
}
.products-grid-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 24px; }
.empty-state {
  text-align: center; background: var(--white); border: 1px dashed var(--line); border-radius: 22px;
  padding: 72px 20px; margin-top: 24px; color: var(--muted);
}

.admin-table-wrap { overflow: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 0.95rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
.admin-table th { background: #fff5ea; color: var(--green-deep); }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.admin-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.campaign-form { max-width: 760px; padding: 26px; background: var(--white); border: 1px solid var(--line); border-radius: 22px; }
.campaign-form textarea { min-height: 180px; resize: vertical; }
.campaign-form button:disabled { opacity: 0.55; cursor: not-allowed; }
.recipient-count { color: var(--green-deep); }
.form-help { color: var(--muted); line-height: 1.6; }
.errorlist { color: var(--danger); }

.cart-layout, .checkout-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr); gap: 24px; align-items: start; }
.cart-items { display: grid; gap: 14px; }
.cart-item { display: grid; grid-template-columns: 90px minmax(150px, 1fr) auto auto auto; gap: 16px; align-items: center; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; }
.cart-item > img { width: 90px; height: 90px; object-fit: cover; border-radius: 14px; }
.cart-product-info h2 { margin: 0 0 6px; color: var(--green-deep); font-size: 1rem; }
.cart-product-info p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.quantity-form { display: grid; gap: 6px; justify-items: start; }
.quantity-form label { color: var(--muted); font-size: 0.8rem; }
.quantity-form input { width: 82px; padding: 0.55rem; border: 1px solid var(--line); border-radius: 10px; }
.quantity-form .btn { padding: 0.5rem 0.75rem; font-size: 0.8rem; }
.link-button { border: 0; background: transparent; color: var(--danger); cursor: pointer; text-decoration: underline; }
.stock-warning { color: var(--danger) !important; font-weight: 600; }
.order-summary, .checkout-form, .order-confirmation { padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 40px rgba(22,61,45,0.06); }
.order-summary { position: sticky; top: 105px; }
.order-summary h2 { margin-top: 0; color: var(--green-deep); }
.order-summary > p, .order-confirmation > p, .confirmation-lines > p { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); }
.order-summary strong, .order-confirmation strong { color: var(--green-deep); }
.summary-total { border-top: 1px solid var(--line); padding-top: 14px; font-size: 1.12rem; }
.summary-total strong { font-size: 1.25rem; }
.payment-note { color: var(--green-deep); background: #edf7f0; padding: 12px; border-radius: 12px; line-height: 1.6; }
.full-width { display: block; width: 100%; text-align: center; }
.checkout-form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.form-span { grid-column: 1 / -1; }
.checkout-form .form-group textarea, .checkout-form .form-group input, .checkout-form .form-group select {
  border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 0.9rem; width: 100%; font: inherit; background: #fff;
}
.checkout-terms { align-items: flex-start; }
.checkout-terms input { margin-top: 5px; }
.checkout-terms a { color: var(--green); text-decoration: underline; }
.order-confirmation { max-width: 800px; margin: 0 auto; }
.order-confirmation h1 { color: var(--green-deep); }
.confirmation-lines { border-top: 1px solid var(--line); padding-top: 10px; }

.messages { padding-top: 16px; }
.message { padding: 12px 16px; border-radius: 12px; background: #e9f5ed; color: #1a5c3d; }
.message-warning, .message-error { background: #fff2e7; color: #8f4313; }
.privacy-page { padding-top: 64px; padding-bottom: 30px; }
.privacy-heading { max-width: 800px; margin-bottom: 32px; }
.privacy-heading h1 { color: var(--green-deep); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; }
.privacy-heading p, .privacy-content p { color: var(--muted); line-height: 1.8; }
.privacy-heading .privacy-note { padding: 14px 18px; border-left: 4px solid var(--primary); background: #fff2e3; border-radius: 8px; }
.privacy-content { max-width: 850px; padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: 22px; }
.privacy-content section + section { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 8px; }
.privacy-content h2 { color: var(--green-deep); font-size: 1.2rem; }
.privacy-content a { color: var(--green); text-decoration: underline; }
.privacy-back { display: inline-block; margin-top: 24px; }

.modal {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 100; background: rgba(13, 18, 17, 0.45); padding: 20px;
}
.modal.is-visible { display: flex; }
.modal-card { width: min(520px, 100%); padding: 26px; position: relative; }
.modal-close {
  position: absolute; top: 12px; right: 16px; border: 0; background: transparent; cursor: pointer; font-size: 2rem; color: var(--muted);
}
.modal-card h2 { margin: 10px 0 12px; color: var(--green-deep); }
.modal-card p { color: var(--muted); line-height: 1.7; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--green-deep); font-weight: 600; }
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

.site-footer { background: var(--green-deep); color: rgba(255,255,255,0.85); margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr; gap: 22px; padding: 52px 0 28px; }
.site-footer h3, .site-footer h4 { color: var(--white); margin-top: 0; }
.site-footer ul { padding: 0; margin: 0; list-style: none; display: grid; gap: 8px; }
.site-footer p, .site-footer li { color: rgba(255,255,255,0.78); line-height: 1.7; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); text-align: center; padding: 18px 0 26px; color: rgba(255,255,255,0.72); }

@media (max-width: 980px) {
  .hero-grid, .info-grid, .newsletter-box, .footer-grid, .category-grid, .info-cards { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .catalog-filters, .newsletter-form { grid-template-columns: 1fr 1fr; }
  .products-grid, .products-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .cart-item { grid-template-columns: 80px minmax(140px, 1fr) auto; }
}

@media (max-width: 680px) {
  .nav-wrap { display: grid; grid-template-columns: 1fr; padding: 14px 0; }
  .nav-actions, .search-box, .hero-grid, .catalog-filters, .newsletter-form, .products-grid, .products-grid-wide, .info-grid, .info-cards, .footer-grid, .newsletter-box { grid-template-columns: 1fr; display: grid; }
  .hero-visual { height: 340px; }
  .hero-stats { gap: 16px; }
  .admin-heading { display: grid; }
  .admin-actions { display: grid; }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item > img { width: 72px; height: 72px; }
  .cart-item > strong, .cart-item > form:last-child { grid-column: 2; }
  .quantity-form { grid-column: 2; display: flex; align-items: center; flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; }
  .form-span { grid-column: auto; }
}
