/* =======================================================
   PRODUCT DETAIL PAGE (PDP)
======================================================== */
body #main-content #sobie-classic-pdp,
#sobie-classic-pdp {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding-top: 40px !important;
  padding-bottom: 80px !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  display: block !important;
}

/* ----- Trái tim ----- */
.sobie-wishlist-btn svg {
  display: block !important;
  visibility: visible !important;
}
.sobie-wishlist-btn.is-active svg {
  fill: #ff4d4f !important;
  stroke: #ff4d4f !important;
}

/* ----- Tag Sale trên ảnh ----- */
.carousel-item { position: relative; }
.pdp-image-sale-tag {
  position: absolute;
  top: 15px; left: 15px;
  z-index: 10;
  color: #000;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.7);
  padding: 4px 8px;
  pointer-events: none;
}
@media (max-width: 768px) {
  .pdp-image-sale-tag {
    top: 10px; left: 10px;
    font-size: 11px;
    padding: 3px 6px;
  }
}

/* ----- Bố cục chính ----- */
.classic-pdp-layout {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

/* ----- Gallery trái ----- */
.classic-gallery {
  flex: 0 0 55%;
  width: 55%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.main-carousel-wrapper {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  background: #f8f8f8;
  border-radius: 4px;
}
.main-carousel-wrapper::-webkit-scrollbar { display: none; }

.carousel-item {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: center;
}
.carousel-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.thumb-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.thumb-list::-webkit-scrollbar { display: none; }
.thumb-item {
  width: 70px; height: 90px;
  border: 1px solid transparent;
  cursor: pointer;
  opacity: 1;
  transition: 0.3s;
}
.thumb-item img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.thumb-item:hover,
.thumb-item.is-active {
  opacity: 1;
  border-color: #111;
}

/* ----- Info phải ----- */
.classic-info { flex: 1; min-width: 0; }
.c-vendor {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 5px;
}
.c-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 5px;
}
.c-title {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  text-transform: uppercase;
  line-height: 1.3;
  margin: 0;
}
.c-sku {
  font-size: 11px;
  color: #999;
  margin-bottom: 20px;
}
.c-price-box {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
}
.c-price {
  font-size: 18px;
  font-weight: 800;
  color: #111;
}
.c-old-price {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
}
.c-divider {
  border: 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 25px;
}

/* ----- Swatch ----- */
.c-swatches { margin-bottom: 25px; }
.swatch { margin-bottom: 15px; }
.swatch .header {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.swatch-element input[type="radio"],
.swatch-element img { display: none !important; }
.swatch-element {
  display: inline-block;
  margin-right: 8px;
  margin-bottom: 8px;
}
.swatch-element label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  margin: 0;
}
.swatch-element label:hover { border-color: #1768b2; }
.swatch-element input:checked + label {
  background: #1768b2 !important;
  color: #fff !important;
  border-color: #1768b2 !important;
}
.swatch-element.soldout label {
  opacity: 0.4;
  text-decoration: line-through;
  cursor: not-allowed;
  background: #f9f9f9;
}

/* ----- Action row (qty + buttons) ----- */
.c-action-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-top: 20px;
  margin-bottom: 40px;
  height: 45px;
}
.c-qty-box {
  flex: 0 0 100px;
  display: flex;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}
.qty-btn {
  background: #fff;
  border: none;
  width: 30px;
  font-size: 18px;
  cursor: pointer;
  color: #555;
}
.c-qty-box input {
  flex: 1;
  border: none;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  pointer-events: none;
}
.c-btn {
  flex: 1;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.c-btn-outline {
  background: #1768b2;
  border: 1px solid #1768b2;
  color: #fff;
}
.c-btn-outline:hover {
  background: #125593;
  border-color: #125593;
}
.c-btn-solid {
  background: #1768b2;
  border: none;
  color: #fff;
}
.c-btn-solid:hover { background: #125593; }

/* ----- Features icon grid (đặc tính sản phẩm) ----- */
.c-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  padding: 20px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin-bottom: -1px;
}
.c-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.c-feature-ico {
  width: 38px;
  height: 38px;
  background: #1a1a1a;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.c-feature-ico svg {
  width: 20px;
  height: 20px;
  color: #c0c0c0;
}
.c-feature-label {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  .c-features {
    gap: 12px 16px;
    padding: 16px 0;
  }
  .c-feature-ico { width: 34px; height: 34px; border-radius: 8px; }
  .c-feature-ico svg { width: 18px; height: 18px; }
  .c-feature-label { font-size: 12px; }
}

/* ----- Accordion ----- */
.c-accordion {
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin-bottom: -1px;
  padding: 15px 0;
}
.c-accordion summary {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  color: #333;
}
.c-accordion summary::after {
  content: '+';
  font-size: 16px;
}
.c-accordion[open] summary::after { content: '-'; }
.acc-content {
  padding-top: 15px;
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

/* ----- Khối sản phẩm dưới PDP ----- */
.pdp-bottom-related {
  width: 100%;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #eee;
}
.bottom-related-title {
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: left;
  margin-bottom: 30px;
  color: #111;
}
.bottom-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.bottom-rel-item { text-align: left; }
.rel-img-box {
  display: block;
  background: #f8f8f8;
  margin-bottom: 15px;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 3/4;
}
.rel-img-box img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.rel-img-box:hover img { transform: scale(1.05); }
.rel-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  margin-bottom: 8px;
  line-height: 1.4;
}
.rel-title:hover { color: #1768b2; }
.rel-price {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.rel-price .current {
  font-weight: 800;
  font-size: 15px;
  color: #111;
}
.rel-price .old {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
}

/* ----- Slider PDP ----- */
.pdp-slider-wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
  padding-bottom: 15px;
}
.pdp-slider-track {
  display: flex;
  flex-wrap: nowrap !important;
  gap: 30px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.pdp-slider-track::-webkit-scrollbar { height: 6px; }
.pdp-slider-track::-webkit-scrollbar-track {
  background: #f8f8f8;
  border-radius: 10px;
}
.pdp-slider-track::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 10px;
}
.pdp-slider-track::-webkit-scrollbar-thumb:hover { background: #1768b2; }
.slider-item {
  flex: 0 0 calc((100% - 90px) / 4);
  scroll-snap-align: start;
  max-width: calc((100% - 90px) / 4);
}

/* ----- View all link với mũi tên ----- */
.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 30px;
}
.section-header-flex .bottom-related-title { margin-bottom: 0; }
.view-all-link {
  font-size: 12px;
  font-weight: 700;
  color: #1768b2;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}
.view-all-link:hover { color: #111; }
.view-all-link::after {
  content: '→';
  font-size: 16px;
  margin-left: 5px;
  transition: transform 0.3s ease;
}
.view-all-link:hover::after { transform: translateX(4px); }

/* =======================================================
   MOBILE RESPONSIVE PDP
======================================================== */
@media (max-width: 768px) {
  body #main-content #sobie-classic-pdp,
  #sobie-classic-pdp {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .classic-pdp-layout { flex-direction: column; gap: 20px; }

  /* Gallery tràn viền */
  .classic-gallery {
    width: calc(100% + 40px) !important;
    flex: 0 0 calc(100% + 40px) !important;
    margin-left: -20px !important;
    margin-right: -20px !important;
  }
  .desktop-main-img { display: none !important; }
  .mobile-main-carousel {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: none !important;
  }
  .mobile-main-carousel::-webkit-scrollbar { display: none !important; }
  .mobile-main-carousel img {
    flex: 0 0 100% !important;
    width: 100% !important;
    height: auto !important;
    scroll-snap-align: center !important;
    object-fit: cover !important;
  }

  .thumb-list {
    display: flex !important;
    padding: 10px 20px 0 !important;
    overflow-x: auto !important;
  }
  .thumb-item {
    flex: 0 0 70px !important;
    width: 70px !important;
    height: 90px !important;
    opacity: 1 !important;
  }

  .classic-info { width: 100%; flex: 0 0 100%; }
  .c-title { font-size: 16px !important; line-height: 1.4 !important; }

  .c-action-row {
    display: flex !important;
    flex-wrap: wrap !important;
    height: auto !important;
    gap: 10px !important;
  }
  .c-qty-box { flex: 0 0 110px !important; height: 45px !important; }
  #btn-add-cart-classic {
    flex: 1 !important;
    height: 45px !important;
    font-size: 12px !important;
  }
  #btn-buy-now-classic {
    flex: 0 0 100% !important;
    height: 45px !important;
    font-size: 13px !important;
    margin-top: 2px !important;
  }

  /* Related items vuốt ngang */
  .bottom-related-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 15px !important;
    padding-bottom: 15px !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .bottom-related-grid::-webkit-scrollbar { display: none; }
  .bottom-rel-item {
    flex: 0 0 calc(50% - 7.5px) !important;
    min-width: calc(50% - 7.5px) !important;
    scroll-snap-align: start !important;
    margin-bottom: 0 !important;
  }
  .rel-img-box {
    aspect-ratio: 3/4 !important;
    margin-bottom: 10px !important;
  }
  .rel-title {
    font-size: 13px !important;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .pdp-slider-track { gap: 15px; }
  .slider-item {
    flex: 0 0 calc((100% - 15px) / 2);
    max-width: calc((100% - 15px) / 2);
  }
}
