/*-----------------------------------*\
  HOB — Product Detail Page Styles
\*-----------------------------------*/

/* =========================================
   BREADCRUMB
   ========================================= */
.product-breadcrumb {
  background: #f5f7fa;
  border-bottom: 1px solid #e8ecf0;
  padding: 10px 0;
}

.product-breadcrumb .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  flex-wrap: wrap;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.breadcrumb-list li::after {
  content: "/";
  color: #bbb;
  margin-left: 2px;
}

.breadcrumb-list li:last-child::after {
  display: none;
}

.breadcrumb-list a {
  color: #15417e;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-list a:hover { color: #FFD50D; }

.breadcrumb-list li:last-child {
  color: #333;
  font-weight: 600;
}

.breadcrumb-nav-arrows {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.breadcrumb-nav-arrows button {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  background: #fff;
  color: #15417e;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}

.breadcrumb-nav-arrows button:hover {
  background: #15417e;
  color: #fff;
  border-color: #15417e;
}

/* =========================================
   PRODUCT MAIN SECTION
   ========================================= */
.product-detail-section {
  padding: 32px 0 56px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* =========================================
   GALLERY COLUMN
   ========================================= */
.product-gallery {
  position: sticky;
  top: 90px;
}

.gallery-main {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f8f9fc;
  border: 1px solid #e8ecf0;
  aspect-ratio: 1 / 1;
  cursor: zoom-in;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-main:hover img {
  transform: scale(1.06);
}

.gallery-zoom-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(21, 65, 126, 0.85);
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.gallery-badge-sale {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #e74c3c;
  color: #fff;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.gallery-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.gallery-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e8ecf0;
  cursor: pointer;
  background: #f8f9fc;
  flex-shrink: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.gallery-thumb:hover img { transform: scale(1.08); }

.gallery-thumb.active,
.gallery-thumb:hover {
  border-color: #15417e;
  box-shadow: 0 0 0 2px rgba(21, 65, 126, 0.2);
}

/* =========================================
   PRODUCT INFO COLUMN
   ========================================= */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-badge-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-certified { background: #e8f4e8; color: #2d7a2d; }
.badge-stock { background: #e8f0fb; color: #15417e; }
.badge-hot { background: #fff3cd; color: #b45309; }

.product-name {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: #15417e;
  line-height: 1.25;
  margin: 0;
}

.product-sku {
  font-size: 12px;
  color: #999;
  font-weight: 400;
  display: block;
  margin-top: 4px;
}

.product-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stars {
  display: flex;
  gap: 2px;
  color: #FFD50D;
  font-size: 16px;
}

.review-count {
  font-size: 13px;
  color: #999;
}

.review-count a {
  color: #15417e;
  text-decoration: underline;
}

/* Price */
.product-price-block {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.price-sale {
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 900;
  color: #15417e;
}

.price-original {
  font-size: 18px;
  color: #aaa;
  text-decoration: line-through;
  font-weight: 400;
}

.price-saving {
  background: #fff3cd;
  color: #b45309;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

/* Variants */
.variant-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.variant-label {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.variant-label span {
  font-weight: 400;
  color: #666;
  text-transform: none;
  margin-left: 6px;
}

/* Color swatches using images */
.color-swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e8ecf0;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
}

.color-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.color-swatch:hover,
.color-swatch.active {
  border-color: #15417e;
  box-shadow: 0 0 0 3px rgba(21, 65, 126, 0.25);
  transform: scale(1.05);
}

.color-swatch.active::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #15417e;
  border-radius: 6px;
}

/* Size buttons */
.size-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.size-btn {
  min-width: 52px;
  height: 40px;
  padding: 0 16px;
  border: 1.5px solid #ddd;
  background: #fff;
  color: #333;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Be Vietnam Pro', sans-serif;
}

.size-btn:hover {
  border-color: #15417e;
  color: #15417e;
}

.size-btn.active {
  background: #15417e;
  border-color: #15417e;
  color: #fff;
  box-shadow: 0 3px 10px rgba(21, 65, 126, 0.3);
}

/* Quantity + add to cart row */
.cart-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qty-cart-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.quantity-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.qty-btn {
  width: 40px;
  height: 48px;
  background: #f5f7fa;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #15417e;
  font-weight: 700;
  transition: background 0.2s;
  font-family: 'Be Vietnam Pro', sans-serif;
}

.qty-btn:hover { background: #e8ecf0; }

.qty-input {
  width: 52px;
  height: 48px;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #15417e;
  font-family: 'Be Vietnam Pro', sans-serif;
  background: #fff;
}

.qty-input:focus { outline: none; }

.btn-add-cart {
  flex: 1;
  height: 48px;
  background: #FFD50D;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  color: #15417e;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.25s;
  font-family: 'Be Vietnam Pro', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-add-cart:hover {
  background: #f0c800;
  box-shadow: 0 4px 16px rgba(255, 213, 13, 0.5);
  transform: translateY(-1px);
}

.btn-buy-now {
  width: 100%;
  height: 52px;
  background: #15417e;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: all 0.25s;
  font-family: 'Be Vietnam Pro', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-buy-now:hover {
  background: #0f2e5c;
  box-shadow: 0 4px 18px rgba(21, 65, 126, 0.45);
  transform: translateY(-2px);
}

.btn-wishlist {
  width: 48px;
  height: 48px;
  border: 1.5px solid #ddd;
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #999;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-wishlist:hover,
.btn-wishlist.active {
  border-color: #e74c3c;
  color: #e74c3c;
  background: #fff5f5;
}

/* Policy strip */
.policy-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.policy-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: #f8f9fc;
  border-radius: 8px;
  border: 1px solid #e8ecf0;
  text-align: center;
}

.policy-item ion-icon {
  font-size: 22px;
  color: #15417e;
}

.policy-item span {
  font-size: 11px;
  color: #555;
  font-weight: 600;
  line-height: 1.3;
}

/* =========================================
   SPECIFICATIONS TABLE
   ========================================= */
.product-specs-section {
  margin-top: 8px;
}

.specs-title {
  font-size: 14px;
  font-weight: 800;
  color: #15417e;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #FFD50D;
  display: inline-block;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.specs-table tr {
  border-bottom: 1px solid #f0f0f0;
}

.specs-table tr:last-child { border-bottom: none; }

.specs-table td {
  padding: 9px 12px;
  vertical-align: middle;
}

.specs-table td:first-child {
  color: #15417e;
  font-weight: 700;
  width: 42%;
  background: #f8f9fc;
  border-right: 1px solid #e8ecf0;
}

.specs-table td:last-child {
  color: #333;
  font-weight: 400;
}

.spec-certified {
  color: #2d7a2d;
  font-weight: 700;
}

/* =========================================
   PRODUCT TABS (Description / Reviews)
   ========================================= */
.product-tabs-section {
  padding: 48px 0 64px;
  border-top: 1px solid #e8ecf0;
}

.product-tabs-section .container > h2 {
  display: none;
}

.tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e8ecf0;
  margin-bottom: 32px;
}

.tab-btn {
  padding: 12px 28px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: #999;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  font-family: 'Be Vietnam Pro', sans-serif;
}

.tab-btn.active,
.tab-btn:hover {
  color: #15417e;
  border-bottom-color: #FFD50D;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-description {
  max-width: 800px;
  line-height: 1.8;
  color: #444;
  font-size: 15px;
}

.tab-description h3 {
  font-size: 18px;
  color: #15417e;
  margin: 24px 0 8px;
  font-weight: 700;
}

.tab-description ul {
  padding-left: 20px;
}

.tab-description li {
  margin-bottom: 6px;
}

/* Reviews */
.reviews-summary {
  display: flex;
  gap: 40px;
  align-items: center;
  padding: 24px;
  background: #f8f9fc;
  border-radius: 12px;
  margin-bottom: 32px;
  border: 1px solid #e8ecf0;
}

.review-score {
  text-align: center;
  flex-shrink: 0;
}

.review-score-number {
  font-size: 56px;
  font-weight: 900;
  color: #15417e;
  line-height: 1;
}

.review-score .stars {
  justify-content: center;
  margin: 6px 0 4px;
  font-size: 20px;
}

.review-score p {
  font-size: 13px;
  color: #999;
}

.review-bars {
  flex: 1;
}

.review-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 13px;
}

.review-bar-row span:first-child {
  width: 40px;
  text-align: right;
  color: #666;
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  height: 8px;
  background: #e8ecf0;
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: #FFD50D;
  border-radius: 4px;
}

.review-bar-row span:last-child {
  width: 28px;
  color: #999;
  font-size: 12px;
  flex-shrink: 0;
}

.review-card {
  padding: 20px 0;
  border-bottom: 1px solid #f0f0f0;
}

.review-card:last-child { border-bottom: none; }

.review-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.reviewer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #15417e;
  color: #FFD50D;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.reviewer-name {
  font-weight: 700;
  color: #333;
  font-size: 14px;
}

.reviewer-date {
  font-size: 12px;
  color: #aaa;
}

.review-text {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}

.verified-badge {
  font-size: 11px;
  color: #2d7a2d;
  font-weight: 600;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =========================================
   RELATED PRODUCTS
   ========================================= */
.related-section {
  padding: 48px 0 64px;
  background: #f8f9fc;
}

.related-section .section-title {
  text-align: center;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  color: #15417e;
  margin-bottom: 32px;
  position: relative;
}

.related-section .section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #FFD50D;
  margin: 10px auto 0;
  border-radius: 2px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.related-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8ecf0;
  transition: box-shadow 0.25s, transform 0.25s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.related-card:hover {
  box-shadow: 0 8px 24px rgba(21, 65, 126, 0.12);
  transform: translateY(-4px);
}

.related-card-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f5f7fa;
}

.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.related-card:hover .related-card-img img {
  transform: scale(1.06);
}

.related-card-body {
  padding: 14px 16px;
}

.related-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #15417e;
  margin-bottom: 6px;
  line-height: 1.4;
}

.related-card-price {
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-price-sale {
  font-weight: 800;
  color: #15417e;
  font-size: 15px;
}

.related-price-old {
  font-size: 12px;
  color: #bbb;
  text-decoration: line-through;
}

/* =========================================
   PRODUCT FOOTER
   ========================================= */
.footer-top {
  padding: 40px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-top .container {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(160px, 1fr));
  gap: 28px;
  align-items: start;
}

.footer-logo {
  width: fit-content;
  margin-bottom: 14px;
}

.footer-logo img {
  display: block;
  max-width: 100%;
  height: auto;
}

.footer-text {
  color: #c5d2e9;
  font-size: 14px;
  line-height: 1.75;
  max-width: 420px;
}

.footer-list-title {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
}

.footer-list ul {
  display: grid;
  gap: 10px;
}

.footer-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  color: #b6c8e8;
  font-size: 14px;
  line-height: 1.55;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #ffd50d;
}

.footer-link ion-icon {
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.footer-bottom {
  margin-bottom: 0;
  padding: 16px 0;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-payment-img {
  max-width: 200px;
  height: auto;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-gallery {
    position: static;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
  }

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

  .footer-top .container {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .product-breadcrumb .container {
    flex-wrap: wrap;
  }

  .policy-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .policy-item {
    padding: 10px 6px;
  }

  .policy-item span {
    font-size: 10px;
  }

  .qty-cart-row {
    flex-wrap: wrap;
  }

  .btn-add-cart {
    flex: 1 1 auto;
    min-width: 180px;
  }

  .reviews-summary {
    flex-direction: column;
    gap: 20px;
  }

  .footer-top {
    padding: 32px 0;
  }

  .footer-top .container {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom .container {
    justify-content: center;
  }
}

@media (max-width: 500px) {
  .product-detail-section {
    padding: 20px 0 40px;
  }

  .gallery-thumbnails {
    flex-wrap: wrap;
  }

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

  .tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    white-space: nowrap;
    padding: 12px 18px;
  }
}
