/* ── Breadcrumb ─────────────────────────────────────────────────────────────── */
.breadcrumb {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span:last-child { color: var(--ink); font-weight: 500; }

/* ── Product Layout ─────────────────────────────────────────────────────────── */
.product-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

/* ── Gallery ─────────────────────────────────────────────────────────────────── */
.gallery { position: sticky; top: calc(var(--nav-h) + 20px); }
.gallery-main {
  aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--border);
  margin-bottom: 12px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--border);
  transition: border-color var(--transition);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--ink); }
.gallery-thumb:hover { border-color: var(--muted); }

/* ── Product Info ────────────────────────────────────────────────────────────── */
.product-info { padding-top: 8px; }
.product-category {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.product-name {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 16px;
  letter-spacing: -.01em;
}
.product-price {
  font-size: 24px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.stock-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 99px;
  margin-bottom: 20px;
}
.in-stock { background: var(--accent-bg); color: var(--accent); }
.out-of-stock { background: #fef2f2; color: var(--danger); }

.product-description {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
}

/* ── Variants ────────────────────────────────────────────────────────────────── */
.variant-group { margin-bottom: 20px; }
.variant-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.variant-label span { font-weight: 400; color: var(--accent); margin-left: 4px; }

.variant-options { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-btn {
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--transition);
}
.variant-btn:hover:not(:disabled) { border-color: var(--ink); }
.variant-btn.selected { border-color: var(--ink); background: var(--ink); color: #fff; }
.variant-btn.disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

/* ── Add to Cart ─────────────────────────────────────────────────────────────── */
.add-to-cart-form { margin-top: 24px; }
.quantity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn {
  width: 40px;
  height: 44px;
  font-size: 18px;
  color: var(--ink);
  background: transparent;
  transition: background var(--transition);
}
.qty-btn:hover { background: var(--border); }
.qty-input {
  width: 52px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  height: 44px;
  outline: none;
  background: var(--surface);
  color: var(--ink);
}

/* ── Tabs ────────────────────────────────────────────────────────────────────── */
.tabs {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 60px;
}
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.tab-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--ink); border-color: var(--ink); }

.tab-content { display: none; }
.tab-content.active { display: block; }

.specs-table { width: 100%; border-collapse: collapse; max-width: 600px; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table th, .specs-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
}
.specs-table th {
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  width: 35%;
}
.specs-table td { color: var(--ink-light); }

/* ── Related ─────────────────────────────────────────────────────────────────── */
.related-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 80px;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.related-card { display: block; }
.related-image {
  aspect-ratio: 1/1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border);
  margin-bottom: 10px;
}
.related-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.related-card:hover .related-image img { transform: scale(1.06); }
.related-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 3px;
}
.related-price { font-size: 13px; font-weight: 600; color: var(--accent); }

/* ── Cart page ───────────────────────────────────────────────────────────────── */
.cart-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 36px 24px 24px;
  border-bottom: 1px solid var(--border);
}
.cart-header h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
}
.cart-header p { font-size: 14px; color: var(--muted); margin-top: 4px; }

.cart-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.cart-layout > div {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: start;
}

.cart-items { display: flex; flex-direction: column; gap: 16px; }
.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 20px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.item-image {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--border);
}
.item-image img { width: 100%; height: 100%; object-fit: cover; }
.item-name { font-weight: 600; margin-bottom: 3px; }
.item-variant { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.item-price { font-size: 14px; color: var(--accent); font-weight: 500; }
.item-subtotal { font-weight: 600; font-size: 16px; margin-bottom: 10px; text-align: right; }

.qty-control-sm {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.qty-btn-sm {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--ink);
  transition: border-color var(--transition);
}
.qty-btn-sm:hover { border-color: var(--ink); }
.qty-val {
  width: 46px;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  height: 30px;
  outline: none;
  background: var(--surface);
  color: var(--ink);
}
.remove-btn {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.remove-btn:hover { color: var(--danger); border-color: var(--danger); }

/* Cart Summary */
.cart-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}
.summary-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.summary-row.total {
  font-weight: 700;
  font-size: 16px;
  border-bottom: none;
  padding-top: 16px;
}
.summary-note { font-size: 12px; color: var(--muted); margin: 12px 0 20px; line-height: 1.6; }

.empty-cart {
  text-align: center;
  padding: 100px 20px;
  max-width: 400px;
  margin: 0 auto;
}
.empty-cart h2 { font-family: var(--font-display); font-size: 32px; font-weight: 400; margin-bottom: 8px; }
.empty-cart p { color: var(--muted); margin-bottom: 24px; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; gap: 32px; }
  .gallery { position: static; }
  .cart-layout > div { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}
@media (max-width: 640px) {
  .product-name { font-size: 30px; }
  .cart-item { grid-template-columns: 72px 1fr; }
  .item-controls { grid-column: 1 / -1; }
}