/**
 * Base styles — СевасБижу
 * Шрифты, токены, reset, layout, типографика, кнопки, header, footer, media
 */

/* ===== FONTS ===== */
@font-face {
  font-family: 'Songer';
  src: url('../fonts/Songer/SONGER_SE_Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Songer';
  src: url('../fonts/Songer/SONGER_SE_Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat/Montserrat-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat/Montserrat-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat/Montserrat-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat/Montserrat-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ===== TOKENS ===== */
:root {
  --cream:      #FFF3E7;
  --dark-green: #003128;
  --bordo:      #410818;
  --peach:      #F1C994;
  --peach-light:#FBE8C8;
  --white:      #FFFFFF;
  --gray:       #999;
  --gray-light: #f5f5f5;
  --shadow-sm:  0 2px 8px rgba(0,49,40,0.08);
  --shadow-md:  0 6px 24px rgba(0,49,40,0.12);
  --shadow-lg:  0 16px 48px rgba(0,49,40,0.18);
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --transition: 0.25s ease;
  --font-heading: 'Songer', Georgia, serif;
  --font-ui:      'Montserrat', Arial, sans-serif;
  /* Layout */
  --content-padding-x: 40px;
  --content-max: 1280px;
  /* Breakpoints (документация; в media нельзя var()) */
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 56px;
  --space-section: 72px;
  /* Max-width */
  --text-max: 720px;
  --form-max: 480px;
  /* Icons */
  --icon-sm: 44px;
  --icon-md: 56px;
  --icon-lg: 64px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  background: var(--cream);
  color: var(--dark-green);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  font-synthesis: none;
  font-kerning: normal;
  font-variant-ligatures: none;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-padding-x);
}
.section { padding: var(--space-section) 0; }
.section-sm { padding: var(--space-lg) 0; }

/* ===== CARD BASE ===== */
.card-base {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid rgba(0,49,40,0.1);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card-base:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--bordo);
}

/* ===== TYPOGRAPHY ===== */
.h1 { font-family: var(--font-heading); font-size: clamp(34px,4.6vw,54px); font-weight: 700; line-height: 1.12; }
.h2 { font-family: var(--font-heading); font-size: clamp(26px,3.1vw,38px); font-weight: 700; line-height: 1.18; }
.h3 { font-family: var(--font-heading); font-size: clamp(19px,2.3vw,25px); font-weight: 700; line-height: 1.25; }
.lead { font-size: 17px; font-weight: 500; line-height: 1.6; opacity: 0.9; }
.caption { font-size: 12px; font-weight: 400; line-height: 1.45; opacity: 0.65; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-md); font-family: var(--font-ui); font-weight: 700;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition), border-color var(--transition); white-space: nowrap; cursor: pointer;
}
.btn-l { height: 52px; padding: 0 32px; font-size: 14px; letter-spacing: 0.01em; }
.btn-m { height: 44px; padding: 0 24px; font-size: 13px; letter-spacing: 0.01em; }
.btn-s { height: 36px; padding: 0 16px; font-size: 12px; letter-spacing: 0.01em; }
.btn-primary {
  background: var(--bordo); color: var(--white);
  box-shadow: 0 4px 16px rgba(65,8,24,0.3);
}
.btn-primary:hover { background: #5a0e23; box-shadow: 0 6px 20px rgba(65,8,24,0.4); transform: translateY(-1px); }
.btn-secondary {
  background: transparent; color: var(--dark-green);
  border: 2px solid var(--dark-green);
}
.btn-secondary:hover { background: var(--dark-green); color: var(--white); }
.btn-secondary-white {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-secondary-white:hover { background: rgba(255,255,255,0.15); border-color: var(--white); }
.btn-peach {
  background: var(--peach);
  color: var(--dark-green);
}
.btn-peach:hover { background: var(--peach-light); color: var(--dark-green); }
.btn-white { background: var(--white); color: var(--bordo); }
.btn-white:hover { background: var(--peach); color: var(--dark-green); }
.btn-outline-white { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.6); }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); border-color: var(--white); }

/* Focus & Disabled states */
.btn:focus-visible {
  outline: 2px solid var(--bordo);
  outline-offset: 2px;
}
.btn-outline-white:focus-visible,
.btn-secondary-white:focus-visible {
  outline-color: var(--white);
}
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Interactive focus for links and icon buttons */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--bordo);
  outline-offset: 2px;
}
.header-icon-btn:focus-visible,
.burger-btn:focus-visible {
  outline-color: var(--peach);
}

/* ===== SECTION HEADING ===== */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header .h2 { margin-bottom: 12px; }
.section-label {
  display: inline-block;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bordo); margin-bottom: 12px;
}
.section-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; color: var(--bordo);
  margin-top: 16px; transition: gap var(--transition);
}
.section-link:hover { gap: 10px; }
.section-link::after { content: '→'; }

/* ===== TOP PROMO BANNER ===== */
.promo-banner {
  background: var(--bordo);
  color: var(--white);
  overflow: visible;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--content-padding-x);
}
.promo-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 24px 48px;
}
.promo-track span {
  font-size: 12px;
  font-weight: 600;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bordo);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition), opacity var(--transition);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}
.logo-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-left: 0;
  overflow: hidden;
  width: 220px;
  height: 56px;
}
.logo-link img {
  height: 100%;
  width: auto;
  min-width: 100%;
  object-fit: cover;
  object-position: center;
}
.logo-placeholder {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.logo-text { font-family: var(--font-heading); font-size: 18px; font-weight: 700; }
.logo-tagline { font-size: 10px; opacity: 0.7; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1; }

/* Header promo (вместо поиска) */
.header-promo {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
}

/* Search */
.header-search {
  flex: 1;
  position: relative;
  max-width: 340px;
}
.search-input {
  width: 100%;
  height: 38px;
  padding: 0 16px 0 44px;
  border-radius: 21px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition), opacity var(--transition);
}
.search-input::placeholder { color: rgba(255,255,255,0.55); }
.search-input:focus { outline: none; background: rgba(255,255,255,0.2); }
.search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
  pointer-events: none;
}
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: none;
  z-index: 100;
}
.search-suggestions.open { display: block; }
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  transition: background var(--transition);
}
.suggestion-item:hover { background: var(--cream); }
.suggestion-thumb {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.suggestion-name { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--dark-green); }
.suggestion-price { font-size: 13px; color: var(--bordo); font-weight: 700; }

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.header-icon-btn {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: background var(--transition);
}
.header-icon-btn:hover { background: rgba(255,255,255,0.12); }
.icon-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 18px; height: 18px;
  background: var(--peach);
  color: var(--dark-green);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.header-phone {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.burger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  color: var(--white);
}
.burger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition), opacity var(--transition);
}

/* Main nav */
.main-nav {
  border-top: 1px solid rgba(255,255,255,0.12);
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 0;
  height: 44px;
}
.nav-link {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 44px;
  line-height: 1.35;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  border-bottom: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition), opacity var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--white);
  border-bottom-color: var(--peach);
}
.nav-link.highlight {
  color: var(--peach);
  font-weight: 700;
}

/* ===== FLOATING BUTTONS (MOBILE) ===== */
.float-btns {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 16px;
  flex-direction: column;
  gap: 10px;
  z-index: 500;
}
.float-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition);
}
.float-btn:hover { transform: scale(1.1); }
.float-wa { background: #25D366; }
.float-tg { background: #229ED9; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--dark-green);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; text-align: left; }
.footer-logo-link { display: block; margin-bottom: 4px; overflow: hidden; width: 108px; height: 54px; }
.footer-logo-img { height: 100%; width: auto; min-width: 100%; object-fit: cover; object-position: center; display: block; }
.footer-tagline { font-size: 14px; line-height: 1.65; max-width: 300px; margin: 0; }
.footer-socials { display: flex; gap: 10px; margin-top: 4px; }
.social-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 16px;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition), opacity var(--transition);
}
.social-btn:hover { background: var(--bordo); }
.footer-title {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-list { display: flex; flex-direction: column; gap: 10px; }
.footer-list li a, .footer-list li {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}
.footer-list li a:hover { color: var(--peach); }
.footer-contact {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
.footer-contact-icon { opacity: 0.7; flex-shrink: 0; }

/* Payment icons */
.footer-payment {
  padding: 24px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-payment-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.5); flex-shrink: 0; }
.footer-payment-label-spaced { margin-left: 16px; }
.payment-icons { display: flex; gap: 10px; flex-wrap: wrap; }
.payment-icon {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
}

/* Footer bottom */
.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.45); }
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal a {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  transition: color var(--transition);
}
.footer-legal a:hover { color: rgba(255,255,255,0.7); }

/* ===== MOBILE MENU OVERLAY ===== */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--dark-green);
  z-index: 2000;
  overflow-y: auto;
  padding: 0;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s ease;
}
.mobile-menu.open {
  display: flex;
  transform: translateX(0);
}
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: var(--bordo);
}
.mobile-menu-header .logo-link img {
  height: 36px;
  width: auto;
}
.mobile-close {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 20px;
}
.mobile-nav-list { padding: 16px 0; }
.mobile-nav-item a {
  display: block;
  padding: 14px 24px;
  color: rgba(255,255,255,0.85);
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition), opacity var(--transition);
}
.mobile-nav-item a:hover {
  color: var(--peach);
  padding-left: 32px;
}
.mobile-menu-footer {
  margin-top: auto;
  padding: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.mobile-contacts { display: flex; flex-direction: column; gap: 12px; }
.mobile-contact a {
  color: rgba(255,255,255,0.75);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--peach); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #d4920e; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  :root { --content-padding-x: 24px; }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .wholesale-banner { grid-template-columns: 1fr; }
  .wholesale-ctas { flex-direction: row; }
  .special-offer-inner { grid-template-columns: 1fr; }
  .special-offer-right { display: none; }
  .two-worlds { grid-template-columns: 1fr; }
  .two-worlds-section { background: none; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .step:not(:last-child)::after { display: none; }
  .pickup-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --content-padding-x: 16px; }
  .section { padding: var(--space-lg) 0; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .inspiration-grid { grid-template-columns: 1fr; }
  .inspiration-card:first-child { grid-row: span 1; }
  .reviews-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-brand { gap: 12px; }
  .footer-tagline { font-size: 13px; }
  .footer-list { gap: 8px; }
  .footer-title { margin-bottom: 10px; }
  .site-footer { padding: 40px 0 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero { min-height: auto; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 15px; }
  .wholesale-banner { padding: 32px var(--content-padding-x); }
  .header-phone { display: none; }
  .main-nav { display: none; }
  .burger-btn { display: flex; }
  .float-btns { display: flex; }
  .header-search { display: none; }
  .header-promo { display: none; }
  .steps { grid-template-columns: 1fr; }
  .world-card { padding: 48px 24px; }
  .special-offer-inner { padding: 40px 0; }
}

@media (max-width: 480px) {
  :root { --content-padding-x: 12px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-icon { width: 52px; height: 52px; font-size: 22px; }
  .cat-icon img { width: 24px; height: 24px; }
  .cat-name { font-size: 13px; }
}
