:root {
  --orange: #F26B1D;
  --orange-dark: #d85a12;
  --orange-soft: #fff1e8;
  --beige: #F5EDE3;
  --beige-2: #FAF6F1;
  --bg: #FAF7F3;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e8e0d6;
  --shadow: 0 4px 18px rgba(40, 20, 0, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --header-h: 64px;
  --bottom-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
  padding-bottom: calc(var(--bottom-h) + 16px);
}
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

.desktop-only { display: none !important; }
.mobile-only { display: inline-flex; }
.brand-text small.desktop-only { display: none !important; }
@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .desktop-only { display: inline-flex !important; }
  .brand-text small.desktop-only { display: block !important; }
  .search.desktop-only { display: flex !important; }
  .mobile-only, .bottom-nav { display: none !important; }
  .mobile-search { display: none !important; }
}

/* Header */
.header {
  position: sticky; top: 0; z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; min-height: var(--header-h);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none; flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.05rem; letter-spacing: 0.02em; }
.brand-text small { color: var(--muted); font-size: 0.72rem; margin-top: 2px; }
.icon-btn {
  border: 0; background: transparent; padding: 8px; border-radius: 10px; cursor: pointer;
  color: var(--text);
}
.icon-btn:hover { background: var(--beige); }

.search {
  flex: 1; display: flex; align-items: stretch;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
}
.search input {
  flex: 1; border: 0; outline: 0; padding: 10px 16px; background: transparent; min-width: 0;
}
.search button {
  border: 0; background: var(--orange); color: #fff; padding: 0 16px; cursor: pointer;
}
.search button:hover { background: var(--orange-dark); }
.mobile-search { margin: 0 16px 12px; }

.cart-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: #fff;
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.cart-btn:hover { border-color: var(--orange); }
.badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--orange); color: #fff; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Layout */
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
.view { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: none;} }

/* Category cards */
.cats {
  display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px;
}
@media (min-width: 700px) {
  .cats { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
.cat-card {
  text-align: left;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.cat-card:hover, .cat-card.active {
  border-color: var(--orange);
  background: var(--orange-soft);
  transform: translateY(-1px);
}
.cat-icon { font-size: 1.4rem; display: block; margin-bottom: 6px; }
.cat-card strong { display: block; font-size: 1rem; }
.cat-card small { color: var(--muted); }

/* Hero */
.hero {
  display: grid; gap: 0;
  background: var(--beige);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
  min-height: 180px;
}
@media (min-width: 800px) {
  .hero { grid-template-columns: 1.2fr 1fr; min-height: 240px; }
}
.hero-text { padding: 28px 24px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.hero-text h1 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.75rem); line-height: 1.25; }
.hero-text p { margin: 0 0 10px; color: var(--muted); }
.hero-art {
  min-height: 140px;
  background:
    linear-gradient(135deg, rgba(242,107,29,.15), transparent 50%),
    url('../img/lighting/topwell_1.jpg') center/cover no-repeat;
}
@media (max-width: 799px) {
  .hero-art { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 20px;
  font-weight: 600; cursor: pointer; transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; padding: 14px 20px; font-size: 1.05rem; }
.btn-ghost {
  background: #fff; border: 1px solid var(--line); color: var(--text);
}
.linkish {
  border: 0; background: transparent; color: var(--orange); font-weight: 600; cursor: pointer;
}

.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 8px 0 14px;
}
.section-head h2 { margin: 0; font-size: 1.25rem; }

/* Product grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 1000px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid transparent;
  transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-2px); border-color: var(--line); }
.card-img {
  aspect-ratio: 1; background: var(--beige-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 {
  margin: 0; font-size: .92rem; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  cursor: pointer; min-height: 2.4em;
}
.price { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.price.soon { color: var(--muted); font-weight: 600; font-size: .9rem; }
.card .btn { width: 100%; margin-top: auto; padding: 10px 12px; font-size: .9rem; border-radius: 12px; }
.tag-soon {
  display: inline-block; background: var(--beige); color: var(--muted);
  font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}

/* Pill tabs */
.pill-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}
.pill {
  flex: 0 0 auto;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
}
.pill.active { background: var(--orange); border-color: var(--orange); color: #fff; }

/* Cart */
.cart-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.cart-item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px;
  background: #fff; border-radius: var(--radius-sm); padding: 10px; box-shadow: var(--shadow);
  align-items: center;
}
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--beige); }
.cart-item h4 { margin: 0 0 4px; font-size: .92rem; }
.cart-item .meta { color: var(--muted); font-size: .85rem; }
.qty-mini { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.qty-mini button, .qty button {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-weight: 700;
}
.cart-item .remove { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.2rem; }
.empty { text-align: center; padding: 48px 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }

.checkout {
  background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.checkout h3 { margin: 18px 0 10px; font-size: 1rem; }
.checkout h3:first-child { margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.field input, .field textarea {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff;
  outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--orange); }
.pay-option {
  display: flex; align-items: center; gap: 10px;
  background: var(--beige); border-radius: 12px; padding: 12px 14px; font-weight: 600;
}
.pay-option input { accent-color: var(--orange); width: 18px; height: 18px; }
.hint { color: var(--muted); font-size: .85rem; margin: 8px 0 16px; }
.total-row {
  display: flex; justify-content: space-between; align-items: center;
  margin: 8px 0 14px; font-size: 1.1rem;
}
.privacy { text-align: center; color: var(--muted); font-size: .75rem; margin: 10px 0 0; }

.thanks {
  text-align: center; background: #fff; border-radius: var(--radius);
  padding: 48px 24px; box-shadow: var(--shadow); margin-top: 24px;
}
.thanks-icon { font-size: 2.5rem; margin-bottom: 8px; }

/* Footer */
.footer {
  max-width: 1100px; margin: 24px auto 16px; padding: 0 16px 24px;
}
.footer-tg {
  background: var(--beige);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow);
}
.tg-left { display: flex; gap: 12px; align-items: center; }
.tg-logo {
  width: 44px; height: 44px; border-radius: 12px; background: #2AABEE; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.tg-left strong { display: block; }
.tg-left p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.tg-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tg-links a {
  background: #fff; border-radius: 999px; padding: 8px 14px;
  color: var(--text); font-weight: 600; font-size: .85rem;
  border: 1px solid var(--line); text-decoration: none;
}
.tg-links a:hover { border-color: var(--orange); color: var(--orange); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-top: 14px; color: var(--muted); font-size: .85rem; padding: 0 4px;
}

/* Bottom nav */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  height: var(--bottom-h);
  background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
}
.bnav {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; background: transparent; color: var(--muted); font-size: .7rem; cursor: pointer;
  text-decoration: none;
}
.bnav.active, .bnav:hover { color: var(--orange); }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 700px) {
  .modal { align-items: center; padding: 24px; }
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.modal-sheet {
  position: relative; z-index: 1;
  background: #fff; width: min(720px, 100%);
  max-height: 92vh; overflow: auto;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,.2);
  display: grid;
}
@media (min-width: 700px) {
  .modal-sheet {
    border-radius: 20px;
    grid-template-columns: 1fr 1fr;
  }
}
.modal-close {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.9); font-size: 1.4rem; cursor: pointer;
}
.modal-gallery { background: var(--beige-2); }
.modal-gallery > img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.thumbs button {
  border: 2px solid transparent; padding: 0; border-radius: 10px; overflow: hidden;
  width: 56px; height: 56px; cursor: pointer; background: #fff; flex-shrink: 0;
}
.thumbs button.active { border-color: var(--orange); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 18px; }
.modal-body h2 { margin: 0 0 8px; font-size: 1.2rem; }
.modal-price { font-size: 1.35rem; font-weight: 800; margin-bottom: 10px; color: var(--orange); }
.specs { padding-left: 18px; margin: 10px 0 16px; color: var(--muted); }
.specs li { margin-bottom: 4px; }
.modal-actions { display: flex; gap: 12px; align-items: center; }
.qty { display: inline-flex; align-items: center; gap: 8px; background: var(--beige); border-radius: 12px; padding: 4px 8px; }
.qty span { min-width: 24px; text-align: center; font-weight: 700; }
.modal-actions .btn { flex: 1; }
.soon-note { color: var(--muted); font-size: .9rem; margin-top: 10px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--bottom-h) + 16px); transform: translateX(-50%);
  z-index: 80; background: #1a1a1a; color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: .9rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
@media (min-width: 860px) {
  .toast { bottom: 24px; }
}


/* Catalog controls */
.muted { color: var(--muted); font-size: .9rem; }
.catalog-controls { margin-bottom: 14px; }
.subfilters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.subchip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: .82rem; font-weight: 600; cursor: pointer;
}
.subchip.active { background: var(--orange-soft); border-color: var(--orange); color: var(--orange-dark); }
.sort-row label { font-size: .85rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.sort-row select {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff;
}
.pager {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center;
  margin: 20px 0 8px;
}
.pager button {
  min-width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-weight: 600;
}
.pager button.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager .pg-info { color: var(--muted); font-size: .85rem; margin: 0 6px; }

.leather-panel {
  text-align: center; background: #fff; border-radius: 20px; padding: 36px 20px;
  box-shadow: var(--shadow); margin: 8px 0 24px;
}
.leather-logo {
  width: min(220px, 70%); aspect-ratio: 1; object-fit: cover; border-radius: 16px;
  margin: 0 auto 16px; box-shadow: var(--shadow);
}
.leather-panel h3 { margin: 0 0 8px; font-size: 1.35rem; }
.leather-panel p { color: var(--muted); margin: 0 0 18px; }

.card-img img { background: var(--beige-2); }
