/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #1a1a1a;
  --grey:    #555;
  --light:   #f5f5f5;
  --border:  #e0e0e0;
  --bg:      #ffffff;
  --surface: #ffffff;
  --radius:  6px;
  --shadow:  0 2px 8px rgba(0,0,0,.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --black:   #f0f0f0;
    --grey:    #999;
    --light:   #2a2a2a;
    --border:  #333;
    --bg:      #121212;
    --surface: #1e1e1e;
    --shadow:  0 2px 8px rgba(0,0,0,.4);
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--black);
  background: var(--bg);
  line-height: 1.5;
}

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

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

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  background: #1a1a1a;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.5px;
  color: #fff;
}

.site-nav {
  display: flex;
  gap: 24px;
  margin: 0 auto 0 32px;
}

.site-nav a {
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  transition: color .2s;
}

.site-nav a:hover { color: #fff; }

.cart-btn {
  background: none;
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color .15s;
}
.cart-btn:hover { border-color: #fff; }

.cart-count {
  background: #fff;
  color: var(--black);
  border-radius: 99px;
  padding: 1px 7px;
  font-size: .75rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

/* ── Category filter ──────────────────────────────────────────────────────── */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 28px 0 20px;
}

.filter-pill {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: .85rem;
  color: var(--grey);
  transition: all .15s;
  white-space: nowrap;
}
.filter-pill:hover   { border-color: #1a1a1a; color: #1a1a1a; }
.filter-pill.active  { background: #1a1a1a; border-color: #1a1a1a; color: #fff; }

@media (prefers-color-scheme: dark) {
  .filter-pill:hover  { border-color: #f0f0f0; color: #f0f0f0; }
  .filter-pill.active { background: #f0f0f0; border-color: #f0f0f0; color: #1a1a1a; }
}

/* ── Product grid ─────────────────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding-bottom: 60px;
}

.product-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.product-img-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--light);
  position: relative;
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-primary {
  transition: transform .3s;
}
.product-card:hover .img-primary { transform: scale(1.03); }
.product-card:hover .img-slide,
.product-card:hover .img-bg { transform: none; }
.img-slide, .img-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.product-info {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-name {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}
.product-desc {
  font-size: .8rem;
  color: var(--grey);
  flex: 1;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-price {
  font-size: 1rem;
  font-weight: 700;
}

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

/* ── Breadcrumb ───────────────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 20px 0 0;
  font-size: .82rem;
  color: var(--grey);
}
.breadcrumb a { color: var(--grey); text-decoration: underline; }
.breadcrumb a:hover { color: var(--black); }

/* ── Product detail ───────────────────────────────────────────────────────── */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 28px 0 60px;
}

@media (max-width: 700px) {
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
}

/* Gallery */
.gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light);
  aspect-ratio: 1;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.gallery-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: .7;
  transition: all .15s;
}
.gallery-thumb:hover, .gallery-thumb.active {
  border-color: var(--black);
  opacity: 1;
}

/* Product detail info */
.product-detail-info h1 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}
.detail-price {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.detail-price .currency {
  font-size: .9rem;
  font-weight: 400;
  color: var(--grey);
}
.short-desc {
  color: var(--grey);
  margin-bottom: 16px;
  font-size: .95rem;
}
.full-desc {
  font-size: .9rem;
  color: var(--grey);
  line-height: 1.7;
  margin-bottom: 24px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.full-desc p { margin-bottom: .75em; }
.full-desc p:last-child { margin-bottom: 0; }

/* Variants */
.variant-group { margin-bottom: 18px; }
.variant-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--grey);
  margin-bottom: 8px;
}
.variant-options { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.variant-btn:hover  { border-color: #1a1a1a; }
.variant-btn.active { border-color: #1a1a1a; background: #1a1a1a; color: #fff; }

@media (prefers-color-scheme: dark) {
  .variant-btn         { color: var(--black); }
  .variant-btn:hover   { border-color: #f0f0f0; }
  .variant-btn.active  { border-color: #f0f0f0; background: #f0f0f0; color: #1a1a1a; }
}
.variant-price-adj  { font-size: .72rem; opacity: .8; }

.digital-note {
  font-size: .8rem;
  color: var(--grey);
  margin-top: 10px;
  text-align: center;
}

/* ── Qty stepper ──────────────────────────────────────────────────────────── */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 16px;
  width: fit-content;
}
.qty-stepper button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--black);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.qty-stepper button:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.qty-stepper button:last-child  { border-radius: 0 var(--radius) var(--radius) 0; }
.qty-stepper button:hover { background: var(--light); }
.qty-stepper input {
  width: 48px;
  height: 36px;
  border: 1px solid var(--border);
  border-left: none;
  border-right: none;
  text-align: center;
  font-size: .95rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--black);
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── Personalisation input ────────────────────────────────────────────────── */
.personalisation-group { margin-bottom: 16px; }
.personalisation-group .variant-label { display: block; margin-bottom: 6px; }
.personalisation-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--black);
  box-sizing: border-box;
}
.personalisation-group input:focus { outline: none; border-color: var(--black); }

/* ── Cart qty ─────────────────────────────────────────────────────────────── */
.cart-item-qty { font-size: .78rem; color: var(--grey); margin-top: 2px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: #1a1a1a;
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
  text-align: center;
}
.btn-primary:hover { opacity: .85; }

@media (prefers-color-scheme: dark) {
  .btn-primary { background: #f0f0f0; color: #1a1a1a; }
}
.btn-full { width: 100%; display: block; }

.btn-add-cart { margin-top: 8px; font-size: 1rem; padding: 14px; }

/* ── Cart drawer ──────────────────────────────────────────────────────────── */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 200;
}
.cart-overlay.open { display: block; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 100vw;
  background: var(--surface);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,.12);
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.cart-drawer-header h3 { font-size: 1rem; font-weight: 600; }

.cart-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  color: var(--grey);
}
.cart-close:hover { color: var(--black); }

.cart-items { flex: 1; overflow-y: auto; padding: 16px 20px; }

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.cart-item-name { font-weight: 600; line-height: 1.3; }
.cart-item-variant { font-size: .78rem; color: var(--grey); margin-top: 2px; }
.cart-item-price { font-weight: 700; white-space: nowrap; }
.cart-item-remove {
  background: none;
  border: none;
  color: var(--grey);
  cursor: pointer;
  font-size: .75rem;
  padding: 0;
  margin-top: 4px;
  text-decoration: underline;
}
.cart-item-remove:hover { color: #c00; }

.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.cart-total {
  font-size: 1rem;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}
.cart-empty {
  text-align: center;
  color: var(--grey);
  padding: 40px 20px;
  font-size: .9rem;
}

/* ── Checkout page ────────────────────────────────────────────────────────── */
.checkout-wrap {
  max-width: 560px;
  margin: 40px auto;
  padding: 0 20px 60px;
}
.checkout-wrap h1 { font-size: 1.5rem; margin-bottom: 24px; }

.order-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.order-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
}
.order-summary-row:last-child { border-bottom: none; font-weight: 700; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--grey);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .15s;
  background: var(--surface);
  color: var(--black);
  box-sizing: border-box;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--black);
}
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--black);
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.form-group select:focus { outline: none; border-color: var(--black); }
.suburb-suggestion {
  padding: 10px 12px;
  font-size: .9rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}
.suburb-suggestion:last-child { border-bottom: none; }
.suburb-suggestion:hover { background: var(--light); }

.form-error { color: #c00; font-size: .82rem; margin-top: 4px; }

.contact-wrap { max-width: 560px; padding: 40px 0; }

.form-success h1 { margin: 0 0 8px; }
.form-success p  { margin: 0; color: var(--grey); }

/* ── Order complete ───────────────────────────────────────────────────────── */
.order-complete-wrap {
  max-width: 500px;
  margin: 80px auto;
  text-align: center;
  padding: 0 20px;
}
.order-complete-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.order-complete-wrap h1 { font-size: 1.6rem; margin-bottom: 12px; }
.order-complete-wrap p  { color: var(--grey); margin-bottom: 8px; }

/* ── Download request ─────────────────────────────────────────────────────── */
.download-request-wrap {
  max-width: 440px;
  margin: 60px auto;
  padding: 0 20px 60px;
}
.download-request-wrap h1 { font-size: 1.4rem; margin-bottom: 8px; }
.download-request-wrap p  { color: var(--grey); margin-bottom: 24px; font-size: .9rem; }
