/* ===== THEME: SARA light olive ===== */
:root{
  --olive:#475A3E;      /* основной */
  --sage:#F5F7F2;       /* фон страницы */
  --sage-200:#E8EEE3;   /* светлые бордеры/плейсхолды */
  --ink:#1C1F1B;        /* текст */
  --brass:#C9A574;      /* акцент */
  --radius:22px;
}

/* ===== BASE ===== */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
  background:var(--sage);
  color:var(--ink);
}
a{ color:inherit; text-decoration:none; }
img{ display:block; max-width:100%; }
.container{ max-width:1100px; margin:0 auto; padding:12px 12px 96px; }

/* ===== HEADER ===== */
.brand{ display:flex; align-items:center; gap:12px; margin:12px 0; padding:4px 2px; }
.brand__logo{ width:44px; height:44px; object-fit:contain; }
.brand__title{ font-weight:800; color:var(--olive); letter-spacing:.2px; }

#langSwitch{ margin-left:auto; display:flex; gap:6px; align-items:center; }
.lang-btn{
  border:1px solid var(--sage-200);
  background:#fff; color:var(--olive);
  border-radius:999px; padding:6px 10px; font-size:13px; cursor:pointer;
}
.lang-btn.active{ border-color:var(--olive); color:#fff; background:var(--olive); }

/* ===== TYPO ===== */
.h1{ font-size:22px; margin:8px 0 6px; color:var(--ink); }
.muted{ color:#6E746C; font-size:14px; }

/* ===== CATEGORIES ===== */
#categories{ display:flex; gap:8px; overflow-x:auto; padding:8px 0 12px; }
#categories .chip{
  border:1px solid var(--sage-200); background:#fff; color:var(--ink);
  border-radius:999px; padding:8px 12px; white-space:nowrap;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
}
#categories .chip.active{
  border-color:var(--olive);
  box-shadow:0 0 0 2px color-mix(in srgb, var(--olive) 18%, transparent);
}

/* ===== GRID ===== */
#products{
  display:grid; gap:12px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
@media (min-width:680px){
  #products{ grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (min-width:980px){
  #products{ grid-template-columns:repeat(4,minmax(0,1fr)); }
}

/* ===== CARD ===== */
.card{
  background:#fff; border:1px solid var(--sage-200); border-radius:var(--radius);
  box-shadow:0 6px 24px rgba(0,0,0,.06); overflow:hidden; padding:10px;
}
.card__media{
  position:relative; width:100%; aspect-ratio:1/1;
  background:var(--sage-200); border-radius:16px; overflow:hidden; margin-bottom:8px;
}
.card__media img{
  width:100%; height:100%; object-fit:cover; object-position:center; display:block;
}
.card .title{ font-weight:700; color:var(--ink); }
.card .price{ color:#485248; margin:6px 0; }
/* Кнопка "Добавить": фикс. размер, по центру, без кружка у плюса */
.card .add{
  all:unset;
  box-sizing:border-box;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;                   /* расстояние между + и текстом */
  width:160px;                /* !!! фиксированная ширина (стабильная) */
  height:44px;                /* !!! фиксированная высота */
  margin:12px auto 14px;      /* по центру карточки */
  border-radius:14px;
  background:var(--olive, #475A3E);
  color:#fff;
  border:1.5px solid var(--olive, #475A3E);
  font-weight:700;
  white-space:nowrap;         /* не переносить текст */
  cursor:pointer;
  user-select:none;
}
.card .add:hover{ filter:brightness(.98); }
.card .add:active{ transform:translateY(1px); }
/* Плюс без круга */
.card .add::before{
  content:"+";
  font-weight:900;
  font-size:18px;
  line-height:1;
  /* никаких рамок/круга! */
  border:none;
  width:auto; height:auto;
  display:inline-block;
}
/* На всякий случай убираем старые круги, если где-то остались */
.card .add::before{ border-radius:0; border:none; }

/* Если на очень узких экранах не влезает — можно сузить: */
@media (max-width:360px){
  .card .add{ width:148px; height:42px; }
}
/* ===== CART BAR ===== */
#cartBar{
  position:fixed; left:0; right:0; bottom:0;
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:12px 14px; border-top:1px solid var(--sage-200); background:#fff;
  box-shadow:0 -8px 24px rgba(0,0,0,.06); z-index:10;
}
#checkoutBtn{
  padding:.8rem 1rem; border-radius:14px; border:1px solid var(--olive);
  background:var(--olive); color:#fff; font-weight:700;
}
#checkoutBtn[disabled]{ background:#9EAB98; border-color:#9EAB98; }

/* ===== POPUP ===== */
.product-popup{
  position:fixed; inset:0; background:rgba(0,0,0,.5);
  display:flex; align-items:center; justify-content:center; z-index:9999;
}
.product-popup.hidden{ display:none; }
.popup-card{
  width:92%; max-width:420px; background:#fff; border:1px solid var(--sage-200);
  border-radius:18px; box-shadow:0 16px 36px rgba(0,0,0,.18); overflow:hidden;
}
.popup-img{ width:100%; height:200px; object-fit:contain; background:var(--sage-200); }
.popup-body{ padding:12px; }
.popup-title{ font-weight:800; color:var(--ink); margin-bottom:8px; }
.popup-options .field{ display:flex; flex-direction:column; gap:6px; margin:8px 0; }
.popup-options .label{ color:#6E746C; }
.popup-options select{
  background:#fff; color:var(--ink);
  border:1px solid var(--sage-200); border-radius:10px; padding:10px;
}
.popup-add{
  width:100%; padding:.9rem 1rem; border-radius:14px; border:1px solid var(--olive);
  background:var(--olive); color:#fff; font-weight:800;
}
.popup-cancel{
  width:100%; padding:.9rem 1rem; border-radius:14px; border:1px solid var(--olive);
  background:#fff; color:var(--olive); margin-top:8px;
}

/* ===== VARIANTS (flavors) ===== */
.variant-grid{
  display:grid; gap:8px; grid-template-columns:repeat(2,minmax(0,1fr));
  margin:6px 0 4px;
}
.variant-card{
  border:1px solid var(--sage-200); background:#fff; border-radius:12px;
  box-shadow:0 1px 2px rgba(0,0,0,.04); padding:8px;
  display:flex; align-items:center; gap:8px; cursor:pointer;
}
.variant-card img{ width:44px; height:44px; object-fit:contain; background:var(--sage-200); border-radius:8px; }
.variant-card .v-title{ font-size:14px; }
.variant-card.active{
  border-color:var(--olive);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--olive) 30%, transparent);
}

/* ===== SIZE BUTTONS (mobile-friendly) ===== */
.size-buttons{ display:flex; gap:8px; margin:10px 0 6px; }
.size-btn{
  flex:1; border:2px solid var(--olive); background:#fff; color:var(--olive);
  border-radius:14px; padding:10px 12px; text-align:center; line-height:1.1; transition:all .15s ease;
}
.size-btn .sb-title{ font-weight:700; font-size:14px; }
.size-btn .sb-sub{ font-size:12px; opacity:.75; margin-top:3px; }
.size-btn.active{ background:var(--olive); color:#fff; }
.size-btn:active{ transform:scale(.98); }
.size-note{ margin-top:6px; font-size:12px; opacity:.7; }

/* ===== FAB (optional) ===== */
#fabAdd{
  position:fixed; right:16px; bottom:82px; z-index:1000;
  width:56px; height:56px; border-radius:50%;
  border:none; background:var(--olive); color:#fff; font-size:28px; line-height:0;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 8px 24px rgba(0,0,0,.18); cursor:pointer;
}
#fabAdd .cnt{
  position:absolute; top:-6px; right:-6px; min-width:20px; height:20px;
  padding:0 6px; border-radius:999px; background:#ff4757; color:#fff;
  font-size:12px; display:flex; align-items:center; justify-content:center;
}
/* --- Top contacts bar --- */
.contact-bar{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  padding:6px 0 12px;
}

.contact-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:.45rem .75rem;
  border:1px solid var(--sage-200);
  background:#fff;
  color:var(--olive);
  border-radius:999px;
  font-weight:600;
  text-decoration:none;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
}

.contact-link .ig{
  width:18px; height:18px; fill:currentColor;
}
/* --- ADD BUTTON: solid olive, fixed size, centered, no ring --- */
#products.card .add{
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  min-width: 160px;
  padding: 0 16px;
  margin: 12px auto 14px;       /* центрирование в карточке */

  background: var(--olive, #475A3E);
  color: #fff;                  /* читаемый текст */
  border: 1.5px solid var(--olive, #475A3E);
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
#products.card .add::before{
  content: "+";                 /* просто плюс, без кружка */
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
}
#products.card .add:hover{ filter: brightness(.98); }
#products.card .add:active{ transform: translateY(1px); }

/* (необязательно) на очень узких экранах сделаем чуть уже */
@media (max-width:360px){
  #products.card .add{ min-width: 148px; height: 42px; }
}

