/* ==========================================================================
   Product detail page
   ========================================================================== */

.product-loading {
  padding-block: var(--space-9);
  text-align: center;
  color: var(--color-text-muted);
}

.product {
  display: grid;
  gap: var(--space-7);
  padding-block: var(--space-6) var(--section-padding);
}

@media (min-width: 900px) {
  .product {
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-8);
    align-items: start;
  }

  .product__info {
    position: sticky;
    top: calc(var(--header-height) + var(--space-5));
  }
}

/* --- Gallery --- */
.gallery {
  display: grid;
  gap: var(--space-3);
}

.gallery__main {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-beige-200);
  aspect-ratio: 4 / 5;
}

.gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: gallery-fade var(--duration-base) ease;
}

@keyframes gallery-fade {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

.gallery__thumbs {
  display: flex;
  gap: var(--space-3);
}

.gallery__thumb {
  width: 76px;
  height: 92px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--color-beige-200);
  opacity: 0.7;
  transition: opacity var(--duration-fast) ease, border-color var(--duration-fast) ease;
}

.gallery__thumb:hover {
  opacity: 1;
}

.gallery__thumb[aria-current="true"] {
  border-color: var(--color-green-700);
  opacity: 1;
}

.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Small notice on provisional photos (not the real product) */
.gallery__notice {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
}

/* --- Info column --- */
.product__info > * + * {
  margin-top: var(--space-5);
}

.product__category {
  margin-bottom: 0;
}

/* Sub-brand logo above the title (e.g. XOL Women) */
.product__brand-logo {
  width: auto;
  height: 120px;
  margin-bottom: calc(-1 * var(--space-2));
}

@media (max-width: 599px) {
  .product__brand-logo {
    height: 96px;
  }
}

.product__title {
  font-size: var(--text-3xl);
}

.product__variant {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-muted);
}

.product__price {
  font-size: var(--text-xl);
  font-weight: 600;
}

.product__short {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.product__label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.product__buy {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.product__buy .btn {
  flex: 1 1 220px;
}

.product__highlights {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
  font-size: var(--text-sm);
}

.product__highlights li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.product__highlights svg {
  width: 18px;
  height: 18px;
  color: var(--color-green-700);
  flex-shrink: 0;
}

/* --- Not found --- */
.product-missing {
  padding-block: var(--space-9);
  text-align: center;
}

.product-missing p {
  margin-block: var(--space-4) var(--space-6);
  color: var(--color-text-muted);
}
