/* /assets/css/product.css
   Incredible, responsive styling for product detail page
────────────────────────────────────────────────────────────── */

.hc-product-page .hc-product-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 1rem;
}

/* Gallery */
.product-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.product-gallery .main-image {
  width: 100%;
  border-radius: 0.5rem;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.product-gallery .thumbnails {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.product-gallery .thumbnails .thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.product-gallery .thumbnails .thumb:hover,
.product-gallery .thumbnails .thumb:focus {
  border-color: var(--accent);
  outline: none;
}

/* Info panel */
.product-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}
.product-title {
  font-size: 2rem;
  margin: 0;
  font-weight: 700;
  color: var(--text-color);
}
.price {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--accent);
}
.description {
  margin: 1rem 0;
  line-height: 1.6;
  color: #555;
}

/* Size & Quantity */
.size-select,
.quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.size-select .size-label,
.quantity .qty-label {
  font-weight: 500;
}
.prod-size-select,
.prod-qty-input {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  font-size: 1rem;
  background: #fff;
}
.prod-qty-input {
  width: 4rem;
  text-align: center;
}

/* Add to Cart */
.btn-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.3rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
}
.btn-cart:hover {
  filter: brightness(0.9);
  transform: translateY(-2px);
}
.btn-cart:active {
  transform: translateY(0);
}
.btn-cart.loading {
  opacity: 0.8;
  pointer-events: none;
}

.btn-cart__spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}
.btn-cart.loading .btn-cart__spinner {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .hc-product-page .hc-product-detail {
    grid-template-columns: 1fr;
  }
  .product-gallery .main-image {
    max-width: 100%;
  }
}

/* Add to /assets/css/product.css */
/* ─────────────────────────────────────────────
   Thumbnail active-state & pointer
────────────────────────────────────────────── */

.product-gallery .thumb {
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.product-gallery .thumb:hover {
  border-color: rgba(0,0,0,0.2);
}

.product-gallery .thumb.active {
  border-color: var(--accent, #111);
}
