/* paullabonte.com — base styles */

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

:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #888;
  --line: #efefef;
  --hover: #fafafa;
}

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

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

/* ============ HEADER ============ */
header {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  padding: 16px 24px;
  border-bottom: 0.5px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.logo {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.cart-link {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--ink);
  padding: 0;
}

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

/* ============ MAIN GRID ============ */
main {
  padding: 16px 24px 80px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tile {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  overflow: hidden;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4%;
  transition: opacity 0.4s ease, transform 0.6s ease;
}

.tile:hover img {
  transform: scale(1.01);
  opacity: 0.95;
}

.tile.sold-out::after {
  content: "Sold Out";
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-size: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  padding: 4px 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 400;
}

/* ============ PRODUCT PAGE ============ */
.product {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0;
  min-height: calc(100vh - 53px);
}

.product-media {
  background: var(--hover);
  display: flex;
  flex-direction: column;
}

.product-media img {
  width: 100%;
  height: auto;
  display: block;
}

.product-info {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 53px;
  align-self: flex-start;
  max-height: calc(100vh - 53px);
  overflow-y: auto;
}

.product-info .back {
  font-size: 12px;
  color: var(--muted);
}

.product-info .back:hover {
  color: var(--ink);
}

.product-title {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 6px;
}

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

.product-price.sold {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
}

.product-desc {
  font-size: 13px;
  line-height: 1.65;
  color: #333;
  max-width: 420px;
}

.product-specs {
  font-size: 12px;
  line-height: 1.8;
  color: #444;
  list-style: none;
  padding-top: 16px;
  border-top: 0.5px solid var(--line);
}

.product-specs li::before {
  content: "—  ";
  color: var(--muted);
}

.buy-area {
  padding-top: 8px;
}

/* Style the embedded Shopify Buy Button to match */
.shopify-buy__btn-wrapper {
  width: 100%;
}

.shopify-buy__btn {
  width: 100%;
  background: #0a0a0a !important;
  border-radius: 0 !important;
  font-family: inherit !important;
  font-size: 12px !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  padding: 15px 19px !important;
  font-weight: 400 !important;
}

.shopify-buy__btn:hover {
  background: #222 !important;
}

.shopify-buy__quantity-input,
.shopify-buy__quantity {
  font-family: inherit !important;
}

/* ============ FOOTER ============ */
footer {
  padding: 56px 24px 28px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 0.5px solid var(--line);
  margin-top: 80px;
}

.product-page footer {
  margin-top: 0;
  border-top: 0.5px solid var(--line);
}

footer .footer-links {
  display: flex;
  gap: 20px;
}

footer .footer-links a:hover {
  color: var(--ink);
}

/* ============ CONTAINER ============ */
header, main, footer {
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* ============ RESPONSIVE ============ */

/* Phones (default below 640px): 2-column grid, stacked product, tighter padding */
@media (max-width: 639px) {
  header {
    padding: 14px 16px;
  }

  main {
    padding: 12px 16px 56px;
  }

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

  .product {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .product-info {
    padding: 28px 16px 48px;
    position: static;
    max-height: none;
    gap: 22px;
  }

  .product-title {
    font-size: 18px;
  }

  footer {
    padding: 40px 16px 24px;
  }

  footer .footer-links {
    flex-direction: column;
    gap: 6px;
  }
}

/* Small phones — keep readable */
@media (max-width: 360px) {
  .product-title {
    font-size: 17px;
  }

  main {
    padding: 10px 12px 48px;
  }

  header {
    padding: 12px 12px;
  }
}

/* Tablet portrait (640–899px): 3-column grid, but product page stays stacked
   because side-by-side gets cramped at this width */
@media (min-width: 640px) and (max-width: 899px) {
  header {
    padding: 16px 24px;
  }

  main {
    padding: 16px 24px 72px;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .product {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .product-info {
    padding: 40px 32px 56px;
    position: static;
    max-height: none;
    max-width: 640px;
  }
}

/* Tablet landscape + small desktop (900–1199px): 3-col grid, side-by-side product */
@media (min-width: 900px) and (max-width: 1199px) {
  header {
    padding: 18px 28px;
  }

  main {
    padding: 18px 28px 80px;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .product {
    grid-template-columns: 1.2fr 1fr;
  }

  .product-info {
    padding: 48px 36px;
  }
}

/* Standard desktop (1200–1599px): full layout */
@media (min-width: 1200px) and (max-width: 1599px) {
  header {
    padding: 20px 32px;
  }

  main {
    padding: 20px 32px 96px;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .product {
    grid-template-columns: 1.3fr 1fr;
  }

  .product-info {
    padding: 64px 56px;
  }

  footer {
    padding: 64px 32px 32px;
  }
}

/* Large desktop / 4K (1600px+): centered content with breathing room */
@media (min-width: 1600px) {
  header {
    padding: 24px 40px;
  }

  main {
    padding: 24px 40px 120px;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .product {
    grid-template-columns: 1.3fr 1fr;
  }

  .product-info {
    padding: 72px 64px;
  }

  footer {
    padding: 80px 40px 40px;
  }
}

/* ============ UTILS ============ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
