@import url("https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600&display=swap");

:root {
  --ink: #111;
  --muted: #6f7280;
  --line: #e6e6e6;
  --soft: #f5f5f5;
  --paper: #fff;
  --danger: #b42318;
  --serif: "Playfair Display", Georgia, serif;
  --sans: Jost, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  margin: 0;
}

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

button,
input,
select {
  font: inherit;
}

.header {
  align-items: center;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1.5rem;
  height: 64px;
  padding: 0 clamp(1rem, 2vw, 2rem);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
}

.desktop-nav,
.header-actions {
  align-items: center;
  display: flex;
  gap: 1.2rem;
}

.desktop-nav {
  flex: 1;
  justify-content: center;
}

.desktop-nav a,
.header-actions a,
.link-button {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0;
  text-transform: uppercase;
}

main {
  margin: 0 auto;
  max-width: 1600px;
  min-height: 70vh;
  padding: clamp(1rem, 2vw, 2rem);
}

.eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  text-transform: uppercase;
}

.button {
  align-items: center;
  border: 1px solid var(--ink);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
}

.button-dark {
  background: var(--ink);
  color: white;
  font-weight: 700;
}

.hero {
  background: var(--soft);
  min-height: min(760px, calc(100vh - 80px));
  overflow: hidden;
  padding: clamp(1.25rem, 5vw, 4rem);
  position: relative;
}

.hero-copy {
  display: grid;
  min-height: calc(min(760px, 100vh - 80px) - 8rem);
  max-width: 620px;
  place-content: end start;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 500;
  line-height: 0.88;
  margin: 0 0 1.25rem;
}

.hero-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.8;
  max-width: 680px;
}

.hero-image {
  inset: 0;
  position: absolute;
}

.hero-image img {
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
  width: 100%;
}

.hero-note {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  bottom: 1rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  max-width: calc(100% - 2rem);
  padding: 0.85rem 1rem;
  position: absolute;
  right: 1rem;
  width: min(430px, calc(100% - 2rem));
  z-index: 3;
}

.section {
  padding-top: clamp(2.25rem, 6vw, 5rem);
}

.section-heading,
.listing-toolbar {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section h2,
.listing-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  font-weight: 500;
  line-height: 1.05;
  margin: 0;
}

.rail {
  display: grid;
  gap: clamp(0.85rem, 1.4vw, 1.25rem);
  grid-auto-columns: clamp(220px, 23vw, 320px);
  grid-auto-flow: column;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

.carousel-controls {
  display: flex;
  gap: 0.55rem;
}

.carousel-button {
  background: white;
  border: 1px solid var(--ink);
  cursor: pointer;
  font-size: 1.45rem;
  height: 2.35rem;
  width: 2.35rem;
}

.product-card {
  background: white;
  display: block;
  min-width: 0;
  scroll-snap-align: start;
}

.product-card-media {
  aspect-ratio: 4 / 5;
  background: var(--soft);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}

.product-card-media img {
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
  width: 100%;
}

.product-card:hover img {
  transform: scale(1.025);
}

.badges {
  display: flex;
  gap: 0.35rem;
  left: 0.55rem;
  position: absolute;
  top: 0.55rem;
}

.badges span {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  color: #2563eb;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.45rem;
}

.product-card-copy {
  padding-top: 0.75rem;
}

.vendor,
.details {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0;
}

.vendor {
  font-weight: 600;
  text-transform: uppercase;
}

.product-card h3 {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.32;
  margin: 0.2rem 0 0.35rem;
}

.price {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.price s {
  color: var(--muted);
  font-weight: 400;
}

.trust-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 2rem;
}

.trust-section p,
.listing-hero p {
  color: var(--muted);
  line-height: 1.6;
}

.listing-hero {
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1rem 0 1.5rem;
}

.listing-layout {
  align-items: start;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 280px minmax(0, 1fr);
}

.filter-panel {
  border: 1px solid var(--line);
  padding: 1rem;
  position: sticky;
  top: 80px;
}

.filter-panel label,
.filter-panel fieldset {
  border: 0;
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0;
  padding: 0;
}

.filter-panel span,
.filter-panel legend {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.filter-panel input,
.filter-panel select,
.listing-toolbar select {
  border: 1px solid var(--line);
  min-height: 42px;
  padding: 0.5rem;
}

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

.pdp-page {
  display: grid;
  gap: 1.5rem;
}

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

.product-detail {
  align-items: start;
  display: grid;
  gap: clamp(1.25rem, 2.4vw, 2rem);
  grid-template-columns: minmax(0, 54%) minmax(390px, 1fr);
}

.product-media-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 90px minmax(0, 1fr);
}

.thumbs {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.thumbs button {
  aspect-ratio: 3 / 4;
  background: #f3f4f6;
  border: 1px solid var(--line);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
}

.thumbs img,
.main-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.main-image {
  aspect-ratio: 3 / 4;
  background: #f3f4f6;
  border: 1px solid var(--line);
  cursor: zoom-in;
  overflow: hidden;
}

.main-image img {
  object-fit: contain;
}

.product-panel h1 {
  font-size: clamp(1.85rem, 2.2vw, 2.35rem);
  line-height: 1.18;
  margin: 0;
}

.pdp-price {
  font-size: clamp(2rem, 2.8vw, 2.7rem);
  font-weight: 700;
  margin: 1rem 0 0;
}

.tax,
.short-description {
  color: var(--muted);
}

.loyalty-box,
.delivery-card {
  background: #f6f7f9;
  border: 1px solid var(--line);
  color: var(--muted);
  margin-top: 1rem;
  padding: 0.9rem 1rem;
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.75rem 0 1rem;
}

.option {
  background: #f7f7f7;
  border: 1px solid var(--line);
  cursor: pointer;
  min-height: 48px;
  min-width: 56px;
  padding: 0.55rem 0.85rem;
}

.option.active {
  border-color: var(--ink);
  background: white;
}

.purchase-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 112px minmax(0, 1fr) 76px;
  margin-top: 1.25rem;
}

.qty {
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 36px 1fr 36px;
}

.qty button {
  background: white;
  border: 0;
  cursor: pointer;
}

.qty span {
  align-self: center;
  text-align: center;
}

.wishlist-button {
  background: white;
  border: 1px solid var(--line);
}

.contact-row {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
  margin-top: 1.2rem;
  padding: 0.95rem 0;
}

.contact-row a {
  background: #f7f7f7;
  font-weight: 700;
  padding: 0.8rem;
  text-align: center;
}

.detail-table {
  border: 1px solid var(--line);
  margin-top: 1.5rem;
}

.detail-table div {
  display: grid;
  gap: 1rem;
  grid-template-columns: 170px minmax(0, 1fr);
  padding: 1rem;
}

.detail-table div + div {
  border-top: 1px solid var(--line);
}

.detail-table span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.footer {
  background: var(--ink);
  color: white;
  margin-top: 4rem;
}

.footer-inner {
  align-items: start;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1440px;
  padding: 2rem clamp(1rem, 3vw, 2.5rem);
}

.footer p,
.footer a {
  color: rgba(255, 255, 255, 0.72);
}

.footer-contact {
  display: flex;
  gap: 1rem;
}

.drawer {
  background: rgba(0, 0, 0, 0.2);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 180ms ease;
  z-index: 20;
}

.drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  background: white;
  height: 100%;
  margin-left: auto;
  max-width: 430px;
  overflow: auto;
  padding: 1rem;
  transform: translateX(100%);
  transition: transform 180ms ease;
}

.drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-header,
.cart-line,
.cart-total {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 0;
}

.cart-line img {
  height: 96px;
  object-fit: cover;
  width: 76px;
}

.cart-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.cart-actions a,
.cart-actions button {
  text-align: center;
}

.lightbox {
  align-items: center;
  background: rgba(10, 10, 10, 0.94);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 2rem;
  position: fixed;
  z-index: 30;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-height: calc(100vh - 4rem);
  max-width: 100%;
  object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
  background: transparent;
  border: 0;
  color: white;
  cursor: pointer;
  font-size: 3rem;
  position: absolute;
}

.lightbox-close {
  font-size: 1.5rem;
  right: 1.5rem;
  top: 1rem;
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

.empty {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 2rem;
}

@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }

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

  .hero {
    display: grid;
    min-height: 0;
    padding: 0;
  }

  .hero-copy {
    min-height: 0;
    order: 2;
    padding: 1.25rem 0 0;
  }

  .hero-image {
    aspect-ratio: 4 / 5;
    position: relative;
  }

  .listing-layout,
  .listing-hero,
  .product-detail,
  .trust-section {
    display: grid;
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

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

  .product-media-layout,
  .detail-table div {
    grid-template-columns: 1fr;
  }

  .thumbs {
    flex-direction: row;
    overflow-x: auto;
    order: 2;
  }

  .thumbs button {
    flex: 0 0 78px;
  }

  .footer-inner,
  .footer-contact {
    display: grid;
  }
}

@media (max-width: 560px) {
  main {
    padding: 1rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .rail {
    grid-auto-columns: minmax(74vw, 1fr);
  }

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