/* ============================================================
   CSS TRANG CHI TIẾT SẢN PHẨM – Premium Luxury
   ============================================================ */

/* --- Variables tạm dùng lại từ layout, nếu cần khai báo lại để đảm bảo --- */
:root {
  --primary-color: #d4a373;
  --primary-dark: #a67c52;
  --text-heading: #582f0e;
  --text-main: #2d2d2d;
  --bg-body: #fdfaf1;
  --bg-cream-light: #fefae0;
  --white: #ffffff;
  --border-gold: #e2d1b3;
}

/* --- Khung ảnh chính & Hover Zoom (PC) --- */
.main-image-wrapper {
  height: 300px;
  background: radial-gradient(circle, #ffffff 30%, #fdfaf1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
}
#mainImage {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 15px rgba(88, 47, 14, 0.15));
  transition: transform 0.3s ease-out;
  will-change: transform;
}
.main-image-wrapper:hover #mainImage {
  transform: scale(2.2);
}

/* --- Thông tin chung --- */
.detail-title {
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--text-heading);
}
.price-box {
  background-color: var(--bg-body);
  border: 1px solid var(--border-gold);
}

/* --- Thumbnails --- */
.thumbnail-wrapper {
  width: 65px;
  height: 65px;
  cursor: pointer;
  border: 2px solid transparent;
  background: #fff;
  transition: all 0.2s;
}
.thumbnail-wrapper:hover {
  transform: translateY(-3px);
}
.active-thumb {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 10px rgba(212, 163, 115, 0.5);
}

/* --- Sản phẩm liên quan --- */
.related-card {
  transition: all 0.3s ease;
  border: 1px solid var(--border-gold) !important;
}
.related-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 25px rgba(212, 163, 115, 0.2) !important;
  border-color: var(--primary-color) !important;
}
.related-img-wrapper {
  aspect-ratio: 1/1;
  background-color: var(--bg-body);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.related-title {
  font-size: 14px;
  color: var(--text-heading);
}
.related-price {
  font-size: 15px;
  color: var(--primary-color);
}

/* --- Modal Zoom Ảnh (Mobile) --- */
.modal-fullscreen-custom {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
}
.modal-content-custom {
  margin: auto;
  display: block;
  width: 95%;
  max-width: 1200px;
}
.close-zoom {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* --- Mô tả & Nút Xem thêm --- */
.description-wrapper {
  position: relative;
  background-color: var(--bg-body);
  border: 1px solid #f3efdf;
  line-height: 1.8;
  font-size: 15px;
  color: #4a4a4a;
  transition: all 0.5s ease;
}
.description-content {
  max-height: 250px;
  overflow: hidden;
  transition: max-height 0.5s ease;
}
.description-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(
    to bottom,
    rgba(253, 250, 241, 0),
    rgba(253, 250, 241, 1)
  );
  pointer-events: none;
}
.expanded .description-content {
  max-height: 3000px;
}
.expanded .description-gradient {
  display: none;
}

/* --- Nút thêm vào giỏ với hiệu ứng hover --- */
.btn-add-to-cart {
  background-color: var(--text-heading);
  border: none;
  transition: background-color 0.3s;
}
.btn-add-to-cart:hover {
  background-color: var(--primary-color) !important;
}

/* --- Nút Zalo trong modal --- */
.btn-zalo {
  background-color: #0068ff;
  border-color: #0068ff;
  transition: 0.3s;
  font-size: 16px;
}
.zalo-icon {
  filter: brightness(0) invert(1);
}

/* --- Màu chữ tiện ích (nếu chưa có trong file chung) --- */
.text-gold {
  color: var(--primary-color) !important;
}
.text-navy {
  color: var(--text-heading) !important;
}
.z-index-2 {
  z-index: 2;
}

/* --- Responsive --- */
@media (min-width: 768px) {
  .main-image-wrapper {
    height: 450px;
    cursor: crosshair;
  }
  .detail-title {
    font-size: 2rem;
  }
  .thumbnail-wrapper {
    width: 80px;
    height: 80px;
  }
  .modal-fullscreen-custom {
    padding-top: 100px;
  }
}

/* Utility classes cần cho view (nếu chưa có) */
.object-fit-cover {
  object-fit: cover;
}
.object-fit-contain {
  object-fit: contain;
}
.breadcrumb-item.active {
  white-space: normal; /* cho phép xuống dòng */
  word-break: break-word; /* cắt từ nếu quá dài */
  max-width: none; /* xóa giới hạn chiều rộng */
}
