/* ── Salty Dews — Shared Styles ── */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');

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

:root {
  --navy:      #1A2535;
  --teal:      #2A4755;
  --amber:     #C87840;
  --paper:     #F4F2ED;
  --white:     #FFFFFF;
  --ink:       #111010;
  --gray:      #888480;
  --rule:      #E0DDD6;

  --serif:  'Cormorant Garamond', Georgia, serif;
  --mono:   'Courier Prime', 'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── HEADER ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 28px 48px 0;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 0;
}

.header-left {
  display: flex;
  align-items: center;
  padding-top: 4px;
}

.header-brand {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-align: center;
  grid-column: 2;
  cursor: pointer;
}
.header-brand a { display: block; }

.header-right {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding-top: 6px;
}

.cart-btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.header-nav {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 16px 0 20px;
  grid-column: 1 / -1;
}
.header-nav a {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 300;
  color: var(--ink);
  letter-spacing: 0.02em;
  position: relative;
}
.header-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 1px;
  background: var(--ink);
}

/* ── CART DRAWER ── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  will-change: opacity;
}
.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 380px;
  background: var(--white);
  z-index: 400;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.cart-drawer.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px 24px;
}
.cart-header h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 300;
}
.cart-close {
  font-family: var(--mono);
  font-size: 18px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--gray);
  line-height: 1;
  transition: color 0.2s;
}
.cart-close:hover { color: var(--ink); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0 32px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.cart-empty {
  padding: 48px 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gray);
  letter-spacing: 0.08em;
  text-align: center;
}

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
}
.cart-item-img {
  width: 64px;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--paper);
}
.cart-item-info {}
.cart-item-name {
  font-size: 15px;
  font-weight: 400;
  margin-bottom: 2px;
}
.cart-item-edition {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--gray);
  text-transform: uppercase;
}
.cart-item-price {
  font-family: var(--mono);
  font-size: 13px;
}
.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--gray);
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
  align-self: start;
  margin-top: 2px;
}
.cart-item-remove:hover { color: var(--ink); }

.cart-footer {
  padding: 24px 32px 32px;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
}
.cart-total-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
}
.cart-total-amount {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
}

.btn-checkout {
  width: 100%;
  padding: 16px;
  background: var(--navy);
  color: var(--white);
  border: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-checkout:hover { background: var(--teal); }

/* ── MAIN CONTENT ── */
main {
  padding-top: 120px;
}

/* ── PAGE HERO ── */
.page-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 60px 48px;
  text-align: center;
}
.page-hero-image {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 5/6;
  object-fit: cover;
  margin-bottom: 0;
  cursor: pointer;
  transition: opacity 0.3s;
}

/* ── PRODUCT PAGE ── */
.product-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 48px 120px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.product-gallery {}
.product-main-img {
  width: 100%;
  aspect-ratio: 5/6;
  object-fit: cover;
  margin-bottom: 12px;
  cursor: pointer;
}
.product-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.product-thumb {
  width: 68px;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s;
  border: 1px solid transparent;
}
.product-thumb:hover,
.product-thumb.active { opacity: 1; border-color: var(--ink); }

.product-info {
  position: sticky;
  top: 140px;
}
.product-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 12px;
}
.product-title {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 6px;
}
.product-subtitle {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 300;
  font-style: italic;
  color: var(--gray);
  margin-bottom: 32px;
}
.product-price {
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: 0.05em;
  margin-bottom: 28px;
}
.product-desc {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.8;
  color: #444;
  margin-bottom: 28px;
  padding-top: 0;
}

/* ── ADD TO CART BUTTON ── */
.btn-add {
  width: 100%;
  padding: 16px 32px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 12px;
}
.btn-add:hover { background: rgba(17,16,16,0.05); }
.btn-added {
  background: rgba(42,71,85,0.08) !important;
  border-color: var(--teal) !important;
  color: var(--teal) !important;
}

.product-specs {
  margin-top: 32px;
  padding-top: 0;
}
.spec-row {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  font-size: 13px;
}
.spec-key {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  width: 100px;
  flex-shrink: 0;
  padding-top: 2px;
}
.spec-val {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.5;
}

/* ── CREDITS ── */
.product-credits {
  margin-top: 24px;
  padding-top: 0;
}
.credit-row {
  display: flex;
  gap: 16px;
  padding: 5px 0;
  font-size: 13px;
}
.credit-key {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gray);
  width: 140px;
  flex-shrink: 0;
  padding-top: 1px;
}
.credit-val {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.5;
}

/* ── ABOUT SECTION ── */
.about-section {
  max-width: 640px;
  margin: 0 auto;
  padding: 60px 48px 100px;
}
.about-section p {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.85;
  color: #333;
  margin-bottom: 28px;
}
.about-section p:last-child { margin-bottom: 0; }

/* ── POSTERS PAGE ── */
.posters-grid {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 48px 120px;
}
.posters-intro {
  text-align: center;
  margin-bottom: 60px;
}
.posters-intro h1 {
  font-size: 36px;
  font-weight: 300;
  margin-bottom: 8px;
}
.posters-intro p {
  font-size: 15px;
  font-weight: 300;
  font-style: italic;
  color: var(--gray);
}
.posters-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.poster-item {}
.poster-img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--paper);
  margin-bottom: 16px;
  cursor: pointer;
  transition: opacity 0.25s;
}
.poster-info {}
.poster-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 300;
  margin-bottom: 2px;
}
.poster-size {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gray);
  margin-bottom: 8px;
}
.poster-price {
  font-family: var(--mono);
  font-size: 13px;
  margin-bottom: 12px;
}
.btn-add-small {
  padding: 10px 20px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
}
.btn-add-small:hover { background: rgba(17,16,16,0.05); }

/* ── FOOTER ── */
.site-footer {
  padding: 32px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-footer p {
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.1em;
  color: var(--gray);
}

/* ── ORDER FORM MODAL ── */
.order-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  will-change: opacity;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.order-overlay.open { opacity: 1; pointer-events: all; }

.order-modal {
  background: var(--white);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 48px;
  position: relative;
}
.order-modal-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none; border: none;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--gray);
  cursor: pointer;
  line-height: 1;
}
.order-modal-close:hover { color: var(--ink); }

.order-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  margin-bottom: 24px;
}

.order-summary {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.order-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 300;
  padding: 4px 0;
  color: #444;
}
.order-summary-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  margin-top: 14px;
}

.order-note {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.75;
  color: var(--gray);
  margin-bottom: 28px;
}

.order-form label {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 6px;
}
.order-form input,
.order-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: var(--white);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 300;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 18px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}
.order-form input:focus,
.order-form textarea:focus { border-color: var(--ink); }
.order-form textarea { resize: vertical; min-height: 80px; }

.btn-submit-order {
  width: 100%;
  padding: 16px;
  background: var(--navy);
  color: var(--white);
  border: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}
.btn-submit-order:hover { background: var(--teal); }
.btn-submit-order:disabled { opacity: 0.5; cursor: not-allowed; }

.order-success {
  text-align: center;
  padding: 48px 0 24px;
}
.order-success-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 300;
  margin-bottom: 16px;
}
.order-success-msg {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.8;
  color: var(--gray);
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: var(--white);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 12px 28px;
  opacity: 0;
  transition: all 0.35s;
  pointer-events: none;
  z-index: 500;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .site-header { padding: 20px 24px 0; }
  .header-brand { font-size: 22px; }
  .header-nav { gap: 28px; padding: 14px 0 16px; }
  .product-page { grid-template-columns: 1fr; gap: 40px; padding: 40px 24px 80px; }
  .product-info { position: static; }
  .posters-list { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .posters-grid { padding: 40px 24px 80px; }
  .about-section { padding: 40px 24px 60px; }
  .cart-drawer { width: 100%; }
  main { padding-top: 105px; }
}
