/* 
  HD-INOX Product Detail Page Specific Styles (chi-tiet-san-pham.css)
*/

.pd-breadcrumb {
  padding: 15px 0;
  font-size: 13px;
  color: #666;
}
.pd-breadcrumb a {
  color: #888;
}
.pd-breadcrumb a:hover {
  color: var(--blue-primary);
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  padding: 30px 0;
}
/* Fix for Swiper inside Grid stretching */
.product-detail-layout > div {
  min-width: 0;
}

/* LEFT: GALLERY */
.gallery-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.main-img-box {
  width: 100%;
  aspect-ratio: 1/1;
  background: white;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.main-img-box a.MagicZoom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.main-img-box img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  position: static !important; /* Reset absolute positioning */
  transform: none !important;
}

.gallery-overlay-text {
  position: absolute;
  top: 40px;
  left: 40px;
  color: var(--blue-primary);
  font-weight: 800;
  font-size: 24px;
  text-transform: uppercase;
  line-height: 1.2;
}
.gallery-overlay-text .sub-text {
  font-size: 14px;
  opacity: 0.8;
}

.main-gallery-swiper {
  width: 100%;
  margin-bottom: 20px;
}

.thumb-slider-wrap {
  position: relative;
  padding: 0 40px;
}
.thumb-slider .swiper-slide {
  width: auto; /* Let Swiper control width */
  height: auto;
  aspect-ratio: 1/1; /* Force square */
  cursor: pointer;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  transition: 0.2s;
}
.thumb-slider .swiper-slide.swiper-slide-thumb-active {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px rgba(0, 14, 82, 0.1);
}
.thumb-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* RIGHT: INFO */
.p-info-box {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.p-sku-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.p-sku {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  font-weight: 500;
}
.p-favorite {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--blue-primary);
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
}

.p-detail-title {
  font-size: 24px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
}
.p-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #555;
}
.star-fill {
  color: #ffd700;
}

.p-price-area {
  margin: 15px 0;
}
.p-price-main {
  font-size: 28px;
  font-weight: 700;
  color: var(--blue-primary);
}
.p-price-old-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: #bbb;
  margin-bottom: 5px;
}
.p-price-old-wrap span {
  text-decoration: line-through;
}

/* Voucher */
.p-voucher-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 10px 0;
}
.voucher-tag {
  background: #e0faff;
  color: #008fa0;
  border: 1px solid #b2ebf2;
  padding: 4px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.p-options-group {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  margin-top: 15px;
}
.opt-label {
  width: 80px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  padding-top: 8px;
}
.opt-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.chip {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}
.chip.active {
  background: var(--blue-primary);
  color: white;
  border-color: var(--blue-primary);
}

.p-qty-cta-row {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}
.qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
}
.qty-btn {
  width: 35px;
  height: 40px;
  background: white;
  color: #999;
  border: none;
  font-size: 16px;
  cursor: pointer;
}
.qty-input {
  width: 45px;
  height: 40px;
  text-align: center;
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
  border-top: none;
  border-bottom: none;
  font-weight: 500;
}

.btn-add-cart {
  flex: 1;
  background: #b2ebf2; /* Light Cyan as in screenshot */
  color: #006064;
  font-weight: 700;
  border-radius: 4px;
  font-size: 14px;
  text-transform: uppercase;
  height: 45px;
}
.btn-buy-now {
  /* flex: 1.5; */
  background: #003087; /* Deep Blue as in screenshot */
  color: white;
  font-weight: 700;
  border-radius: 4px;
  font-size: 14px;
  text-transform: uppercase;
  height: 45px;
}

.zalo-advise {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--blue-primary);
  font-weight: 600;
  font-size: 13px;
  margin-top: 15px;
}
.zalo-advise i {
  color: #0084ff;
  font-size: 18px;
}

/* TABS */
.pd-tabs-section {
  margin-top: 60px;
  border-top: 1px solid #eee;
}
.pd-tabs-nav {
  display: flex;
  gap: 40px;
  justify-content: center;
  padding: 20px 0;
}
.pd-tab-link {
  font-size: 18px;
  font-weight: 700;
  color: #999;
  cursor: pointer;
  position: relative;
  padding-bottom: 15px;
}
.pd-tab-link.active {
  color: #111;
}
.pd-tab-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #111;
}

.pd-tab-content {
  display: none;
  padding: 30px 0;
  font-size: 15px;
  color: #444;
  line-height: 1.8;
}
.pd-tab-content.active {
  display: block;
}
.pd-tab-content h3 {
  font-size: 20px;
  color: #111;
  margin: 30px 0 15px;
  text-transform: uppercase;
}
.pd-tab-content ul {
  padding-left: 20px;
  list-style: disc;
  margin-bottom: 20px;
}

.img-placeholder-block {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--blue-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  font-weight: 700;
  margin-top: 40px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* REVIEWS */
.pd-reviews-section {
  margin-top: 60px;
  padding-bottom: 60px;
}
.review-summary-card {
  display: flex;
  align-items: center;
  gap: 50px;
  background: #fff;
  border: 1px solid #eee;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 40px;
}
.big-rating {
  text-align: center;
}
.big-rating-num {
  font-size: 48px;
  font-weight: 800;
  color: var(--blue-primary);
  line-height: 1;
}
.rating-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.r-bar-row {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
}
.r-bar-outer {
  flex: 1;
  height: 8px;
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
}
.r-bar-inner {
  height: 100%;
  background: #3f51b5;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.review-item {
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}
.r-user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}
.r-user-name {
  font-weight: 800;
  font-size: 14px;
}
.r-text {
  font-size: 14px;
  color: #555;
}

/* RECENTLY VIEWED */
.recently-viewed-section {
  padding: 60px 0;
  background: white;
}
.rv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.rv-title {
  font-size: 24px;
  font-weight: 800;
}

.p-card-minimal {
  background: #fcfdfe;
  /* border-radius: 8px; */
  overflow: hidden;
  position: relative;
  transition: 0.3s;
}
.p-card-minimal:hover {
  transform: translateY(-5px);
}
.p-card-minimal .p-img-box {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  /* padding: 20px; */
  background: white;
}
.p-card-minimal .p-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.p-card-minimal .p-info {
  padding: 15px;
}
.p-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}
.p-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.p-price-cur {
  color: var(--blue-primary);
  font-weight: 700;
  font-size: 15px;
}
.p-price-old {
  color: #bbb;
  text-decoration: line-through;
  font-size: 13px;
}

.discount-badge-grey {
  position: absolute;
  top: 0px;
  /* left: 10px; */
  background: #f0f0f0;
  color: #888;
  font-size: 11px;
  padding: 2px 6px;
  /* border-radius: 4px; */
  z-index: 2;
}

.recently-viewed-section .swiper-button-next,
.recently-viewed-section .swiper-button-prev {
  /* Remove default color */
  color: inherit;
}
.swiper-btn-custom::after {
  content: none !important; /* Hide default Swiper arrow */
}
.swiper-btn-custom {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.swiper-btn-custom img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* RESPONSIVE */
@media (max-width: 991px) {
  .product-detail-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .main-img-box {
    padding: 20px;
  }
}

.thumb-slider-wrap .swiper-button-next,
.thumb-slider-wrap .swiper-button-prev {
  width: 30px;
  height: 30px;
  background: white;
  color: #888;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.thumb-slider-wrap .swiper-button-next::after,
.thumb-slider-wrap .swiper-button-prev::after {
  font-size: 12px;
  font-weight: 900;
}
.thumb-slider-wrap .swiper-button-next {
  right: 0;
}
.thumb-slider-wrap .swiper-button-prev {
  left: 0;
}
