/* Minimal, clean themes. Edit freely. */
:root{
  color-scheme: dark;
  --bg:#0f1115;
  --panel:#141824;
  --card:#171b28;
  --border:rgba(255,255,255,.10);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.65);
  --muted2:rgba(255,255,255,.48);
  --accent:#58d6c9;
  --accent2:#2bd4c4;
  --accent-rgb:88,214,201;
  --danger:#ff6b6b;
  --danger-rgb:255,107,107;
  --body-bg:var(--bg);
  --topbar-bg:rgba(15,17,21,.75);
  --soft-surface:rgba(255,255,255,.03);
  --softer-surface:rgba(255,255,255,.02);
  --control-bg:rgba(255,255,255,.04);
  --field-bg:rgba(0,0,0,.15);
  --image-bg:#0b0d12;
  --social-btn-bg:#171b28;
  --counter:#9ca3af;
  --warn:#f59e0b;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --radius:16px;
}

html[data-theme="white"]{
  color-scheme: light;
  --bg:#ffffff;
  --panel:#ffffff;
  --card:#ffffff;
  --border:rgba(251,109,20,.30);
  --text:#20130b;
  --muted:#6d3f25;
  --muted2:#87583c;
  --accent:#fb6d14;
  --accent2:#e85a00;
  --accent-rgb:251,109,20;
  --danger:#dc2626;
  --danger-rgb:220,38,38;
  --body-bg:var(--bg);
  --topbar-bg:rgba(255,255,255,.86);
  --soft-surface:rgba(251,109,20,.07);
  --softer-surface:rgba(251,109,20,.05);
  --control-bg:rgba(251,109,20,.10);
  --field-bg:#ffffff;
  --image-bg:#fff3e8;
  --social-btn-bg:#fff7f0;
  --counter:#87583c;
  --warn:#fb6d14;
  --shadow:0 10px 28px rgba(251,109,20,.14);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--body-bg);
  color:var(--text);
  overflow-x: hidden;
}

code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  background:var(--topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}

.topbarActions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.brand{display:flex; gap:12px; align-items:center}
.logo{
  width:40px; height:40px; border-radius:12px;
  display:grid; place-items:center;
  background:rgba(var(--accent-rgb),.12);
  border:1px solid rgba(var(--accent-rgb),.35);
}
.title{font-size:16px; font-weight:800; letter-spacing:.2px}
.subtitle{font-size:12px; color:var(--muted)}

.themeToggle{
  width:94px;
  border:0;
  padding:0;
  color:var(--text);
  background:transparent;
  border-radius:16px;
  cursor:pointer;
}

.themeToggleTrack{
  position:relative;
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:center;
  width:100%;
  min-height:42px;
  padding:4px;
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--softer-surface);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

.themeToggleThumb{
  position:absolute;
  z-index:0;
  top:4px;
  left:4px;
  width:calc((100% - 8px) / 2);
  height:calc(100% - 8px);
  border:1px solid rgba(var(--accent-rgb),.55);
  border-radius:12px;
  background:linear-gradient(180deg, rgba(var(--accent-rgb),.24), rgba(var(--accent-rgb),.12));
  box-shadow:0 6px 14px rgba(0,0,0,.16);
  transition:transform .22s ease, background .22s ease, border-color .22s ease;
}

.themeToggle.isWhite .themeToggleThumb{
  transform:translateX(100%);
}

.themeToggleIcon{
  position:relative;
  z-index:1;
  display:grid;
  place-items:center;
  min-width:0;
  min-height:34px;
  color:var(--muted);
  transition:color .18s ease;
}

.themeToggleIcon svg{
  width:19px;
  height:19px;
  display:block;
  overflow:visible;
}

.themeToggleIconDark svg path{
  fill:currentColor;
}

.themeToggleIconWhite svg circle,
.themeToggleIconWhite svg path{
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.themeToggle:not(.isWhite) .themeToggleIconDark,
.themeToggle.isWhite .themeToggleIconWhite{
  color:var(--text);
}

.themeToggle:hover .themeToggleTrack{
  border-color:rgba(var(--accent-rgb),.45);
}

.themeToggle:focus{
  outline:none;
}

.themeToggle:focus-visible .themeToggleTrack{
  border-color:rgba(var(--accent-rgb),.72);
  box-shadow:0 0 0 3px rgba(var(--accent-rgb),.14);
}

.layout{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap:18px;
  padding:18px;
  max-width:1200px;
  margin:0 auto;
  min-height: 100vh;
  background: var(--bg);
}

.sectionHeader h2{margin:0 0 4px 0}
.sectionHeader p{margin:0 0 14px 0}

.products{
  background:var(--soft-surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
}

/* ===== Category Selector ===== */
.categoryBar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 0 0 14px 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--softer-surface);
}

.catTab{
  border:1px solid var(--border);
  background: var(--control-bg);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
}

.catTab:hover{
  border-color: rgba(var(--accent-rgb),.35);
}

.catTab:focus{
  outline: none;
  border-color: rgba(var(--accent-rgb),.65);
}

.catTab.isActive{
  background: linear-gradient(180deg, rgba(var(--accent-rgb),.22), rgba(var(--accent-rgb),.10));
  border-color: rgba(var(--accent-rgb),.55);
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
}

.card{
  background:linear-gradient(180deg, var(--control-bg), var(--softer-surface));
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
}

.card .img{
  aspect-ratio:3 / 2;
  height:auto;
  background:var(--image-bg);
  border-bottom:1px solid var(--border);
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.card .img img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  display:block;
}
.card .body{padding:12px}
.card .name{font-weight:800; margin:0 0 6px 0; font-size:14px}
.card .price{margin:0 0 10px 0; color:var(--muted); font-size:13px}

.qty{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.qtyControls{
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid var(--border);
  border-radius:999px;
  padding:6px 10px;
  background:var(--softer-surface);
}
.qtyControls button{
  width:32px; height:32px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--control-bg);
  color:var(--text);
  cursor:pointer;
}
.qtyControls button:active{transform:translateY(1px)}
.qtyValue{
  min-width:22px;
  text-align:center;
  font-weight:800;
  color:var(--text);
}

.qtyInput{
  width:60px;
  height:32px;
  text-align:center;
  border-radius:8px;
  border:1px solid var(--border);
  background:var(--field-bg);
  color:var(--text);
  font-weight:800;
}
.qtyInput:focus{
  outline:none;
  border-color:rgba(var(--accent-rgb),.65);
}

/* Remove number input spinners */
.qtyInput::-webkit-outer-spin-button,
.qtyInput::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qtyInput {
  appearance: textfield;
}

.qtyWarn{
  color: var(--danger);
  font-weight: 800;
}

.trashBtn{
  margin-top: 6px;
  width: 36px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(var(--danger-rgb),.55);
  background: rgba(var(--danger-rgb),.12);
  color: var(--danger);
  cursor: pointer;
}
.trashBtn:active{ transform: translateY(1px); }


.btn{
  border:1px solid var(--border);
  background:var(--control-bg);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:700;
}
.btn.small{padding:8px 10px; border-radius:10px; font-weight:700; font-size:12px}
.btn.primary{
  background:linear-gradient(180deg, rgba(var(--accent-rgb),.20), rgba(var(--accent-rgb),.10));
  border-color:rgba(var(--accent-rgb),.55);
}
.clearCartAction{
  min-height:40px;
  padding:9px 14px;
  border-color:rgba(var(--accent-rgb),.62);
  white-space:nowrap;
}
.btn.ghost{
  background:transparent;
}
.btn:active{transform:translateY(1px)}
.btnIcon{opacity:.9}
.btn:disabled,
.trashBtn:disabled,
.qtyControls button:disabled,
.qtyInput:disabled{
  cursor:not-allowed;
  opacity:.58;
}
.btn:disabled:active,
.trashBtn:disabled:active,
.qtyControls button:disabled:active{
  transform:none;
}
.btnSpinner{
  width:16px;
  height:16px;
  border:2px solid rgba(var(--accent-rgb),.28);
  border-top-color:var(--text);
  border-radius:999px;
  display:none;
  animation:spin .8s linear infinite;
}
.btn.isLoading .btnSubmitIcon{display:none}
.btn.isLoading .btnSpinner{display:inline-block}
@keyframes spin{
  to{transform:rotate(360deg)}
}

.badge{
  background:rgba(var(--accent-rgb),.18);
  border:1px solid rgba(var(--accent-rgb),.45);
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}

.cart{
  background:var(--soft-surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
  position:sticky;
  top:82px;
  height:calc(100vh - 110px);
  overflow:auto;
}

.cartHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom:10px;
  border-bottom:1px solid var(--border);
  margin-bottom:10px;
}
.cartItems{display:flex; flex-direction:column; gap:10px; padding:4px 0 10px 0}

.cartItem{
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  background:var(--softer-surface);
}
.cartItemTop{
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.cartItemName{font-weight:800; font-size:13px}
.cartItemMeta{color:var(--muted2); font-size:12px; margin-top:2px}
.cartItemQtyRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
}

.totals{
  border-top:1px solid var(--border);
  padding-top:10px;
  margin-top:6px;
}
.row{display:flex; justify-content:space-between; gap:10px; padding:6px 0}

.checkout{
  border-top:1px solid var(--border);
  padding-top:12px;
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.checkout h3{margin:0 0 4px 0}
.field{display:flex; flex-direction:column; gap:6px}
.field span{color:var(--muted); font-size:12px; font-weight:700}
.field input{
  height:40px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--field-bg);
  color:var(--text);
  padding:0 12px;
  outline:none;
}
.field input:focus{border-color:rgba(var(--accent-rgb),.65)}

.field textarea{
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--field-bg);
  color:var(--text);
  padding:10px 12px;
  outline:none;
  resize:none;
  min-height:40px;
  overflow: hidden;
  transition: height 0.05s ease;
}
.field textarea:focus{
  border-color:rgba(var(--accent-rgb),.65);
}
.field.hasError input,
.field.hasError textarea{
  border-color:rgba(var(--danger-rgb),.78);
  box-shadow:0 0 0 3px rgba(var(--danger-rgb),.12);
}
.field input:disabled,
.field textarea:disabled{
  cursor:not-allowed;
  opacity:.72;
}

.note-counter{
  display:block;
  text-align:right;
  font-size:0.75rem;
  color: var(--counter);
  margin-top:4px;
}
.note-counter.warn{ color:var(--warn); }
.note-counter.danger{ color:var(--danger); }
.fieldHint,
.fieldError,
.privacyNote{
  font-size:12px;
  line-height:1.35;
}
.fieldHint{
  display:none;
  color:var(--muted2);
}
.fieldHint.isVisible{
  display:block;
}
.fieldError{
  display:none;
  color:var(--danger);
  font-weight:700;
}
.field.hasError .fieldError{
  display:block;
}
.privacyNote{
  margin:0;
  color:var(--muted2);
}


.status{min-height:18px; margin:4px 0 0 0; color:var(--muted)}
.status.ok{color:var(--accent2)}
.status.err{color:var(--danger)}

.footer{
  border-top:1px solid var(--border);
  background:linear-gradient(180deg, var(--topbar-bg), var(--bg));
  padding:0 18px;
}

.footerInner{
  max-width:1200px;
  margin:0 auto;
  padding:26px 0 16px;
}

.footerMain{
  display:grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items:center;
  gap:34px;
}

.footerBrand{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}

.footerLogoFrame{
  width:76px;
  height:76px;
  flex:0 0 auto;
  border-radius:0;
  border:0;
  background:none;
  padding:0;
  display:block;
  box-shadow:none;
}

.footerLogoFrame:focus-visible{
  outline:2px solid rgba(var(--accent-rgb),.72);
  outline-offset:4px;
}

.footerLogoImg{
  width:100%;
  height:100%;
  display:block;
  border-radius:0;
  object-fit:cover;
  object-position:center;
}

.footerBrandCopy{
  min-width:0;
}

.footerBrandHeader{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.footerTitle{
  color:var(--text);
  font-size:18px;
  font-weight:800;
  line-height:1.15;
}

.footerBrandBadge{
  border:1px solid rgba(var(--accent-rgb),.38);
  border-radius:999px;
  background:rgba(var(--accent-rgb),.10);
  color:var(--muted);
  padding:4px 8px;
  font-size:10px;
  font-weight:800;
  line-height:1;
  text-transform:uppercase;
}

.footerText{
  margin:5px 0 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.4;
  max-width:480px;
}

.footerDetails{
  display:grid;
  grid-template-columns: minmax(210px, auto) auto;
  align-items:start;
  gap:30px;
}

.footerBlock{
  min-width:0;
}

.footerBlockTitle{
  margin:0 0 9px 0;
  color:var(--muted2);
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.footerContact{
  display:flex;
  flex-direction:column;
  gap:6px;
  color:var(--muted);
  font-size:13px;
  font-style:normal;
  line-height:1.3;
}

.footerContact a{
  color:var(--text);
  text-decoration:none;
  font-weight:700;
}

.footerContact a:hover{
  color:var(--accent2);
}

.footerSocial{
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

.socialBtn{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--social-btn-bg);
  text-decoration:none;
  box-shadow:0 8px 18px rgba(0,0,0,.10);
  transition:border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}

.socialBtn:hover,
.socialBtn:focus{
  outline:none;
  background:rgba(var(--accent-rgb),.08);
  border-color:rgba(var(--accent-rgb),.55);
  box-shadow:0 10px 22px rgba(0,0,0,.14);
  transform:translateY(-1px);
}

.socialIcon{
  width:24px;
  height:24px;
  display:block;
  object-fit:contain;
}

.footerBottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:22px;
  padding-top:14px;
  border-top:1px solid var(--border);
  color:var(--muted2);
  font-size:11px;
  line-height:1.4;
}

.muted{color:var(--muted)}
.tiny{font-size:12px}
.small{font-size:12px}

/* Solid panels to prevent background glow bleed */
.products{ background: var(--panel); }
.cart{ background: var(--panel); }
.card{ background: var(--card); }
.cartItem{ background: var(--card); }

@media (max-width: 980px){
  .layout{grid-template-columns: 1fr; }
  .cart{position:relative; top:auto; height:auto}
  .grid{grid-template-columns: repeat(2, minmax(0, 1fr))}
  .footerMain{
    grid-template-columns:1fr;
    align-items:flex-start;
  }
  .footerDetails{
    width:100%;
    grid-template-columns:1fr auto;
  }
  .footerSocial{
    justify-content:flex-start;
  }
}
@media (max-width: 560px){
  .topbar{
    align-items:flex-start;
    flex-direction:column;
  }
  .topbarActions{
    width:100%;
    justify-content:space-between;
  }
  .themeToggle{
    flex:0 0 auto;
    width:94px;
  }
  .themeToggleTrack{
    min-height:42px;
  }
  .footer{
    padding:0 16px;
  }
  .footerBrand{
    align-items:flex-start;
    gap:12px;
  }
  .footerLogoFrame{
    width:64px;
    height:64px;
  }
  .footerLogoImg{
    border-radius:0;
  }
  .footerBrandHeader{
    gap:7px;
  }
  .footerDetails{
    grid-template-columns:1fr;
    gap:18px;
  }
  .footerBottom{
    align-items:flex-start;
    flex-direction:column;
    gap:6px;
  }
  .grid{grid-template-columns: 1fr}
}
