/* ================================================
   Product Grid & Product Detail
   ================================================ */

/* --- Collections Page --- */
.collections-page__header {
  padding: var(--space-4xl) 0 var(--space-2xl);
  text-align: center;
}
.collections-page__header h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--ink);
  margin: 0 0 var(--space-sm);
}
.collections-page__header p {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  padding-bottom: var(--space-4xl);
}
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* --- Product Card --- */
.product-card {
  position: relative;
}
.product-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.product-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: var(--space-sm);
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.product-card__link:hover .product-card__media img {
  transform: scale(1.04);
}
.product-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-dark);
}
.product-card__placeholder span {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--ink-faint);
  opacity: 0.4;
}
.product-card__info {
  padding: var(--space-2xs) 0;
}
.product-card__title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
}
.product-card__category {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.75rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}
.product-card__brand {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.1rem;
}
.product-card__price {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--ink);
  margin-top: 0.25rem;
}
.product-card__price--request {
  color: var(--ink-soft);
  font-weight: 300;
}

/* --- Pager --- */
.collections-page__pager {
  padding: var(--space-2xl) 0 var(--space-4xl);
  text-align: center;
}
.collections-page__pager .pager__items {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  list-style: none;
  padding: 0;
  margin: 0;
}
.collections-page__pager .pager__item a,
.collections-page__pager .pager__item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 0.2s var(--ease);
}
.collections-page__pager .pager__item a:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.collections-page__pager .pager__item--active span {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

/* --- Product Detail Page --- */
.product-detail {
  padding: var(--space-3xl) 0 var(--space-5xl);
}
.product-detail__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}
@media (max-width: 768px) {
  .product-detail__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}
.product-detail__gallery {
  position: sticky;
  top: calc(var(--header-height) + var(--library-bar-height) + var(--space-lg));
}
.product-detail__image {
  width: 100%;
  height: auto;
  display: block;
  background: var(--surface);
}
.product-detail__placeholder {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-dark);
}
.product-detail__placeholder span {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--ink-faint);
  opacity: 0.3;
}
.product-detail__category {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}
.product-detail__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--ink);
  margin: 0 0 var(--space-md);
  line-height: 1.15;
}
.product-detail__price {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}
.product-detail__price--request {
  color: var(--ink-soft);
  font-weight: 300;
}
.product-detail__description {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: var(--space-xl);
}
.product-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
}
.product-detail__spec {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.85rem;
}
.product-detail__spec-label {
  font-weight: 400;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
}
.product-detail__spec span:last-child {
  color: var(--ink-soft);
  font-weight: 300;
}

/* --- Gallery Thumbnails --- */
.product-detail__main-image {
  margin-bottom: var(--space-sm);
}
.product-detail__thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-xs);
}
@media (max-width: 768px) {
  .product-detail__thumbs { grid-template-columns: repeat(4, 1fr); }
}
.product-detail__thumb {
  border: 2px solid transparent;
  padding: 0;
  background: none;
  cursor: pointer;
  aspect-ratio: 1;
  overflow: hidden;
  transition: border-color 0.2s var(--ease);
}
.product-detail__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-detail__thumb:hover {
  border-color: var(--border-warm);
}
.product-detail__thumb--active {
  border-color: var(--gold);
}

/* --- Brand & Short Description --- */
.product-detail__brand {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-bottom: var(--space-2xs);
}
.product-detail__short-desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: var(--space-xl);
}

/* --- Specs Section --- */
.product-detail__specs {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}
.product-detail__specs-title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin: 0 0 var(--space-md);
}

/* --- Availability Badges --- */
.product-detail__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-xl);
}
.product-detail__badge {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-2xs) var(--space-sm);
  border: 1px solid var(--border-warm);
  color: var(--ink-soft);
}

/* --- Hide Drupal Commerce defaults --- */
.commerce-product .field--name-variations,
.commerce-product .field--name-body,
.field--name-price,
article.commerce-product > div > .field {
  /* Hide default Commerce rendered fields — we use custom template */
}

/* --- Product Options / Variation Selector --- */
.product-detail__options {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}
.product-detail__option {
  margin-bottom: var(--space-md);
}
.product-detail__option:last-child {
  margin-bottom: 0;
}
.product-detail__option-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-bottom: var(--space-xs);
}
.product-detail__option-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--border-warm);
  border-radius: 0;
  appearance: none;
  -webkit-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='%236B6560' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
}
.product-detail__option-select:hover {
  border-color: var(--ink-soft);
}
.product-detail__option-select:focus {
  outline: none;
  border-color: var(--gold);
}
