:root {
  --cream: #fff8ed;
  --beige-2: #f6efe4;
  --text: rgba(11, 43, 51, 0.78);
  --text-strong: rgba(11, 43, 51, 0.92);
  --border: rgba(17, 59, 70, 0.12);
  --surface: rgba(255, 255, 255, 0.86);
  --shadow: 0 14px 34px rgba(11, 43, 51, 0.09);
  --accent: #0e6b7a;
  --accent-soft: rgba(14, 107, 122, 0.12);
  --danger-soft: rgba(201, 60, 84, 0.08);
  --sans: 'Montserrat', system-ui, sans-serif;
  --heading: 'Comfortaa', system-ui, sans-serif;
  font: 16px/150% var(--sans);
  color: var(--text);
  background: #fff;
}
* { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
  position: relative;
  margin: 0; background: #fff; overflow-x: hidden;
}
.pageDecor {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
}
.pageDecor img {
  position: absolute;
  left: var(--x); top: var(--y);
  width: var(--s); height: var(--s);
  opacity: .08;
  transform: translate(-50%, -50%) rotate(var(--r));
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--heading); color: var(--text-strong); margin: 0; }

.appShell {
  position: relative; isolation: isolate;
  min-height: 100vh; display: flex; flex-direction: column;
}
.topBar, .appShell { position: relative; z-index: 1; }
.container { max-width: 1100px; margin: 0 auto; padding: 16px; }
.topBar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.75); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topBarInner { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brandLogo { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; border: 1px solid var(--border); }
.brandTitle { font-family: var(--heading); font-weight: 800; color: var(--text-strong); }
.brandSub { font-size: 12px; }
.nav { display: flex; gap: 10px; flex-wrap: wrap; }
.navLink {
  padding: 8px 10px; border-radius: 10px; text-decoration: none;
  border: 1px solid var(--border); background: rgba(255,255,255,.65); color: var(--text-strong);
}
.main { flex: 1; padding-top: 0; }

.homePage {
  position: relative; isolation: isolate;
  width: 100vw; min-height: calc(100svh - 77px);
  margin-left: calc(50% - 50vw);
}
.homeBg {
  display: block;
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-size: cover; background-position: center;
}
.homeBg::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.72) 58%, #fff 100%);
}
.homeBg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.62) 46%, rgba(255,255,255,.12) 72%, transparent 100%);
}
.homeContent {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: clamp(18px,3vw,40px);
  padding-top: clamp(84px,12.5vh,136px);
  padding-left: clamp(10px,2vw,24px);
}
.homeContent > * { max-width: 560px; }
.homeTitle { font-size: clamp(34px,3.2vw,48px); line-height: 1.15; margin-bottom: 12px; }
.homeText { font-size: 21px; line-height: 1.6; max-width: 540px; }
.homeActions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(255,255,255,.7); font-weight: 800; cursor: pointer; font-family: inherit; font-size: inherit;
  text-decoration: none; color: var(--text-strong);
}
.btnPrimary { background: var(--accent-soft); border-color: rgba(14,107,122,.28); }
.btnGhost { background: rgba(255,255,255,.72); }

.section { scroll-margin-top: 88px; margin-top: 48px; }
.heroBlock {
  padding: 18px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 14px;
}
.heroTitle { font-size: 22px; font-weight: 800; font-family: var(--heading); }
.heroText { margin-top: 6px; }
.filters { display: grid; grid-template-columns: minmax(0,1fr) minmax(160px,240px); gap: 12px; }
.input {
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(255,255,255,.65); color: var(--text-strong); width: 100%;
}
.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.card {
  padding: 14px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: 0 10px 26px rgba(11,43,51,.06);
}
.card img { width: 100%; height: 170px; object-fit: cover; border-radius: 14px; display: block; margin-bottom: 10px; border: 1px solid var(--border); }
.cardTitle { font-weight: 800; color: var(--text-strong); }
.cardDesc { margin-top: 8px; font-size: 14px; line-height: 1.35; }
.cardBottom { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-weight: 900; color: var(--text-strong); }
.chip { font-size: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--border); display: inline-block; margin-top: 8px; }
.qtyCtl { display: grid; grid-template-columns: 28px 1fr 28px; border-radius: 10px; border: 1px solid rgba(14,107,122,.28); background: var(--accent-soft); overflow: hidden; }
.qtyBtn { border: 0; background: transparent; cursor: pointer; font-weight: 900; height: 28px; }
.qtyVal { display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; border-left: 1px solid rgba(14,107,122,.18); border-right: 1px solid rgba(14,107,122,.18); }

.floatingCart {
  position: fixed; right: 16px; bottom: 96px; z-index: 40;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 12px 14px; border-radius: 999px; border: 1px solid rgba(14,107,122,.28);
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px); cursor: pointer; font-weight: 800;
}
.cartIcon { width: 20px; height: 20px; display: block; }
.badge { margin-left: 8px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); border: 1px solid var(--border); }

.drawerRoot { position: fixed; inset: 0; z-index: 50; }
.drawerBackdrop { position: absolute; inset: 0; border: 0; background: rgba(11,43,51,.35); cursor: pointer; }
.drawerPanel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(420px,92vw);
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-left: 1px solid var(--border); padding: 16px; overflow: auto;
}
.drawerPanel[hidden], .drawerRoot[hidden] { display: none; }
.drawerHeader { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.cartRow { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.cartRow:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.cartThumb { width: 58px; height: 58px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.cartInfo { display: grid; gap: 8px; min-width: 0; }
.cartControls { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.siteFooter { margin-top: auto; border-top: 1px solid var(--border); background: rgba(255,255,255,.82); }
.footerTitle { text-align: center; margin-bottom: 12px; }
.footerNav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 18px;
  text-align: center;
}
.footerNav a { text-decoration: none; font-weight: 700; color: var(--text-strong); }
.footerDisclaimer { text-align: center; font-size: 13px; max-width: 720px; margin: 0 auto; }
.footerCopy { text-align: center; margin: 10px 0 0; font-weight: 700; color: var(--text-strong); }

.contactsBox .row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; margin-bottom: 8px; }
.contactsBox .label { font-weight: 700; color: var(--text-strong); }

.error { padding: 12px; border-radius: 12px; background: var(--danger-soft); border: 1px solid rgba(201,60,84,.22); margin: 12px 0; }
.muted { color: var(--text); }
.hidden { display: none !important; }

/* Admin */
.adminShell { background: #f7f4ef; }
.adminTop { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.adminTabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.adminTab { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-weight: 700; }
.adminTab.active { border-color: rgba(14,107,122,.28); background: var(--accent-soft); }
.adminBox { padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 14px; }
.adminGrid { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 10px; }
.adminRow { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.adminRow:first-child { border-top: 0; }
.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.loginBox { max-width: 360px; margin: 80px auto; padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }

@media (max-width: 900px) { .grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 720px) {
  .main { max-width: none; padding-left: 0; padding-right: 0; }
  .homePage { width: 100%; margin-left: 0; }
  .section { padding-left: 16px; padding-right: 16px; }
  .grid, .filters { grid-template-columns: 1fr; }
  .homeBg { background-position: 62% center; }
  .homeBg::before { height: 42%; background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.76) 54%, #fff 100%); }
  .homeBg::after { background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.72) 58%, rgba(255,255,255,.2) 100%); }
  .pageDecor img { width: calc(var(--s) * .72); height: calc(var(--s) * .72); opacity: .06; }
  .footerNav { grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: 13px; }
  .contactsBox .row { grid-template-columns: 1fr; }
  .adminRow { grid-template-columns: 1fr; }
}
