/* ============================================================
   Fashionuble — Editorial Outerwear Edit
   A refined, magazine-inspired commerce surface.
   ============================================================ */

:root {
  --paper: #ffffff;
  --paper-warm: #f5f5f3;
  --ink: #16140f;
  --ink-soft: #4c4a44;
  --rule: #e6e5e1;
  --accent: #edc73d; /* bright marigold */
  --muted: #8d8b85;
  --shadow: 0 1px 2px rgba(22, 20, 15, 0.04);

  --serif: "Fraunces", "Times New Roman", Georgia, serif;
  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;

  --max: 1440px;
  --gutter: clamp(20px, 4vw, 56px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "kern";
}

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

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

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

/* ====================== Masthead ====================== */

.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 28px var(--gutter) 24px;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 50;
}

.nav-left,
.nav-right {
  display: flex;
  gap: 28px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.nav-right {
  justify-content: flex-end;
}

.nav-left a,
.nav-right a {
  position: relative;
  padding: 4px 0;
  transition: opacity 0.2s ease;
}

.nav-left a:hover,
.nav-right a:hover {
  opacity: 0.6;
}

.nav-left a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--ink);
}

.bag-count {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  margin-left: 2px;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 42px);
  letter-spacing: -0.02em;
  text-align: center;
  font-feature-settings: "ss01", "swsh";
  position: relative;
}

.wordmark-mark {
  font-size: 0.35em;
  vertical-align: super;
  margin-left: 2px;
  font-style: italic;
  opacity: 0.6;
}

/* ====================== Editorial hero ====================== */

.editorial-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-areas:
    "title quote"
    "meta  .";
  gap: 40px 56px;
  padding: clamp(60px, 9vw, 140px) var(--gutter) clamp(60px, 8vw, 110px);
  border-bottom: 1px solid var(--rule);
  position: relative;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.45)),
    url("assets/background.jpg");
  background-size: cover;
  background-position: center;
}

.editorial-hero::before {
  content: "Vol. X";
  position: absolute;
  top: 24px;
  right: var(--gutter);
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

.editorial-hero::after {
  content: "SS · 26";
  position: absolute;
  top: 24px;
  left: var(--gutter);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero-meta {
  grid-area: meta;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: end;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}

.hero-title-block {
  grid-area: title;
  text-align: left;
  align-self: center;
}

.kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(54px, 9.5vw, 148px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-feature-settings: "ss01";
}

.hero-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.hero-pullquote {
  grid-area: quote;
  align-self: end;
  justify-self: end;
  text-align: right;
  max-width: 300px;
}

.hero-pullquote p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(16px, 1.45vw, 22px);
  line-height: 1.34;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.hero-pullquote cite {
  display: block;
  margin-top: 18px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ====================== Filter bar ====================== */

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 80px;
  background: var(--paper);
  z-index: 40;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.filter-count {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
}

.filter-controls {
  display: flex;
  gap: 4px;
}

.filter-btn {
  padding: 8px 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  border-radius: 999px;
}

.filter-btn:hover {
  color: var(--ink);
}

.filter-btn.active {
  background: var(--ink);
  color: var(--paper);
}

.filter-sort {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-sort label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-sort select {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink);
  padding: 4px 22px 4px 0;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2316140f' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

/* ====================== Collection grid ====================== */

.collection {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 1px;
  background: var(--rule);
  border-bottom: 1px solid var(--rule);
}

.product {
  background: var(--paper);
  padding: 32px 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: background 0.3s ease;
}

.product:hover {
  background: var(--paper);
}

.product--feature {
  grid-column: span 2;
  background: var(--paper);
  flex-direction: row;
  align-items: stretch;
  padding: 40px;
  gap: 40px;
}

.product--feature:hover {
  background: var(--paper);
}

.product--feature .product-media {
  flex: 1.5;
}

.product--feature .product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.product--feature .product-name {
  font-size: 32px;
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-warm);
}

.product--feature .product-media {
  aspect-ratio: auto;
  min-height: 480px;
}

/* Placeholder shown until a real image is dropped in at images/{handle}.jpg */
.placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px;
  text-align: center;
  background: var(--paper);
}

.placeholder::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(22, 20, 15, 0.12);
  pointer-events: none;
}

.placeholder-mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
}

.placeholder-name {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-soft);
  max-width: 200px;
  line-height: 1.35;
}

.placeholder-meta {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.product-image {
  position: absolute;
  inset: 28px;
  width: calc(100% - 56px);
  height: calc(100% - 56px);
  object-fit: contain;
  object-position: center;
  z-index: 1;
  transition: transform 0.6s cubic-bezier(0.2, 0, 0, 1);
}

.product--feature .product-image {
  inset: 36px;
  width: calc(100% - 72px);
  height: calc(100% - 72px);
}

.product:hover .product-image {
  transform: scale(1.03);
}

.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 10px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  z-index: 2;
}

.badge-new {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.badge-soldout {
  background: var(--paper);
  color: var(--accent);
  border-color: var(--accent);
}

.quick-view {
  position: absolute;
  bottom: 45%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 20px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
  z-index: 2;
}

.product:hover .quick-view {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.quick-view:hover {
  background: var(--ink);
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.product-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.product-editorial {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 300;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

.product-color {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.product-price {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: -0.01em;
}

/* ====================== Editor's note ====================== */

.editors-note {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(60px, 8vw, 110px) var(--gutter);
  text-align: center;
  border-bottom: 1px solid var(--rule);
}

.note-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
}

.editors-note p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.note-signature {
  display: block;
  margin-top: 32px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
}

/* ====================== Footer ====================== */

.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px var(--gutter) 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 56px;
  max-width: var(--max);
  margin: 0 auto 64px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13px;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--paper);
}

.footer-heading {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.newsletter {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 6px;
  margin-top: 8px;
}

.newsletter input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
  padding: 4px 0;
  outline: none;
}

.newsletter input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.newsletter button {
  color: var(--paper);
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.newsletter button:hover {
  opacity: 0.7;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ====================== Modal ====================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal[hidden] {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(22, 20, 15, 0.55);
  backdrop-filter: blur(2px);
}

.modal-panel {
  position: relative;
  background: var(--paper);
  width: min(960px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  animation: modalIn 0.4s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 28px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-family: var(--serif);
  font-weight: 300;
  color: var(--ink);
  transition: transform 0.2s ease;
}

.modal-close:hover {
  transform: rotate(90deg);
}

.modal-content {
  display: contents;
}

.modal-media {
  background: var(--paper-warm);
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
}

.modal-detail {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-id {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.modal-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.modal-editorial {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--accent);
  font-weight: 300;
}

.modal-price {
  font-family: var(--serif);
  font-size: 22px;
  margin-top: 4px;
  margin-bottom: 8px;
}

.modal-description {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.modal-specs {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px 16px;
  margin: 16px 0;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 12px;
}

.modal-specs dt {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-size: 11px;
}

.modal-specs dd {
  color: var(--ink-soft);
}

.size-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.size-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.sizes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.size-btn {
  padding: 10px 14px;
  border: 1px solid var(--rule);
  font-size: 12px;
  letter-spacing: 0.06em;
  min-width: 44px;
  background: var(--paper);
  transition: all 0.2s ease;
}

.size-btn:hover {
  border-color: var(--ink);
}

.size-btn.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.add-btn {
  background: var(--ink);
  color: var(--paper);
  padding: 16px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 12px;
  transition: background 0.2s ease;
}

.add-btn:hover:not(:disabled) {
  background: var(--accent);
}

.add-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.modal-link {
  text-align: center;
  margin-top: 4px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.modal-link:hover {
  color: var(--ink);
}

/* ====================== Responsive ====================== */

@media (max-width: 1024px) {
  .editorial-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "meta"
      "title"
      "quote";
    text-align: center;
    gap: 28px;
  }

  .hero-meta {
    align-self: auto;
    align-items: center;
    text-align: center;
  }

  .hero-title-block {
    text-align: center;
  }

  .hero-pullquote {
    justify-self: center;
    text-align: center;
  }

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

  .product--feature {
    grid-column: span 2;
    flex-direction: column;
  }

  .product--feature .product-media {
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 720px) {
  .nav-left,
  .nav-right {
    display: none;
  }

  .masthead {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 20px var(--gutter);
  }

  .filter-bar {
    flex-wrap: wrap;
    gap: 14px;
    top: 70px;
  }

  .filter-controls {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

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

  .product--feature {
    grid-column: span 1;
    padding: 28px 24px;
  }

  .modal-panel {
    grid-template-columns: 1fr;
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
  }

  .modal-detail {
    padding: 32px 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .editorial-hero::before,
  .editorial-hero::after {
    display: none;
  }
}
