@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --bg: #f6efdf;
  --paper: #fffdf6;
  --card: #fffaf0;
  --text: #2a2217;
  --muted: #706453;
  --brand: #c77612;
  --brand-strong: #9f5600;
  --accent: #2b8d56;
  --line: #ead8b4;
  --shadow: 0 18px 40px rgba(69, 43, 8, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 6%, rgba(255, 245, 212, 0.75) 0, rgba(255, 245, 212, 0) 34%),
    radial-gradient(circle at 92% 10%, rgba(255, 235, 199, 0.7) 0, rgba(255, 235, 199, 0) 38%),
    linear-gradient(180deg, #fff5dc 0%, var(--bg) 48%, #efe2c4 100%);
}

.page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 14px 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0 -14px 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(110deg, #d08a20, #b36a0d);
  box-shadow: 0 10px 28px rgba(81, 44, 0, 0.24);
}

.brand {
  color: #fff;
  text-decoration: none;
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hamburger {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  gap: 4px;
}

.hamburger span {
  width: 20px;
  height: 2px;
  background: #fff;
  display: block;
}

.menu {
  position: absolute;
  right: 14px;
  top: 62px;
  width: min(88vw, 330px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  display: none;
  background: rgba(255, 253, 244, 0.97);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.menu.open {
  display: block;
  animation: slideDown 180ms ease;
}

.menu a {
  color: #403526;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 9px;
  font-weight: 600;
}

.menu a:hover,
.menu a.active {
  background: #f7ead0;
  color: #7e4d0f;
}

.menu .btn-link {
  background: #ecf9ef;
  color: #1d6a3d;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  font-family: 'Fraunces', serif;
  letter-spacing: 0.15px;
}

h1 {
  font-size: 1.52rem;
}

h2 {
  font-size: 1.2rem;
}

.hero,
.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(77, 54, 20, 0.08);
}

.hero {
  padding: 18px;
  background: linear-gradient(140deg, #fff6dc, #fffdf8 62%);
}

.card {
  padding: 14px;
  background: linear-gradient(180deg, var(--paper), #fff9ee);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e8d6af;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 10px 24px rgba(70, 46, 17, 0.12);
  transform: translateY(0);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(70, 46, 17, 0.2);
}

.product-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.product-card .product-gallery-item {
  display: none;
}

.is-featured {
  border-color: #d7962e;
}

.selected-card {
  border: 2px solid #cb840d;
}

.ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, #ef9f2f, #cf7410);
  box-shadow: 0 6px 18px rgba(95, 47, 0, 0.24);
}

.product-body {
  padding: 14px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8edd6;
  color: #5f4725;
  border: 1px solid #ead5a8;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
}

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

.price {
  color: #1e7648;
  font-weight: 800;
}

.row-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

input,
textarea,
select,
button,
.btn {
  width: 100%;
  border: 1px solid #d9c8a2;
  border-radius: 11px;
  padding: 11px 12px;
  font-size: 0.95rem;
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(207, 129, 12, 0.35);
  border-color: #d18a1d;
}

label {
  font-weight: 700;
  font-size: 0.9rem;
  display: block;
  margin: 9px 0 6px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 10px;
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

button,
.btn {
  border: 0;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(100deg, var(--brand), var(--brand-strong));
  box-shadow: 0 10px 18px rgba(115, 64, 0, 0.22);
}

button:hover,
.btn:hover {
  filter: brightness(1.04);
}

.btn.secondary {
  background: linear-gradient(95deg, #319a60, #216b43);
}

.btn.danger {
  background: linear-gradient(95deg, #cf4b35, #9f2715);
}

.notice {
  padding: 10px;
  border-radius: 11px;
  margin-bottom: 11px;
}

.notice.ok {
  background: #e8f8eb;
  border: 1px solid #b5dfbc;
  color: #1d5a33;
}

.notice.error {
  background: #ffe9e5;
  border: 1px solid #efbbb4;
  color: #6f241a;
}

.search {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gallery img {
  width: 100%;
  border-radius: 12px;
  height: 116px;
  object-fit: cover;
  border: 1px solid var(--line);
  cursor: zoom-in;
}

iframe {
  width: 100%;
  min-height: 240px;
  border: 0;
  border-radius: 13px;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: rgba(21, 15, 6, 0.86);
  padding: 16px;
}

body.modal-open {
  overflow: hidden;
}

.image-modal[hidden],
.image-modal[aria-hidden='true'] {
  display: none !important;
}

.image-modal.open,
.image-modal[aria-hidden='false'] {
  display: flex;
}

.image-modal-stage {
  width: min(96vw, 1100px);
  max-height: 84vh;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
}

.image-modal img {
  width: 100%;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.04);
}

.image-modal-title {
  margin: 8px 0 0;
  color: #fff;
  font-weight: 600;
  text-align: center;
}

.image-modal-counter {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.88rem;
}

.image-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  font-size: 1.5rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.image-modal-nav {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: none;
}

.image-modal-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .image-modal-stage {
    grid-template-columns: 34px 1fr 34px;
    gap: 6px;
  }

  .image-modal-nav {
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .page {
    padding: 0 20px 34px;
  }

  .topbar {
    margin: 0 -20px 18px;
    padding: 12px 20px;
  }

  .hamburger {
    display: none;
  }

  .menu {
    position: static;
    width: auto;
    display: flex;
    padding: 0;
    gap: 4px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
  }

  .menu a {
    color: #fff;
    padding: 9px 12px;
  }

  .menu a:hover,
  .menu a.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
  }

  .menu .btn-link {
    color: #7a4a0b;
    background: rgba(255, 250, 237, 0.94);
  }

  h1 {
    font-size: 1.95rem;
  }

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

  .search {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }

  .search label:nth-of-type(2) {
    grid-column: 2;
  }

  .search button {
    min-width: 145px;
  }

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