/**
 * Flatsome Single Product Styles - Complete Redesign
 * Tailwind-inspired professional design
 */

/* ================================================
   RESET & BASE
   ================================================ */

.product-main-content {
  margin-bottom: 1rem;
}

/* ================================================
   GRID LAYOUT
   ================================================ */
.tanphat-product-row {
  display: grid;
  grid-template-columns: 4fr 5fr 3fr;
  gap: 1rem;
  align-items: start;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 1024px) {
  .tanphat-product-row {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .tanphat-product-services {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .tanphat-product-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Column Base Styles */
.tanphat-product-images,
.tanphat-product-info,
.tanphat-product-services {
  height: fit-content;
  min-width: 0;
}

/* ================================================
   PRODUCT IMAGES GALLERY
   ================================================ */
.tanphat-product-images {
  max-width: 100%; /* Prevent overflow */
  box-sizing: border-box;
  width: 100%;
}
@media (min-width: 768px) {
  .tanphat-product-images {
    position: sticky;
    top: 60px;
  }
}

.custom-product-gallery {
  position: relative;
  width: 100%;
  max-width: 100%;
}

/* Main Image Container */
.custom-main-image {
  position: relative;
  margin-bottom: 0.25rem;
  width: 100%;
}

.main-image-container {
  position: relative;
  aspect-ratio: 1;
  background: var(--tp-white);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.main-image-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.main-image-slide.active {
  opacity: 1;
}

.main-image-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Gallery Navigation Arrows */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.4);
  color: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.main-image-container:hover .gallery-nav {
  opacity: 1;
}

.gallery-prev {
  left: 0.5rem;
}

.gallery-next {
  right: 0.5rem;
}

.gallery-nav:hover {
  background: var(--primary-color);
}

.gallery-nav i {
  font-size: 0.875rem;
  color: var(--primary-color);
}

.gallery-nav:hover i {
  color: #fff;
}
/* Product Discount Badge */
.product-discount-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 15;
  background: var(--tp-primary);
  color: var(--tp-white);
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.product-discount-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(239, 64, 42, 0.2);
}

.product-discount-badge .discount-percent {
  display: block;
  line-height: 1;
}

/* Expand Button */
.gallery-expand {
  all: unset;
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  background: var(--tp-white);
  color: var(--tp-gray-700);
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 10;
  height: 40px;
  width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: unset;
}

.gallery-expand:hover {
  background: var(--tp-gray-100);
}

.gallery-expand i {
  font-size: 1rem;
  color: var(--tp-gray-400);
}

/* Thumbnail Gallery */
.custom-thumbnail-gallery {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.thumbnail-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  width: 100%;
  max-width: 100%;
}

.thumbnail-container:active {
  cursor: grabbing;
}

.thumbnail-container::-webkit-scrollbar {
  display: none;
}

.thumbnail-item {
  flex-shrink: 0;
  aspect-ratio: 1;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--tp-white);
  overflow: hidden;
  border: 1px solid var(--tp-gray-200);
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.thumbnail-item:hover {
  border-color: var(--tp-gray-400);
}

.thumbnail-item.active {
  border-color: var(--tp-primary);
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Fade gradient for overflow indication */
.custom-thumbnail-gallery::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1.5rem;
  height: 100%;
  background: linear-gradient(to right, transparent, var(--tp-white));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-thumbnail-gallery.has-overflow::after {
  opacity: 1;
}

/* ================================================
   PRODUCT SUMMARY
   ================================================ */
/* Product Title */
.tanphat-product-summary .product-title {
  font-size: 1.65rem;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  color: var(--primary-color) !important;
  margin-bottom: 1rem !important;
}
@media (max-width: 768px) {
  .tanphat-product-summary .product-title {
    font-size: 1.2rem;
  }
}

/* Enhanced Product Price Display */
.enhanced-price-container {
  position: relative;
  background: linear-gradient(
    135deg,
    var(--tp-gray-50) 0%,
    var(--tp-white) 100%
  );
  border: 1px dashed var(--tp-primary);
  border-radius: 5px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.enhanced-price-container.price-on-sale {
  border-color: var(--tp-primary);
  background: linear-gradient(
    135deg,
    rgba(239, 64, 42, 0.05) 0%,
    var(--tp-white) 100%
  );
  box-shadow: 0 4px 12px rgba(239, 64, 42, 0.1);
}

/* Price Discount Badge */
.price-discount-badge {
  position: absolute;
  top: -1rem;
  left: 1rem;
  background: var(--tp-primary);
  color: var(--tp-white);
  border-radius: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 4px rgba(239, 64, 42, 0.3);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.price-discount-badge .discount-text {
  font-size: 0.6875rem;
}

.price-discount-badge .discount-percent {
  font-size: 0.875rem;
  font-weight: 800;
}

/* Price Content */
.price-content {
  width: 100%;
}

/* Price Comparison (On Sale) */
.price-comparison {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Price Group - inline layout */
.price-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.price-regular.variation-regular-inline {
  font-size: 1.25rem;
  color: var(--tp-gray-400);
  text-decoration: line-through;
  font-weight: 600;
}

.price-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-main .price-label {
  font-size: 1rem;
  color: var(--tp-gray-800);
  font-weight: 600;
}

.price-main .price-current,
.price-main .price-sale {
  font-size: 1.25rem;
  color: var(--tp-primary);
  font-weight: 700;
}

.price-main .price-current .woocommerce-Price-amount,
.price-main .price-sale .woocommerce-Price-amount {
  color: var(--tp-primary);
}

/* Variable Product Prices */
.price-main .price-current .price_label {
  font-size: 0.875rem;
  color: var(--tp-gray-600);
  font-weight: 500;
  margin-right: 0.5rem;
}

/* Price Savings */
.price-savings {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 5px;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.price-savings .savings-text,
.price-savings .savings-amount {
  font-size: 0.875rem;
  color: #059669;
  font-weight: 600;
}

.price-savings .savings-percent {
  font-size: 0.875rem;
  color: #059669;
  font-weight: 700;
}

/* Regular Price Only (Not On Sale) */
.price-regular-only {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-regular-only .price-label {
  font-size: 1rem;
  color: var(--tp-gray-800);
  font-weight: 600;
}

.price-regular-only .price-current {
  font-size: 1.25rem;
  color: var(--tp-primary);
  font-weight: 700;
}
.price-regular-only .price-current .woocommerce-Price-amount {
  color: var(--tp-primary);
}
.price-regular-only .single-contact-price-btn {
  font-weight: 600;
  font-size: 1rem;
}

/* Price Suffix */
.price-suffix {
  font-size: 0.875rem;
  color: var(--tp-gray-600);
  font-weight: 500;
  margin-left: 0.25rem;
}

.price-original .price-suffix {
  color: var(--tp-gray-500);
}

/* Override WooCommerce default price styles */
.enhanced-price-container .woocommerce-Price-amount {
  font-weight: inherit;
}

.enhanced-price-container .woocommerce-Price-currencySymbol {
  font-weight: inherit;
}

/* Variable Product Price Transitions */
.variation-original,
.variation-savings {
  transition: all 0.3s ease;
  opacity: 1;
}

.variation-original[style*="display: none"],
.variation-savings[style*="display: none"] {
  opacity: 0;
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.price-discount-badge {
  transition: all 0.3s ease;
}

.price-discount-badge[style*="display: none"] {
  opacity: 0;
  transform: scale(0.8);
}

/* Loading state for variation prices */
.variation-current-price em {
  font-style: italic;
  color: var(--tp-gray-500);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .price-discount-badge {
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 1rem;
    align-self: flex-start;
  }

  .price-main .price-current,
  .price-main .price-sale,
  .price-regular-only .price-current {
    font-size: 1.25rem;
  }

  .price-main,
  .price-regular-only {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .price-group {
    gap: 0.25rem;
  }

  .price-savings {
    gap: 0.25rem;
    text-align: center;
  }

  .price-suffix {
    font-size: 0.75rem;
  }
}
.product-sku-section {
  margin-bottom: 1rem;
}
/* Product Short Description */
.product-specs-section {
  background-color: #ffffff; /* Nền trắng cho khu vực thông số */
  border-radius: 5px; /* Bo góc nhẹ (tương đương rounded-xl của Tailwind) */
  padding: 1rem; /* Khoảng đệm xung quanh nội dung */
  margin: 1rem auto; /* Căn giữa */
  border: 1px solid #e5e7eb; /* Đường viền mỏng, tinh tế */
}

/* --- Section Title --- */
.specs-title {
  font-size: 16px; /* Cỡ chữ */
  font-weight: 600; /* In đậm vừa phải */
  color: var(--primary-color); /* Màu nhấn xanh tím giống lần trước */
  text-transform: uppercase; /* Viết hoa */
  margin-top: 0;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb; /* Dòng kẻ phân cách */
}

/* --- Product Title --- */
.specs-content h1,
.specs-content h2,
.specs-content h3,
.specs-content h4 {
  font-size: 1.4rem; /* Cỡ chữ lớn (tương đương text-3xl) */
  font-weight: 700; /* In đậm */
  margin-top: 0;
  margin-bottom: 1rem; /* Khoảng cách với danh sách bên dưới */
}

/* --- Unordered List --- */
.specs-content ul {
  list-style: none; /* Bỏ các dấu chấm đầu dòng mặc định */
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px; /* Khoảng cách giữa các mục trong danh sách */
}

/* --- List Item --- */
.specs-content ul li {
  display: flex; /* Dùng flexbox để căn chỉnh icon và chữ */
  align-items: center; /* Căn lề trên */
  font-size: 14px; /* Cỡ chữ tiêu chuẩn */
  color: #4b5563; /* Màu chữ xám đậm hơn một chút */
  line-height: normal;
}

/* --- Custom Bullet Point (Checkmark) --- */
.specs-content ul li::before {
  content: "✓"; /* Ký tự dấu tick */
  color: #34d399; /* Màu xanh lá cây cho dấu tick */
  font-weight: 700;
  margin-right: 0.55rem; /* Khoảng cách giữa dấu tick và nội dung */
  flex-shrink: 0; /* Không để icon bị co lại */
}

.specs-content ul li p {
  margin-bottom: 0px;
}

/* ================================================
   PRODUCT VARIATIONS
   ================================================ */
/* --- Variations Table Style --- */
.product-variations-section .variations {
  width: 100%;
  max-width: 600px;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
}

.product-variations-section .variations tr {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.product-variations-section .variations tr:last-child {
  border-bottom: none;
}

.product-variations-section .variations th.label {
  flex-basis: 120px;
  flex-shrink: 0;
  font-weight: 500;
  font-size: 0.95rem;
  padding-top: 0.5rem;
  text-align: left;
}

.product-variations-section .variations td.value {
  flex-grow: 1;
}

.product-variations-section .ux-swatches {
  all: unset;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* --- Swatch (Option Button) Style --- */
.product-variations-section .ux-swatch {
  all: unset;
  cursor: pointer;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 12px;
  color: #374151;
  user-select: none;
  transition: all 0.2s ease-in-out;
}

.product-variations-section .ux-swatch:hover {
  box-shadow: unset !important;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.product-variations-section .ux-swatch.selected {
  box-shadow: unset !important;
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: white;
  font-weight: 500;
}
/* --- Clear Button Style --- */
.product-variations-section a.reset_variations {
  all: unset;
  cursor: pointer;
  display: inline-flex; /* Quan trọng để căn chỉnh icon và chữ */
  align-items: center;
  margin-top: 1rem; /* Khoảng cách với các lựa chọn bên trên */
  font-size: 0.875rem; /* Cỡ chữ nhỏ hơn một chút */
  color: #6b7280; /* Màu xám, ít nổi bật */
  text-decoration: none;
  transition: color 0.2s ease-in-out;
  visibility: hidden; /* Mặc định ẩn đi */
}

.product-variations-section a.reset_variations.visible {
  visibility: visible; /* Hiện ra khi có class 'visible' */
}

.product-variations-section a.reset_variations:hover {
  color: #ef4444; /* Chuyển sang màu đỏ khi hover, ra hiệu xóa */
  text-decoration: underline;
}

.product-variations-section a.reset_variations svg {
  width: 1em;
  height: 1em;
  margin-right: 0.375rem; /* Khoảng cách giữa icon và chữ */
  stroke-width: 2.5;
}

.variation-selector.hidden {
  display: none;
}

/* ================================================
   BUTTON SECTION
   ================================================ */

.product-variations-section .single_variation_wrap {
  width: 100%;
}

/* --- Main Container --- */
.product-variations-section .woocommerce-variation-add-to-cart {
  display: flex;
  gap: 0.75rem; /* Khoảng cách giữa bộ đếm và nút */
  flex-wrap: nowrap; /* Tự động xuống hàng trên màn hình nhỏ */
}

/* --- Quantity Selector --- */
.product-variations-section .ux-quantity {
  all: unset;
  display: flex;
  border: 1px solid #d1d5db;
  border-radius: 5px; /* Bo góc */
  overflow: hidden; /* Ẩn các phần thừa của border-radius */
  min-height: 28px;
}

/* Style cho nút +/- */
.product-variations-section .quantity .button.minus {
  background-color: #f9fafb;
  border: none;
  cursor: pointer;
  width: 2.5rem;
  font-size: 1.25rem;
  font-weight: 400;
  transition: background-color 0.2s ease, color 0.2s ease;
  text-shadow: none;
  min-height: 28px;
}
.product-variations-section .quantity .button.plus {
  background-color: #f9fafb;
  border: none;
  cursor: pointer;
  width: 2.5rem;
  font-size: 1.25rem;
  font-weight: 400;
  transition: background-color 0.2s ease, color 0.2s ease;
  text-shadow: none;
  min-height: 28px;
}
.product-variations-section .quantity .button {
  line-height: normal;
}
.product-variations-section .quantity .button:hover {
  background-color: #f3f4f6 !important;
  box-shadow: none !important;
}

.product-variations-section .quantity .button.minus {
  border-right: 1px solid #d1d5db !important;
}
.product-variations-section .quantity .button.plus {
  border-left: 1px solid #d1d5db !important;
}

/* Style cho ô nhập số */
.product-variations-section .ux-quantity .input-text.qty {
  all: unset;
  width: 3rem;
  border: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  /* Loại bỏ mũi tên tăng giảm mặc định của trình duyệt */
  -moz-appearance: textfield;
  appearance: textfield;
}
.product-variations-section
  .ux-quantity
  .input-text.qty::-webkit-outer-spin-button,
.product-variations-section
  .ux-quantity
  .input-text.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* --- Add to Cart Button --- */
.single_add_to_cart_button.button {
  all: unset;
  flex-grow: 1; /* Nút sẽ chiếm hết không gian còn lại */
  background-color: var(--primary-color) !important;
  color: white;
  border: none;
  border-radius: 5px; /* Bo góc */
  padding: 0.5rem 1rem;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  line-height: normal;
  min-height: 28px;
}

.single_add_to_cart_button.button:not(:disabled):hover {
  background-color: var(--primary-color) !important;
  color: white !important;
}

/* Style khi nút bị VÔ HIỆU HÓA */
.single_add_to_cart_button.button.disabled,
.single_add_to_cart_button.button:disabled {
  background-color: var(--gray-300) !important;
  color: var(--gray-500) !important;
  cursor: not-allowed; /* Con trỏ chuột bị cấm */
}

/* Secondary Buttons Row */
.secondary-buttons-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* ================================================
   SOCIAL SHARING
   ================================================ */
.product-social-share {
  background: var(--tp-gray-50);
  border: 1px solid var(--tp-gray-200);
  border-radius: 5px;
  padding: 1.25rem;
}

.social-share-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tp-gray-800);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.social-share-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  color: var(--tp-white);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.social-btn i {
  color: white !important;
}

.social-btn:hover {
  transform: translateY(-2px);
}

.social-btn:hover i {
  color: white !important;
}

.social-btn.facebook {
  background: #1877f2;
}
.social-btn.twitter {
  background: #1da1f2;
}
.social-btn.pinterest {
  background: #e60023;
}
.social-btn.whatsapp {
  background: #25d366;
}
.social-btn.telegram {
  background: #0088cc;
}
.social-btn.copy-link {
  background: var(--tp-gray-600);
}

/* ================================================
   PRODUCT SERVICES
   ================================================ */

.tanphat-services-container .services-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--tp-gray-900);
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: -0.025em;
}

.service-item {
  display: flex;
  align-items: start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 5px;
  border: 1px solid var(--tp-gray-200);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  background: var(--tp-gray-50);
}

.service-item:hover {
  border-color: var(--tp-primary);
  background: var(--tp-white);
  box-shadow: 0 4px 6px -1px rgba(239, 64, 42, 0.1);
}

.service-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--tp-primary);
  color: var(--tp-white);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}

.service-content h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tp-gray-900);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.service-content p {
  font-size: 0.75rem;
  color: var(--tp-gray-600);
  line-height: 1.4;
  margin: 0;
}

/* Consultant Card */
.consultant-card {
  background: var(--tp-gray-50);
  border: 1px solid var(--tp-gray-200);
  border-radius: 5px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.consultant-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.consultant-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--tp-gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.avatar-placeholder {
  color: var(--tp-gray-500);
  font-size: 1.5rem;
}

.consultant-info h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tp-gray-900);
  margin-bottom: 0.25rem;
}

.consultant-info p {
  font-size: 0.75rem;
  color: var(--tp-gray-600);
  margin: 0;
}

.consultant-actions {
  display: flex;
  justify-content: center;
}

/* Zalo Button Styling */
.zalo-btn {
  background: var(--secondary-color) !important;
  color: var(--tp-white) !important;
  border-color: var(--secondary-color) !important;
  width: 100% !important;
}

.zalo-btn:hover {
  background: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: var(--tp-white) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 104, 255, 0.3);
}

.zalo-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ================================================
   PRODUCT META
   ================================================ */
.product_meta {
  background: var(--tp-gray-50) !important;
  border: 1px solid var(--tp-gray-200) !important;
  padding: 1.25rem !important;
  border-radius: 0.75rem !important;
  margin-bottom: 2rem !important;
}

.product_meta > span {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0 !important;
  border-bottom: 1px solid var(--tp-gray-200);
  margin-bottom: 0 !important;
  font-size: 0.875rem;
}

.product_meta > span:last-child {
  border-bottom: none;
}

.product_meta .sku_wrapper,
.product_meta .posted_in,
.product_meta .tagged_as {
  font-weight: 600 !important;
  color: var(--tp-gray-800) !important;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.product_meta .sku,
.product_meta a {
  color: var(--tp-gray-600) !important;
  font-weight: 400 !important;
  text-decoration: none;
  font-style: normal;
}

.product_meta a:hover {
  color: var(--tp-primary) !important;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */
@media (max-width: 768px) {
  .product_title {
    font-size: 1.5rem !important;
  }

  .cart {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .secondary-buttons-row {
    grid-template-columns: 1fr;
  }

  .thumbnail-item {
    width: 3rem;
    height: 3rem;
    min-width: 3rem; /* Prevent shrinking too much */
  }
}

@media (max-width: 480px) {
  .product-discount-badge {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.375rem;
    font-size: 0.6875rem;
  }

  .gallery-nav {
    width: 2.5rem;
    height: 2.5rem;
  }

  .gallery-prev {
    left: 0.5rem;
  }

  .gallery-next {
    right: 0.5rem;
  }

  .gallery-expand {
    bottom: 0.5rem;
    left: 0.5rem;
    padding: 0.5rem;
    width: 25px;
    height: 25px;
  }
  .gallery-expand i {
    font-size: 12px;
  }
}

/* ================================================
   LOADING STATES
   ================================================ */
.single_add_to_cart_button.loading {
  opacity: 0.7;
  pointer-events: none;
}

.single_add_to_cart_button.loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================================================
   UTILITIES
   ================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================================================
   DISABLED BUTTONS STYLES
   ================================================ */
.tp-button:disabled,
.tp-button.disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background-color: var(--tp-gray-300) !important;
  color: var(--tp-gray-500) !important;
  border-color: var(--tp-gray-300) !important;
}

.tp-button--secondary:disabled,
.tp-button--secondary.disabled {
  background-color: var(--tp-gray-100) !important;
  color: var(--tp-gray-400) !important;
  border-color: var(--tp-gray-200) !important;
}

.tp-button--outline:disabled,
.tp-button--outline.disabled {
  background-color: transparent !important;
  color: var(--tp-gray-400) !important;
  border-color: var(--tp-gray-200) !important;
}
