*[hidden] { display: none !important; }

:root{
  /* light theme: белый + бежевый */
  --bg:#f6efe6;
  --panel:#ffffff;
  --panel2:#fbf6ef;
  --text:#1b1610;
  --muted:#6e655b;
  --stroke:rgba(27,22,16,.10);
  --brand:#c79a55;
  --brand2:#f2d3a2;
  --ok:#1fa76f;
  --bad:#d93a4f;
  --shadow: 0 10px 26px rgba(27,22,16,.12);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(199,154,85,.22), transparent 60%),
    radial-gradient(1000px 600px at 100% 0%, rgba(242,211,162,.35), transparent 55%),
    var(--bg);
  color:var(--text);
}
a{color:inherit}
.container{max-width:100%; margin:0 auto; padding:0 16px}
@media (min-width: 768px) { .container{padding:0 32px} }

.header{
  position:sticky; top:0; z-index:50;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--stroke);
}
.header__inner{display:flex; align-items:center; justify-content:space-between; padding:14px 0}
.header__right{display:flex; align-items:center; gap:12px}

.brand{display:flex; gap:12px; align-items:center; text-decoration:none}
.brand__logoWrap{position:relative; width:60px; height:60px; flex:0 0 60px}
.brand--link:hover{opacity:.95}
.brand__logo{
  width:60px; height:60px; border-radius:50%;
  display:grid; place-items:center;
  font-weight:800;
  background: linear-gradient(135deg, rgba(199,154,85,1), rgba(242,211,162,1));
  box-shadow: var(--shadow);
}
.brand__logo--img{width:60px; height:60px; border-radius:50%; object-fit:cover; display:block}
.brand__logo.fallback{position:absolute; inset:0; display:none; place-items:center}
.brand__subtitle{color:var(--muted); font-size:13px}
.brand__hint{color:var(--muted); font-size:12px}
.brand__phone{display:inline-block; margin-top:3px; font-weight:650; text-decoration:none}
.brand__phone:hover{text-decoration:underline}

.cartButton{
  display:flex; gap:10px; align-items:center;
  padding:10px 12px;
  border:1px solid var(--stroke);
  border-radius:14px;
  background: rgba(255,255,255,.75);
  color:var(--text);
  cursor:pointer;
}
.cartButton:hover{border-color: rgba(27,22,16,.18)}
.cartButton__icon{font-weight:700}
.cartButton__meta{color:var(--muted); font-weight:650}

.pill{
  padding:8px 10px;
  border:1px solid var(--stroke);
  border-radius:999px;
  background: rgba(255,255,255,.70);
  color:var(--muted);
  font-weight:650;
}

.hero{padding:26px 0 6px}
.hero__title{margin:0; font-size:32px; line-height:1.1}
.hero__desc{margin:10px 0 0; color:var(--muted)}

.categories{
  display:flex; gap:10px; flex-wrap:wrap;
  padding:16px 0 10px;
}
.chip{
  padding:10px 12px;
  border:1px solid var(--stroke);
  border-radius:999px;
  background: rgba(255,255,255,.70);
  color:var(--muted);
  cursor:pointer;
  font-weight:650;
}
.chip--active{
  background: linear-gradient(135deg, rgba(199,154,85,.20), rgba(242,211,162,.28));
  border-color: rgba(199,154,85,.45);
  color: var(--text);
}
.chip--disabled{
  opacity: .55;
  cursor: not-allowed;
}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:14px;
  padding: 10px 0 40px;
}
.card{
  grid-column: span 12;
  display:flex; gap:14px;
  border:1px solid var(--stroke);
  border-radius:18px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
  overflow:hidden;
}
@media (min-width:720px){ .card{grid-column: span 6;} }
@media (min-width:1250px){ .card{grid-column: span 4;} }
@media (min-width:1700px){ .card{grid-column: span 3;} }
@media (min-width:2200px){ .card{grid-column: span 2;} }

.card__img{width:120px; height:120px; object-fit:cover; flex:0 0 120px; background: rgba(255,255,255,.05)}
.card__body{padding:12px 12px 12px 0; display:flex; flex-direction:column; gap:8px; min-width:0; flex: 1;}
.card__title{font-weight:800}
.card__desc{color:var(--muted); font-size:13px; line-height:1.35; min-height:34px}
.card__bottom{display:flex; align-items:center; gap:10px; margin-top:auto}
.price{font-weight:900}
.priceBox{display:flex; flex-direction:column; gap:4px}
.price--old{
  color: #ff0000;
  position: relative;
}
.crossed-num {
  position: relative;
  display: inline-block;
}
.crossed-num::after{
  content:"";
  position:absolute; left:0; right:0; top:50%;
  border-top:2px solid #ff0000;
  transform: rotate(-12deg);
  transform-origin:center;
}
.card__actions{display:flex; gap:10px; align-items:center; flex-wrap:nowrap; margin-left:auto}
.card__options { margin-top: auto; margin-bottom: 10px; }

.card__actions .primaryBtn,
.card__actions .qty {
  width: 110px; /* Fixed width for consistency */
  min-width: 110px;
  height: 38px;
  padding: 0; /* Reset padding for centered flex */
  box-sizing: border-box;
}

.card__actions .qty {
  justify-content: space-between;
  padding: 0 2px;
}

.sizeSwitch{display:flex; gap:8px}
.chip--size{padding:8px 10px}

.primaryBtn,.secondaryBtn{
  display:inline-flex; justify-content:center; align-items:center;
  padding:10px 12px;
  border-radius:14px;
  text-decoration:none;
  border:1px solid transparent;
  cursor:pointer;
  font-weight:800;
}
.primaryBtn{
  background: linear-gradient(135deg, rgba(199,154,85,1), rgba(242,211,162,1));
  color:#1b1610;
}
.primaryBtn:hover{
  filter:brightness(1.05);
  transform: scale(1.05);
}
.primaryBtn {
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.secondaryBtn{
  background: rgba(255,255,255,.70);
  border-color: var(--stroke);
  color: var(--text);
}
.secondaryBtn:hover{border-color: rgba(27,22,16,.18)}

.iconBtn{
  background: transparent;
  border:1px solid var(--stroke);
  color: var(--text);
  width:34px; height:34px;
  border-radius:12px;
  cursor:pointer;
}
.iconBtn:hover{border-color: rgba(27,22,16,.18)}

.drawerOverlay{
  position:fixed; inset:0; z-index:80;
  background: rgba(27,22,16,.22);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.drawerOverlay.is-open {
  opacity: 1;
  visibility: visible;
}

.drawer{
  position:fixed; top:0; right:0; bottom:0; z-index:90;
  width:min(420px, 92vw);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border-left:1px solid var(--stroke);
  box-shadow: var(--shadow);
  display:flex; flex-direction:column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer.is-open {
  transform: translateX(0);
}

.drawer__header{display:flex; justify-content:space-between; align-items:center; padding:14px 14px; border-bottom:1px solid var(--stroke)}
.drawer__title{font-weight:900}
.drawer__content{padding:10px 14px; overflow:auto; flex:1}
.drawer__footer{padding:14px; border-top:1px solid var(--stroke)}
.totalRow{display:flex; justify-content:space-between; align-items:center; margin-bottom:10px}
.muted{color:var(--muted)}
.small{font-size:12px}
.big{font-size:22px}

.cartItems{display:flex; flex-direction:column; gap:10px}
.cartItem{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:8px;
  padding:10px;
  border:1px solid var(--stroke);
  border-radius:16px;
  background: rgba(251,246,239,.85);
}
.cartItem__title{font-weight:800}
.cartItem__meta{color:var(--muted); font-size:12px}
.qty{
  display:flex; gap:6px; align-items:center; justify-content:flex-end;
}
.qtyBtn{
  width:30px; height:30px; border-radius:10px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.75);
  color: var(--text);
  cursor:pointer;
}
.qtyBtn:hover{border-color: rgba(27,22,16,.18)}
.qtyVal{min-width:22px; text-align:center; font-weight:800}
.delBtn{margin-left:6px; color:var(--bad)}

.checkout{padding:18px 0 60px; display:grid; grid-template-columns: 1fr; gap:14px}
@media (min-width:920px){ .checkout{grid-template-columns: 1.3fr .9fr;} .panel--sticky{position:sticky; top:86px; height:fit-content;} }
.panel{
  border:1px solid var(--stroke);
  border-radius:18px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
  padding:14px;
}
.panel__title{margin:0 0 12px; font-size:16px}
.formGrid{display:grid; grid-template-columns: 1fr; gap:12px}
@media (min-width:720px){ .formGrid{grid-template-columns: 1fr 1fr;} .field--wide{grid-column: span 2;} }
.field{display:flex; flex-direction:column; gap:6px}
.field__label{color:var(--muted); font-size:12px; font-weight:750}
.field__hint{color:var(--muted); font-size:12px}
.input{
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.88);
  color: var(--text);
  outline:none;
}
.input:focus{border-color: rgba(199,154,85,.55); box-shadow: 0 0 0 3px rgba(199,154,85,.18)}

.radioList{display:flex; flex-direction:column; gap:10px}
.radio{display:flex; gap:10px; align-items:center; font-weight:700}
.hintCard{
  margin-top:10px;
  padding:12px;
  border-radius:16px;
  border:1px dashed rgba(27,22,16,.20);
  background: rgba(251,246,239,.75);
}
.hintCard__title{font-weight:900; margin-bottom:4px}
.hintCard__text{color:var(--muted); font-size:13px}

.rowBetween{display:flex; align-items:center; justify-content:space-between; gap:12px}
.error{
  margin-top:10px;
  padding:10px;
  border:1px solid rgba(217,58,79,.35);
  background: rgba(217,58,79,.10);
  border-radius:14px;
  color: #7c1f2a;
  font-weight:650;
}
.successCard{display:flex; flex-direction:column; gap:10px}
.successCard__row{line-height:1.4}

.orderPreview{display:flex; flex-direction:column; gap:8px}
.orderLine{display:flex; justify-content:space-between; gap:12px; color: var(--muted)}
.orderLine strong{color: var(--text)}

.mapContainer{width:100%; height:360px; background: #eee; border-radius:14px; overflow:hidden}

/* FAB Cart */
.fabCart {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #d93a4f; /* Red circle */
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(217, 58, 79, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.fabCart:hover {
  transform: scale(1.05);
}
.fabCart:active {
  transform: scale(0.95);
}
.fabCart__icon {
  font-size: 28px;
  line-height: 1;
}
.fabCart__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #000;
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.grid.fade-in {
  animation: fadeIn 0.4s ease-out;
}

/* Fly to cart animation item */
.fly-item {
  position: fixed;
  z-index: 1000;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
  transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
