:root {
  --wine-950: #160007;
  --wine-900: #26020e;
  --wine-800: #3b0717;
  --wine-700: #5b1027;
  --cream: #f4ecdf;
  --ivory: #fff9ef;
  --blush: #d8a7a1;
  --gold: #c7a166;
  --ink: #26161a;
  --muted: #7b6863;
  --green: #256339;
  --amber: #8a5c00;
  --line: rgba(91, 16, 39, 0.18);
  font-family: "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
}

body:has(.cart-drawer[aria-hidden="false"]) {
  overflow: hidden;
}

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

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

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

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

[hidden] {
  display: none !important;
}

.site-header {
  align-items: center;
  background: linear-gradient(90deg, var(--wine-950), var(--wine-900));
  color: var(--ivory);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 72px;
  padding: 0 clamp(20px, 5vw, 72px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 600;
}

.main-nav {
  display: flex;
  gap: clamp(22px, 4vw, 54px);
  font-size: 0.92rem;
}

.main-nav a,
.header-actions button {
  opacity: 0.9;
}

.main-nav a:hover,
.header-actions button:hover {
  opacity: 1;
}

.header-actions {
  display: flex;
  gap: 10px;
  justify-self: end;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  position: relative;
  width: 38px;
}

.icon-button svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 20px;
}

.icon-button:hover {
  border-color: rgba(255, 249, 239, 0.22);
}

.icon-button.dark {
  color: var(--wine-900);
}

.bag-count {
  align-items: center;
  background: var(--gold);
  border-radius: 999px;
  color: var(--wine-950);
  display: flex;
  font-size: 0.68rem;
  font-weight: 800;
  height: 18px;
  justify-content: center;
  position: absolute;
  right: -2px;
  top: -2px;
  width: 18px;
}

.search-bar {
  align-items: center;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(220px, 520px);
  justify-content: center;
  padding: 16px 20px;
}

.search-bar label,
.newsletter-form label {
  color: var(--wine-800);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-bar input,
.newsletter-form input,
.inventory-toolbar input,
.product-form input,
.product-form select,
.product-form textarea {
  background: white;
  border: 1px solid rgba(91, 16, 39, 0.18);
  border-radius: 6px;
  color: var(--ink);
  min-height: 44px;
  padding: 0 14px;
  width: 100%;
}

.product-form textarea {
  min-height: 110px;
  padding-top: 12px;
  resize: vertical;
}

.hero {
  background:
    radial-gradient(circle at 76% 18%, rgba(199, 161, 102, 0.16), transparent 26%),
    linear-gradient(135deg, var(--wine-950), var(--wine-800));
  color: var(--ivory);
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1.18fr);
  min-height: 590px;
  overflow: hidden;
  padding: clamp(48px, 7vw, 92px) clamp(20px, 5vw, 72px) 42px;
}

.hero-copy {
  align-self: center;
  max-width: 560px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.hero h1,
.section h2,
.newsletter-section h2,
.admin-topbar h1,
.product-modal h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0;
}

.hero h1 {
  font-size: clamp(3.4rem, 7.5vw, 7.4rem);
  line-height: 0.94;
}

.hero-text {
  color: rgba(255, 249, 239, 0.84);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.65;
  margin: 26px 0 30px;
  max-width: 510px;
}

.hero-actions,
.section-heading,
.drawer-header,
.cart-total {
  align-items: center;
  display: flex;
  gap: 16px;
}

.button {
  align-items: center;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
}

.button.primary {
  background: var(--ivory);
  color: var(--wine-800);
}

.button.ghost {
  border: 1px solid rgba(255, 249, 239, 0.34);
  color: var(--ivory);
}

.button.mini {
  background: var(--wine-800);
  color: var(--ivory);
  min-height: 38px;
  padding: 0 16px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button.wide {
  width: 100%;
}

.hero-media {
  align-self: end;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.hero-media img {
  border-radius: 6px;
  filter: drop-shadow(0 34px 54px rgba(0, 0, 0, 0.34));
  max-height: 410px;
  object-fit: cover;
  width: min(720px, 100%);
}

.trust-strip {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 18px clamp(20px, 5vw, 72px);
}

.trust-strip div {
  border-right: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 0 28px;
}

.trust-strip div:first-child {
  padding-left: 0;
}

.trust-strip div:last-child {
  border-right: 0;
}

.trust-strip strong {
  color: var(--wine-800);
  font-size: 0.92rem;
}

.trust-strip span,
.product-info p,
.service-grid p,
.cart-item span,
.inventory-row small {
  color: var(--muted);
  font-size: 0.88rem;
}

.section {
  padding: clamp(42px, 6vw, 72px) clamp(20px, 5vw, 72px);
}

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

.section h2,
.newsletter-section h2 {
  color: var(--wine-900);
  font-size: clamp(2rem, 3.2vw, 3.5rem);
}

.text-link {
  color: var(--wine-700);
  font-weight: 800;
}

.text-link::after {
  content: " ->";
}

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

.category-card {
  aspect-ratio: 1.33;
  background: var(--wine-800);
  border-radius: 8px;
  color: var(--ivory);
  display: grid;
  isolation: isolate;
  min-height: 190px;
  overflow: hidden;
  padding: 20px;
  place-content: end center;
  position: relative;
  text-align: center;
}

.category-card img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
  z-index: -2;
}

.category-card::after {
  background: linear-gradient(transparent 20%, rgba(22, 0, 7, 0.76));
  content: "";
  inset: 0;
  position: absolute;
  z-index: -1;
}

.category-card span {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
}

.category-card small {
  color: rgba(255, 249, 239, 0.82);
  margin-top: 4px;
}

.editorial-band {
  align-items: center;
  background: var(--wine-900);
  color: var(--ivory);
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr 0.8fr;
}

.editorial-band h2 {
  color: var(--ivory);
  max-width: 720px;
}

.editorial-band p:last-child {
  color: rgba(255, 249, 239, 0.8);
  font-size: 1.08rem;
  line-height: 1.7;
  margin: 0;
}

.product-heading {
  align-items: flex-end;
}

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

.filter-pill {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--wine-800);
  cursor: pointer;
  font-weight: 800;
  min-height: 38px;
  padding: 0 16px;
}

.filter-pill.active {
  background: var(--wine-800);
  color: var(--ivory);
}

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

.product-card,
.service-grid article,
.product-form,
.inventory-panel,
.admin-metrics article {
  background: #fffdf8;
  border: 1px solid rgba(91, 16, 39, 0.12);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(38, 22, 26, 0.06);
  overflow: hidden;
}

.product-image {
  aspect-ratio: 1.35;
  background: var(--wine-800);
  border: 0;
  cursor: pointer;
  padding: 0;
  width: 100%;
}

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

.product-info {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.product-info span {
  color: var(--wine-700);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-info h3,
.service-grid h3 {
  color: var(--wine-900);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  margin: 0;
}

.product-info p,
.service-grid p {
  line-height: 1.55;
  margin: 0;
}

.product-info div:last-child {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.service-grid {
  background: var(--cream);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-grid article {
  box-shadow: none;
  padding: 24px;
}

.newsletter-section {
  align-items: end;
  background: linear-gradient(135deg, var(--wine-950), var(--wine-700));
  color: var(--ivory);
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr minmax(280px, 460px);
  padding: clamp(42px, 6vw, 72px) clamp(20px, 5vw, 72px);
}

.newsletter-section h2 {
  color: var(--ivory);
  max-width: 760px;
}

.newsletter-form {
  display: grid;
  gap: 10px;
}

.newsletter-form label {
  color: var(--gold);
}

.cart-drawer {
  background: var(--ivory);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.25);
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  max-width: 440px;
  padding: 22px;
  position: fixed;
  right: 0;
  top: 0;
  transform: translateX(0);
  transition: transform 180ms ease;
  width: min(92vw, 440px);
  z-index: 50;
}

.cart-drawer[aria-hidden="true"] {
  transform: translateX(105%);
}

.drawer-header {
  justify-content: space-between;
}

.drawer-header h2,
.product-form h2,
.inventory-toolbar h2 {
  color: var(--wine-900);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2rem;
  margin: 0;
}

.cart-items {
  align-content: start;
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 20px 0;
}

.cart-item {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 74px 1fr auto;
}

.cart-item img {
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
}

.cart-item div {
  display: grid;
  gap: 5px;
}

.cart-item button,
.row-actions button {
  background: transparent;
  border: 0;
  color: var(--wine-700);
  cursor: pointer;
  font-weight: 800;
}

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

.cart-total {
  justify-content: space-between;
}

.modal-backdrop {
  align-items: center;
  background: rgba(22, 0, 7, 0.72);
  display: grid;
  inset: 0;
  padding: 20px;
  position: fixed;
  z-index: 60;
}

.product-modal {
  background: var(--ivory);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: auto;
  max-width: 920px;
  overflow: hidden;
  position: relative;
  width: min(100%, 920px);
}

.modal-close {
  background: rgba(255, 249, 239, 0.86);
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
}

.modal-image {
  background: var(--wine-800);
}

.modal-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.modal-content {
  align-content: center;
  display: grid;
  gap: 18px;
  padding: clamp(28px, 5vw, 52px);
}

.modal-content h2 {
  color: var(--wine-900);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
}

.modal-content p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.site-footer {
  align-items: center;
  background: var(--wine-950);
  color: rgba(255, 249, 239, 0.72);
  display: flex;
  justify-content: space-between;
  padding: 24px clamp(20px, 5vw, 72px);
}

.site-footer span {
  color: var(--ivory);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
}

.admin-body {
  background: #f6f3ee;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: #1f1116;
  color: var(--ivory);
  padding: 28px;
}

.admin-sidebar strong {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  margin-bottom: 34px;
}

.admin-sidebar nav {
  display: grid;
  gap: 8px;
}

.admin-sidebar a {
  border-radius: 6px;
  color: rgba(255, 249, 239, 0.74);
  font-weight: 800;
  padding: 12px 14px;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
  background: rgba(255, 249, 239, 0.1);
  color: var(--ivory);
}

.admin-main {
  padding: 34px;
}

.admin-topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 26px;
}

.admin-topbar h1 {
  color: var(--wine-900);
  font-size: 2.5rem;
}

.admin-metrics {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
}

.admin-metrics article {
  display: grid;
  gap: 8px;
  padding: 22px;
}

.admin-metrics span {
  color: var(--muted);
  font-weight: 800;
}

.admin-metrics strong {
  color: var(--wine-800);
  font-size: 2rem;
}

.admin-layout {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(280px, 360px) 1fr;
}

.product-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.product-form label {
  color: var(--wine-800);
  display: grid;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 7px;
}

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

.inventory-panel {
  overflow: hidden;
}

.inventory-toolbar {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 22px;
}

.inventory-toolbar input {
  max-width: 280px;
}

.inventory-row {
  align-items: center;
  border-top: 1px solid rgba(38, 22, 26, 0.08);
  display: grid;
  gap: 16px;
  grid-template-columns: 1.35fr 0.85fr 0.65fr 0.7fr 0.65fr 0.8fr;
  padding: 17px 20px;
}

.inventory-row > span:first-child {
  display: grid;
  gap: 4px;
}

.inventory-head {
  background: #fbfaf7;
  border-top: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  justify-content: center;
  padding: 6px 10px;
  width: max-content;
}

.status.ok {
  background: #e9f5eb;
  color: var(--green);
}

.status.warn {
  background: #fff2d8;
  color: var(--amber);
}

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

.empty-state {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 1100px) {
  .category-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .main-nav {
    display: none;
  }

  .hero,
  .editorial-band,
  .newsletter-section,
  .admin-body,
  .product-modal {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-media {
    justify-content: flex-start;
  }

  .trust-strip,
  .service-grid,
  .admin-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-sidebar {
    display: none;
  }

  .inventory-row {
    grid-template-columns: 1fr 1fr;
  }

  .inventory-head {
    display: none;
  }
}

@media (max-width: 620px) {
  .hero-actions,
  .section-heading,
  .admin-topbar,
  .inventory-toolbar,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-bar,
  .trust-strip,
  .category-grid,
  .product-grid,
  .service-grid,
  .admin-metrics,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(3rem, 17vw, 4.6rem);
  }

  .trust-strip div {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    padding: 14px 0;
  }

  .trust-strip div:last-child {
    border-bottom: 0;
  }

  .filter-controls {
    justify-content: flex-start;
  }

  .cart-item,
  .inventory-row {
    grid-template-columns: 1fr;
  }
}
