:root {
  --bg: hsl(38 48% 95%);
  --fg: hsl(263 35% 12%);
  --card: hsl(40 50% 98%);
  --primary: hsl(263 48% 22%);
  --primary-fg: hsl(42 60% 96%);
  --secondary: hsl(38 35% 88%);
  --muted: hsl(30 18% 38%);
  --accent: hsl(43 92% 46%);
  --accent-fg: hsl(263 40% 12%);
  --border: hsl(36 28% 82%);
  --radius: 0.75rem;
  --shadow: 0 18px 40px -28px hsl(263 40% 20% / 0.45);
  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--fg);
  background:
    radial-gradient(1200px 500px at 10% -10%, hsl(43 90% 70% / 0.18), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, hsl(263 50% 40% / 0.1), transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

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

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

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

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: hsl(40 50% 98% / 0.86);
  border-bottom: 1px solid var(--border);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 0.85rem;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.92rem;
}

.nav a {
  color: var(--muted);
}

.nav a:hover,
.nav a.active {
  color: var(--fg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-fg);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding-inline: 0.6rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: white;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.05) contrast(1.05);
  animation: rise 1.2s ease both;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, hsl(263 40% 8% / 0.72) 0%, hsl(263 40% 8% / 0.28) 42%, transparent 70%),
    linear-gradient(0deg, hsl(263 40% 8% / 0.45), transparent 42%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.5rem;
  max-width: 38rem;
  animation: fade-up 0.9s ease 0.15s both;
}

.hero-copy .brand-hero {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 520;
  margin: 0 0 0.75rem;
  max-width: 18ch;
}

.hero-copy p {
  margin: 0 0 1.4rem;
  color: hsl(42 40% 92% / 0.9);
  font-size: 1.05rem;
  max-width: 34ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

section.block {
  padding: 4rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  max-width: 40ch;
}

.grid-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.grid-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.product-card .thumb {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  background: var(--secondary);
  box-shadow: var(--shadow);
}

.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .thumb img {
  transform: scale(1.04);
}

.product-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.product-card .meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.product-card .price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cat-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  color: white;
}

.cat-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-tile span {
  position: absolute;
  inset: auto 0 0;
  padding: 1rem;
  background: linear-gradient(transparent, hsl(263 40% 8% / 0.75));
  font-weight: 650;
}

.site-footer {
  margin-top: 3rem;
  background: var(--primary);
  color: var(--primary-fg);
}

.site-footer .inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  padding: 3rem 0;
}

.site-footer h4 {
  margin: 0 0 0.8rem;
  font-size: 0.85rem;
}

.site-footer a {
  display: block;
  color: hsl(42 40% 92% / 0.72);
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
}

.site-footer a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid hsl(42 40% 92% / 0.15);
  padding: 1.1rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: hsl(42 40% 92% / 0.6);
}

.shop-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  padding: 2rem 0 4rem;
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filters a,
.filters button {
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.45rem 0.55rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.filters a.active,
.filters button.active,
.filters a:hover,
.filters button:hover {
  background: var(--secondary);
  color: var(--fg);
}

.product-page {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
}

.product-gallery {
  border-radius: 1rem;
  overflow: hidden;
  background: var(--secondary);
  aspect-ratio: 1;
  box-shadow: var(--shadow);
}

.product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.product-info .subtitle {
  color: var(--muted);
  margin: 0 0 1rem;
}

.product-info .price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.product-info .price-row .now {
  font-size: 1.5rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.product-info .price-row .was {
  color: var(--muted);
  text-decoration: line-through;
}

.option-block {
  margin-bottom: 1.1rem;
}

.option-block label {
  display: block;
  font-size: 0.8rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  font-size: 0.88rem;
}

.chip.active {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

.chip .preview {
  color: inherit;
  opacity: 0.75;
  margin-left: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.product-info .desc {
  margin-top: 1.5rem;
  color: var(--muted);
  line-height: 1.65;
}

.cart-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: var(--primary);
  color: var(--primary-fg);
  padding: 0.85rem 1rem;
  border-radius: 0.8rem;
  box-shadow: var(--shadow);
  transform: translateY(120%);
  transition: transform 0.3s ease;
  z-index: 50;
}

.cart-toast.show {
  transform: translateY(0);
}

.admin-shell {
  padding: 2rem 0 4rem;
}

.admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  padding: 0.65rem 0.75rem;
  background: white;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--secondary);
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
  font-size: 0.8rem;
}

.tag button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  line-height: 1;
}

.login-box {
  max-width: 380px;
  margin: 4rem auto;
}

.muted {
  color: var(--muted);
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: hsl(43 92% 46% / 0.18);
}

@keyframes rise {
  from {
    transform: scale(1.06);
    opacity: 0.6;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .grid-products,
  .grid-cats {
    grid-template-columns: repeat(2, 1fr);
  }

  .shop-layout,
  .product-page,
  .site-footer .inner {
    grid-template-columns: 1fr;
  }

  .nav .hide-sm {
    display: none;
  }
}

@media (max-width: 560px) {
  .grid-products {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }
}
