/* ================================================
   SINGLE PRODUCT
   ================================================ */

.single-product-shell {
  margin: 0 auto;
}

/* ── HERO ── */
.single-product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  padding: 40px 0 var(--tg-section-space);
}

/* ── MEDIA ── */
.single-product-hero__media {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.single-product-hero__main {
  position: relative;
  border-radius: var(--tg-radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--tg-surface);
}

.single-product-hero__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.single-product-hero__accent {
  border-radius: calc(var(--tg-radius) / 1.5);
  overflow: hidden;
  aspect-ratio: 16 / 6;
}

.single-product-hero__accent img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.single-product-hero__gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.single-product-hero__gallery::-webkit-scrollbar {
  display: none;
}

.single-product-hero__thumb {
  flex: 0 0 calc(25% - 8px);
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
  aspect-ratio: 1;
}

.single-product-hero__thumb:hover {
  border-color: var(--tg-primary);
  opacity: 0.85;
}

.single-product-hero__thumb.is-active {
  border-color: var(--tg-primary);
}

.single-product-hero__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Badge */
.single-product-hero__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: var(--tg-tertiary);
  color: #fff;
  font-family: var(--tg-font-body);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 100px;
  letter-spacing: 0.5px;
}

/* ── SUMMARY ── */
.single-product-hero__summary {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 8px;
}

.single-product-hero__eyebrow {
  font-family: var(--tg-font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--tg-primary-soft);
}

.product_title.entry-title {
  font-family: var(--tg-font-heading);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--tg-text);
}

/* Rating */
.single-product-hero__rating {
  display: flex;
  align-items: center;
  gap: 8px;
}

.single-product-hero__rating .star-rating {
  font-size: 14px;
  color: var(--tg-tertiary);
}

.single-product-hero__review-count {
  font-family: var(--tg-font-body);
  font-size: 13px;
  color: var(--tg-secondary);
  text-decoration: none;
}

.single-product-hero__review-count:hover {
  color: var(--tg-primary);
  text-decoration: underline;
}

/* Price */
.single-product-hero__price-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.single-product-hero__price {
  font-family: var(--tg-font-heading);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  color: var(--tg-primary);
  line-height: 1;
}

.single-product-hero__price del {
  font-size: 18px;
  font-weight: 400;
  color: var(--tg-secondary);
  margin-right: 6px;
  opacity: 0.6;
}

.single-product-hero__price ins {
  text-decoration: none;
}

.single-product-hero__pill {
  background: var(--tg-surface-strong);
  color: var(--tg-primary);
  font-family: var(--tg-font-body);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 100px;
}

/* Short description */
.single-product-hero__description {
  font-family: var(--tg-font-body);
  font-size: 15px;
  line-height: 1.75;
  color: var(--tg-secondary);
}

.single-product-hero__description p {
  margin: 0;
}

/* Out of stock */
.single-product-hero__out-of-stock {
  display: inline-block;
  background: #fff0f0;
  color: #c0392b;
  font-family: var(--tg-font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  margin: 0;
}

/* ── QUANTITY ── */
.single-product-hero__qty {
  display: flex;
  align-items: center;
  width: fit-content;
  border: 1.5px solid var(--tg-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--tg-cream);
}

.single-product-hero__qty .quantity {
  display: contents;
}

.single-product-hero__qty .qty {
  width: 56px;
  text-align: center;
  border: none;
  border-left: 1.5px solid var(--tg-line);
  border-right: 1.5px solid var(--tg-line);
  padding: 12px 0;
  font-family: var(--tg-font-body);
  font-size: 15px;
  font-weight: 700;
  background: transparent;
  color: var(--tg-text);
  -moz-appearance: textfield;
  order: 2;
}

.single-product-hero__qty .qty::-webkit-outer-spin-button,
.single-product-hero__qty .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.qty-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  font-size: 20px;
  font-weight: 400;
  color: var(--tg-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.qty-btn--minus { order: 1; }
.qty-btn--plus  { order: 3; }

.qty-btn:hover {
  background: var(--tg-surface);
}

/* ── ACTIONS ── */
.single-product-hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.single-product-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-family: var(--tg-font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  line-height: 1;
}

.single-product-hero__button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: var(--tg-shadow);
}

.single-product-hero__button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.single-product-hero__button--primary {
  background: var(--tg-primary);
  color: #fff;
  flex: 1;
}

.single-product-hero__button--secondary {
  background: transparent;
  color: var(--tg-primary);
  border: 2px solid var(--tg-primary);
  flex: 1;
}

.single-product-hero__button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── BRAND FEATURES ── */
.single-product-hero__features {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--tg-line);
}

.single-product-hero__feature {
  display: flex;
	width: calc(33% - 16px);
  align-items: center;
  gap: 7px;
  font-family: var(--tg-font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--tg-secondary);
}

.single-product-hero__feature-icon {
  display: flex;
  align-items: center;
  color: var(--tg-primary);
}

.single-product-hero__feature-icon svg {
  width: 18px;
  height: 18px;
}

/* ── META ── */
.single-product-hero__meta {
  font-family: var(--tg-font-body);
  font-size: 13px;
  color: var(--tg-secondary);
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 20px;
  border-top: 1px solid var(--tg-line);
}

.single-product-hero__meta .sku_wrapper,
.single-product-hero__meta .posted_in,
.single-product-hero__meta .tagged_as {
  display: block;
}

.single-product-hero__meta a {
  color: var(--tg-primary-soft);
  text-decoration: none;
}

.single-product-hero__meta a:hover {
  color: var(--tg-primary);
  text-decoration: underline;
}

/* ── VARIATIONS ── */
.single-product-hero__variations {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.variation-group__label {
  font-family: var(--tg-font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--tg-text);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.variation-group__selected {
  font-weight: 400;
  color: var(--tg-primary);
  text-transform: none;
  letter-spacing: 0;
}

.variation-group__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variation-chip {
  font-family: var(--tg-font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1.5px solid var(--tg-line);
  background: var(--tg-cream);
  color: var(--tg-text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, opacity 0.2s;
  line-height: 1;
}

.variation-chip:hover:not(:disabled) {
  border-color: var(--tg-primary);
  color: var(--tg-primary);
}

.variation-chip.is-active {
  background: var(--tg-primary);
  border-color: var(--tg-primary);
  color: #fff;
}

.variation-chip.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

.variation-chip.is-out-of-stock {
  opacity: 0.55;
  text-decoration: line-through;
}

.variation-notice {
  font-family: var(--tg-font-body);
  font-size: 13px;
  color: #c0392b;
  background: #fff0f0;
  padding: 8px 14px;
  border-radius: 8px;
}

/* Stock badge */
.single-product-hero__stock .stock {
  font-family: var(--tg-font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  display: inline-block;
}

.single-product-hero__stock .in-stock {
  background: #edfaf1;
  color: #1a7a40;
}

.single-product-hero__stock .out-of-stock {
  background: #fff0f0;
  color: #c0392b;
}

/* Purchase row: qty + buttons cùng hàng */
.single-product-hero__purchase-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
	margin-top: 12px;
}

.single-product-hero__actions {
  display: flex;
  gap: 12px;
}

.single-product-hero__button--primary {
  background: var(--tg-primary);
  color: #fff;
  flex: 1;
}

.single-product-hero__button--secondary {
  background: var(--tg-primary);
  color: #fff;
  border: none;
  flex: 1;
}

/* Transition ảnh chính */
.single-product-hero__main img {
  transition: opacity 0.18s ease;
}

/* ================================================
   SECTIONS
   ================================================ */

.single-product-section {
  padding: 40px 0;
  border-top: 1px solid var(--tg-line);
}

.single-product-section h2 {
  font-family: var(--tg-font-heading);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  color: var(--tg-text);
  margin: 0 0 16px;
}

.single-product-section__content {
  font-family: var(--tg-font-body);
  font-size: 15px;
  line-height: 1.85;
  color: var(--tg-secondary);
  max-width: 780px;
}

.single-product-section__content p {
  margin: 0 0 16px;
}

/* Related grid */
.single-product-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.single-product-hero__gallery-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gallery-nav {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--tg-line);
  background: var(--tg-cream);
  color: var(--tg-primary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, opacity 0.15s;
  padding: 0;
}

.gallery-nav:hover {
  background: var(--tg-surface-strong);
}

.gallery-nav:disabled {
  opacity: 0.3;
  cursor: default;
}
.single-product-hero__button.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.single-product-hero__actions .single-product-hero__button {
	display: flex !important;
	justify-content: center;
	align-items: center;
}
/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 1024px) {
  .single-product-hero {
    gap: 40px;
  }

  .single-product-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .single-product-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 0 48px;
  }

  .single-product-hero__actions {
    flex-direction: column;
  }

  .single-product-hero__button {
    width: 100%;
  }

  .single-product-section {
    padding: 48px 0;
  }

  .single-product-related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .single-product-related-grid {
    grid-template-columns: 1fr;
  }

  .single-product-hero__thumb {
    width: calc(33.333% - 7px);
  }
}
/* ================================================
   WOOCOMMERCE NOTICES
   ================================================ */

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 12px;
  font-family: var(--tg-font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 20px;
  list-style: none;
  border: none;
  box-shadow: var(--tg-shadow);
}

/* Thành công */
.woocommerce-message {
  background: #edfaf1;
  color: #1a7a40;
  border-left: 4px solid #27ae60;
  padding-left: 60px;
}

.woocommerce-message::before {
  font-family: "Material Symbols Outlined";
  content: "check_circle";
  font-size: 20px;
  flex-shrink: 0;
  color: #27ae60;
}

/* Lỗi */
.woocommerce-error {
  background: #fff0f0;
  color: #c0392b;
  border-left: 4px solid #e74c3c;
	padding-left: 60px;
}

.woocommerce-error::before {
  font-family: "Material Symbols Outlined";
  content: "error";
  font-size: 20px;
  flex-shrink: 0;
  color: #e74c3c;
  top: 10px;
}

/* Thông tin */
.woocommerce-info {
  background: #f0f6ff;
  color: #1a4a8a;
  border-left: 4px solid #3498db;
	padding-left: 60px;
}

.woocommerce-info::before {
  font-family: "Material Symbols Outlined";
  content: "info";
  font-size: 20px;
  flex-shrink: 0;
  color: #3498db;
	top: 0;
}

/* Nút "Xem giỏ hàng" trong notice */
.woocommerce-message .button,
.woocommerce-error .button,
.woocommerce-info .button {
  margin-left: auto;
  flex-shrink: 0;
  background: var(--tg-primary);
  color: #fff;
  font-family: var(--tg-font-body);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 100px;
  text-decoration: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.woocommerce-message .button:hover,
.woocommerce-error .button:hover,
.woocommerce-info .button:hover {
  opacity: 0.85;
  color: #fff;
}
.woocommerce-message a {
	display: flex !important;
	justify-content: center;
	align-items: center;
}