:root {
  --color-honey: #e8a93c;
  --color-honey-dark: #b5791f;
  --color-brown: #4a2f13;
  --color-bg: #fffaf1;
  --color-text: #2c2117;
  --color-border: #e6d7bd;
  --color-error: #b3261e;
  --color-success: #2e6b2e;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a { color: var(--color-honey-dark); }

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--color-brown);
}

.brand__logo { height: 48px; width: auto; }

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}

.main-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}

.main-nav a:hover { color: var(--color-honey-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-brown);
  border-radius: 2px;
}

.cart-count {
  display: inline-block;
  background: var(--color-honey);
  color: #fff;
  border-radius: 999px;
  min-width: 1.4em;
  padding: 0 0.35em;
  text-align: center;
  font-size: 0.8em;
}

main.container { padding-top: 2rem; padding-bottom: 3rem; flex: 1 0 auto; width: 100%; }

.hero { text-align: center; margin-bottom: 2.5rem; }
.hero h1 { font-size: 2rem; color: var(--color-brown); }

.category-section { margin-bottom: 2.5rem; }
.category-section h2 { border-bottom: 2px solid var(--color-honey); display: inline-block; padding-bottom: 0.25rem; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.product-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.product-card a { text-decoration: none; color: inherit; }

.product-card__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: var(--color-border);
}

.product-card__image--placeholder { display: block; }

.product-card__name { margin: 0.75rem 0 0.25rem; font-size: 1.05rem; }
.product-card__price { font-weight: 600; color: var(--color-honey-dark); margin: 0 0 0.75rem; }

.product-detail { display: flex; flex-wrap: wrap; gap: 2rem; }
.product-detail__image { flex: 1 1 320px; max-width: 420px; width: 100%; border-radius: 8px; }
.product-detail__info { flex: 1 1 280px; }
.product-detail__price { font-size: 1.25rem; font-weight: 600; color: var(--color-honey-dark); }

.btn {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}

.btn--primary { background: var(--color-honey); color: #fff; }
.btn--primary:hover { background: var(--color-honey-dark); }
.btn--text { background: transparent; color: var(--color-honey-dark); padding: 0.4rem 0.5rem; }
.btn--danger { color: var(--color-error); }

.form-field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.35rem; max-width: 420px; }
.form-field--checkbox { flex-direction: row; align-items: center; }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="number"],
.form-field input[type="password"],
.form-field select,
.form-field textarea {
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
}

.form-honeypot { position: absolute; left: -9999px; top: -9999px; }

fieldset { border: 1px solid var(--color-border); border-radius: 6px; margin-bottom: 1rem; max-width: 420px; }

.field-error { color: var(--color-error); font-size: 0.85rem; margin: 0; }

.flash-messages { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.flash { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 0.5rem; }
.flash--success { background: #e4f3e4; color: var(--color-success); }
.flash--error { background: #fbe6e4; color: var(--color-error); }

.legal-draft-notice {
  background: #fbe6e4;
  border: 1px solid var(--color-error);
  padding: 0.75rem 1rem;
  border-radius: 6px;
}

.cart-row {
  display: grid;
  grid-template-columns: 64px 1fr auto auto auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.cart-row__image { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; background: var(--color-border); }
.cart-row__quantity { width: 4rem; padding: 0.35rem; }

.cart-summary__total { font-size: 1.2rem; font-weight: 600; }

.admin-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.6rem; border-bottom: 1px solid var(--color-border); }
.admin-table__actions { display: flex; gap: 0.75rem; align-items: center; }
.product-form__current-image { max-width: 200px; border-radius: 6px; display: block; margin-bottom: 1rem; }

.site-footer { border-top: 1px solid var(--color-border); background: #fff; flex-shrink: 0; }
.site-footer__inner { padding: 1.5rem 1.25rem; text-align: center; color: #6b5a45; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 0.75rem; }
.footer-nav a { text-decoration: none; color: #6b5a45; }

@media (max-width: 600px) {
  .cart-row { grid-template-columns: 48px 1fr; grid-auto-rows: auto; }

  .nav-toggle { display: flex; }

  .main-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
  }

  .main-nav.is-open { display: flex; }
}

.carousel {
  position: relative;
  max-width: 700px;
  margin: 2rem auto;
  outline: none;
}

.carousel__viewport {
  overflow: hidden;
  border-radius: 8px;
  background: var(--color-border);
}

.carousel__track {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: transform 0.4s ease;
}

.carousel__slide {
  flex: 0 0 100%;
  max-width: 100%;
}

.carousel__slide img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.carousel__caption {
  margin: 0.6rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: #6b5a45;
}

.carousel__btn {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.5rem;
  border: none;
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-brown);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.carousel__btn:hover { background: rgba(255, 255, 255, 0.9); }
.carousel__btn--prev { left: 0; border-radius: 0 6px 6px 0; }
.carousel__btn--next { right: 0; border-radius: 6px 0 0 6px; }

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.carousel__dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  border: none;
  background: var(--color-border);
  padding: 0;
  cursor: pointer;
}

.carousel__dot.is-active { background: var(--color-honey); }
