:root {
  --bg: #f2efe7;
  --bg-soft: #fbf8f1;
  --surface: rgba(255, 251, 244, 0.92);
  --surface-strong: #fffdf7;
  --surface-muted: #efe7d6;
  --surface-dark: #1d2c29;
  --text: #182320;
  --muted: #6d786f;
  --border: rgba(24, 35, 32, 0.09);
  --accent: #bb5b26;
  --accent-strong: #d67d36;
  --accent-soft: rgba(187, 91, 38, 0.12);
  --accent-deep: #7d3412;
  --success: #17694d;
  --danger: #a7342b;
  --radius-xl: 6px;
  --radius-lg: 6px;
  --radius-md: 6px;
  --radius-sm: 6px;
  --shadow-lg: 0 28px 60px rgba(28, 31, 28, 0.11);
  --shadow-md: 0 18px 38px rgba(28, 31, 28, 0.09);
  --shadow-sm: 0 12px 22px rgba(28, 31, 28, 0.06);
  --sidebar-width: 352px;
}

body[data-theme="dark"] {
  --bg: #101816;
  --bg-soft: #16211e;
  --surface: rgba(17, 25, 23, 0.92);
  --surface-strong: #18211f;
  --surface-muted: #22302c;
  --surface-dark: #0b1311;
  --text: #ebf3ef;
  --muted: #93a39d;
  --border: rgba(190, 213, 205, 0.12);
  --accent: #f08a4b;
  --accent-strong: #ffb169;
  --accent-soft: rgba(240, 138, 75, 0.15);
  --accent-deep: #ffcf9d;
  --success: #52d2a0;
  --danger: #ff8f81;
  --shadow-lg: 0 28px 60px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 18px 38px rgba(0, 0, 0, 0.28);
  --shadow-sm: 0 12px 22px rgba(0, 0, 0, 0.2);
}

body[data-theme="goldish"] {
  --accent: #a97b12;
  --accent-strong: #d0a93b;
  --accent-soft: rgba(169, 123, 18, 0.14);
}

body[data-theme="pink"] {
  --accent: #b44168;
  --accent-strong: #db668d;
  --accent-soft: rgba(180, 65, 104, 0.14);
}

body[data-theme="brownish"] {
  --accent: #87553a;
  --accent-strong: #bf7a4f;
  --accent-soft: rgba(135, 85, 58, 0.14);
}

body[data-theme="oceaning"] {
  --accent: #0a7f8f;
  --accent-strong: #2eb6c4;
  --accent-soft: rgba(10, 127, 143, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(214, 125, 54, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(23, 105, 77, 0.08), transparent 32%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Ubuntu", "Trebuchet MS", "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.disabled-link {
  pointer-events: none;
  opacity: 0.56;
}

.store-app {
  min-height: 100vh;
}

.utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 28px;
  background: var(--surface-dark);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.83rem;
}

.utility-links,
.utility-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.immersive-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  align-items: start;
}

.shop-sidebar {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
}

.sidebar-scroll {
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding-right: 6px;
}

.shop-profile-card,
.content-section,
.showcase-card,
.topbar,
.hero-shell,
.status-ribbon-card,
.drawer-panel,
.theme-panel,
.analytics-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.shop-profile-card {
  padding: 20px;
  display: grid;
  gap: 18px;
}

.shop-profile-head,
.sidebar-section-head,
.section-head,
.drawer-head,
.theme-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-brand {
  align-items: flex-start;
}

.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 16px 28px rgba(187, 91, 38, 0.24);
}

.brand-name {
  font-size: 1.08rem;
  font-weight: 700;
}

.brand-subtitle,
.helper-text,
.section-head p,
.status-note,
.footer-links,
.product-card p,
.empty-state p,
.product-detail-copy p,
.hero-metric-card small,
.detail-row span {
  color: var(--muted);
}

.status-pill {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.status-pill.live {
  background: rgba(23, 105, 77, 0.14);
  color: var(--success);
}

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

.profile-stat,
.hero-metric-card,
.category-feature-card,
.buyers-card,
.cart-item,
.checkout-summary,
.empty-state,
.product-card,
.theme-option,
.category-rail-link,
.status-ribbon-card {
  border: 1px solid var(--border);
  background: var(--surface-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.profile-stat {
  padding: 12px;
  display: grid;
  gap: 6px;
}

.profile-stat span,
.hero-metric-card span,
.strip-label,
.detail-row span,
.section-mini,
.eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--accent);
}

.sidebar-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid var(--border);
}

.sidebar-section-accent {
  background: linear-gradient(160deg, rgba(187, 91, 38, 0.08), rgba(255, 255, 255, 0.35));
}

.sidebar-section h3,
.section-head h2,
.drawer-head h2,
.theme-panel h3 {
  margin: 6px 0 0;
}

.detail-list,
.category-list,
.theme-list,
.product-view,
.cart-items,
.checkout-summary {
  display: grid;
  gap: 10px;
}

.detail-row,
.metric-row,
.product-meta-row,
.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-row.stacked {
  display: grid;
  justify-content: start;
}

.detail-row a,
.detail-row strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
}

.category-chip {
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--muted);
  border-radius: 6px;
  padding: 9px 12px;
}

.category-chip.active {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
}

.field,
.checkout-form {
  display: grid;
  gap: 10px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 600;
}

.searchbar input,
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  background: var(--surface-strong);
  color: var(--text);
}

.searchbar input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid rgba(187, 91, 38, 0.18);
  border-color: rgba(187, 91, 38, 0.42);
}

.btn,
.cart-button,
.icon-button,
.category-chip,
.theme-option {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn,
.cart-button,
.theme-option {
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.btn {
  padding: 12px 16px;
}

.btn:hover,
.cart-button:hover,
.icon-button:hover,
.theme-option:hover,
.category-chip:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  box-shadow: 0 16px 26px rgba(187, 91, 38, 0.24);
}

.btn-secondary {
  background: var(--surface-muted);
  color: var(--text);
  border-color: var(--border);
}

.btn-block {
  width: 100%;
}

.icon-button {
  min-width: 42px;
  min-height: 42px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--muted);
}

.sidebar-actions,
.hero-actions,
.hero-trust,
.product-actions,
.product-inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.store-main {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 24px;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(300px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
}

.topbar-brand {
  min-width: 0;
}

.searchbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  background: var(--surface-strong);
  border-color: var(--border);
  color: var(--text);
}

.cart-button strong {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.9fr);
  gap: 20px;
  padding: 20px;
  overflow: hidden;
}

.hero-copy-panel {
  display: grid;
  gap: 18px;
  align-content: start;
}

.hero-copy-panel h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 4.3rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.hero-copy-panel p {
  margin: 0;
  max-width: 56ch;
  font-size: 1.02rem;
  line-height: 1.6;
}

.hero-trust {
  margin-top: -2px;
}

.trust-chip {
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text);
}

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

.hero-metric-card {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.hero-metric-card strong {
  font-size: 1.45rem;
  line-height: 1.08;
}

.hero-metric-card.emphasis {
  background: linear-gradient(140deg, var(--surface-dark) 0%, #2f4c42 100%);
  color: #fff;
  border-color: transparent;
}

.hero-metric-card.emphasis small,
.hero-metric-card.emphasis span {
  color: rgba(255, 255, 255, 0.74);
}

.hero-visual-panel {
  min-height: 100%;
  border-radius: 6px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 36%),
    linear-gradient(160deg, rgba(29, 44, 41, 0.97) 0%, rgba(125, 52, 18, 0.88) 100%);
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 24px;
  min-height: 420px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hero-visual-panel.with-image {
  background-position: center;
  background-size: cover;
}

.hero-visual-panel.with-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 19, 17, 0.08) 0%, rgba(11, 19, 17, 0.62) 100%);
}

.hero-visual-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
}

.hero-visual-mark {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  font-size: 1.5rem;
  font-weight: 700;
}

.hero-visual-overlay strong {
  display: block;
  font-size: 1.35rem;
}

.hero-visual-overlay span {
  color: rgba(255, 255, 255, 0.74);
}

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

.status-ribbon-card {
  padding: 16px 18px;
  display: grid;
  gap: 6px;
}

.status-ribbon-card strong {
  font-size: 1.05rem;
}

.content-section,
.showcase-card {
  padding: 20px;
}

.section-head {
  margin-bottom: 16px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
}

.category-rail,
.category-feature-grid,
.product-grid,
.catalog-grid,
.dual-showcase,
.analytics-strip {
  display: grid;
  gap: 16px;
}

.category-rail {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.category-rail-link {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.category-rail-link.active {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

.analytics-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analytics-card {
  padding: 18px 20px;
  display: grid;
  gap: 8px;
}

.strip-value {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
}

.category-feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.category-feature-card {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.category-feature-card span {
  color: var(--muted);
}

.category-feature-card button {
  justify-self: start;
}

.dual-showcase {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.showcase-card {
  min-width: 0;
}

.product-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.catalog-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.product-card {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.product-card-media,
.product-hero-media {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(140deg, rgba(187, 91, 38, 0.08) 0%, rgba(29, 44, 41, 0.06) 100%);
  display: grid;
  place-items: center;
}

.product-card-media img,
.product-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-art {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--muted);
}

.product-summary {
  display: grid;
  gap: 8px;
}

.product-card h3,
.product-detail-copy h2,
.cart-item h4,
.empty-state h3 {
  margin: 0;
}

.price-tag {
  font-size: 1.15rem;
  font-weight: 700;
}

.stock-pill,
.info-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 11px;
  border-radius: 6px;
  font-size: 0.8rem;
}

.stock-pill.in {
  background: rgba(23, 105, 77, 0.12);
  color: var(--success);
}

.stock-pill.out {
  background: rgba(167, 52, 43, 0.1);
  color: var(--danger);
}

.info-pill {
  background: var(--surface-muted);
  color: var(--muted);
  border: 1px solid var(--border);
}

.product-actions .btn,
.product-inline-actions .btn {
  flex: 1;
}

.pagination-bar {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

.drawer.open {
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 10, 0.52);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.drawer-panel {
  position: absolute;
  padding: 22px;
  overflow: auto;
}

.drawer-right .drawer-panel {
  top: 0;
  right: 0;
  width: min(560px, 100%);
  height: 100%;
  transform: translateX(103%);
  transition: transform 0.24s ease;
}

.drawer-center .drawer-panel {
  top: 50%;
  left: 50%;
  width: min(760px, calc(100vw - 26px));
  max-height: calc(100vh - 36px);
  transform: translate(-50%, -42%);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.drawer.open .drawer-backdrop {
  opacity: 1;
}

.drawer-right.open .drawer-panel {
  transform: translateX(0);
}

.drawer-center.open .drawer-panel {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.product-detail-grid {
  display: grid;
  gap: 20px;
}

.product-detail-copy,
.product-meta {
  display: grid;
  gap: 14px;
}

.qty-control {
  display: inline-grid;
  grid-template-columns: auto minmax(56px, 76px) auto;
  gap: 6px;
  align-items: center;
}

.qty-control button {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
}

.qty-control input {
  text-align: center;
  border-radius: 6px;
  border: 1px solid var(--border);
  padding: 10px;
  background: var(--surface-strong);
  color: var(--text);
}

.cart-item,
.checkout-summary,
.empty-state {
  padding: 16px;
}

.cart-item {
  display: grid;
  gap: 12px;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
}

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

.empty-state {
  text-align: center;
}

.theme-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  border: 0;
  border-radius: 6px;
  padding: 14px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 18px 28px rgba(187, 91, 38, 0.24);
}

.theme-panel {
  position: fixed;
  right: 22px;
  bottom: 86px;
  z-index: 79;
  width: min(320px, calc(100vw - 32px));
  padding: 18px;
}

.theme-option {
  width: 100%;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.theme-option.active {
  border-color: rgba(187, 91, 38, 0.35);
  background: var(--accent-soft);
}

.theme-swatch {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 96px;
  z-index: 82;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 280px;
  max-width: 380px;
  padding: 14px 16px;
  border-radius: 6px;
  color: #fff;
  background: #17211f;
  box-shadow: 0 20px 38px rgba(8, 11, 10, 0.32);
}

.toast.success {
  background: #0f6b48;
}

.toast.error {
  background: #9f2e2b;
}

.store-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 0 6px 10px;
  color: var(--muted);
}

.store-footer strong {
  color: var(--text);
  margin-right: 10px;
}

.mobile-only {
  display: none;
}

@media (max-width: 1240px) {
  .immersive-shell {
    grid-template-columns: 1fr;
  }

  .shop-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(390px, 100%);
    max-height: 100vh;
    z-index: 70;
    transform: translateX(-103%);
    transition: transform 0.24s ease;
  }

  .shop-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scroll {
    max-height: 100vh;
    padding: 20px 14px 20px 20px;
    background: var(--bg);
  }

  .mobile-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .topbar {
    top: 16px;
  }
}

@media (max-width: 1080px) {
  .hero-shell,
  .dual-showcase,
  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics-grid,
  .status-ribbon,
  .analytics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .utility-bar {
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .immersive-shell {
    padding: 16px;
  }

  .topbar {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .searchbar,
  .hero-actions,
  .product-actions,
  .product-inline-actions,
  .cart-item-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-metrics-grid,
  .status-ribbon,
  .analytics-strip,
  .profile-stat-grid {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .catalog-grid,
  .category-feature-grid,
  .category-rail {
    grid-template-columns: 1fr;
  }

  .theme-fab,
  .theme-panel,
  .toast-stack {
    right: 16px;
  }
}
