/**
 * Single Product Actions, Buy Now Button, Quantity Steppers, Spacing & Related Products
 *
 * Dedicated styling for Single Product template:
 * - Optimal vertical spacing separating short description, action row, and WhatsApp inquiry button
 * - Seamless horizontal alignment for Quantity Stepper, Add to Cart, and ⚡ Buy Now buttons
 * - Complete redesign of the "Related Products" section with Woodmart-benchmark cards
 * - Dynamic loading indicator animations during AJAX cart interactions
 * - Full responsiveness across desktop, tablet, and mobile (2-column grid on mobile)
 *
 * @package KRM_Enterprises
 */

/* ==========================================================================
   1. SINGLE PRODUCT ACTION AREA & SPACING OPTIMIZATION
   ========================================================================== */

/* Product Short Description (Tamil / English Text) */
.pdp-short-desc {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 0.95rem !important;
  line-height: 1.65 !important;
  color: #334155 !important;
  margin-top: 14px !important;
  margin-bottom: 24px !important;
}

/* Actions Wrapper Container */
.pdp-actions-wrap {
  margin-top: 8px !important;
  margin-bottom: 24px !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Primary Purchase Action Row (Stepper + Add to Cart + Buy Now) */
.pdp-actions-wrap form.cart {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
  margin-bottom: 14px !important;
  width: 100% !important;
}

/* Modern Pill-Shaped / Rounded Stepper Container */
.pdp-actions-wrap .quantity,
.quantity.krm-quantity-stepper,
.woocommerce .quantity {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 48px !important;
  background-color: #F8FAFC !important;
  border: 1.5px solid #E2E8F0 !important;
  border-radius: 10px !important;
  padding: 3px !important;
  box-sizing: border-box !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex: 0 0 125px !important;
  min-width: 120px !important;
  position: relative !important;
}

.pdp-actions-wrap .quantity:focus-within,
.quantity.krm-quantity-stepper:focus-within {
  border-color: var(--brand-green, #006633) !important;
  box-shadow: 0 0 0 3px rgba(0, 102, 51, 0.12) !important;
  background-color: #FFFFFF !important;
}

/* Stepper Clickable Decrement & Increment Buttons */
.quantity .qty-btn,
.quantity button.qty-btn,
.quantity .krm-qty-btn-minus,
.quantity .krm-qty-btn-plus {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 40px !important;
  min-width: 36px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 7px !important;
  color: #475569 !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
  flex-shrink: 0 !important;
}

.quantity .qty-btn:hover:not(:disabled),
.quantity button.qty-btn:hover:not(:disabled) {
  background-color: #E2E8F0 !important;
  color: #0F172A !important;
}

.quantity .qty-btn:active:not(:disabled),
.quantity button.qty-btn:active:not(:disabled) {
  transform: scale(0.92) !important;
  background-color: #CBD5E1 !important;
}

.quantity .qty-btn:disabled,
.quantity .qty-btn.disabled,
.quantity button.qty-btn:disabled {
  opacity: 0.28 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background: transparent !important;
}

/* Stepper Centered Number Input */
.quantity input.qty,
.quantity input.krm-qty-input {
  width: 44px !important;
  height: 40px !important;
  min-height: 40px !important;
  border: none !important;
  background: transparent !important;
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  color: #0F172A !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  -moz-appearance: textfield !important;
  appearance: textfield !important;
  flex: 1 1 auto !important;
}

.quantity input.qty::-webkit-outer-spin-button,
.quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

/* Native Add to Cart Button */
button.single_add_to_cart_button {
  height: 48px !important;
  padding: 0 20px !important;
  background-color: var(--brand-green, #006633) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  border: none !important;
  font-size: 0.98rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  flex: 1 1 50% !important;
  min-width: 140px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 102, 51, 0.15) !important;
}

button.single_add_to_cart_button:hover {
  background-color: #004D26 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 102, 51, 0.25) !important;
}

/* Direct "⚡ Buy Now" Button */
button.krm-single-buy-now-btn {
  height: 48px !important;
  padding: 0 20px !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  border: none !important;
  font-size: 0.98rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  flex: 1 1 50% !important;
  min-width: 140px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.25) !important;
}

button.krm-single-buy-now-btn:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  color: #FFFFFF !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 14px rgba(217, 119, 6, 0.35) !important;
}

button.krm-single-buy-now-btn svg {
  flex-shrink: 0 !important;
}

/* Button Dynamic Loading State during AJAX */
button.single_add_to_cart_button.loading,
button.krm-single-buy-now-btn.loading {
  position: relative !important;
  color: transparent !important;
  pointer-events: none !important;
  cursor: wait !important;
}

button.single_add_to_cart_button.loading svg,
button.single_add_to_cart_button.loading span,
button.krm-single-buy-now-btn.loading svg,
button.krm-single-buy-now-btn.loading span {
  opacity: 0 !important;
}

button.single_add_to_cart_button.loading::after,
button.krm-single-buy-now-btn.loading::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 20px !important;
  height: 20px !important;
  margin-top: -10px !important;
  margin-left: -10px !important;
  border: 2.5px solid rgba(255, 255, 255, 0.35) !important;
  border-top-color: #FFFFFF !important;
  border-radius: 50% !important;
  animation: krmSpin 0.7s linear infinite !important;
}

@keyframes krmSpin {
  to { transform: rotate(360deg); }
}

/* WhatsApp Inquiry Button with balanced vertical separation */
.pdp-btn-whatsapp,
.btn-whatsapp-outline.pdp-btn-whatsapp {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  height: 48px !important;
  background-color: #FFFFFF !important;
  color: #128C7E !important;
  border: 1.5px solid #128C7E !important;
  border-radius: 10px !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  margin-top: 14px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 6px rgba(18, 140, 126, 0.08) !important;
}

.pdp-btn-whatsapp:hover,
.btn-whatsapp-outline.pdp-btn-whatsapp:hover {
  background-color: #128C7E !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(18, 140, 126, 0.25) !important;
  transform: translateY(-1px) !important;
}

/* ==========================================================================
   2. "RELATED PRODUCTS" SECTION COMPLETE REDESIGN
   ========================================================================== */

.pdp-related-section,
.pdp-related-products-section,
.related.products {
  margin-top: 50px !important;
  margin-bottom: 60px !important;
  padding-top: 20px !important;
}

.pdp-related-header {
  margin-bottom: 24px !important;
  position: relative !important;
}

.pdp-related-heading,
.related.products > h2,
.related.products h2 {
  font-family: 'Outfit', -apple-system, sans-serif !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  margin: 0 0 8px !important;
  letter-spacing: -0.5px !important;
  text-transform: none !important;
}

.pdp-related-divider {
  width: 48px !important;
  height: 3.5px !important;
  background-color: var(--brand-green, #006633) !important;
  border-radius: 3px !important;
}

/* Related Products Grid - 4 Columns Desktop, 3 Columns Tablet, 2 Columns Mobile */
.pdp-related-grid,
.krm-related-grid,
.related ul.products,
.pdp-related-section .product-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

@media (max-width: 1100px) {
  .pdp-related-grid,
  .krm-related-grid,
  .related ul.products,
  .pdp-related-section .product-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
  }
}

@media (max-width: 767px) {
  .pdp-related-grid,
  .krm-related-grid,
  .related ul.products,
  .pdp-related-section .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

/* Card Design & Rounded Border */
.pdp-related-grid .woodmart-product-card,
.pdp-related-grid .krm-product-card,
.related ul.products li.product {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03) !important;
  position: relative !important;
  padding: 0 !important;
  margin: 0 !important;
}

.pdp-related-grid .woodmart-product-card:hover,
.pdp-related-grid .krm-product-card:hover,
.related ul.products li.product:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08) !important;
  border-color: #CBD5E1 !important;
}

/* 1:1 Aspect Ratio Image Container */
.pdp-related-grid .product-thumb-wrap,
.pdp-related-grid .krm-pcard-stage,
.related ul.products li.product .woocommerce-LoopProduct-link {
  position: relative !important;
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  overflow: hidden !important;
  background-color: #F8FAFC !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.pdp-related-grid .product-thumb-link,
.pdp-related-grid .krm-pcard-img-link {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  align-items: center !important;
  justify-content: center !important;
}

.pdp-related-grid .product-card-img,
.pdp-related-grid .krm-pcard-img,
.related ul.products li.product img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  padding: 12px !important;
  box-sizing: border-box !important;
  transition: transform 0.35s ease !important;
}

.pdp-related-grid .woodmart-product-card:hover .product-card-img,
.pdp-related-grid .woodmart-product-card:hover .krm-pcard-img,
.related ul.products li.product:hover img {
  transform: scale(1.05) !important;
}

/* Brand Red Savings Pill Badge ("SAVE X% TODAY") */
.pdp-related-grid .krm-pcard-discount-pill,
.pdp-related-grid .product-badge.badge-discount,
.related ul.products li.product .onsale {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 4 !important;
  background: #E53935 !important;
  color: #FFFFFF !important;
  font-family: 'Inter', -apple-system, sans-serif !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  box-shadow: 0 3px 8px rgba(229, 57, 53, 0.35) !important;
  border: none !important;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1.2 !important;
}

/* Product Card Body */
.pdp-related-grid .product-card-body,
.pdp-related-grid .krm-pcard-body {
  padding: 14px 16px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  background: #FFFFFF !important;
}

/* Subtle Uppercase Gray Category */
.pdp-related-grid .product-category,
.pdp-related-grid .krm-pcard-category {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  color: #94A3B8 !important;
  margin-bottom: 4px !important;
  display: block !important;
}

/* Clean Bold Title clamped to 2 lines */
.pdp-related-grid .product-title,
.pdp-related-grid .krm-pcard-title,
.related ul.products li.product .woocommerce-loop-product__title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: #0F172A !important;
  margin: 0 0 6px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  min-height: 40px !important;
  text-decoration: none !important;
}

.pdp-related-grid .product-title a,
.pdp-related-grid .krm-pcard-title a {
  color: #0F172A !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

.pdp-related-grid .woodmart-product-card:hover .product-title a,
.pdp-related-grid .woodmart-product-card:hover .krm-pcard-title a {
  color: var(--brand-green, #006633) !important;
}

/* Price Display Hierarchy */
.pdp-related-grid .product-price-row,
.pdp-related-grid .krm-pcard-price-row,
.related ul.products li.product .price {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
  flex-wrap: wrap !important;
}

.pdp-related-grid .krm-pcard-reg-price,
.related ul.products li.product .price del {
  color: #94A3B8 !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  text-decoration: line-through !important;
}

.pdp-related-grid .krm-pcard-sale-price,
.related ul.products li.product .price ins,
.related ul.products li.product .price {
  color: var(--brand-green, #006633) !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

/* Branded Solid Green Add-to-Cart Button */
.pdp-related-grid .btn-add-to-cart,
.pdp-related-grid .krm-pcard-btn-cart,
.related ul.products li.product .button.add_to_cart_button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  width: 100% !important;
  height: 42px !important;
  background-color: var(--brand-green, #006633) !important;
  color: #FFFFFF !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  border-radius: 9px !important;
  border: none !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 8px rgba(0, 102, 51, 0.16) !important;
  margin-top: auto !important;
}

.pdp-related-grid .btn-add-to-cart:hover,
.pdp-related-grid .krm-pcard-btn-cart:hover,
.related ul.products li.product .button.add_to_cart_button:hover {
  background-color: #004D26 !important;
  color: #FFFFFF !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(0, 102, 51, 0.28) !important;
}

.pdp-related-grid .krm-btn-cart-svg {
  flex-shrink: 0 !important;
  color: #FFFFFF !important;
}

/* ==========================================================================
   3. SLIDE-OUT MINI-CART DRAWER
   ========================================================================== */
.mini-cart-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 380px !important;
  max-width: 90vw !important;
  height: 100vh !important;
  background-color: #FFFFFF !important;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18) !important;
  z-index: 999999 !important;
  transform: translateX(100%) !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.mini-cart-drawer.open,
.mini-cart-drawer.is-open {
  transform: translateX(0) !important;
}

.mini-cart-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(3px) !important;
  -webkit-backdrop-filter: blur(3px) !important;
  z-index: 999998 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease !important;
}

.mini-cart-backdrop.open,
.mini-cart-backdrop.is-active {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Mini-Cart Header */
.mini-cart-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 20px !important;
  border-bottom: 1px solid #E2E8F0 !important;
  background-color: #F8FAFC !important;
}

.mini-cart-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.mini-cart-title-row h3 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
  color: #0F172A !important;
}

.drawer-close-btn {
  background: none !important;
  border: none !important;
  font-size: 1.5rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
  color: #64748B !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
}

.drawer-close-btn:hover {
  background-color: #E2E8F0 !important;
  color: #0F172A !important;
}

/* Mini-Cart Body & Item Rows */
.mini-cart-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  padding: 16px 20px !important;
}

.mini-cart-item-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 0 !important;
  border-bottom: 1px solid #F1F5F9 !important;
}

.mini-cart-thumb-wrap {
  width: 60px !important;
  height: 60px !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  background-color: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
}

.mini-cart-thumb-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.mini-cart-details-wrap {
  flex: 1 1 auto !important;
}

.mini-cart-title {
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  color: #1E293B !important;
  text-decoration: none !important;
  display: block !important;
  margin-bottom: 4px !important;
}

/* Mini-Cart Drawer Live Quantity Stepper */
.mini-cart-action-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 6px !important;
}

.mini-cart-stepper,
.mini-cart-qty-stepper {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background-color: #F1F5F9 !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 6px !important;
  height: 28px !important;
  padding: 2px !important;
  box-sizing: border-box !important;
}

.mini-cart-stepper-btn,
.mini-cart-qty-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 4px !important;
  color: #475569 !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: all 0.15s ease !important;
}

.mini-cart-stepper-btn:hover,
.mini-cart-qty-btn:hover {
  background-color: #E2E8F0 !important;
  color: #0F172A !important;
}

.mini-cart-stepper-btn:active,
.mini-cart-qty-btn:active {
  transform: scale(0.9) !important;
}

.mini-cart-stepper-qty,
.mini-cart-qty-val,
.mini-cart-qty-num {
  min-width: 24px !important;
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  color: #0F172A !important;
  user-select: none !important;
}

.mini-cart-multiply {
  font-size: 0.85rem !important;
  color: #94A3B8 !important;
  font-weight: 600 !important;
}

.mini-cart-unit-price {
  font-weight: 700 !important;
  color: var(--brand-green, #006633) !important;
}

.mini-cart-drawer .widget_shopping_cart_content {
  transition: opacity 0.2s ease !important;
}

/* ==========================================================================
   4. MOBILE RESPONSIVE ENGINE (<768px)
   ========================================================================== */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .pdp-wrapper {
    padding: 14px 0 36px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .pdp-wrapper .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .pdp-hero-grid {
    grid-template-columns: 100% !important;
    padding: 14px 12px !important;
    gap: 16px !important;
    border-radius: 14px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .pdp-gallery-wrap,
  .pdp-details-wrap {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .woocommerce-product-gallery,
  .woocommerce-product-gallery__wrapper,
  .woocommerce-product-gallery__image {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .woocommerce-product-gallery__image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 360px !important;
    object-fit: contain !important;
    box-sizing: border-box !important;
  }

  .flex-control-thumbs,
  .flex-control-nav.flex-control-thumbs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 10px 0 0 !important;
    padding: 0 !important;
  }

  .flex-control-thumbs li,
  .flex-control-nav.flex-control-thumbs li {
    flex: 0 0 calc(25% - 6px) !important;
    max-width: calc(25% - 6px) !important;
    width: calc(25% - 6px) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    aspect-ratio: 1 / 1 !important;
  }

  .flex-control-thumbs img,
  .flex-control-nav.flex-control-thumbs img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    border: 1.5px solid #E2E8F0 !important;
    box-sizing: border-box !important;
    display: block !important;
    padding: 2px !important;
    background-color: #FAFAFA !important;
  }

  .pdp-title {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    margin: 6px 0 8px !important;
  }

  .pdp-short-desc {
    font-size: 0.92rem !important;
    line-height: 1.6 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    margin-top: 10px !important;
    margin-bottom: 16px !important;
  }

  .pdp-price-panel {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px 10px !important;
    padding: 10px 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 14px !important;
    border-radius: 10px !important;
  }

  .pdp-price-current {
    display: inline-flex !important;
    align-items: baseline !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    font-size: 1.55rem !important;
    line-height: 1.2 !important;
    max-width: 100% !important;
  }

  .pdp-price-current del {
    font-size: 1.1rem !important;
  }

  .pdp-price-current ins {
    font-size: 1.55rem !important;
  }

  .pdp-price-savings {
    font-size: 0.76rem !important;
    padding: 3px 8px !important;
    white-space: nowrap !important;
  }

  /* Actions Row: Row 1 = Stepper + Add to Cart, Row 2 = Buy Now */
  .pdp-actions-wrap {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 6px !important;
    margin-bottom: 18px !important;
  }

  .pdp-actions-wrap form.cart {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 10px !important;
  }

  .pdp-actions-wrap .quantity,
  .pdp-actions-wrap .quantity.krm-quantity-stepper {
    flex: 0 0 110px !important;
    max-width: 115px !important;
    min-width: 0 !important;
    height: 46px !important;
    box-sizing: border-box !important;
  }

  .quantity input.qty,
  .quantity input.krm-qty-input {
    width: 36px !important;
    height: 38px !important;
    font-size: 0.95rem !important;
  }

  button.single_add_to_cart_button {
    flex: 1 1 calc(100% - 120px) !important;
    min-width: 0 !important;
    height: 46px !important;
    padding: 0 12px !important;
    font-size: 0.92rem !important;
    box-sizing: border-box !important;
  }

  button.krm-single-buy-now-btn {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    padding: 0 14px !important;
    font-size: 0.95rem !important;
    box-sizing: border-box !important;
    margin-top: 2px !important;
  }

  .pdp-btn-whatsapp,
  .btn-whatsapp-outline.pdp-btn-whatsapp {
    width: 100% !important;
    height: 46px !important;
    font-size: 0.9rem !important;
    margin-top: 6px !important;
    box-sizing: border-box !important;
  }

  .mini-cart-drawer {
    width: 100% !important;
    max-width: 100vw !important;
  }
}

/* ==========================================================================
   INTERACTIVE HIGH-RESOLUTION PRODUCT IMAGE ZOOM & LIGHTBOX
   ========================================================================== */

/* Main Gallery Image Container */
.woocommerce-product-gallery__image,
.pdp-gallery-inner .woocommerce-product-gallery__image {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background-color: #FAFAFA !important;
  border: 1px solid #E2E8F0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: crosshair !important;
  user-select: none;
  touch-action: pan-y pinch-zoom;
}

.woocommerce-product-gallery__image a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  cursor: crosshair !important;
  text-decoration: none !important;
}

/* Base Image - Stabilized & Sharp without pixelated scaling */
.woocommerce-product-gallery__image img {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 480px !important;
  object-fit: contain !important;
  box-sizing: border-box !important;
  transform: none !important;
  image-rendering: -webkit-optimize-contrast !important;
  image-rendering: crisp-edges !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  transform: translateZ(0) !important;
  transition: opacity 0.2s ease !important;
  pointer-events: none !important;
}

/* Dedicated High-Resolution Magnified Layer (Uncompressed Source File) */
.krm-zoom-magnified-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none !important;
  opacity: 0;
  visibility: hidden;
  background-repeat: no-repeat;
  background-color: #FAFAFA;
  border-radius: 14px;
  image-rendering: -webkit-optimize-contrast !important;
  image-rendering: crisp-edges !important;
  image-rendering: auto !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s ease;
  z-index: 6;
}

.krm-zoom-magnified-layer.is-active,
.woocommerce-product-gallery__image.is-zoomed .krm-zoom-magnified-layer {
  opacity: 1 !important;
  visibility: visible !important;
}

.woocommerce-product-gallery__image.is-zoomed img {
  opacity: 0.12 !important; /* Soft backdrop so the high-res magnified layer is 100% sharp and visible */
}

/* Semi-transparent Cursor Follow Lens */
.krm-zoom-lens {
  position: absolute;
  top: 0;
  left: 0;
  width: 140px;
  height: 140px;
  border: 2px solid rgba(0, 166, 81, 0.85);
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  pointer-events: none !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 10;
  will-change: transform;
}

.woocommerce-product-gallery__image.is-zoomed .krm-zoom-lens {
  opacity: 1;
  visibility: visible;
}

/* Subtle "Hover to zoom" Pill Badge */
.krm-zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(17, 24, 39, 0.82);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none !important;
  opacity: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 8;
}

.krm-zoom-hint svg {
  display: block;
  flex-shrink: 0;
  stroke: #ffffff;
}

.woocommerce-product-gallery__image.is-zoomed .krm-zoom-hint {
  opacity: 0;
  transform: translateY(4px);
}

/* Fullscreen Expand Trigger Button */
.krm-gallery-expand-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 12;
  padding: 0;
}

.krm-gallery-expand-btn:hover {
  background: #00a651;
  color: #ffffff;
  border-color: #00a651;
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 166, 81, 0.35);
}

/* Fullscreen High-Resolution Lightbox Modal */
.krm-pdp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.krm-pdp-lightbox.is-active {
  opacity: 1;
  visibility: visible;
}

.krm-lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 25, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.krm-lightbox-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  box-sizing: border-box;
  z-index: 2;
  pointer-events: none;
}

.krm-lightbox-header,
.krm-lightbox-stage,
.krm-lightbox-thumbs-bar {
  pointer-events: auto;
}

.krm-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  color: #ffffff;
}

.krm-lightbox-counter {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 9999px;
  backdrop-filter: blur(6px);
}

.krm-lightbox-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.krm-lightbox-close:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: rgba(239, 68, 68, 0.85);
  transform: rotate(90deg);
}

.krm-lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  min-height: 0;
  gap: 16px;
}

.krm-lightbox-img-wrap {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.krm-lightbox-img {
  max-width: 100%;
  max-height: calc(85vh - 120px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
  user-select: none;
}

.krm-lightbox-img.is-loading {
  opacity: 0.3;
}

.krm-lightbox-nav {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.krm-lightbox-nav:hover {
  background: #00a651;
  border-color: #00a651;
  transform: scale(1.08);
}

.krm-lightbox-thumbs-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow-x: auto;
}

.krm-lightbox-thumb-item {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  border: 2px solid transparent;
  background: #ffffff;
  padding: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
}

.krm-lightbox-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.krm-lightbox-thumb-item.is-active,
.krm-lightbox-thumb-item:hover {
  border-color: #00a651;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 166, 81, 0.4);
}

body.krm-lightbox-open {
  overflow: hidden !important;
}

/* Touch & Mobile Fallbacks */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
  .woocommerce-product-gallery__image {
    cursor: pointer !important;
  }

  .woocommerce-product-gallery__image a {
    cursor: pointer !important;
  }

  .krm-zoom-lens {
    display: none !important;
  }

  .krm-zoom-hint {
    display: none !important;
  }

  .krm-lightbox-nav {
    display: none !important; /* Swipe gesture used on mobile */
  }

  .krm-lightbox-stage {
    padding: 0;
  }

  .krm-lightbox-img {
    max-height: 70vh;
  }

  .krm-lightbox-thumb-item {
    width: 48px;
    height: 48px;
  }
}

/* ==========================================================================
   FLOATING WHATSAPP BUTTON (BOTTOM-LEFT ANCHOR)
   ========================================================================== */
.floating-whatsapp-wrap,
#floating-whatsapp-wrap {
  position: fixed !important;
  bottom: 16px !important;
  left: 16px !important;
  right: auto !important;
  width: auto !important;
  max-width: fit-content !important;
  z-index: 9999 !important;
  pointer-events: auto !important;
  margin: 0 !important;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease !important;
  will-change: opacity, transform;
}

.floating-whatsapp-wrap.is-hidden,
#floating-whatsapp-wrap.is-hidden,
.floating-whatsapp-wrap.scrolled-down,
#floating-whatsapp-wrap.scrolled-down {
  opacity: 0 !important;
  transform: translateY(20px) !important;
  pointer-events: none !important;
}

@media (max-width: 768px) {
  .floating-whatsapp-wrap,
  #floating-whatsapp-wrap {
    bottom: 16px !important;
    left: 16px !important;
    right: auto !important;
  }
}


