/* ============================================================
   91LAB — SINGLE PRODUCT CSS
   File: template/css/91lab-single-product.css
   ============================================================ */
.single-product-wrapper {
  max-width: 1200px;
  padding: 0 20px;
  margin: auto;
  width: 100%;
}

/* ========== RESET / BASE ========== */
.sp-header,
.sp-meta-bar,
.sp-content-area,
.sp-footer-marquee-wrap {
  width: 100%;
}

/* ========== HEADER BLOCK ========== */

/* Outer wrapper: full viewport width, position: relative làm stacking context */
.sp-header {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-bottom: 32px;
  margin-top: 40px;
  min-height: 180px;
  padding: 20px 24px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Tầng 1 (z:1): Khung xám bo góc, không full width, nằm dưới cùng ---- */
.sp-menu-box {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px); /* margin 24px mỗi bên */
  max-width: 900px;
  background: #c8c8c8;
  border-radius: 20px;
  z-index: 1;
  height: 190px;
}

/* ---- Tầng 2 (z:5): Marquee hồng full width, xuyên qua khung xám ---- */
.sp-marquee-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: #ff1f8f;
  padding: 10px 0;
  overflow: hidden;
  z-index: 5;
}

/* ---- Tầng 3 (z:10): Chữ MENU SVG, đè lên tất cả ---- */
.sp-menu-text {
  position: relative;
  z-index: 10;
  width: min(65%, 560px);
  pointer-events: none;
}

.sp-menu-text svg {
  width: 100%;
  height: auto;
  display: block;
}

.sp-marquee-track {
  display: flex;
  white-space: nowrap;
  animation: sp-marquee 20s linear infinite;
}

.sp-marquee-item {
  font-size: 13px;
  font-weight: 700;
  color: #000;
  letter-spacing: 0.04em;
  padding: 0 32px;
  display: inline-block;
  text-transform: uppercase;
}

.sp-sep {
  margin: 0 10px;
}

@keyframes sp-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ========== MAIN CONTENT ========== */
.sp-content-area {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===========================
   TOP CONTENT SECTION
   =========================== */
.single-prod-top-content {
  position: relative;
  overflow: visible !important;
}

.single-prod-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
  overflow: visible !important;
}

.single-prod-blog-logo {
  width: 150px;
  height: auto;
  flex-shrink: 0;
}

/* Content Tabs for Single Post */
.single-prod-content-tabs {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 28px;
  overflow: visible !important;
}

.single-prod-content-tab-first,
.single-prod-content-tab {
  padding: 0px 10px;
  background: #a7a9ac;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: visible !important;
}

.single-prod-content-tab-first {
  background-color: #fff;
  border: none;
  padding: 0;
}

.single-prod-content-tab::before {
  content: "";
  width: 30px;
  height: 30px;
  background-image: url(../../template/images/asterisk-crop.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: inline-block;
  filter: brightness(0) saturate(100%) invert(28%) sepia(96%) saturate(6539%)
    hue-rotate(320deg) brightness(100%) contrast(105%);
  animation: rotate-icon-single 3s linear infinite;
  position: absolute;
  top: -15px;
  left: -15px;
  z-index: 10;
}

@keyframes rotate-icon-single {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ---- Two-column product layout ---- */
.sp-product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* ---- Gallery column ---- */
.sp-gallery-col .woocommerce-product-gallery {
  border-radius: 4px;
  overflow: hidden;
}

.sp-gallery-col .woocommerce-product-gallery__wrapper img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* Hide WC gallery thumbnails strip on this layout if needed */
.sp-gallery-col .flex-control-nav {
  display: none;
}

/* ---- Summary column ---- */
.sp-summary-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Product title */
.sp-product-title,
.sp-summary-col .product_title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  color: #000;
  margin: 0 0 8px;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

/* Tag pills */
.sp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sp-tag-pill {
  border-radius: 100px;
  padding: 4px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #ff1f8f;
  background: #000;
  display: inline-block;
}

/* Short description */
.sp--desc {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

.sp-desc p {
  margin: 0 0 8px;
}

/* Price */
.sp-summary-col .price,
.sp-price .price {
  font-size: 28px;
  font-weight: 700;
  color: #ff1f8f;
}

/* Hide default WC title & description inside hook area since we render manually */
.sp-summary-col .woocommerce-product-details__short-description,
.sp-summary-col .product_title {
  /* kept for WC hook compatibility — title is visually replaced by .sp-product-title */
}

/* ---- Add to Cart (ĐẶT HÀNG button) ---- */
.sp-add-to-cart .single_add_to_cart_button,
.sp-summary-col .single_add_to_cart_button {
  background: #000 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 14px 36px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-block;
  margin-top: 12px;
}

.sp-add-to-cart .single_add_to_cart_button:hover,
.sp-summary-col .single_add_to_cart_button:hover {
  background: #ff1f8f !important;
}

/* Quantity input */
.sp-add-to-cart .quantity input,
.sp-summary-col .quantity input {
  border: 2px solid #000;
  border-radius: 0;
  height: 44px;
  font-weight: 600;
}

/* ========== AFTER SUMMARY (tabs / related) ========== */

/* Related Products heading */
.sp-product-wrapper .related.products > h2,
.sp-product-wrapper .up-sells > h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000;
  border: 2px solid #000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  margin-bottom: 28px;
}

.sp-product-wrapper .related.products > h2::before,
.sp-product-wrapper .up-sells > h2::before {
  content: "*";
  color: #ff1f8f;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

/* Related section label row with asterisk — matching design */
.sp-related-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 2px solid #000;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
  margin-top: 60px;
}

.sp-related-label .sp-asterisk {
  font-size: 20px;
}

/* ========== FOOTER MARQUEE ========== */
.sp-footer-marquee-wrap {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background: #ff1f8f;
  padding: 10px 0;
  overflow: hidden;
  margin-top: 48px;
}

/* sp-footer-marquee-wrap re-uses .sp-marquee-track & .sp-marquee-item */

/* ========== REMOVE / SUPPRESS DEFAULT WC WRAPPERS ========== */
/* We use sp-product-layout instead of default .woocommerce columns */
.sp-product-wrapper .woocommerce-product-gallery {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}

.sp-product-wrapper .summary.entry-summary {
  float: none !important;
  width: 100% !important;
  clear: none !important;
}

/* Prevent WC from adding clearing floats */
.sp-product-wrapper::after,
.sp-product-wrapper::before {
  display: none !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .sp-header {
    padding: 16px 16px;
  }

  .sp-menu-box {
    border-radius: 12px;
    padding: 24px 24px;
	height: 170px;
  }

  .sp-menu-text {
    max-width: 100%;
  }

  .sp-product-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sp-identity-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .sp-chung-toi {
    font-size: 12px;
    padding: 8px 14px;
  }

  h1.product_title.entry-title.wd-entities-title {
    text-align: center;
  }

  .sp-tags {
    justify-content: center;
  }
}

/* STYLE CHO HOOK WC */
.sp-add-to-cart .single_add_to_cart_button,
.sp-summary-col .single_add_to_cart_button {
  margin-top: 0 !important;
}

.wd-before-add-to-cart.wd-entry-content,
.wd-after-add-to-cart.wd-entry-content,
.tagged_as {
  display: none;
}


div.quantity input[type="button"] {
  height: auto !important;
}

/* Giá chưa cập nhật */
.sp-price-na {
  font-size: 28px;
  font-weight: 700;
  color: #a7a9ac;
  font-style: italic;
}

/* Button bị disable khi chưa có giá */
.single_add_to_cart_button.sp-btn-disabled,
.single_add_to_cart_button:disabled {
  background: #a7a9ac !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  pointer-events: none !important;
}

/* ── Luôn reset float/width WC gallery inject ── */
.sp-product-layout .woocommerce-product-gallery,
.sp-gallery-col .woocommerce-product-gallery {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.sp-product-layout .summary.entry-summary,
.sp-summary-col.summary.entry-summary {
  float: none !important;
  width: 100% !important;
  clear: none !important;
  margin: 0 !important;
}

/* ── Desktop: 2 cột ── */
@media (min-width: 769px) {
  .sp-product-layout {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 48px !important;
    align-items: start !important;
  }

  .sp-product-layout > .sp-gallery-col,
  .sp-product-layout > .sp-summary-col {
    width: auto !important;
    float: none !important;
    min-width: 0;
  }
}

/* ── Mobile: 1 cột ── */
@media (max-width: 768px) {
  .sp-product-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .sp-product-layout > .sp-gallery-col,
  .sp-product-layout > .sp-summary-col {
    width: 100% !important;
    float: none !important;
  }
}
