@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400&family=Montserrat:wght@400;500;600&display=swap");

:root {
  --paper: #fbf5ec;
  --paper-deep: #efe2d1;
  --milk: #fffefb;
  --ink: #4a3227;
  --muted: #8a7465;
  --line: #e4d4c3;
  --brown: #7b5645;
  --brown-dark: #4f3428;
  --beige: #ead9c4;
  --beige-soft: #f5eadb;
  --caramel: #b98a68;
  --shadow: 0 18px 48px rgba(79, 52, 40, 0.1);
  --font-title: Cormorant Garamond, Cormorant, Iowan Old Style, Palatino, Georgia, serif;
  --font-body: Montserrat, Avenir Next, Avenir, Nunito Sans, Helvetica Neue, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--paper), #fffaf4 42%, #f4eadc);
  color: var(--ink);
  font-family: var(--font-body);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(251, 245, 236, 0.93);
  border-bottom: 1px solid rgba(234, 222, 212, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: 142px;
  height: auto;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.nav a,
.bag-button,
.secondary {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 251, 0.82);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.nav a {
  padding: 9px 14px;
}

.bag-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  cursor: pointer;
}

.bag-button span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--brown-dark);
  color: white;
}

.hero {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(22px, 4vw, 42px) 0 30px;
}

.hero-wide {
  display: block;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brown);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-heading h2,
.category-title h3,
.modal-info h2,
.bag-sheet h2 {
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 0;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--brown-dark);
  color: white;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 12px 24px rgba(79, 52, 40, 0.18);
}

.secondary {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
}

.full {
  width: 100%;
}

.hero-showcase {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--beige-soft);
  box-shadow: var(--shadow);
}

.hero-showcase::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent 0%, transparent 54%, rgba(79, 52, 40, 0.08) 100%);
  pointer-events: none;
}

.hero-showcase img {
  width: 100%;
  aspect-ratio: 2.78 / 1;
  object-fit: cover;
  object-position: center;
}

.banner-cta {
  position: absolute;
  right: 30px;
  bottom: 28px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 254, 251, 0.64);
  border-radius: 999px;
  background: rgba(79, 52, 40, 0.78);
  color: white;
  font-size: 0.86rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
  background: rgba(255, 254, 251, 0.7);
}

.intro-strip span {
  padding: 15px 14px;
  border-right: 1px solid var(--line);
  color: var(--brown);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
}

.catalog {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 38px 0 82px;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 8px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.18rem, 1.8vw, 1.65rem);
  line-height: 1.35;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--muted);
}

.section-heading .eyebrow {
  margin-bottom: 8px;
  color: var(--brown);
  font-size: 0.68rem;
  font-weight: 500;
}

.category {
  margin-top: 46px;
}

.category-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.category-title h3 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 2.6vw, 2.18rem);
  color: var(--brown-dark);
}

.category-title span {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  display: grid;
  width: 100%;
  min-height: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--milk);
  color: inherit;
  text-align: left;
  box-shadow: 0 10px 28px rgba(88, 72, 60, 0.075);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(88, 72, 60, 0.12);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--paper-deep);
}

.product-card__body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.product-card__body span {
  color: var(--caramel);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
}

.product-card h4 {
  margin: 0;
  min-height: 40px;
  color: var(--brown-dark);
  font-family: var(--font-title);
  font-size: 1.22rem;
  font-weight: 400;
  line-height: 1.12;
}

.product-card p {
  margin: 0;
  min-height: 56px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.45;
}

.product-card strong {
  color: var(--brown-dark);
  font-size: 0.95rem;
}

.product-modal {
  width: min(980px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--milk);
  box-shadow: var(--shadow);
}

.product-modal::backdrop {
  background: rgba(54, 43, 36, 0.36);
  backdrop-filter: blur(6px);
}

.icon-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--milk);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
}

.product-modal > .icon-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
}

.modal-gallery img {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
}

.modal-gallery {
  position: relative;
  background: var(--paper-deep);
}

.modal-gallery > img {
  display: block;
}

.modal-thumbs {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 8px;
  overflow: auto;
}

.modal-thumbs button {
  flex: 0 0 68px;
  overflow: hidden;
  padding: 0;
  border: 2px solid rgba(255, 254, 251, 0.85);
  border-radius: 8px;
  background: var(--milk);
  cursor: pointer;
  opacity: 0.78;
}

.modal-thumbs button.is-active {
  border-color: var(--brown-dark);
  opacity: 1;
}

.modal-thumbs img {
  width: 100%;
  height: 62px;
  min-height: 0;
  object-fit: cover;
}

.modal-info {
  display: grid;
  align-content: center;
  gap: 15px;
  padding: 54px 42px 36px;
}

.modal-info h2 {
  margin: 0;
  font-size: clamp(2.2rem, 3.6vw, 3.15rem);
  line-height: 1.06;
}

.modal-info > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.modal-price {
  color: var(--brown-dark);
  font-size: 1.22rem;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffbf7;
  color: var(--ink);
  padding: 12px;
  outline-color: var(--caramel);
}

textarea {
  resize: vertical;
}

.bag-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.bag-panel.is-open {
  pointer-events: auto;
  opacity: 1;
}

.bag-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(54, 43, 36, 0.36);
}

.bag-sheet {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(460px, 100%);
  height: 100%;
  padding: 24px;
  background: var(--milk);
  box-shadow: var(--shadow);
  transform: translateX(18px);
  transition: transform 180ms ease;
}

.bag-panel.is-open .bag-sheet {
  transform: translateX(0);
}

.bag-sheet header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.bag-sheet h2 {
  margin: 0 0 18px;
  font-size: 1.9rem;
}

.bag-items {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 18px 0;
}

.empty {
  color: var(--muted);
  line-height: 1.5;
}

.bag-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffbf7;
}

.bag-item strong,
.bag-item span,
.bag-item small {
  display: block;
}

.bag-item span,
.bag-item small {
  color: var(--muted);
}

.bag-item input {
  width: 74px;
}

.bag-item button {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--caramel);
  cursor: pointer;
  font-weight: 500;
}

.bag-sheet footer {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.bag-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.bag-total span,
#quoteNotice {
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--line);
  background: #f2e6d8;
  color: var(--brown-dark);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 6vw, 82px);
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 48px 0 34px;
}

.footer-brand img {
  width: 170px;
  height: auto;
  margin-bottom: 18px;
}

.footer-brand p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

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

.footer h2 {
  margin: 0 0 14px;
  color: var(--brown-dark);
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.footer a,
.footer-links p {
  display: block;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.footer a {
  text-decoration: underline;
  text-decoration-color: rgba(123, 86, 69, 0.25);
  text-underline-offset: 4px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 16px 0 20px;
  border-top: 1px solid rgba(123, 86, 69, 0.15);
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-body {
  min-height: 100vh;
  background: var(--paper);
}

.password-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(251, 245, 236, 0.94);
  backdrop-filter: blur(14px);
}

.password-gate.is-hidden {
  display: none;
}

.password-card {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--milk);
  box-shadow: var(--shadow);
}

.password-card h1 {
  margin: 0;
  color: var(--brown-dark);
  font-family: var(--font-title);
  font-size: 2.4rem;
  font-weight: 400;
}

.password-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.password-error {
  min-height: 22px;
  color: #9d4a3f !important;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 245, 236, 0.94);
  backdrop-filter: blur(18px);
}

.admin-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.admin-topbar-actions a,
.admin-topbar-actions button,
.admin-panel-heading button,
.ghost {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--milk);
  color: var(--brown);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
}

.admin-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 38px 0 72px;
}

.admin-hero {
  max-width: 740px;
  margin-bottom: 28px;
}

.admin-hero h1,
.admin-panel h2,
.admin-form h2 {
  margin: 0;
  color: var(--brown-dark);
  font-family: var(--font-title);
  font-weight: 400;
}

.admin-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1.04;
}

.admin-hero p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

.admin-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
}

.admin-panel,
.admin-form {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--milk);
  box-shadow: 0 12px 32px rgba(79, 52, 40, 0.07);
}

.admin-panel {
  overflow: hidden;
}

.admin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-panel h2,
.admin-form h2 {
  font-size: 1.7rem;
}

.admin-list {
  display: grid;
  max-height: 430px;
  overflow: auto;
}

.admin-row {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.admin-row:hover,
.admin-row.is-active {
  background: #fff8ef;
}

.admin-row strong {
  color: var(--brown-dark);
  font-family: var(--font-title);
  font-size: 1.28rem;
  font-weight: 400;
}

.admin-row span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.admin-editor {
  display: block;
  margin-top: 18px;
}

.admin-edit-page {
  max-width: 860px;
  margin-inline: auto;
}

[hidden] {
  display: none !important;
}

.admin-form {
  display: grid;
  gap: 15px;
  padding: 20px;
}

.admin-form-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.admin-two-cols {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
}

.admin-check input {
  width: 18px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.danger {
  color: #9d4a3f;
}

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

.variant-editor {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffbf7;
}

.admin-panel-heading.inline {
  align-items: center;
  padding: 14px;
  background: var(--milk);
}

.admin-panel-heading.inline h2 {
  font-size: 1.35rem;
}

.admin-panel-heading.inline p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.variant-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.variant-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--milk);
}

.photo-admin-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffbf7;
}

.photo-admin-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.photo-admin-card div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border-top: 1px solid var(--line);
}

.photo-admin-card button {
  min-height: 34px;
  border: 0;
  background: var(--milk);
  color: var(--brown);
  cursor: pointer;
  font-size: 0.76rem;
}

.admin-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .hero,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .hero-showcase img {
    aspect-ratio: 2.25 / 1;
  }

  .intro-strip {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .modal-gallery img {
    min-height: 0;
    height: 390px;
  }

  .footer-inner,
  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    display: grid;
  }

  .admin-layout,
  .admin-editor,
  .admin-two-cols,
  .variant-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero,
  .catalog {
    width: min(100% - 24px, 1180px);
  }

  .hero-showcase {
    border-radius: 8px;
  }

  .hero-showcase img {
    aspect-ratio: 1.65 / 1;
    object-position: 42% center;
  }

  .banner-cta {
    right: 14px;
    bottom: 14px;
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.8rem;
  }

  .grid,
  .intro-strip {
    grid-template-columns: 1fr;
  }

  .category-title {
    display: block;
  }

  .modal-info {
    padding: 32px 18px 22px;
  }

  .admin-shell {
    width: min(100% - 24px, 1180px);
  }

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