/* ==========================================================================
   CUSTOM SINGLE PRODUCT PAGE – RESPONSIVE & CLEAN
   ========================================================================== */

.custom-single-product-wrapper {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
  box-sizing: border-box;
  width: 100%;
}

.custom-single-product-main {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .custom-single-product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

/* Gallery */
.custom-product-gallery-col {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.custom-product-gallery-col .woocommerce-product-gallery {
  width: 100% !important;
  float: none !important;
}
.custom-product-gallery-col img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Title & Rating */
.custom-product-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  line-height: 1.3;
  color: #2d2b3a;
}
.custom-single-rating-row {
  margin-bottom: 15px;
}

/* ================================================================
   SINGLE PRODUCT – RATING
   ================================================================ */
.custom-single-review-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  text-decoration: none !important;
  color: currentColor !important;
  flex-wrap: wrap;
}

.custom-single-review-link .star-rating-stars {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.custom-single-review-link .star-precise {
  display: inline-block;
  font-size: 18px;
  background: linear-gradient(
    90deg,
    #e5456d var(--fill),
    rgb(209, 213, 219) var(--fill)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  user-select: none;
}

.custom-single-review-link .custom-review-text {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 0.9rem;
  line-height: 1;
  color: rgb(107, 114, 128);
  margin-left: 4px;
}

/* Hide any other potential duplicate elements */
.custom-single-review-link .rating-count,
.custom-single-review-link .review-count,
.custom-single-review-link .custom-star-rating > span:not(.stars) {
  display: none !important;
}

/* Price, Brand, Description */
.custom-single-price {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: #2d2b3a;
}
.custom-brand-info {
  font-size: 0.95rem;
  margin-bottom: 15px;
  color: #2d2b3a;
}
.custom-brand-info strong {
  font-weight: 600;
}
.custom-short-description {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 25px;
  color: #2d2b3a;
}

/* ========== ACTION ROW ========== */
.custom-single-add-to-cart-wrap {
  margin-bottom: 25px;
}
.custom-cart-form {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap;
}

.custom-quantity-stepper,
.custom-single-add-cart-btn,
.custom-cart-form .custom-top-wishlist-wrapper,
.custom-cart-form .custom-wishlist-btn {
  height: 42px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

/* Quantity stepper */
.custom-quantity-stepper {
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
}
.custom-quantity-stepper .qty-btn {
  background: transparent;
  border: none;
  width: 36px;
  height: 100%;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  user-select: none;
  transition: background-color 0.2s ease;
  color: #2d2b3a;
}
.custom-quantity-stepper .qty-btn:hover {
  background-color: #f9f9f9;
}
.custom-quantity-stepper .quantity {
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
}
.custom-quantity-stepper .quantity input.qty {
  width: 44px !important;
  height: 100% !important;
  border: none !important;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  appearance: textfield;
  -moz-appearance: textfield;
  color: #2d2b3a;
}
.custom-quantity-stepper .quantity input.qty::-webkit-outer-spin-button,
.custom-quantity-stepper .quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ============================================================
   ADD TO CART BUTTON – WHITE BG, BLACK TEXT
   ============================================================ */
.custom-single-add-cart-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 24px !important;
  font-weight: 600 !important;
  border-radius: 4px !important;
  line-height: 1 !important;
  cursor: pointer;
  white-space: nowrap;
  background-color: #ffffff;
  color: #2d2b3a !important;
  border: 1px solid #2d2b3a;
  transition: all 0.2s ease;
}
.custom-single-add-cart-btn:hover {
  background-color: #2d2b3a;
  color: #ffffff !important;
  border-color: #2d2b3a;
}
.custom-single-add-cart-btn.out-of-stock {
  background-color: #e5456d !important;
  color: #ffffff !important;
  border-color: #e5456d !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Wishlist button */
.custom-cart-form .custom-top-wishlist-wrapper {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
}
.custom-cart-form .custom-wishlist-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background-color: #f9f9f9 !important;
  border: none !important;
  transition: background-color 0.2s ease;
}
.custom-cart-form .custom-wishlist-btn:hover {
  background-color: #e2e8f0 !important;
}
.custom-cart-form .custom-wishlist-btn svg {
  stroke: #2d2b3a;
  fill: none;
}
.custom-cart-form .custom-wishlist-btn.active svg {
  stroke: #e5456d;
  fill: #e5456d;
}

/* Social Share */
.custom-social-share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: #2d2b3a;
  flex-wrap: wrap;
}
.custom-social-share-row .share-label {
  font-weight: 400;
}
.custom-social-share-row a {
  text-decoration: none;
  font-weight: 700;
  padding: 4px 8px;
  color: #2d2b3a;
  transition: color 0.2s ease;
}
.custom-social-share-row a:hover {
  color: #e5456d;
}

/* Tabs */
.custom-product-tabs-wrapper {
  width: 100%;
  overflow-x: auto;
}
.custom-product-tabs-wrapper .woocommerce-tabs ul.tabs {
  border-bottom: 1px solid #e2e8f0;
  padding: 0;
  display: flex;
  gap: 20px;
  list-style: none;
  white-space: nowrap;
}
.custom-product-tabs-wrapper .woocommerce-tabs ul.tabs li {
  background: transparent !important;
  border: none !important;
  padding: 10px 0 !important;
  margin: 0 !important;
}
.custom-product-tabs-wrapper .woocommerce-tabs ul.tabs li a {
  color: #2d2b3a;
  font-weight: 500;
  text-decoration: none;
  padding: 5px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}
.custom-product-tabs-wrapper .woocommerce-tabs ul.tabs li.active a {
  border-bottom-color: #e5456d;
  color: #e5456d;
}

/* ========== MOBILE (≤ 767px) ========== */
@media (max-width: 767px) {
  .custom-product-title {
    font-size: 1.3rem;
  }
  .custom-single-price {
    font-size: 1.2rem;
  }

  /* ============================================================
     MOBILE: Quantity, Add to Cart, Wishlist – ALL IN ONE ROW
     ============================================================ */
  .custom-cart-form {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  /* Quantity stepper – smaller, fixed width */
  .custom-quantity-stepper {
    flex: 0 0 auto !important;
    width: auto !important;
    height: 40px !important;
  }

  .custom-quantity-stepper .qty-btn {
    width: 32px !important;
    font-size: 1rem !important;
  }

  .custom-quantity-stepper .quantity input.qty {
    width: 36px !important;
    font-size: 0.9rem !important;
  }

  /* Add to Cart – takes remaining space */
  .custom-single-add-cart-btn {
    flex: 1 !important;
    width: auto !important;
    height: 40px !important;
    font-size: 14px !important;
    padding: 0 12px !important;
  }

  /* Wishlist – fixed size */
  .custom-cart-form .custom-top-wishlist-wrapper {
    flex: 0 0 auto !important;
    width: auto !important;
    display: flex !important;
    justify-content: center !important;
  }

  .custom-cart-form .custom-wishlist-btn {
    width: 40px !important;
    height: 40px !important;
  }

  /* Social share – stays below, centered */
  .custom-social-share-row {
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
  }
  .custom-social-share-row a {
    padding: 6px 12px;
    font-size: 14px;
  }

  /* Tabs - scrollable on mobile */
  .custom-product-tabs-wrapper .woocommerce-tabs ul.tabs {
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .custom-product-tabs-wrapper .woocommerce-tabs ul.tabs li a {
    font-size: 14px;
    padding: 8px 4px;
  }

  .custom-single-review-link .star-precise {
    font-size: 16px;
  }
  .custom-single-review-link .custom-review-text {
    font-size: 13px;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .custom-product-title {
    font-size: 1.1rem;
  }
  .custom-single-price {
    font-size: 1.1rem;
  }

  .custom-cart-form {
    gap: 6px !important;
  }

  .custom-quantity-stepper {
    height: 36px !important;
  }
  .custom-quantity-stepper .qty-btn {
    width: 28px !important;
    font-size: 0.9rem !important;
  }
  .custom-quantity-stepper .quantity input.qty {
    width: 32px !important;
    font-size: 0.8rem !important;
  }

  .custom-single-add-cart-btn {
    height: 36px !important;
    font-size: 12px !important;
    padding: 0 8px !important;
  }

  .custom-cart-form .custom-wishlist-btn {
    width: 36px !important;
    height: 36px !important;
  }

  .custom-short-description {
    font-size: 0.9rem;
  }

  .custom-social-share-row a {
    font-size: 12px;
    padding: 4px 8px;
  }
  .custom-single-review-link .star-precise {
    font-size: 14px;
  }
  .custom-single-review-link .custom-review-text {
    font-size: 12px;
  }
}

/* ==========================================================================
   RELATED PRODUCTS SLIDER
   ========================================================================== */

.custom-related-slider-wrapper {
  margin: 40px 0px;
  padding-top: 30px;
  border-top: 1px solid #e2e8f0;
}

/* Header & Title Alignment */
.custom-related-slider-wrapper .wc-custom-section-control-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  margin-bottom: 20px;
}

/* Swiper Navigation Arrows */
.custom-related-slider-wrapper .swiper-navigation-wrapper {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.custom-related-slider-wrapper .swiper-button-prev-custom,
.custom-related-slider-wrapper .swiper-button-next-custom {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #f1f5f9;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  user-select: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.custom-related-slider-wrapper .swiper-button-prev-custom:hover,
.custom-related-slider-wrapper .swiper-button-next-custom:hover {
  background-color: #0f172a;
  color: #ffffff;
}

.custom-related-slider-wrapper .swiper-button-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Swiper Slide Flex Heights */
.custom-related-slider-wrapper .related-swiper .swiper-slide {
  height: auto;
  display: flex;
}

.custom-related-slider-wrapper .related-swiper .custom-product-card-vertical {
  width: 100%;
}
