:root {
  --bg: #f7f3ec;
  --surface: #fffaf2;
  --surface-2: #ece4d7;
  --ink: #181716;
  --muted: #67615a;
  --line: #ded3c4;
  --brand: #0f766e;
  --brand-2: #ef5d5d;
  --accent: #e0a458;
  --shadow: 0 18px 45px rgba(24, 23, 22, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="women"] {
  --bg: #f9f1f4;
  --surface: #fff9fb;
  --surface-2: #f0dfe7;
  --ink: #1e1720;
  --muted: #715f68;
  --line: #ead3dd;
  --brand: #b83280;
  --brand-2: #0f766e;
  --accent: #d99a3f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

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

.site {
  min-height: 100vh;
}

.topbar {
  background: var(--ink);
  color: var(--surface);
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 8px 18px;
  font-size: 13px;
  flex-wrap: wrap;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0;
  font-size: 21px;
}

.brand-mark {
  width: 36px;
  aspect-ratio: 1;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--surface);
  font-weight: 900;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link,
.icon-btn,
.theme-pill,
.primary-btn,
.secondary-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 40px;
  transition: 0.18s ease;
}

.nav-link {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav-link.active,
.nav-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}

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

.theme-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}

.theme-pill {
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
  min-height: 34px;
  font-size: 13px;
  font-weight: 800;
}

.theme-pill.active {
  background: var(--ink);
  color: var(--surface);
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  font-size: 18px;
}

.cart-count {
  position: absolute;
  top: -7px;
  right: -6px;
  width: 21px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-2);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 70px;
}

.hero {
  min-height: min(680px, calc(100vh - 98px));
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 34px;
  align-items: center;
  padding: 28px 0 44px;
}

.hero-copy {
  display: grid;
  gap: 20px;
}

.eyebrow {
  width: fit-content;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: 0;
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.hero-actions,
.row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  font-weight: 900;
}

.primary-btn {
  background: var(--ink);
  color: var(--surface);
}

.primary-btn:hover {
  background: var(--brand);
}

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

.secondary-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.hero-media {
  position: relative;
  min-height: 520px;
}

.hero-image {
  position: absolute;
  inset: 0 0 40px 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-image img,
.product-image img,
.blog-image img,
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-stat {
  position: absolute;
  right: 20px;
  bottom: 0;
  width: min(260px, calc(100% - 40px));
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  padding: 18px;
  display: grid;
  gap: 8px;
}

.hero-stat strong {
  font-size: 30px;
}

.section {
  padding: 44px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 20px;
}

.section-head h2,
.page-title h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.section-head p,
.page-title p {
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.55;
}

.grid {
  display: grid;
  gap: 16px;
}

.category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card,
.product-card,
.blog-card,
.policy-box,
.support-card,
.checkout-box,
.summary-box,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-card {
  min-height: 160px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  position: relative;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.52));
}

.category-card > * {
  position: relative;
  color: white;
}

.product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  overflow: hidden;
  display: grid;
  grid-template-rows: 250px auto;
}

.product-image {
  position: relative;
  background: var(--surface-2);
  border: 0;
  padding: 0;
  text-align: left;
}

.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
}

.product-info {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.price {
  font-size: 20px;
  font-weight: 900;
}

.stars {
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}

.filters {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) repeat(3, minmax(150px, 180px));
  gap: 10px;
  margin: 24px 0;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  min-height: 42px;
  padding: 10px 12px;
  outline: none;
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.55fr);
  gap: 20px;
}

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

.blog-card {
  overflow: hidden;
}

.blog-image {
  height: 210px;
}

.blog-body,
.policy-box,
.support-card,
.checkout-box,
.summary-box,
.contact-card {
  padding: 18px;
}

.blog-body {
  display: grid;
  gap: 10px;
}

.muted {
  color: var(--muted);
  line-height: 1.55;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: center;
}

.about-image {
  height: 460px;
  border-radius: 8px;
  overflow: hidden;
}

.stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.mini-stat {
  border-top: 3px solid var(--brand);
  padding-top: 12px;
}

.mini-stat strong {
  display: block;
  font-size: 28px;
}

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

.cart-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.cart-item img {
  width: 86px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty button {
  width: 34px;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 900;
}

.summary-box {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.summary-line.total {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.checkout-form {
  display: grid;
  gap: 14px;
}

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

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--surface);
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 800;
  box-shadow: var(--shadow);
  z-index: 30;
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--surface);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: color-mix(in srgb, var(--surface) 75%, transparent);
}

.empty {
  padding: 36px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.mobile-tabbar {
  display: none;
}

.product-open {
  width: 100%;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 0.72fr);
  gap: 28px;
  align-items: start;
}

.gallery {
  display: grid;
  gap: 10px;
}

.gallery-main {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-2);
}

.gallery-main img,
.gallery-thumbs img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.gallery-thumbs button {
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.detail-copy {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

.rich-content {
  color: var(--muted);
  line-height: 1.65;
}

.admin-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.login-wrap {
  min-height: calc(100vh - 260px);
  display: grid;
  place-items: center;
  padding: 34px 0;
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-sidebar,
.admin-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.admin-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 8px;
}

.admin-tab {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 10px 12px;
  text-align: left;
  text-transform: capitalize;
  font-weight: 800;
}

.admin-tab.active,
.admin-tab:hover {
  background: var(--ink);
  color: var(--surface);
}

.admin-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0;
}

.admin-metrics strong {
  display: block;
  font-size: 34px;
}

.cms-form {
  display: grid;
  gap: 14px;
}

.cms-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
}

.cms-item summary {
  cursor: pointer;
  font-weight: 900;
  margin-bottom: 12px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  font-weight: 800;
}

.toggle-row input {
  width: 20px;
  aspect-ratio: 1;
}

.editor-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.editor-tools button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  min-height: 34px;
  padding: 6px 10px;
  font-weight: 800;
}

.rich-editor {
  min-height: 130px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
  line-height: 1.55;
  outline: none;
}

.rich-editor:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

@media (max-width: 930px) {
  .nav {
    grid-template-columns: 1fr;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .actions {
    justify-content: space-between;
  }

  .hero,
  .two-col,
  .about-layout,
  .product-detail,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar,
  .detail-copy {
    position: static;
  }

  .hero-media {
    min-height: 430px;
  }

  .category-grid,
  .product-grid,
  .blog-grid,
  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .topbar {
    justify-content: flex-start;
    gap: 10px;
  }

  .page {
    padding-inline: 14px;
  }

  .hero {
    padding-top: 12px;
  }

  .hero-media {
    min-height: 360px;
  }

  .category-grid,
  .product-grid,
  .blog-grid,
  .filters,
  .form-grid,
  .stat-grid,
  .footer-inner,
  .admin-metrics,
  .gallery-thumbs {
    grid-template-columns: 1fr;
  }

  body {
    padding-bottom: 72px;
  }

  .header {
    top: 0;
  }

  .nav-links {
    display: none;
  }

  .nav {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .actions {
    width: 100%;
  }

  .mobile-tabbar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
  }

  .mobile-tabbar a,
  .mobile-tabbar button {
    display: grid;
    place-items: center;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
  }

  .mobile-tabbar a:hover,
  .mobile-tabbar button:hover {
    background: var(--surface-2);
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .admin-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-card {
    grid-template-rows: 280px auto;
  }

  .cart-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .cart-item img {
    width: 72px;
  }

  .cart-item .qty {
    grid-column: 2;
  }
}
