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

:root {
  --bg: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e4e0da;
  --brown: #6b5a48;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', Helvetica, Arial, sans-serif;
  --nav-h: 84px;
}

* { box-sizing: border-box; }

/* Guarantees the `hidden` attribute always wins, even on elements (like
   .btn) that set their own `display` value -- otherwise a same-specificity
   cascade tie can leave a "hidden" element visible. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.site-social {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  color: var(--brown);
}

.site-social svg {
  width: 22px;
  height: 22px;
}

.site-social:hover {
  opacity: 0.7;
}

.site-logo {
  grid-column: 2;
  justify-self: center;
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: 0.03em;
  color: var(--brown);
  display: block;
}

.site-logo-image {
  display: block;
  max-height: 180px;
  width: auto;
}

.site-nav {
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 32px;
}

.site-nav a {
  color: var(--brown);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-toggle {
  grid-column: 3;
  justify-self: end;
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* Cyanotype intro */
.cyanotype-intro {
  padding: 90px 0 50px;
}

.cyanotype-intro-heading {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 48px);
  text-align: center;
  color: var(--ink);
  margin: 0 0 40px;
}

.cyanotype-intro-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.cyanotype-intro-images img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.cyanotype-intro-text {
  max-width: 760px;
  margin: 0 auto;
}

.cyanotype-intro-text p {
  color: var(--muted);
  margin: 0 0 18px;
}

.cyanotype-intro-text p:last-child {
  margin-bottom: 0;
}

/* Hero */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 3300 / 1275;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding-bottom: 5%;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-signature {
  display: block;
  width: clamp(180px, 24vw, 320px);
  height: auto;
  margin: 0 auto -20px;
}

.hero-content h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 7vw, 80px);
  margin: 0 0 28px;
}

.btn {
  display: inline-block;
  padding: 14px 36px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
}

.btn:hover { background: #eee; }

.btn-outline {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
}

/* Category gallery */
.category-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 24px;
  row-gap: 72px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 55px 32px 130px;
}

.category-tile {
  display: block;
}

.category-tile-image {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #fff;
  background-size: cover;
  background-position: center;
  transition: opacity 0.4s ease;
}

.category-tile:hover .category-tile-image {
  opacity: 0.8;
}

.category-tile-label {
  display: block;
  text-align: center;
  padding-top: 22px;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 0.02em;
}

/* Section */
.section {
  padding: 100px 0;
}

.section-narrow {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.section h2,
.about-section h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 40px;
  margin: 0 0 20px;
}

/* About */
.about-section {
  padding: 110px 0 100px;
}

.about-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 64px;
  align-items: center;
}

.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 12%;
  display: block;
}

.about-text h2 {
  margin: 0 0 20px;
}

.section p {
  color: var(--muted);
}

/* Product grid (category page) */
.page-title {
  padding: 80px 0 32px;
  text-align: center;
}

.page-title h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 48px;
  margin: 0;
}

.page-intro {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 640px;
  margin: 20px auto 0;
}

.shop-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  padding: 0 32px 24px;
  border-bottom: 1px solid var(--line);
  margin: 0 32px 64px;
}

.shop-filter {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 4px;
}

.shop-filter.active {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

.shop-sub-breadcrumb {
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 0 32px 40px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 24px;
  padding-bottom: 100px;
}

.product-card {
  text-align: center;
}

.product-card-image {
  aspect-ratio: 3 / 4;
  background-size: cover;
  background-position: center;
  margin-bottom: 20px;
  transition: background-size 0.4s ease;
}

.product-card:hover .product-card-image {
  background-size: 115%;
}

.product-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: #4a4a4a;
  margin: 0 0 6px;
}

.product-card .price {
  font-family: var(--sans);
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 17px;
}

.product-card .btn {
  display: inline-block;
  width: auto;
  padding: 10px 32px;
  background: var(--ink);
  color: #fff;
}

.product-card .btn:hover { background: #333; }

.product-card .btn[disabled] {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--muted);
}

/* Product detail page */
.product-breadcrumb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 100px 32px 32px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb span {
  margin: 0 8px;
}

.next-link {
  color: var(--muted);
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding-bottom: 120px;
  align-items: start;
}

.product-detail-image {
  aspect-ratio: 1 / 1;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #fff;
}

.framed-toggle {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brown);
  background: none;
  border: none;
  border-bottom: 1px solid var(--brown);
  cursor: pointer;
  padding: 0 0 2px;
}

.framed-toggle:hover {
  opacity: 0.7;
}

.product-detail-info {
  padding-top: 8px;
}

.product-detail-info h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 40px;
  margin: 0 0 24px;
}

.product-detail-info p {
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 520px;
}

.size-selector {
  display: flex;
  gap: 12px;
  margin: 28px 0 32px;
}

.size-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.size-option span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 92px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.size-option input:checked + span {
  border: 1px solid var(--ink);
}

.size-option-name {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.size-option-dim {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
}

.size-option-price {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
}

.product-detail-info .btn {
  background: var(--ink);
  color: #fff;
}

.product-detail-info .btn:hover {
  background: #333;
}

.product-detail-info .btn[disabled] {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

/* Contact form */
.contact-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  font-family: var(--sans);
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.contact-form textarea { min-height: 140px; resize: vertical; }

.contact-form .hidden { display: none; }

.form-note {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0;
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-copy {
  font-size: 13px;
  color: var(--muted);
}

/* Cart */
.cart-link {
  position: relative;
}

.cart-count {
  display: inline-block;
  margin-left: 5px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brown);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.cart-page .btn {
  margin: 8px 8px 0 0;
}

.cart-items {
  margin: 28px 0;
  text-align: left;
}

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

.cart-item-qty {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

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

.cart-total {
  font-family: var(--sans);
  font-size: 18px;
  margin: 0 0 20px;
}

/* Gift code (BOGO promo, applied in-cart) */
.cart-promo {
  margin: 8px 0 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cart-promo label {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.promo-form-inline {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.promo-form-inline input {
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-width: 220px;
  flex: 1;
}

.promo-message {
  margin-top: 12px;
  font-size: 14px;
  min-height: 1.2em;
}

.promo-message-error {
  color: #b3392c;
}

.promo-message-success {
  color: #2f6f4e;
}

.promo-remove {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 1px solid var(--muted);
  cursor: pointer;
  padding: 0 0 2px;
  white-space: nowrap;
}

.promo-remove:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* Checkout modal */
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.checkout-modal.open { display: flex; }

.checkout-modal-inner {
  position: relative;
  background: #fff;
  width: min(680px, 92vw);
  max-height: 88vh;
  overflow: auto;
  padding: 20px;
}

.checkout-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.checkout-loading {
  text-align: center;
  padding: 60px 0;
  color: var(--muted);
}

/* Mobile */
@media (max-width: 860px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .category-gallery { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    grid-column: 1 / -1;
    justify-self: stretch;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 20px 32px 24px;
    z-index: 30;
  }
  .nav-toggle { display: block; }
  .product-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .category-gallery { grid-template-columns: 1fr; row-gap: 48px; }
  .product-detail { grid-template-columns: 1fr; gap: 32px; }
  .cyanotype-intro-images { grid-template-columns: 1fr; gap: 16px; }
}
