:root {
  --bg: #efe1d4;
  --bg-soft: #f7f0e9;
  --surface: #fff8f1;
  --surface-2: #eadccc;
  --ink: #211712;
  --muted: #74645a;
  --primary: #9a704f;
  --primary-dark: #6f4a34;
  --accent: #d9c1a9;
  --line: rgba(48, 32, 24, 0.11);
  --danger: #d84a4a;
  --success: #0ba34a;
  --warning: #e88926;
  --shadow: 0 28px 80px rgba(72, 47, 30, 0.16);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Tahoma, Arial, sans-serif;
  letter-spacing: 0;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
}

.boot-screen img {
  width: min(360px, 70vw);
}

.top-strip {
  height: 10px;
  background: #2f3849;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 58px);
  background: rgba(239, 225, 212, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 44px);
  font-weight: 900;
}

.nav a {
  padding: 10px 0;
}

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

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 12px;
  position: relative;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.45);
}

.cart-badge {
  position: absolute;
  top: 4px;
  left: 2px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.container {
  width: min(1240px, calc(100% - 40px));
  margin-inline: auto;
}

.hero {
  position: relative;
  min-height: calc(100vh - 102px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(239, 225, 212, 0.2), rgba(239, 225, 212, 0.82) 58%, rgba(239, 225, 212, 0.94));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100% - 40px));
  margin-inline: auto;
  text-align: right;
  padding: 40px 0;
}

.eyebrow {
  color: var(--primary);
  font-weight: 900;
  margin: 0 0 12px;
}

.hero h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 1.06;
  font-weight: 900;
}

.hero p:not(.eyebrow) {
  margin: 20px 0 32px;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.9;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 14px;
  padding: 12px 22px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(111, 74, 52, 0.22);
}

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

.btn.ghost {
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  box-shadow: none;
  border: 1px solid var(--line);
}

.btn.danger {
  background: var(--danger);
}

.btn:disabled {
  opacity: 0.65;
  cursor: progress;
}

.section {
  padding: 78px 0;
}

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

.section-head h2,
.page-title h1,
.admin-main h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
}

.section-head p,
.page-title p,
.admin-main p {
  color: var(--muted);
  line-height: 1.8;
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(18px, 3vw, 38px);
}

.category-card {
  width: min(210px, 42vw);
  text-align: center;
  font-weight: 900;
}

.category-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid transparent;
  transition: 0.25s ease;
  box-shadow: var(--shadow);
}

.category-card:hover img {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.category-card span {
  display: block;
  margin-top: 16px;
  font-size: 18px;
}

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

.product-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(72, 47, 30, 0.08);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1.08;
  object-fit: cover;
}

.product-body {
  padding: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.product-card h3 {
  margin: 14px 0 8px;
  font-size: 21px;
}

.product-card p {
  color: var(--muted);
  min-height: 48px;
  line-height: 1.7;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.price {
  color: var(--primary-dark);
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}

.about-band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 46px;
  align-items: center;
}

.about-layout img {
  border-radius: 36px;
  box-shadow: var(--shadow);
}

.about-layout h2 {
  font-size: clamp(32px, 5vw, 58px);
  margin: 0 0 18px;
}

.about-layout p {
  color: var(--muted);
  line-height: 2;
  font-size: 18px;
}

.footer {
  padding: 42px 0;
  background: #211712;
  color: #fff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.page-wrap {
  padding: 70px 0;
  min-height: calc(100vh - 102px);
}

.filters {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 16px;
  margin-bottom: 26px;
}

.filter-btn {
  min-height: 42px;
  white-space: nowrap;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 900;
}

.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 248, 241, 0.65);
  padding: 36px;
  text-align: center;
  color: var(--muted);
  font-weight: 900;
}

.cart-panel,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(25, 18, 14, 0.42);
  backdrop-filter: blur(5px);
}

.cart-drawer {
  position: fixed;
  z-index: 90;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(430px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.drawer-head,
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.cart-lines {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

.cart-line {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line img {
  width: 66px;
  height: 66px;
  object-fit: cover;
  border-radius: 18px;
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 4px;
  margin-top: 8px;
}

.qty button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.drawer-foot {
  padding: 20px;
  border-top: 1px solid var(--line);
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 16px;
}

.checkout-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

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

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

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 900;
  font-size: 14px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  padding: 10px 14px;
  color: var(--ink);
  outline: none;
}

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

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(154, 112, 79, 0.14);
}

.toast {
  position: fixed;
  z-index: 130;
  left: 22px;
  bottom: 22px;
  width: min(360px, calc(100% - 44px));
  padding: 16px 18px;
  border-radius: 18px;
  color: #fff;
  background: #211712;
  box-shadow: var(--shadow);
  font-weight: 900;
}

.toast.success {
  background: #167347;
}

.toast.error {
  background: #b43434;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: radial-gradient(circle at 50% 20%, #f8eee5, var(--bg));
}

.login-card {
  width: min(480px, 100%);
  padding: 46px;
  border-radius: 44px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.login-card img {
  width: 82px;
  margin: 0 auto 22px;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px 1fr;
  background: var(--bg-soft);
}

.admin-sidebar {
  border-left: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 24px;
}

.admin-logo {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 36px;
}

.admin-logo img {
  width: 82px;
}

.admin-nav {
  display: grid;
  gap: 10px;
}

.admin-nav a,
.admin-nav button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 900;
  text-align: right;
}

.admin-nav a.active,
.admin-nav a:hover,
.admin-nav button:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 28px rgba(111, 74, 52, 0.2);
}

.admin-main {
  padding: 34px 38px 80px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 44px;
}

.search {
  width: min(460px, 100%);
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 10px 18px;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0;
}

.stat-card,
.admin-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(72, 47, 30, 0.07);
}

.stat-card {
  padding: 24px;
}

.stat-card span {
  color: var(--muted);
  font-weight: 900;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
}

.admin-card {
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 18px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: middle;
}

.table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}

.product-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.product-mini img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 14px;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.small-btn {
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 900;
}

.small-btn:hover {
  background: var(--surface-2);
}

.modal {
  position: fixed;
  z-index: 100;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100% - 32px));
  max-height: min(90vh, 900px);
  overflow: auto;
  border-radius: 34px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-body {
  padding: 24px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--line);
  background: rgba(239, 225, 212, 0.58);
}

.image-preview {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.content-grid {
  display: grid;
  gap: 22px;
}

.admin-card.pad {
  padding: 24px;
}

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

.category-admin-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-soft);
}

.category-admin-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 12px;
}

.orders-list {
  display: grid;
  gap: 14px;
}

.order-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  margin-top: 8px;
}

@media (max-width: 980px) {
  .product-grid,
  .about-layout,
  .admin-stat-grid,
  .form-grid,
  .category-admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-logo {
    margin-bottom: 18px;
  }

  .admin-nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .admin-main {
    padding: 28px 18px 72px;
  }

  .site-header {
    height: auto;
    padding: 14px 18px;
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 20px;
    padding-top: 10px;
    font-size: 14px;
  }
}

@media (max-width: 680px) {
  .hero {
    align-items: end;
    min-height: 78vh;
  }

  .hero-content {
    text-align: center;
  }

  .actions,
  .section-head,
  .footer-inner,
  .admin-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-nav {
    grid-template-columns: 1fr 1fr;
  }

  .table {
    min-width: 760px;
  }

  .admin-card {
    overflow-x: auto;
  }

  .login-card {
    padding: 32px 22px;
  }
}
