:root {
  --ink: #1e1c19;
  --muted: #777168;
  --line: #ded8cf;
  --cream: #f3efe8;
  --paper: #fffdf9;
  --sand: #d9cdbd;
  --soft-line: rgba(30,28,25,.11);
  --soft-shadow: 0 18px 42px rgba(30,28,25,.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fbf8f1;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}
button, input, select, textarea { font: inherit; }
button, .button, .upload-button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
h1 { font-size: clamp(2.3rem, 7vw, 4.8rem); line-height: .95; margin-bottom: 0; }
h2 { font-size: 1.8rem; }
label {
  display: grid;
  gap: 10px;
  color: rgba(30,28,25,.7);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--soft-line);
  border-radius: 0;
  background: rgba(255,253,249,.72);
  padding: 13px 0;
  color: var(--ink);
}
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: rgba(30,28,25,.42); }
.muted { color: var(--muted); }
.eyebrow {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.wordmark { color: var(--ink); font-family: Arial, sans-serif; font-weight: 700; letter-spacing: .14em; text-decoration: none; }
.logo-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  text-decoration: none;
}
.brand-logo {
  display: block;
  width: auto;
  max-width: min(220px, 58vw);
  height: 38px;
  object-fit: contain;
}
.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  height: 72px;
  border-bottom: 1px solid rgba(30,28,25,.08);
  background: rgba(251,248,241,.86);
  padding: 0 20px;
  backdrop-filter: blur(16px);
}
.header-logo { justify-self: start; }
.site-header .mobile-only { justify-self: start; }
.cart-button {
  justify-self: end;
  border: 0;
  background: none;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .12em;
}
.cart-button span {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  margin-left: 7px;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font-size: 10px;
  line-height: 1;
}
.catalog-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-height: 245px;
  padding: 62px 20px 38px;
  background:
    linear-gradient(180deg, rgba(243,239,232,.92), rgba(251,248,241,1));
}
.catalog-intro h1 { letter-spacing: -.035em; }
.catalog-layout { display: grid; grid-template-columns: 260px 1fr; }
.filters {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  border-right: 1px solid rgba(30,28,25,.08);
  padding: 34px 28px;
  background: rgba(255,253,249,.62);
}
.filters label { margin-bottom: 26px; }
.filters input,
.filters select {
  border-width: 0 0 1px;
  background-color: transparent;
}
.filter-heading {
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
}
.filter-heading h2 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.filter-footer { position: absolute; bottom: 24px; }
.catalog-content { min-width: 0; padding: 34px 20px 96px; }
.catalog-meta {
  display: flex;
  justify-content: space-between;
  min-height: 44px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
}
.product-grid { display: grid; grid-template-columns: 1fr; gap: 48px 18px; }
.product-card { min-width: 0; }
.product-card button {
  appearance: none;
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  background: none;
  transition: transform .35s ease, filter .35s ease;
}
.product-card button:focus-visible { outline: 1px solid var(--ink); outline-offset: 7px; }
.product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin-bottom: 20px;
  background: #eee7dc;
  transition: box-shadow .45s ease;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: opacity .45s ease, transform .65s ease;
}
.card-image-primary { display: block; }
.card-image-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.product-card:hover .product-image { box-shadow: var(--soft-shadow); }
.product-card:hover .product-image img { transform: scale(1.03); }
.product-card:hover .card-image-hover { opacity: 1; }
.image-fallback { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.product-card-info {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  align-content: start;
  gap: 8px;
  min-height: 142px;
}
.product-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.25;
}
.product-card p { margin: 0; }
.product-card-articolo,
.product-card-moq {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.product-card-material {
  min-height: 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.product-card-price {
  align-self: end;
  margin-top: 8px !important;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
}
.product-price { color: var(--ink) !important; }
.button, .upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--ink);
  padding: 11px 16px;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: .11em;
}
.button-dark { color: white; background: var(--ink); }
.button-light, .upload-button { color: var(--ink); background: transparent; }
.button-full { width: 100%; }
.upload-button input, .button input { display: none; }
.text-button, .icon-button { border: 0; padding: 0; color: var(--ink); background: none; text-decoration: underline; }
.icon-button { text-decoration: none; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.empty-state { max-width: 480px; margin: 70px auto; text-align: center; }
.empty-state code { padding: 2px 4px; background: var(--cream); }
dialog { width: min(920px, calc(100% - 24px)); border: 0; padding: 0; background: var(--paper); box-shadow: 0 24px 80px rgba(25,20,15,.2); }
dialog::backdrop { background: rgba(25,20,15,.5); }
.dialog-close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 14px;
  border: 0;
  padding: 8px;
  background: none;
  font-size: 25px;
}
.product-detail { display: grid; grid-template-columns: 1.1fr .9fr; }
.detail-image { display: grid; gap: 1px; min-height: 560px; background: var(--cream); }
.detail-image img { width: 100%; height: auto; object-fit: cover; }
.detail-info { padding: 58px 44px 38px; }
.detail-logo { margin-bottom: 34px; }
.detail-info h2 { margin-bottom: 8px; font-size: 2.4rem; }
.detail-sku { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.detail-list { margin: 34px 0; border-top: 1px solid var(--line); }
.detail-row { display: grid; grid-template-columns: 100px 1fr; gap: 15px; border-bottom: 1px solid var(--line); padding: 13px 0; font-size: 12px; }
.detail-row dt { color: var(--muted); }
.detail-row dd { margin: 0; }
.purchase-grid { display: grid; grid-template-columns: 1fr 100px; gap: 10px; margin-bottom: 10px; }
.moq-note { margin: 8px 0 14px; color: var(--muted); font-size: 11px; }
.cart-drawer {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  width: min(460px, 100%);
  height: 100%;
  padding: 24px;
  background: var(--paper);
  transform: translateX(100%);
  transition: transform .3s ease;
  overflow: auto;
}
.cart-drawer.open { transform: translateX(0); }
.drawer-head { position: relative; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 12px 0 18px; }
.drawer-head .dialog-close { top: 0; right: 0; }
.scrim { position: fixed; z-index: 40; inset: 0; background: rgba(25,20,15,.45); }
.cart-items { min-height: 180px; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; border-bottom: 1px solid var(--line); padding: 18px 0; }
.cart-item h3 { margin-bottom: 4px; font-family: Georgia, serif; font-weight: 400; }
.cart-controls { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.cart-controls input { width: 60px; padding: 7px; }
.cart-totals { display: flex; justify-content: space-between; padding: 22px 0; font-size: 16px; }
.order-dialog, .summary-dialog { max-width: 680px; padding: 42px 28px 28px; }
.order-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.field-wide { grid-column: 1 / -1; }
.summary-dialog pre { overflow: auto; max-height: 50vh; border: 1px solid var(--line); padding: 16px; background: var(--cream); white-space: pre-wrap; font: 12px/1.6 monospace; }
.summary-actions { display: flex; gap: 10px; margin-top: 18px; }
.login-page {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,253,249,.72), transparent 34%),
    linear-gradient(135deg, #d9cdbd 0%, #f3efe8 50%, #b8a68f 100%);
}
.login-hero-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--cream);
}
.login-hero-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,253,249,.16), transparent 34%),
    linear-gradient(120deg, rgba(42,34,25,.48), rgba(91,72,52,.24) 45%, rgba(24,21,18,.54));
  backdrop-filter: saturate(1.05);
}
.login-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  border: 1px solid rgba(255,255,255,.42);
  padding: 52px 38px 36px;
  background: rgba(255,253,249,.68);
  box-shadow: 0 30px 90px rgba(25,20,15,.28);
  text-align: center;
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
}
.login-card h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 8vw, 3.25rem);
  line-height: 1;
}
.login-card .muted {
  color: rgba(30,28,25,.72);
  line-height: 1.65;
}
.login-logo { justify-content: center; margin: 0 auto 32px; }
.login-card form { display: grid; gap: 16px; margin-top: 32px; text-align: left; }
.login-card input {
  border-color: rgba(30,28,25,.22);
  background: rgba(255,253,249,.74);
}
.login-card input::placeholder { color: rgba(119,113,104,.74); }
.login-card .button-dark {
  border-color: rgba(30,28,25,.94);
  background: rgba(30,28,25,.94);
}
.login-card > .muted:last-child {
  margin: 24px 0 0;
  font-size: 12px;
}
.form-error { min-height: 16px; margin: -4px 0; color: #9a2f22; font-size: 12px; }
.success-card h1 { margin-bottom: 28px; }
.success-card .button { margin-top: 22px; }
.order-reference {
  margin: 24px 0;
  border: 1px solid var(--line);
  padding: 14px;
  font-family: monospace;
  font-size: 12px;
}
.mobile-only { display: none; }

@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 54px 22px; }
}

@media (min-width: 1100px) {
  .site-header { padding-inline: 34px; }
  .catalog-intro { padding: 70px 40px 45px; }
  .catalog-content { padding: 36px 42px 100px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 32px; }
}

@media (max-width: 700px) {
  .mobile-only { display: block; }
  .catalog-layout { display: block; }
  .filters {
    position: fixed;
    z-index: 60;
    top: 0;
    left: 0;
    width: min(340px, 90%);
    height: 100%;
    transform: translateX(-100%);
    transition: transform .25s ease;
    background: var(--paper);
  }
  .filters.open { transform: translateX(0); }
  .filter-footer { position: static; margin-top: 40px; }
  .catalog-intro { align-items: start; flex-direction: column; gap: 28px; }
  .site-header {
    height: 64px;
    padding-inline: 14px;
  }
  .brand-logo { height: 34px; }
  .catalog-content { padding: 26px 16px 78px; }
  .product-grid { grid-template-columns: 1fr; gap: 46px; }
  .product-card-info { min-height: 0; }
  .product-detail { display: block; }
  .detail-image { min-height: 0; }
  .detail-info { padding: 38px 20px 24px; }
  .order-form { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .summary-actions { flex-direction: column; }
}
