  /* Visualize selected color and its thumbnail */
  .color-option.active { outline: 2px solid #000; }
  .thumb-selected { border: 2px solid #000 !important; }

  /* Out-of-stock: same look/size as normal, just add a diagonal line */
  .size-option.out-of-stock {
    position: relative;
    text-decoration: line-through !important;
    text-decoration-thickness: 2px !important;
    text-decoration-color: #000000 !important;
  }

  /* Keep strikethrough even when active/selected */
  .size-option.out-of-stock.active {
    text-decoration: line-through !important;
    text-decoration-thickness: 2px !important;
    text-decoration-color: #ffffff !important;
  }
  
  /* NEW: Standardized image sizes */
  #main-product-image {
    width: 100%;
    height: 600px;
    object-fit: contain;
    background-color: transparent; /* Remove background color */
    border: none; /* Remove any border */
    box-shadow: none; /* Remove any shadow */
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  /* Image fade-in effect */
  #main-product-image.loading {
    opacity: 0.5;
  }
  
  .thumbnail-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    background-color: transparent; /* Remove background color */
    border: none !important; /* Remove border */
  }
  
  /* Keep only border for selected thumbnail */
  .thumbnail-item.thumb-selected img {
    border: 3px solid #0d6efd !important;
  }

  .review-action-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
  }

  .review-action-modal.is-open {
    display: flex;
  }

  .review-action-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
  }

  .review-action-card {
    position: relative;
    width: min(420px, calc(100% - 32px));
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
    padding: 16px;
    transform: translateY(6px);
    transition: transform 0.2s ease;
  }

  .review-action-modal.is-open .review-action-card {
    transform: translateY(0);
  }

  .review-action-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .review-action-close {
    border: none;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    color: #6c757d;
  }

  .review-action-body {
    font-size: 0.95rem;
    color: #343a40;
    margin-bottom: 16px;
  }

  .review-action-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }

  /* Remove img-thumbnail class styling */
  .img-thumbnail {
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
  }
  
  /* Remove container background */
  .main-image-container {
    background-color: transparent;
  }
  
  /* Ensure color thumbnails are consistent */
  .color-option + img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    background-color: #f8f9fa;
  }
  
  /* Horizontal thumbnail strip below the main image, matching the
     external PDP's gallery layout — shown on all screen sizes. */
  #thumbnail-gallery {
    max-width: 100%;
  }

  /* Image navigation arrows */
  .main-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .image-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.8;
  }
  
  .image-nav-arrow:hover {
    background-color: rgba(255, 255, 255, 1);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  }

  .image-nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
  }
  
  .image-nav-prev {
    left: 10px;
  }
  
  .image-nav-next {
    right: 10px;
  }
  
  /* Highlight the active thumbnail */
  .thumbnail-item.thumb-selected {
    border: 2px solid #000 !important;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
  }
  
  /* Carousel control */
  #carousel-control {
    cursor: pointer;
  }

  /* Size rail: arrows are always-visible inline siblings flanking the rail.
     No opacity tricks — disabled state handles boundary feedback. */
  .product-page .pdp-size-scroll-hint,
  .product-page .pdp-color-scroll-hint {
    display: none;
  }
  .product-page .pdp-size-rail-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
  }
  .product-page .pdp-size-rail {
    flex: 1 1 0;
    min-width: 0;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.4rem !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
  }
  .product-page .pdp-size-rail::-webkit-scrollbar {
    display: none;
  }
  .product-page .pdp-size-arrow {
    flex: 0 0 auto;
    align-self: stretch;
    width: 28px;
    border: 1px solid #d7dce3;
    border-radius: 6px;
    background: #f9fafb;
    color: #374151;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
  }
  .product-page .pdp-size-arrow.is-visible {
    display: flex;
  }
  .product-page .pdp-size-arrow:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
  }
  .product-page .pdp-size-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
  }
  [dir="rtl"] .product-page .pdp-size-arrow i {
    transform: scaleX(-1);
    display: inline-block;
  }
  .product-page .pdp-size-fade {
    display: none;
  }
  .product-page .pdp-size-item {
    flex: 0 0 auto;
  }

  @media (max-width: 768px) {
    /* Make the arrows more visible on mobile */
    .image-nav-arrow {
      width: 50px;
      height: 50px;
      background-color: rgba(255, 255, 255, 0.8);
    }
    
    .image-nav-arrow i {
      font-size: 24px;
    }
  }

  /* Add these styles to your existing <style> section */
  
  /* Frame around the image container */
  .col-md-6.col-lg-6 .d-flex.flex-column.align-items-center {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }
  
  /* Frame around the product details container */
  .col-md-6.col-lg-6:nth-child(2) {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }

  /* Category Hero band + breadcrumb — duplicated from unified_filtering.css's
     .category-hero / .category-hero-breadcrumb (same class names, kept in
     sync manually) so the product detail page's breadcrumb matches the
     category listing page's location, size, and font exactly, without
     pulling in that whole stylesheet's unrelated filter-sidebar CSS. */
  .category-hero {
    background: #fff;
    border-bottom: 1px solid #ebebeb;
    padding: 1.75rem 0 1.4rem;
  }

  .category-hero-breadcrumb {
    font-size: 0.75rem !important;
    color: #aaa !important;
    margin-bottom: 0.9rem !important;
  }

  .category-hero-breadcrumb .breadcrumb-item a {
    color: #999;
    text-decoration: none;
    transition: color 0.15s;
  }

  .category-hero-breadcrumb .breadcrumb-item a:hover {
    color: #111;
  }

  .category-hero-breadcrumb .breadcrumb-item.active {
    color: #666;
  }

  .category-hero-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #ccc;
  }

  /* Additional spacing between the containers on mobile */
  @media (max-width: 768px) {
    .col-md-6.col-lg-6 {
      margin-bottom: 15px;
    }
    
    .col-md-6.col-lg-6 .d-flex.flex-column.align-items-center,
    .col-md-6.col-lg-6:nth-child(2) {
      border-radius: 6px;
      padding: 12px;
    }

    /* Mobile PDP visual hierarchy: reduce oversized desktop typography/spacing */
    .product-page {
      padding-top: 0.5rem !important;
    }

    .product-page .product-details-panel {
      padding: 14px 12px !important;
    }

    .product-page .product-heading-line {
      font-size: 1.25rem !important;
      line-height: 1.35 !important;
      margin-bottom: 0.7rem !important;
    }

    .product-page .product-color-line,
    .product-page .average-rating .rating-text,
    .product-page .average-rating .stars {
      font-size: 0.95rem !important;
    }

    .product-page .average-rating {
      margin-bottom: 0.9rem !important;
    }

    .product-page .price-section {
      padding: 0.9rem !important;
      border-radius: 10px !important;
      margin-bottom: 0.95rem !important;
    }

    .product-page #product-price {
      font-size: 1.62rem !important;
      letter-spacing: 0 !important;
      line-height: 1.2;
    }

    .product-page #original-price {
      font-size: 0.95rem !important;
    }

    .product-page .flash-sale-badge .badge {
      font-size: 0.82rem !important;
      padding: 0.35rem 0.55rem !important;
    }

    .product-page .flash-sale-countdown {
      font-size: 0.88rem !important;
    }

    .product-page #action-buttons-container {
      gap: 0.5rem !important;
      margin-bottom: 0.9rem !important;
      align-items: stretch !important;
    }

    .product-page #add-button,
    .product-page #notify-stock-button {
      min-height: 44px;
      font-size: 0.95rem !important;
      padding: 0.62rem 0.85rem !important;
      border-radius: 10px !important;
    }

    .product-page .wishlist-btn-product-detail {
      width: 44px !important;
      height: 44px !important;
      font-size: 1rem !important;
      border-radius: 2px !important;
    }

    .product-page .color-option,
    .product-page .size-option {
      min-width: 46px;
      font-size: 0.82rem;
      padding: 0.42rem 0.58rem;
    }

    .product-page .pdp-color-label-row {
      margin-bottom: 0.35rem;
    }

    .product-page .pdp-color-label-row .form-label {
      margin-bottom: 0 !important;
      font-size: 0.9rem !important;
    }

    .product-page .pdp-color-rail {
      display: flex !important;
      flex-wrap: nowrap !important;
      gap: 0.4rem !important;
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      -ms-overflow-style: none;
      padding: 0.05rem 1.65rem;
      scroll-behavior: smooth;
    }

    .product-page .pdp-color-rail::-webkit-scrollbar {
      display: none;
    }

    .product-page .pdp-color-item {
      flex: 0 0 auto;
      width: auto;
      min-width: 5.25rem;
      max-width: min(15rem, 58vw);
      margin: 0 !important;
      gap: 0.28rem;
    }

    .product-page .pdp-color-chip {
      width: auto;
      min-height: 44px;
      min-width: 100%;
      padding: 0.3rem 0.32rem;
      font-size: 0.72rem !important;
      border-radius: 7px !important;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
      line-height: 1.15;
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
      letter-spacing: 0 !important;
    }

    .product-page .pdp-selected-color-line {
      line-height: 1.25;
      font-size: 0.82rem;
    }

    .product-page .pdp-selected-color-line strong {
      font-weight: 700;
      color: #111827;
    }

    .product-page .pdp-color-arrow {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 24px;
      height: 24px;
      border: 1px solid #d7dce3;
      border-radius: 50%;
      background: #ffffff;
      color: #111827;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      z-index: 3;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
    }

    .product-page .pdp-color-arrow.left {
      left: 0.1rem;
    }

    .product-page .pdp-color-arrow.right {
      right: 0.1rem;
    }

    .product-page .pdp-color-arrow.is-visible {
      opacity: 1 !important;
      pointer-events: auto;
    }

    .product-page .pdp-color-arrow:disabled {
      opacity: 0.35;
      pointer-events: none;
    }

    .product-page .pdp-color-fade {
      display: block;
      position: absolute;
      top: 0;
      bottom: 0;
      width: 26px;
      pointer-events: none;
      z-index: 2;
    }

    .product-page .pdp-color-fade.left {
      left: 0;
      background: linear-gradient(to right, #ffffff 35%, rgba(253, 251, 248, 0));
    }

    .product-page .pdp-color-fade.right {
      right: 0;
      background: linear-gradient(to left, #ffffff 35%, rgba(253, 251, 248, 0));
    }

    .product-page .pdp-size-label-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      margin-bottom: 0.35rem;
    }

    .product-page .pdp-size-label-row .form-label {
      margin-bottom: 0 !important;
      font-size: 0.9rem !important;
    }

    .product-page .pdp-size-scroll-hint {
      display: none;
      align-items: center;
      gap: 0.2rem;
      color: rgba(17, 24, 39, 0.7);
      font-size: 0.85rem;
      line-height: 1;
    }

    .product-page .pdp-size-scroll-hint.is-visible {
      display: inline-flex;
    }

    .product-page .pdp-size-scroll-hint .hint-left,
    .product-page .pdp-size-scroll-hint .hint-right {
      display: none;
    }

    .product-page .pdp-size-scroll-hint.show-left .hint-left {
      display: inline-flex;
    }

    .product-page .pdp-size-scroll-hint.show-right .hint-right {
      display: inline-flex;
    }

    .product-page .pdp-size-rail-wrapper {
      display: flex;
      align-items: stretch;
      gap: 0.3rem;
    }

    .product-page .pdp-size-rail {
      flex: 1 1 0;
      min-width: 0;
      display: flex !important;
      flex-wrap: nowrap !important;
      gap: 0.4rem !important;
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      -ms-overflow-style: none;
      scroll-behavior: smooth;
    }

    .product-page .pdp-size-rail::-webkit-scrollbar {
      display: none;
    }

    .product-page .pdp-size-item {
      flex: 0 0 calc((100% - 0.8rem) / 3);
      max-width: calc((100% - 0.8rem) / 3);
      min-width: calc((100% - 0.8rem) / 3);
      margin: 0 !important;
    }

    .product-page .pdp-size-item .size-option {
      width: 100%;
      min-height: 32px;
      padding: 0.24rem 0.25rem;
      font-size: 0.72rem !important;
      border-radius: 8px !important;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
      letter-spacing: 0 !important;
    }

    .product-page .pdp-size-arrow {
      width: 24px;
      font-size: 0.65rem;
      border-radius: 4px;
    }
  }

  /* Custom underline styling for review action links */
  .edit-review-link, .delete-review-link {
    text-decoration: none;
    border-bottom: 1px solid;
    padding-bottom: 1px;
    display: inline-block;
  }
  
  .edit-review-link {
    border-bottom-color: #0d6efd; /* Bootstrap 5 primary blue */
  }
  
  .delete-review-link {
    border-bottom-color: #dc3545; /* Bootstrap danger red */
  }
  
  .edit-review-link:hover, .delete-review-link:hover {
    text-decoration: none;
    opacity: 0.8;
  }
  
  /* Wishlist button styling */
  .wishlist-btn-product-detail {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid #000 !important;
    background-color: transparent !important;
    position: relative;
  }
  
  .wishlist-btn-product-detail:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
  
  .wishlist-btn-product-detail:active {
    transform: scale(0.98);
  }
  
  .wishlist-btn-product-detail i {
    font-size: 1.2rem;
    transition: color 0.3s ease;
  }
  
  /* When wishlisted, heart turns red */
  .wishlist-btn-product-detail[data-wishlisted="true"] i {
    color: #dc3545 !important;
  }
  
  /* When not wishlisted, heart is black outline */
  .wishlist-btn-product-detail[data-wishlisted="false"] i {
    color: #000 !important;
  }
  
  /* Disabled state for non-authenticated users */
  .wishlist-btn-product-detail:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .wishlist-btn-product-detail:disabled:hover {
    transform: none;
    box-shadow: none;
  }

  /* Enhanced Add to Cart Button */
  #add-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4) !important;
  }

  #add-button:active:not(:disabled) {
    transform: translateY(0);
  }

  /* Color and Size Option Buttons — match the external PDP's pill style */
  .product-page .color-option,
  .product-page .size-option {
    min-width: 50px;
    padding: 8px 12px;
    border: 2px solid #dee2e6 !important;
    border-radius: 6px !important;
    background-color: #f8f9fa !important;
    color: #212529 !important;
    font-weight: 500;
    font-size: 0.875rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
  }

  .product-page .color-option:hover:not(:disabled),
  .product-page .size-option:hover:not(:disabled) {
    border-color: #212529 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .product-page .color-option.active,
  .product-page .size-option.active {
    background-color: #212529 !important;
    border-color: #212529 !important;
    color: #fff !important;
    box-shadow: none;
  }

  .product-page .color-option:disabled,
  .product-page .size-option:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }

  /* Small solid-color dot inside the color pill, matching .ext-color-dot on
     the external PDP — replaces the old per-color image thumbnail preview. */
  .pdp-color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
  }

  /* External-product size/color pills (server-rendered links to sibling
     Product pages, no JS variant-switching involved). */
  .ext-size-pill {
    display: inline-block;
    padding: 5px 14px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 600;
    color: #212529;
    background: #f8f9fa;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
    transition: border-color .15s, background .15s;
  }
  .ext-size-pill.active {
    border-color: #212529;
    background: #212529;
    color: #fff;
  }
  .ext-size-pill.unavailable {
    color: #adb5bd;
    background: #fff;
    text-decoration: line-through;
    opacity: .6;
  }
  .ext-size-pill.active.unavailable {
    background: #6c757d;
    border-color: #6c757d;
    color: #fff;
  }
  .ext-color-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 500;
    color: #212529;
    background: #f8f9fa;
  }
  .ext-color-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.12);
    flex-shrink: 0;
  }
  .ext-color-link {
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, background .15s;
  }
  .ext-color-link.active {
    border-color: #212529;
    background: #212529;
    color: #fff;
  }
  .ext-color-link.unavailable {
    color: #adb5bd;
    background: #fff;
    text-decoration: line-through;
    opacity: .6;
  }

  .pdp-color-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .pdp-color-scroll-hint {
    display: none;
    align-items: center;
    gap: 0.2rem;
    color: rgba(17, 24, 39, 0.7);
    font-size: 0.85rem;
    line-height: 1;
  }

  .pdp-color-scroll-hint.is-visible {
    display: inline-flex;
  }

  .pdp-color-scroll-hint .hint-left,
  .pdp-color-scroll-hint .hint-right {
    display: none;
  }

  .pdp-color-scroll-hint.show-left .hint-left {
    display: inline-flex;
  }

  .pdp-color-scroll-hint.show-right .hint-right {
    display: inline-flex;
  }

  .pdp-color-rail-wrapper {
    position: relative;
  }

  .pdp-color-arrow,
  .pdp-color-fade {
    display: none;
  }

  [dir="rtl"] .product-page .pdp-color-scroll-hint,
  [dir="rtl"] .product-page .pdp-size-scroll-hint {
    direction: ltr;
  }

  /* Quantity controls */
  .pdp-qty-row {
    gap: 0.5rem;
  }

  .pdp-qty-label {
    font-size: 0.95rem;
    color: #495057;
    letter-spacing: 0.01em;
  }

  .pdp-qty-stepper {
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  }

  .pdp-qty-btn {
    min-width: 2.35rem;
    border: 0 !important;
    border-radius: 0 !important;
    background: #f8f9fa !important;
    color: #212529 !important;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s ease;
  }

  .pdp-qty-btn:not(:disabled):hover,
  .pdp-qty-btn:not(:disabled):focus {
    background: #e9ecef !important;
    color: #111827 !important;
  }

  .pdp-qty-input {
    width: 62px;
    min-width: 62px;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827 !important;
  }

  .pdp-qty-input:focus {
    box-shadow: none !important;
  }

  /* Thumbnail hover effects */
  .thumbnail-item img {
    transition: all 0.3s ease;
    border-radius: 6px;
  }

  .thumbnail-item:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .thumbnail-item.thumb-selected img {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
  }

  /* Collapsible sections styling */
  .collapsible-header {
    transition: all 0.3s ease;
    user-select: none;
  }
  
  .collapsible-header.active {
    background-color: #e9ecef;
    border-radius: 4px;
    padding: 8px;
    margin: -8px;
  }
  
  .collapsible-content {
    transition: all 0.3s ease;
    overflow: hidden;
    margin-top: 15px;
  }
  
  .collapsible-content.show {
    display: block !important;
  }
  
  .collapsible-header .fa-chevron-down {
    transition: transform 0.3s ease;
  }
  
  .collapsible-header.active .fa-chevron-down {
    transform: rotate(180deg);
  }

  /* Star Rating Input Styles */
  .star-rating-input {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
  }

  .star-input {
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    color: #ddd;
  }

  .star-input:hover {
    color: #ffc107 !important;
  }

  .star-input.fas {
    color: #ffc107 !important;
  }

  /* Hide number input spinners for quantity field */
  #quantity::-webkit-outer-spin-button,
  #quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  #quantity[type=number] {
    -moz-appearance: textfield;
  }

  .pdp-price-selection-hint { color: #6c757d; font-size: .86rem; }
  .pdp-purchase-reassurance { display: flex; flex-wrap: wrap; gap: .5rem 1rem; padding: .75rem 0; border-top: 1px solid #edf0f2; border-bottom: 1px solid #edf0f2; color: #5f6b76; font-size: .8rem; }
  .pdp-purchase-reassurance i { color: #198754; }

  /* Sticky Add to Cart Bar (Mobile Only) */
  @media (max-width: 768px) {
    /* Add bottom padding to container to prevent content being hidden by sticky bar */
    .container {
      padding-bottom: 80px;
    }

    .sticky-cart-bar {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: #ffffff;
      box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
      padding: 0.72rem 0.88rem calc(0.72rem + env(safe-area-inset-bottom, 0px));
      z-index: 1000;
      transform: translateY(100%);
      transition: transform 0.3s ease-in-out;
      border-top: 1px solid #dee2e6;
    }

    .sticky-cart-bar.show {
      transform: translateY(0);
    }

    .sticky-cart-bar .price-info {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      min-width: 0;
    }

    .sticky-cart-bar .sticky-price-total {
      font-size: 1.06rem;
      font-weight: 700;
      line-height: 1.15;
      color: #111827;
    }

    .sticky-cart-bar .sticky-price-line {
      display: inline-flex;
      align-items: baseline;
      gap: 0.42rem;
      flex-wrap: wrap;
    }

    .sticky-cart-bar .sticky-price-meta {
      margin-top: 0.1rem;
      font-size: 0.72rem;
      color: #6b7280;
      line-height: 1.15;
      font-weight: 600;
    }

    .sticky-cart-bar .sticky-price-meta-inline {
      margin: 0;
      font-size: 0.78rem;
      color: #6b7280;
      line-height: 1.1;
      font-weight: 600;
    }

    .sticky-cart-bar .sticky-inner {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 0.38rem;
      flex-wrap: wrap;
    }

    .sticky-cart-bar .sticky-actions {
      display: flex;
      align-items: flex-end;
      gap: 0.34rem;
      margin-left: auto;
    }

    .sticky-cart-bar .sticky-cta-stack {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      justify-content: flex-end;
      gap: 0;
      min-width: 152px;
      min-height: 0;
    }

    .sticky-cart-bar .btn {
      font-size: 0.9rem;
      padding: 0.6rem 0.82rem;
      min-height: 48px;
      border-radius: 10px;
    }

    .sticky-cart-bar .sticky-secondary-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.35rem;
      white-space: nowrap;
      font-size: 0.82rem;
      padding: 0.34rem 0.5rem;
      border-width: 1px;
      min-height: 48px;
      line-height: 1.1;
      transition: opacity 0.2s ease;
      width: 100%;
      margin-bottom: 12px;
    }

    .sticky-cart-bar .sticky-secondary-btn.is-hidden {
      visibility: hidden;
      opacity: 0;
      pointer-events: none;
    }

    .pdp-sticky-qty-stepper {
      width: 120px;
      height: 48px;
      border: 1px solid #d0d5dd;
      border-radius: 10px;
      overflow: hidden;
      background: #fff;
      box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
      margin-bottom: 12px;
    }

    .pdp-sticky-qty-btn {
      min-width: 2rem;
      min-height: 46px;
      border: 0 !important;
      border-radius: 0 !important;
      background: #f8f9fa !important;
      color: #212529 !important;
      font-weight: 700;
      line-height: 1;
      font-size: 1rem;
      padding: 0;
    }

    .pdp-sticky-qty-btn:not(:disabled):hover,
    .pdp-sticky-qty-btn:not(:disabled):focus {
      background: #e9ecef !important;
      color: #111827 !important;
    }

    .pdp-sticky-qty-input {
      border: 0 !important;
      border-radius: 0 !important;
      background: #fff !important;
      color: #111827 !important;
      font-weight: 700;
      font-size: 0.88rem;
      height: 46px;
      box-shadow: none !important;
      max-width: 46px;
      padding: 0.3rem 0.2rem;
    }

    /* Hide spinner arrows on sticky quantity input */
    .sticky-qty-input::-webkit-outer-spin-button,
    .sticky-qty-input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

    .sticky-qty-input[type=number] {
      -moz-appearance: textfield;
      max-width: 46px;
      padding: 0.3rem 0.2rem;
      font-size: 0.88rem;
      font-weight: 700;
    }

    /* Better button sizing in sticky bar */
    .sticky-cart-bar .input-group .btn {
      padding: 0;
      font-size: 1rem;
      line-height: 1;
      min-width: 2rem;
    }

    @media (max-width: 420px) {
      .sticky-cart-bar .sticky-inner {
        gap: 0.34rem;
      }

      .sticky-cart-bar .sticky-actions {
        width: 100%;
        justify-content: space-between;
        align-items: flex-end;
      }

      .sticky-cart-bar .sticky-secondary-btn {
        flex: 1 1 auto;
      }
    }

    /* Hide inline quantity controls on mobile; use sticky stepper instead */
    .pdp-qty-row {
      display: none !important;
    }

    .pdp-qty-label {
      width: 100%;
      margin: 0 !important;
      font-size: 0.92rem;
      color: #374151;
    }

    .pdp-qty-stepper {
      width: 148px;
      border: 1px solid #d1d5db;
      border-radius: 10px;
      box-shadow: none;
    }

    .pdp-qty-btn {
      min-width: 42px;
      min-height: 42px;
      padding: 0;
      font-size: 1.12rem;
      font-weight: 700;
      line-height: 1;
      background: #f9fafb !important;
      color: #111827 !important;
    }

    .pdp-qty-input {
      width: 60px;
      min-width: 60px;
      height: 42px;
      padding: 0;
      font-size: 1rem;
      font-weight: 700;
      color: #111827 !important;
      background: #fff !important;
    }

    #qty-hint {
      width: 100%;
      margin: 0 !important;
      font-size: 0.8rem !important;
      line-height: 1.25;
    }
  }

  @media (min-width: 769px) {
    /* Desktop: hide inline PDP quantity controls entirely. */
    .pdp-qty-row {
      display: none !important;
    }

    .product-page {
      padding-bottom: 7rem;
    }

    .sticky-cart-bar {
      position: fixed;
      left: 50%;
      bottom: 0;
      width: min(820px, calc(100vw - 2rem));
      transform: translate(-50%, 100%);
      transition: transform 0.28s ease-in-out;
      z-index: 1000;
      background: #ffffff;
      border: 1px solid #dee2e6;
      border-bottom: 0;
      border-radius: 12px 12px 0 0;
      box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
      padding: 0.78rem 1rem;
    }

    .sticky-cart-bar.show {
      transform: translate(-50%, 0);
    }

    .sticky-cart-bar .sticky-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.9rem;
      flex-wrap: nowrap;
    }

    .sticky-cart-bar .price-info {
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      line-height: 1.2;
    }

    .sticky-cart-bar .sticky-price-line {
      display: inline-flex;
      align-items: baseline;
      gap: 0.5rem;
      flex-wrap: wrap;
    }

    .sticky-cart-bar .sticky-price-meta-inline {
      margin: 0;
      font-size: 0.82rem;
      color: #6b7280;
      line-height: 1.1;
      font-weight: 600;
    }

    .sticky-cart-bar .sticky-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 0.6rem;
      margin-left: 0;
      flex: 0 0 auto;
    }

    .sticky-cart-bar .sticky-cta-stack {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: flex-end;
      gap: 0.5rem;
      min-width: 0;
    }

    .sticky-cart-bar .pdp-sticky-qty-stepper {
      display: grid !important;
      grid-template-columns: 44px minmax(40px, 1fr) 44px;
      align-items: stretch;
      width: 136px;
      height: 48px;
      border: 1px solid #d0d5dd;
      border-radius: 10px;
      overflow: hidden;
      background: #fff;
      box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
      flex: 0 0 auto;
      margin-bottom: 12px;
    }

    .sticky-cart-bar .pdp-sticky-qty-stepper > * {
      margin: 0 !important;
    }

    .sticky-cart-bar .pdp-sticky-qty-btn {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      flex: 0 0 44px;
      width: 44px;
      min-width: 44px;
      min-height: 46px;
      border: 0 !important;
      border-radius: 0 !important;
      background: #f8f9fa !important;
      color: #212529 !important;
      font-weight: 700;
      font-size: 1rem;
      line-height: 1;
      padding: 0;
    }

    .sticky-cart-bar #sticky-decrease-qty {
      border-right: 1px solid #d0d5dd !important;
    }

    .sticky-cart-bar #sticky-increase-qty {
      border-left: 1px solid #d0d5dd !important;
    }

    .sticky-cart-bar .pdp-sticky-qty-input {
      flex: 1 1 auto;
      min-width: 0;
      width: auto;
      border: 0 !important;
      border-radius: 0 !important;
      background: #fff !important;
      color: #111827 !important;
      font-weight: 700;
      font-size: 0.9rem;
      height: 46px;
      max-width: none;
      padding: 0;
      box-shadow: none !important;
    }

    .sticky-cart-bar .sticky-secondary-btn {
      width: auto;
      min-width: 170px;
      min-height: 48px;
      white-space: nowrap;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      margin-bottom: 12px;
    }

    .sticky-cart-bar #sticky-add-button {
      width: 100%;
    }
  }

  /* Enhanced Flash Sale Badge */
  .flash-sale-badge {
    animation: pulse-flash 2s infinite;
  }

  @keyframes pulse-flash {
    0%, 100% {
      opacity: 1;
      transform: scale(1);
    }
    50% {
      opacity: 0.95;
      transform: scale(1.02);
    }
  }

  .flash-sale-badge .badge {
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
    font-size: 1rem !important;
    padding: 0.5rem 1rem !important;
  }

  .flash-sale-countdown {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    animation: blink-countdown 1.5s infinite;
  }

  @keyframes blink-countdown {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.85;
    }
  }

  /* Social Share Buttons */
  .social-share-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
  }

  .share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    color: white;
  }

  .share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }

  .share-btn.whatsapp {
    background-color: #25D366;
  }

  .share-btn.facebook {
    background-color: #1877F2;
  }

  .share-btn.twitter {
    background-color: #1DA1F2;
  }

  .share-btn.copy-link {
    background-color: #6c757d;
  }

  /* Image Zoom Functionality */
  .main-image-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
  }

  .main-image-container.zoomed {
    cursor: zoom-out;
  }

  .main-image-container img {
    transition: transform 0.3s ease;
    max-width: 100%;
    height: auto;
  }

  .main-image-container.zoomed img {
    transform: scale(2);
  }

  /* Desktop zoom indicator */
  @media (min-width: 769px) {
    .main-image-container::after {
      content: '🔍';
      position: absolute;
      top: 10px;
      right: 10px;
      background: rgba(255,255,255,0.9);
      padding: 0.5rem;
      border-radius: 50%;
      font-size: 1.2rem;
      opacity: 0;
      transition: opacity 0.3s ease;
      pointer-events: none;
    }

    .main-image-container:hover::after {
      opacity: 1;
    }
  }

  /* Mobile pinch zoom support */
  @media (max-width: 768px) {
    .main-image-container {
      touch-action: pan-x pan-y pinch-zoom;
    }
  }

.product-heading-line,
.product-color-line {
  unicode-bidi: plaintext;
}

.product-heading-line bdi,
.product-color-line bdi {
  unicode-bidi: isolate;
}

/* Override global theme uppercase headings for product detail title line. */
.product-page .product-heading-line,
.product-page .product-heading-line bdi {
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* Keep reviewer names stable in mixed RTL/LTR context. */
.review-author-name {
  display: inline-flex;
  align-items: center;
  unicode-bidi: isolate;
  direction: ltr;
  text-align: left;
}

.seller-fulfillment-lines {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  vertical-align: middle;
}

.seller-line {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  line-height: 1.25;
}

.seller-line-muted {
  color: #6b7280;
  font-size: 0.92em;
}

.seller-fulfillment-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-inline-start: 0;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  color: #7a4e00;
  background: linear-gradient(135deg, #fff7d6 0%, #f3d27a 100%);
  border: 1px solid #d8b45a;
  box-shadow: 0 1px 2px rgba(122, 78, 0, 0.15);
  white-space: nowrap;
}

.seller-fulfillment-badge i {
  font-size: 0.6rem;
}

.product-page .summary-rating-row {
  gap: 0.35rem;
}

.product-page .summary-average-stars {
  direction: ltr;
  unicode-bidi: isolate;
  gap: 0.08rem;
}

[dir="rtl"] .product-page .summary-average-stars {
  direction: rtl;
}

[dir="rtl"] .product-page .summary-average-stars .fa-star-half-alt {
  transform: scaleX(-1);
}

.product-page .summary-review-count-link {
  margin-inline-start: 0.4rem;
  color: #0d6efd !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

.product-page .summary-review-count-link:hover,
.product-page .summary-review-count-link:focus {
  color: #0b5ed7 !important;
  text-decoration: underline !important;
}

.product-page #average-rating-stars {
  direction: ltr;
  unicode-bidi: isolate;
}

[dir="rtl"] .product-page #average-rating-stars {
  direction: rtl;
}

[dir="rtl"] .product-page #average-rating-stars .fa-star-half-alt {
  transform: scaleX(-1);
}

@media (max-width: 768px) {
  #sizeGuideModal .size-guide-modal-dialog {
    margin: 0;
    max-width: 100%;
    height: 100%;
  }

  #sizeGuideModal .modal-content {
    height: 100%;
    border-radius: 0;
    border: 0;
  }

  #sizeGuideModal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 2;
    background: #ffffff;
    padding: 0.75rem 0.9rem;
  }

  #sizeGuideModal .modal-title {
    margin: 0;
    flex: 1 1 auto;
    font-size: 1rem;
    line-height: 1.2;
  }

  #sizeGuideModal .modal-header .btn-close {
    margin: 0;
    padding: 0.35rem;
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-position: center;
    background-size: 0.9rem;
  }

  #sizeGuideModal .modal-body {
    padding: 0.8rem 0.9rem;
  }

  #sizeGuideModal .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #ffffff;
    padding: 0.65rem 0.9rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    margin-top: auto;
  }

  #sizeGuideModal .modal-footer .btn {
    width: 100%;
    min-height: 42px;
  }

  #sizeGuideModal .size-guide-table-wrap {
    margin: 0 -0.2rem;
  }

  #sizeGuideModal .size-guide-table {
    margin-bottom: 0;
    font-size: 0.82rem;
  }

  #sizeGuideModal .size-guide-table th,
  #sizeGuideModal .size-guide-table td {
    padding: 0.42rem 0.5rem;
    white-space: nowrap;
    vertical-align: middle;
  }
}
