:root {
  --bg: #fff8f1;
  --surface: #ffffff;
  --text: #202020;
  --muted: #666;
  --primary: #ff6b00;
  --primary-dark: #d95700;
  --border: #eee1d5;
  --success: #0d8c4b;
  --shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: linear-gradient(135deg, #fff1e6, #ffffff);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  transition: transform 0.28s ease, box-shadow 0.28s ease, padding 0.28s ease, background 0.28s ease;
}

.header-row,
.filters-row,
.hero-grid,
.section-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.header-row {
  padding: 18px 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.logo-box {
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  border-radius: 24px;
  object-fit: contain;
  transition: width 0.28s ease, height 0.28s ease, flex-basis 0.28s ease, border-radius 0.28s ease;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  color: var(--primary-dark);
}

.site-header h1,
.hero h2,
.section-head h3 {
  margin: 0;
}

.site-header h1 {
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.95;
  transition: font-size 0.28s ease;
}

.tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2.6vw, 28px);
  line-height: 1.2;
  transition: opacity 0.22s ease, max-height 0.28s ease, margin 0.28s ease, font-size 0.28s ease;
}

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

.cart-button,
.primary-button,
.secondary-button,
.icon-button {
  border: none;
  cursor: pointer;
  border-radius: 14px;
}

.cart-button,
.primary-button {
  background: var(--primary);
  color: #fff;
  padding: 12px 18px;
  font-weight: bold;
}

.cart-button:hover,
.primary-button:hover {
  background: var(--primary-dark);
}

.catalog-button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 18px;
  font-weight: bold;
}

.catalog-button:hover {
  border-color: #d7c1ac;
  background: #fff3e7;
}

.hero {
  padding: 26px 0 24px;
}

.hero-grid {
  align-items: stretch;
}

.hero-card,
.product-card,
.cart-panel,
.filters,
.empty-state {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 20px;
}

.hero-card {
  padding: 24px;
  min-width: 280px;
}

.pill {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: #ffe3ce;
  color: var(--primary-dark);
  font-weight: bold;
  margin-bottom: 10px;
}

.filters {
  padding: 14px;
  margin-bottom: 24px;
}

.filters input,
.filters select,
.checkout-form input,
.checkout-form select,
.checkout-form textarea,
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d8d8d8;
  font-size: 14px;
}

.filters-row > * {
  flex: 1;
}

.catalog {
  padding-bottom: 40px;
}

.hero-anchor {
  scroll-margin-top: 110px;
}

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

.product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.product-title {
  font-size: 18px;
  font-weight: bold;
}

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

.price {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-dark);
}

.old-price {
  color: #999;
  text-decoration: line-through;
  font-size: 14px;
}

.stock {
  font-size: 13px;
  color: var(--muted);
}

.cart-drawer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: flex-end;
  z-index: 60;
}

.cart-panel {
  width: min(450px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  border-radius: 0;
}

.cart-header,
.cart-total,
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0;
}

.cart-item {
  padding: 14px;
  background: #fff5ee;
  border-radius: 14px;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-text {
  min-height: 20px;
  font-size: 14px;
  color: var(--success);
}

.hidden {
  display: none !important;
}

.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
}

.admin-sidebar {
  background: #1b1b1b;
  color: #fff;
  padding: 24px;
}

.admin-content {
  padding: 24px;
}

.admin-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

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

.admin-form .full {
  grid-column: 1 / -1;
}

.table-wrap {
  overflow-x: auto;
}

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

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  text-align: left;
  font-size: 14px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #ffe3ce;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header.is-compact {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

@media (max-width: 900px) {
  .hero-grid,
  .header-row,
  .filters-row,
  .admin-shell {
    flex-direction: column;
    display: flex;
  }

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

  .site-header {
    position: sticky;
    top: 0;
    background: rgba(255, 248, 241, 0.97);
    backdrop-filter: blur(10px);
  }

  .header-row {
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0 12px;
  }

  .header-brand {
    width: 100%;
    gap: 12px;
  }

  .logo-box {
    width: 74px;
    height: 74px;
    flex-basis: 74px;
    border-radius: 20px;
  }

  .site-header h1 {
    font-size: 34px;
    line-height: 0.95;
    max-width: 220px;
  }

  .tagline {
    font-size: 17px;
    margin-top: 10px;
    max-width: 420px;
  }

  .header-actions {
    width: 100%;
    gap: 10px;
    justify-content: space-between;
  }

  .header-actions .cart-button,
  .header-actions .catalog-button {
    flex: 1;
    padding: 12px 16px;
    min-height: 52px;
    font-size: 16px;
    border-radius: 18px;
  }

  .hero {
    padding-top: 16px;
  }

  .hero-grid {
    gap: 14px;
  }

  .hero-grid > :first-child {
    display: none;
  }

  .hero-card {
    width: 100%;
    min-width: 0;
    padding: 18px;
    border-radius: 22px;
  }

  .site-header.is-compact .header-row {
    padding: 8px 0;
    gap: 10px;
  }

  .site-header.is-compact .logo-box {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    border-radius: 16px;
  }

  .site-header.is-compact .eyebrow {
    font-size: 10px;
    margin-bottom: 2px;
  }

  .site-header.is-compact h1 {
    font-size: 24px;
    max-width: 170px;
  }

  .site-header.is-compact .tagline {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    font-size: 0;
  }

  .site-header.is-compact .header-actions .catalog-button {
    display: none;
  }

  .site-header.is-compact .header-actions {
    justify-content: flex-end;
  }

  .site-header.is-compact .header-actions .cart-button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 10px 14px;
    font-size: 15px;
    border-radius: 14px;
  }

  .site-header.is-compact + main .hero,
  .site-header.is-hidden + main .hero {
    padding-top: 8px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100%, calc(100% - 20px));
  }

  .header-row {
    gap: 12px;
  }

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

  .logo-box {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    margin-bottom: 8px;
  }

  .site-header h1 {
    font-size: 28px;
    max-width: 180px;
  }

  .tagline {
    font-size: 14px;
    line-height: 1.3;
    margin-top: 8px;
    max-width: 240px;
  }

  .cart-button {
    font-size: 17px;
  }

  .hero {
    padding-top: 10px;
  }

  .site-header.is-compact .logo-box {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-radius: 14px;
  }

  .site-header.is-compact h1 {
    font-size: 20px;
    max-width: 150px;
  }

  .site-header.is-compact .header-actions .cart-button {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 14px;
  }
}
