:root {
  color-scheme: light;
  font-family: var(--font-body);
  background: var(--background);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(222, 225, 232, 0.72), transparent 34%),
    linear-gradient(315deg, rgba(226, 209, 194, 0.64), transparent 38%),
    var(--background);
}

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

button,
input,
textarea {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 64px);
  background: rgba(245, 241, 240, 0.82);
  border-bottom: 1px solid rgba(117, 109, 104, 0.14);
  backdrop-filter: blur(16px);
}

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

.brand-logo {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(44, 40, 38, 0.1);
  border-radius: 50%;
  object-fit: cover;
}

.nav {
  display: flex;
  gap: clamp(14px, 3vw, 32px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 82px);
  min-height: calc(100vh - 76px);
  padding: clamp(36px, 6vw, 76px) clamp(18px, 5vw, 64px) 42px;
}

.hero-copy {
  max-width: 620px;
  animation: rise-in 700ms ease both;
  transform: translateY(-24px);
}

.eyebrow,
.category-line {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: var(--font-display);
  letter-spacing: 0;
}

.hero h1 {
  margin-bottom: 18px;
  font-size: clamp(3.8rem, 8vw, 8.4rem);
  line-height: 0.88;
}

.hero .eyebrow {
  margin-bottom: 28px;
}

.hero p {
  max-width: 520px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
}

.hero-actions,
.product-footer,
.admin-heading,
.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(44, 40, 38, 0.16);
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 16px 42px rgba(44, 40, 38, 0.18);
}

.button.ghost {
  background: rgba(255, 253, 252, 0.58);
  color: var(--ink);
}

.button.danger {
  border-color: rgba(155, 61, 52, 0.32);
  background: rgba(155, 61, 52, 0.08);
  color: #9b3d34;
}

.button.wide {
  width: 100%;
}

.hero-carousel {
  position: relative;
  isolation: isolate;
  min-height: 460px;
  animation: float-in 900ms ease both;
}

.hero-carousel::before {
  position: absolute;
  inset: 8% -4% -2% 14%;
  z-index: -1;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--detailD), var(--detailA));
  content: "";
  transform: rotate(4deg);
}

.hero-track {
  position: relative;
  overflow: hidden;
  height: min(65vh, 620px);
  min-height: 420px;
  border-radius: 8px;
  box-shadow: 0 26px 70px rgba(44, 40, 38, 0.2);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity 700ms ease, transform 1200ms ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-caption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 253, 252, 0.72);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 253, 252, 0.76);
  box-shadow: 0 14px 34px rgba(44, 40, 38, 0.12);
  color: var(--ink);
  backdrop-filter: blur(12px);
}

.hero-caption small {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-caption strong {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.carousel-arrow,
.carousel-dot {
  border: 1px solid rgba(44, 40, 38, 0.13);
  background: rgba(255, 253, 252, 0.68);
  color: var(--ink);
  cursor: pointer;
}

.carousel-arrow {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  font-size: 1.55rem;
  line-height: 1;
  transition: background 180ms ease, transform 180ms ease;
}

.carousel-arrow:hover {
  background: var(--detailD);
  transform: translateY(-2px);
}

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

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  padding: 0;
  transition: width 180ms ease, background 180ms ease;
}

.carousel-dot.active {
  width: 28px;
  border-radius: 999px;
  background: var(--ink);
}
.section-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 42px clamp(18px, 5vw, 64px) 18px;
}

.section-intro h2,
.admin-heading h1,
.login-box h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter {
  min-height: 38px;
  border: 1px solid rgba(44, 40, 38, 0.12);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 253, 252, 0.58);
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.filter.active {
  background: var(--detailD);
  color: var(--ink);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 18px clamp(18px, 5vw, 64px) 70px;
}

.product-card {
  overflow: hidden;
  border: 1px solid rgba(44, 40, 38, 0.09);
  border-radius: 8px;
  background: rgba(255, 253, 252, 0.74);
  box-shadow: 0 18px 46px rgba(44, 40, 38, 0.08);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 58px rgba(44, 40, 38, 0.13);
}

.product-image {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--detailA);
}

.product-image img,
.admin-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  display: grid;
  min-height: 188px;
  gap: 10px;
  padding: 12px;
}

.product-info .category-line {
  margin-bottom: 8px;
  font-size: 0.68rem;
}

.product-info h3 {
  font-size: 1.22rem;
  line-height: 1;
}

.product-info p:not(.category-line) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.9rem;
}

.product-info h3,
.detail-copy h1,
.product-form h2,
.category-row h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  letter-spacing: 0;
}

.product-info p:not(.category-line),
.detail-copy p,
.form-note,
.form-error {
  color: var(--muted);
  line-height: 1.6;
}

.form-error {
  margin-bottom: 0;
  color: #9b3d34;
  font-weight: 700;
}

.product-footer {
  justify-content: space-between;
  align-self: end;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--detailA);
  font-size: 1.4rem;
  font-weight: 500;
}

.product-page,
.admin-page,
.login-page,
.empty-state {
  padding: 34px clamp(18px, 5vw, 64px) 70px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--accent);
  font-weight: 700;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(26px, 5vw, 70px);
  align-items: center;
}

.detail-image {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 24px 66px rgba(44, 40, 38, 0.16);
}

.detail-image img {
  width: 100%;
  height: min(68vh, 720px);
  min-height: 420px;
  object-fit: cover;
}

.detail-copy {
  padding: clamp(18px, 3vw, 42px);
}

.detail-copy h1 {
  font-size: clamp(3rem, 6vw, 6.5rem);
  line-height: 0.92;
}

.detail-price {
  display: block;
  margin: 24px 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.story-page {
  display: grid;
  gap: clamp(34px, 6vw, 70px);
  padding: clamp(34px, 6vw, 72px) 0 78px;
}

.story-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  align-items: stretch;
  gap: clamp(24px, 5vw, 56px);
  width: min(1120px, calc(100% - clamp(36px, 10vw, 128px)));
  margin: 0 auto;
  animation: rise-in 700ms ease both;
}

.story-intro {
  display: grid;
  align-content: center;
  min-height: clamp(360px, 48vw, 560px);
  border: 1px solid rgba(44, 40, 38, 0.08);
  border-radius: 8px;
  padding: clamp(28px, 6vw, 70px);
  background:
    linear-gradient(135deg, rgba(255, 253, 252, 0.8), rgba(222, 225, 232, 0.48)),
    var(--surface);
  box-shadow: 0 24px 64px rgba(44, 40, 38, 0.09);
}

.story-intro h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(3.4rem, 7vw, 7.4rem);
  line-height: 0.92;
}

.story-intro p:not(.eyebrow) {
  max-width: 620px;
  margin-bottom: 28px;
  color: var(--ink);
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  line-height: 1.75;
}

.story-note {
  display: grid;
  align-content: end;
  min-height: 280px;
  border: 1px solid rgba(44, 40, 38, 0.08);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 34px);
  background: var(--detailB);
  color: var(--ink);
}

.story-note span {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 7rem);
  line-height: 0.82;
}

.story-note p {
  margin-bottom: 0;
  color: rgba(44, 40, 38, 0.76);
  font-weight: 700;
  line-height: 1.55;
}

.origin-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  align-items: start;
  gap: clamp(28px, 5vw, 68px);
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 52px);
  background:
    linear-gradient(90deg, rgba(255, 253, 252, 0.78), rgba(255, 253, 252, 0.44)),
    var(--detailA);
  animation: float-in 850ms ease both;
}

.origin-copy {
  display: grid;
  gap: 18px;
}

.origin-copy h2 {
  margin-bottom: 4px;
  font-size: clamp(2.2rem, 4.5vw, 4.2rem);
  line-height: 0.98;
}

.origin-copy p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.story-values {
  display: grid;
  gap: 12px;
}

.story-values div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 6px 16px;
  border-top: 1px solid rgba(44, 40, 38, 0.12);
  padding-top: 16px;
}

.story-values span {
  grid-row: span 2;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1;
}

.story-values strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
}

.story-values p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-shell,
.login-box {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.admin-heading {
  justify-content: space-between;
  margin-bottom: 24px;
}

.product-form,
.login-box {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(44, 40, 38, 0.1);
  border-radius: 8px;
  padding: clamp(18px, 4vw, 34px);
  background: rgba(255, 253, 252, 0.72);
  box-shadow: 0 18px 48px rgba(44, 40, 38, 0.08);
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(44, 40, 38, 0.14);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(139, 111, 97, 0.12);
}

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

.admin-list {
  display: grid;
  gap: 28px;
  margin-top: 34px;
}

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

.admin-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 14px;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(44, 40, 38, 0.09);
  border-radius: 8px;
  background: rgba(255, 253, 252, 0.72);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.admin-card:hover {
  box-shadow: 0 16px 34px rgba(44, 40, 38, 0.11);
  transform: translateY(-2px);
}

.admin-card img {
  aspect-ratio: 1;
}

.admin-card h3 {
  margin-bottom: 6px;
}

.admin-card p {
  margin-bottom: 0;
  color: var(--accent);
  font-weight: 700;
}

.login-page {
  display: grid;
  min-height: calc(100vh - 76px);
  place-items: center;
}

.login-box {
  max-width: 460px;
}

.shake {
  animation: shake 350ms ease;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(44, 40, 38, 0.36);
  backdrop-filter: blur(10px);
}

.modal-panel {
  width: min(760px, 100%);
  max-height: min(92vh, 820px);
  overflow: auto;
  border: 1px solid rgba(44, 40, 38, 0.12);
  border-radius: 8px;
  background: var(--background);
  box-shadow: 0 28px 90px rgba(44, 40, 38, 0.22);
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 0;
}

.modal-heading h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.modal-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(44, 40, 38, 0.12);
  border-radius: 50%;
  background: rgba(255, 253, 252, 0.76);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

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

.edit-form {
  margin: 20px 24px 24px;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
}

@keyframes shake {
  25% {
    transform: translateX(-7px);
  }
  50% {
    transform: translateX(7px);
  }
  75% {
    transform: translateX(-4px);
  }
}

@media (max-width: 980px) {
  .hero,
  .product-detail,
  .story-hero,
  .origin-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .story-hero,
  .origin-panel {
    width: calc(100% - 36px);
  }

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

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

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

  .filters {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-copy {
    transform: translateY(-12px);
  }

  .hero h1 {
    font-size: clamp(3.4rem, 20vw, 5rem);
  }

  .hero-actions,
  .form-row,
  .admin-heading,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-carousel {
    min-height: 340px;
  }

  .hero-track,
  .detail-image img {
    height: 380px;
    min-height: 0;
  }

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

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

  .admin-card {
    grid-template-columns: 84px 1fr;
  }

  .product-info {
    min-height: 168px;
  }

  .story-hero {
    width: calc(100% - 36px);
  }

  .origin-panel {
    width: calc(100% - 36px);
    padding: 24px;
  }

  .story-intro h1 {
    font-size: clamp(3rem, 16vw, 4.8rem);
  }
}
