/* ============================================================
   okitshenry — main.css
   ============================================================ */

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

:root {
  --ink:    #1a1714;
  --cream:  #f5f0e8;
  --warm:   #e8dfd0;
  --accent: #c4622d;
  --muted:  #8a8078;
  --border: rgba(26,23,20,0.12);
  --sans:   'Lato', sans-serif;

  /* Layout */
  --max-width:   1200px;
  --page-margin: 48px;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.6;
  min-height: 100vh;
}


/* ── HEADER ─────────────────────────────────────────────────── */

header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  height: 64px;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-margin);
  height: 100%;
  display: flex; align-items: center; gap: 32px;
}

.logo {
  font-family: var(--sans); font-size: 18px; font-weight: 700;
  letter-spacing: 0.06em; text-decoration: none; color: var(--ink);
  text-transform: lowercase; margin-right: 4px;
}

.header-nav { display: flex; align-items: center; gap: 24px; flex: 1; }

.nav-link {
  font-size: 13px; font-weight: 400; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none;
  color: var(--muted); transition: color 0.2s;
}
.nav-link:hover { color: var(--ink); }

.cart-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--border);
  padding: 9px 20px; border-radius: 2px;
  font-family: var(--sans); font-size: 12px; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink); cursor: pointer; margin-left: auto;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.cart-btn:hover { background: var(--warm); border-color: var(--ink); }

.cart-count {
  background: var(--accent); color: white;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 11px; display: none; align-items: center; justify-content: center;
}
.cart-count.visible { display: flex; }


/* ── PAGE CONTAINER ─────────────────────────────────────────── */

main {
  margin-top: 64px;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--page-margin);
}


/* ── SECTIONS ───────────────────────────────────────────────── */

.section { margin-top: 48px; }
.section + .section { margin-top: 0; }

.section-heading {
  padding: 36px 0 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: baseline; gap: 14px;
}
.section-heading h2 {
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
}
.section-heading span { font-size: 14px; color: var(--muted); font-weight: 300; }


/* ── GRID ───────────────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2px;
  border-bottom: 1px solid var(--border);
}

.product-card {
  background: var(--warm);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  animation: fadeUp 0.5s ease both;
}

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

.product-image {
  width: 100%; aspect-ratio: 1/1;
  position: relative; overflow: hidden;
}
.thumb-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* ── Placeholder gradients (remove once real images are added) ── */
.art-1 { background: linear-gradient(135deg, #d4c4b0 0%, #b8a898 50%, #8a7a6a 100%); }
.art-2 { background: radial-gradient(ellipse at 30% 70%, #c4a882 0%, #8a6644 50%, #4a3322 100%); }
.art-3 { background: linear-gradient(180deg, #e8d4bc 0%, #c4a882 40%, #8a7060 100%); }
.art-4 { background: conic-gradient(from 45deg, #d4bca0, #c09070, #a87850, #c09070, #d4bca0); }
.art-5 { background: linear-gradient(225deg, #b8c4c8 0%, #8098a0 50%, #506070 100%); }
.art-6 { background: radial-gradient(circle at 60% 40%, #e8c4a0 0%, #c89060 50%, #805030 100%); }
.art-7 { background: linear-gradient(160deg, #c8d4b8 0%, #90a870 50%, #5a7040 100%); }
.art-8 { background: radial-gradient(ellipse at 70% 30%, #d0c8e0 0%, #9080b0 50%, #504070 100%); }
.art-9 { background: linear-gradient(200deg, #e0c8b8 0%, #b08060 50%, #704030 100%); }

.product-overlay {
  position: absolute; inset: 0;
  background: rgba(26,23,20,0);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 20px;
  transition: background 0.3s;
}
.product-card:hover .product-overlay { background: rgba(26,23,20,0.35); }

.add-btn {
  background: var(--cream); color: var(--ink);
  border: none; padding: 12px 28px;
  font-family: var(--sans); font-size: 12px; font-weight: 400;
  letter-spacing: 0.12em; text-transform: uppercase;
  border-radius: 2px; cursor: pointer;
  transform: translateY(6px); opacity: 0;
  transition: transform 0.22s, opacity 0.22s, background 0.15s;
  white-space: nowrap;
}
.product-card:hover .add-btn { transform: translateY(0); opacity: 1; }
.add-btn:hover  { background: var(--accent); color: white; }
.add-btn.adding { background: var(--accent); color: white; }

/* On touch devices show the button always (no hover) */
@media (hover: none) {
  .add-btn { opacity: 1; transform: translateY(0); }
  .product-overlay { background: rgba(26,23,20,0.18); }
}

.product-info {
  padding: 16px 18px 18px;
  background: var(--cream);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.product-name  { font-size: 17px; font-weight: 400; }
.product-price { font-size: 17px; font-weight: 300; color: var(--muted); }


/* ── LIGHTBOX ───────────────────────────────────────────────── */

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(15,12,10,0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }

.lightbox-inner {
  position: relative;
  display: flex;
  max-width: 900px; width: 100%;
  max-height: calc(100vh - 48px);
  background: var(--cream);
  transform: scale(0.96);
  transition: transform 0.28s ease;
}
.lightbox.open .lightbox-inner { transform: scale(1); }

.lightbox-img-side {
  flex: 1 1 auto; min-width: 0;
  position: relative;
  display: flex; flex-direction: column;
  align-items: stretch; overflow: hidden;
}

.lightbox-img-wrap {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--cream); /* beige fills the extra space around the print */
  padding: 32px;
}

.lb-art {
  /* Never scale up beyond the image's natural resolution */
  display: block;
  width: auto; height: auto;
  max-width: 100%;
  max-height: calc(100vh - 48px - 64px); /* account for padding */
  object-fit: contain;
  image-rendering: auto;
  /* White mat border tight around the print itself */
  outline: 42px solid white;
  box-shadow: 0 0 0 42px white;
}

/* ── Carousel arrows ── */
.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(26,23,20,0.55); color: white;
  border: none; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}
.lb-arrow:hover  { background: var(--accent); }
.lb-arrow-prev   { left: 12px; }
.lb-arrow-next   { right: 12px; }

/* ── Dot indicators ── */
.lb-dots {
  position: absolute; bottom: 12px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
  z-index: 2;
}
.lb-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none; cursor: pointer; padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.lb-dot.active  { background: white; transform: scale(1.25); }
.lb-dot:hover   { background: rgba(255,255,255,0.8); }

.lightbox-info {
  width: 260px; flex-shrink: 0;
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 32px 28px;
}
.lb-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
.lb-name  { font-size: 26px; font-weight: 400; line-height: 1.3; margin-bottom: 8px; }
.lb-price { font-size: 22px; font-weight: 300; color: var(--muted); margin-bottom: 16px; }
.lb-description {
  font-size: 15px; font-weight: 300; color: var(--ink);
  line-height: 1.7; margin-bottom: 20px;
}
.lb-description:empty { display: none; }
.lb-divider { height: 1px; background: var(--border); margin-bottom: 28px; }
.lb-meta  { font-size: 14px; color: var(--muted); font-weight: 300; line-height: 1.8; flex: 1; }

.lb-add-btn {
  margin-top: 28px; width: 100%;
  background: var(--ink); color: var(--cream);
  border: none; padding: 15px;
  font-family: var(--sans); font-size: 12px; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: 2px; cursor: pointer;
  transition: background 0.2s;
}
.lb-add-btn:hover  { background: var(--accent); }
.lb-add-btn.adding { background: var(--accent); }

.lightbox-close {
  position: absolute; top: -14px; right: -14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--cream);
  border: none; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; z-index: 1;
}
.lightbox-close:hover { background: var(--accent); }


/* ── CART ───────────────────────────────────────────────────── */

.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(26,23,20,0.4);
  z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 100vw;
  background: var(--cream);
  border-left: 1px solid var(--border);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  padding: 26px 32px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.cart-title { font-size: 17px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

.close-btn {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--muted); padding: 4px 8px; transition: color 0.2s;
}
.close-btn:hover { color: var(--ink); }

.cart-body { flex: 1; overflow-y: auto; padding: 24px 32px; }

.cart-empty { text-align: center; padding: 60px 0; color: var(--muted); }
.cart-empty-icon { font-size: 32px; display: block; margin-bottom: 12px; opacity: 0.25; }
.cart-empty p { font-size: 16px; font-weight: 300; }

.cart-item {
  display: flex; gap: 16px; padding: 20px 0;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.25s ease both;
}
.cart-item-thumb   { width: 68px; height: 68px; flex-shrink: 0; overflow: hidden; }
.cart-item-details { flex: 1; }
.cart-item-name    { font-size: 17px; font-weight: 400; margin-bottom: 4px; }
.cart-item-section { font-size: 12px; color: var(--muted); font-weight: 300; letter-spacing: 0.06em; margin-bottom: 12px; }
.cart-item-controls { display: flex; align-items: center; gap: 10px; }
.cart-item-price   { font-size: 17px; font-weight: 300; align-self: flex-start; padding-top: 2px; }

.qty-btn {
  background: none; border: 1px solid var(--border);
  width: 30px; height: 30px; border-radius: 2px;
  font-size: 18px; cursor: pointer; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.qty-btn:hover { background: var(--warm); border-color: var(--ink); }

.qty-val { font-size: 14px; min-width: 20px; text-align: center; }

.remove-btn {
  background: none; border: none; cursor: pointer;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); transition: color 0.2s; margin-left: 2px;
  font-family: var(--sans);
}
.remove-btn:hover { color: var(--accent); }

.cart-footer { padding: 24px 32px 32px; border-top: 1px solid var(--border); }

.cart-total-row {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px;
}
.cart-total-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.cart-total-val   { font-size: 24px; font-weight: 300; }

.checkout-btn {
  width: 100%; background: var(--ink); color: var(--cream);
  border: none; padding: 16px;
  font-family: var(--sans); font-size: 12px; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: 2px; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.checkout-btn:hover   { background: var(--accent); transform: translateY(-1px); }
.checkout-btn:active  { transform: translateY(0); }
.checkout-btn:disabled { background: var(--warm); color: var(--muted); cursor: not-allowed; transform: none; }

.checkout-note { text-align: center; margin-top: 12px; font-size: 12px; color: var(--muted); font-weight: 300; }


/* ── RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 768px) {
  :root { --page-margin: 20px; }

  header { height: 56px; }
  main { margin-top: 56px; }

  .logo { font-size: 18px; }
  .nav-link { font-size: 12px; }

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

  .section-heading { padding: 28px 0 18px; }

  /* Lightbox stacks vertically on mobile */
  .lightbox { padding: 0; align-items: flex-end; }
  .lightbox-inner {
    flex-direction: column;
    max-width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    border-radius: 12px 12px 0 0;
  }
  .lightbox-img-side { max-height: 55vw; }
  .lb-arrow { width: 34px; height: 34px; font-size: 15px; }
  .lightbox-info { width: 100%; border-left: none; border-top: 1px solid var(--border); padding: 24px 20px; }
  .lightbox-close { top: 12px; right: 12px; position: fixed; }

  /* Cart full-width on mobile */
  .cart-drawer { width: 100vw; }
  .cart-header { padding: 22px 24px; }
  .cart-body   { padding: 20px 24px; }
  .cart-footer { padding: 20px 24px 28px; }
}

@media (max-width: 400px) {
  .grid { grid-template-columns: 1fr; }
}