/**
 * Product Carousel Slider for WooCommerce v1.3.0
 */

:root {
  --pcsbb-section-title-color: #333;
  --pcsbb-section-subtitle-color: #666;
  --pcsbb-product-title-color: #333;
  --pcsbb-product-title-hover-color: #000;
  --pcsbb-price-color: #333;
  --pcsbb-price-hover-color: #e74c3c;
  --pcsbb-nav-color: #333;
  --pcsbb-nav-hover-color: #ffffff;
  --pcsbb-nav-bg-color: #ffffff;
  --pcsbb-nav-bg-hover-color: #333;
  --pcsbb-secondary-color: #666;
  --pcsbb-text-color: #333;
  --pcsbb-border-color: #e0e0e0;
  --pcsbb-transition: 0.3s ease;
}

/* ===== LOADER (3-DOT ANIMATION) ===== */
.pcsbb-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  z-index: 999;
  min-height: 300px;
}

.pcsbb-loader-dots {
  display: flex;
  gap: 12px;
  align-items: center;
}

.pcsbb-loader-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pcsbb-text-color, #333);
  animation: pcsbb-dot-bounce 1.4s infinite ease-in-out both;
}

.pcsbb-loader-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.pcsbb-loader-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes pcsbb-dot-bounce {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Hide products while loading */
.pcsbb-loading .pcsbb-product-item {
  opacity: 0;
}

/* ===== MAIN WRAPPER ===== */
.pcsbb-main-wrapper {
  /* width:100% is required — without it, the main wrapper sizes to its content
     (the carousel track's full scroll width), making $wrapper.width() in JS
     return the total track width instead of the visible container width. */
  width: 100%;
  padding: 0;
  position: relative;
  overflow-x: clip;
}

/* ===== HEADER (Title & Subtitle) ===== */
.pcsbb-header {
  text-align: center;
  margin-bottom: clamp(30px, 5vw, 60px);
}

.pcsbb-section-title {
  font-size: clamp(20px, 4vw, 32px);
  font-weight: 600;
  margin: 0 0 clamp(8px, 2vw, 12px) 0;
  color: var(--pcsbb-section-title-color, #333);
  letter-spacing: clamp(1px, 0.2vw, 2px);
  text-transform: uppercase;
  line-height: 1.2;
}

.pcsbb-section-subtitle {
  font-size: clamp(16px, 3vw, 24px);
  font-weight: 300;
  margin: 0;
  color: var(--pcsbb-section-subtitle-color, #666);
  line-height: 1.3;
}

/* ===== CAROUSEL CONTAINER ===== */
.pcsbb-carousel-container {
  position: relative;
  width: 100%;
  min-height: 200px;
  overflow: visible;
  padding: 0;
}

/* Arrow vertical anchor: sits at center of image portion only.
   JS sets --pcsbb-image-center to (imageHeight/2 + 16px) after images load.
   Fallback 40% is a reasonable approximation until JS runs. */
.pcsbb-carousel-container .pcsbb-nav-arrow {
  top: var(--pcsbb-image-center, 40%);
}

/* ===== CAROUSEL WRAPPER ===== */
.pcsbb-carousel-wrapper {
  position: relative;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  /* Padding creates a "breathing zone" inside overflow:hidden so card shadows,
     borders and lift effects aren't hard-clipped at the edge */
  padding: 16px 0px;
  margin: -16px -6px;
  box-sizing: content-box;
}

/* Fit mode: remove horizontal breathing room so items size to exact container width.
   Vertical padding kept so top/bottom shadows still have space. */
.pcsbb-carousel-wrapper.pcsbb-fit-mode {
  padding-left: 0;
  padding-right: 0;
  margin-left: 0;
  margin-right: 0;
}

.pcsbb-carousel-wrapper.dragging {
  cursor: grabbing;
}

/* ===== CAROUSEL TRACK ===== */
.pcsbb-carousel-track {
  display: flex;
  gap: 24px; /* Desktop default — must match JS this.gap */
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* ===== MOBILE VERTICAL LAYOUT ===== */
.pcsbb-mobile-vertical-mode {
  cursor: default;
  overflow: visible !important;
}

.pcsbb-mobile-vertical-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0;
  width: 100%;
}

.pcsbb-mobile-vertical-mode .pcsbb-product-item {
  width: 100% !important;
  max-width: 100%;
  flex: 0 0 auto;
  transform: none !important;
  transition: transform 0.3s ease;
}

/* Restore hover effects in mobile vertical mode */
.pcsbb-mobile-vertical-mode .pcsbb-product-item:hover {
  transform: translateY(-5px) !important;
}

/* Hide navigation in mobile vertical mode */
.pcsbb-mobile-vertical-mode .pcsbb-nav-arrow,
.pcsbb-mobile-vertical-mode .pcsbb-nav-dots,
.pcsbb-mobile-vertical-mode .pcsbb-carousel-container,
.pcsbb-mobile-vertical-mode .pcsbb-carousel-track {
  display: none !important;
}

/* ===== PRODUCT ITEM ===== */
.pcsbb-product-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  transition: transform var(--pcsbb-transition);
  position: relative;
  box-sizing: border-box;
}

/* Gallery: 4px padding gives breathing space around image block */
.pcsbb-main-wrapper[data-variant="gallery"] .pcsbb-product-item {
  padding: 4px;
}

/* Card: no extra item padding — image bleeds to card edges as designed.
   The wrapper's 16px/6px padding handles breathing room for shadows. */
.pcsbb-main-wrapper[data-variant="card"] .pcsbb-product-item {
  padding: 0;
}

/* ===== IMAGE WRAPPER ===== */
.pcsbb-product-image-wrapper {
  position: relative;
  overflow: hidden;
  margin-bottom: 15px;
  width: 100%;
  background-color: #f5f5f5;
}

/* Image Height Modes */
.pcsbb-carousel-wrapper[data-image-height-mode="natural"]
  .pcsbb-product-image-wrapper {
  height: auto;
}

.pcsbb-carousel-wrapper[data-image-height-mode="natural"] .pcsbb-product-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.pcsbb-carousel-wrapper[data-image-height-mode="uniform"]
  .pcsbb-product-image-wrapper {
  aspect-ratio: 1;
  height: auto;
}

.pcsbb-carousel-wrapper[data-image-height-mode="uniform"] .pcsbb-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Image height modes for mobile vertical */
.pcsbb-mobile-vertical-mode[data-image-height-mode="natural"]
  .pcsbb-product-image-wrapper {
  height: auto;
}

.pcsbb-mobile-vertical-mode[data-image-height-mode="natural"]
  .pcsbb-product-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.pcsbb-mobile-vertical-mode[data-image-height-mode="uniform"]
  .pcsbb-product-image-wrapper {
  aspect-ratio: 3 / 4;
  height: auto;
}

.pcsbb-mobile-vertical-mode[data-image-height-mode="uniform"]
  .pcsbb-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== PRODUCT IMAGES ===== */
.pcsbb-product-image {
  transition:
    opacity var(--pcsbb-transition),
    transform var(--pcsbb-transition);
  position: relative;
}

.pcsbb-main-image {
  z-index: 2;
  display: block;
  position: relative;
}

.pcsbb-product-image-link {
  display: block;
  position: relative;
  z-index: 1;
}

.pcsbb-gallery-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: inherit;
  opacity: 0;
  z-index: 1;
  transition: opacity var(--pcsbb-transition);
  background-color: transparent;
}

/* Only show gallery image on hover if it has a valid src */
.pcsbb-gallery-image[src=""],
.pcsbb-gallery-image:not([src]) {
  display: none;
}

/* ===== PRODUCT INFO ===== */
.pcsbb-product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 0;
}

/* ===== PRODUCT TITLE ===== */
.pcsbb-product-title {
  margin: 0 0 clamp(6px, 1vw, 10px) 0;
  font-size: clamp(13px, 2vw, 16px);
  font-weight: 500;
  line-height: 1.4;
  color: var(--pcsbb-text-color);
  width: 100%;
}

.pcsbb-product-title a {
  color: var(--pcsbb-product-title-color, #333);
  text-decoration: none;
  transition: color var(--pcsbb-transition);
}

.pcsbb-product-title a:hover {
  color: var(--pcsbb-product-title-hover-color, #000);
}

/* ===== PRODUCT PRICE ===== */
.pcsbb-product-price {
  margin: 0 0 clamp(8px, 1.5vw, 12px) 0;
  font-size: clamp(14px, 2.2vw, 18px);
  font-weight: 600;
  color: var(--pcsbb-price-color, #333);
  transition: color var(--pcsbb-transition);
}

.pcsbb-product-item:hover .pcsbb-product-price {
  color: var(--pcsbb-price-hover-color, #e74c3c);
}

.pcsbb-product-price del {
  color: #999;
  font-size: clamp(12px, 1.8vw, 15px);
  font-weight: 400;
  margin-right: 8px;
}

.pcsbb-product-price ins {
  text-decoration: none;
  color: var(--pcsbb-price-hover-color, #e74c3c);
}

.pcsbb-product-item:hover .pcsbb-product-price del {
  color: #999;
}

/* ===== PRODUCT RATING ===== */
.pcsbb-product-rating {
  margin: 0 0 clamp(8px, 1.5vw, 12px) 0;
  font-size: clamp(12px, 1.8vw, 14px);
}

.pcsbb-product-rating .star-rating {
  font-size: clamp(12px, 1.8vw, 14px);
}

/* ===== PRODUCT LINK BUTTON ===== */
.pcsbb-product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: clamp(8px, 1.5vw, 12px) clamp(16px, 3vw, 24px);
  background-color: var(--pcsbb-product-link-bg, #333333);
  color: var(--pcsbb-product-link-text, #ffffff);
  border: 1px solid var(--pcsbb-product-link-border, #333333);
  text-decoration: none;
  font-size: clamp(12px, 1.8vw, 14px);
  font-weight: 500;
  border-radius: 4px;
  transition: all var(--pcsbb-transition);
  cursor: pointer;
  text-align: center;
}

.pcsbb-product-link:hover {
  background-color: var(--pcsbb-product-link-hover-bg, #000000);
  color: var(--pcsbb-product-link-hover-text, #ffffff);
  border-color: var(--pcsbb-product-link-hover-bg, #000000);
}

/* ===== ADD TO CART BUTTON ===== */
.pcsbb-add-to-cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: clamp(8px, 1.5vw, 12px) clamp(16px, 3vw, 24px);
  font-size: clamp(12px, 1.8vw, 14px);
  font-weight: 500;
  border-radius: 4px;
  transition: all var(--pcsbb-transition);
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  background-color: var(--pcsbb-add-to-cart-bg, #0073aa);
  color: var(--pcsbb-add-to-cart-text, #ffffff);
  border: 1px solid var(--pcsbb-add-to-cart-border, #0073aa);
}

.pcsbb-add-to-cart:hover {
  background-color: var(--pcsbb-add-to-cart-hover-bg, #005a87);
  color: var(--pcsbb-add-to-cart-hover-text, #ffffff);
  border-color: var(--pcsbb-add-to-cart-hover-bg, #005a87);
}

/* Loading state for add to cart */
.pcsbb-add-to-cart.loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.pcsbb-add-to-cart.added {
  background-color: #28a745;
  border-color: #28a745;
  color: #fff;
}

/* ===== ACTION BUTTONS WRAPPER ===== */
.pcsbb-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  width: 100%;
  box-sizing: border-box;
}

/* Stacked: full width buttons, column direction */
.pcsbb-buttons-stacked {
  flex-direction: column;
}

.pcsbb-buttons-stacked .pcsbb-add-to-cart,
.pcsbb-buttons-stacked .pcsbb-product-link {
  display: flex;
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

/* Inline: side by side */
.pcsbb-buttons-inline {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
}

.pcsbb-buttons-inline .pcsbb-add-to-cart,
.pcsbb-buttons-inline .pcsbb-product-link {
  flex: 1 1 0;
  justify-content: center;
  min-width: 0;
  box-sizing: border-box;
}

/* Per-button full-width modifier class */
.pcsbb-btn-full-width {
  display: flex !important;
  width: 100% !important;
  justify-content: center !important;
  box-sizing: border-box;
}

/* Per-button auto-width (default when no full width) */
.pcsbb-btn-auto {
  display: inline-flex !important;
  width: auto !important;
}

/* Dashicon inside buttons */
.pcsbb-add-to-cart .dashicons,
.pcsbb-product-link .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  line-height: 16px;
  flex-shrink: 0;
}

/* Card variant: buttons need same horizontal padding as card content */
.pcsbb-main-wrapper[data-variant="card"] .pcsbb-action-buttons {
  padding-left: 0;
  padding-right: 0;
}

/* Gallery variant: center the single-button case */
.pcsbb-main-wrapper[data-variant="gallery"] .pcsbb-action-buttons {
  align-items: center;
}

.pcsbb-main-wrapper[data-variant="gallery"]
  .pcsbb-buttons-stacked
  .pcsbb-add-to-cart,
.pcsbb-main-wrapper[data-variant="gallery"]
  .pcsbb-buttons-stacked
  .pcsbb-product-link {
  width: 100%;
}

.pcsbb-main-wrapper[data-variant="gallery"] .pcsbb-buttons-inline {
  justify-content: center;
}

/* ===== SALE & STOCK BADGES ===== */
.pcsbb-sale-badge,
.pcsbb-sold-out-badge {
  display: block;
  position: absolute;
  padding: clamp(4px, 1vw, 6px) clamp(8px, 1.5vw, 12px);
  font-size: clamp(10px, 1.5vw, 12px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 3px;
  z-index: 10;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}

/* Default fallback colors — overridden by inline style from block settings */
.pcsbb-sale-badge {
  background-color: #e74c3c;
  color: #fff;
}
.pcsbb-sold-out-badge {
  background-color: #555;
  color: #fff;
}

/* Badge position classes */
.pcsbb-badge-top-right {
  top: 12px;
  right: 12px;
  left: auto;
  bottom: auto;
}
.pcsbb-badge-top-left {
  top: 12px;
  left: 12px;
  right: auto;
  bottom: auto;
}
.pcsbb-badge-bottom-right {
  bottom: 12px;
  right: 12px;
  left: auto;
  top: auto;
}
.pcsbb-badge-bottom-left {
  bottom: 12px;
  left: 12px;
  right: auto;
  top: auto;
}

/* Mobile badge size */
@media (max-width: 767px) {
  .pcsbb-sale-badge,
  .pcsbb-sold-out-badge {
    padding: 4px 8px;
    font-size: 10px;
  }
}

/* ===== IMAGE DOTS (Gallery Navigation) ===== */
.pcsbb-image-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 4;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 6px 10px;
  border-radius: 20px;
}

.pcsbb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all var(--pcsbb-transition);
  border: none;
  padding: 0;
}

.pcsbb-dot.active {
  background-color: #fff;
  transform: scale(1.3);
}

.pcsbb-dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

/* ===== NAVIGATION ARROWS ===== */
.pcsbb-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  /* Lock to a perfect circle — aspect-ratio prevents dashicons from stretching width */
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  max-width: 30px;
  max-height: 30px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
  background-color: var(--pcsbb-nav-bg-color, #ffffff);
  border: 1px solid var(--pcsbb-border-color, #e0e0e0);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: var(--pcsbb-nav-color, #333);

  /* Hidden by default, shown on carousel container hover */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Show arrows on carousel container hover */
.pcsbb-carousel-container:hover .pcsbb-nav-arrow {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.pcsbb-nav-arrow:hover {
  background-color: var(--pcsbb-nav-bg-hover-color, #333);
  border-color: var(--pcsbb-nav-bg-hover-color, #333);
  color: var(--pcsbb-nav-hover-color, #ffffff);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pcsbb-nav-arrow.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.pcsbb-nav-arrow-prev {
  left: 10px;
}

.pcsbb-nav-arrow-next {
  right: 10px;
}

/* Dashicons inside arrows: !important beats WordPress's global dashicons.css (width:20px).
   display:flex centers the glyph inside the fixed-size container. */
.pcsbb-nav-arrow .dashicons {
  font-size: 14px;
  width: 14px !important;
  height: 14px !important;
  line-height: 14px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: inherit;
  flex-shrink: 0;
  pointer-events: none;
}

/* ===== NAVIGATION DOTS ===== */
.pcsbb-nav-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  padding: 0;
}

.pcsbb-nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--pcsbb-border-color);
  border: none;
  cursor: pointer;
  transition: all var(--pcsbb-transition);
  padding: 0;
}

.pcsbb-nav-dot:hover {
  background-color: var(--pcsbb-secondary-color);
}

.pcsbb-nav-dot.active {
  background-color: var(--pcsbb-text-color);
  transform: scale(1.2);
}

/* ===== VARIANT: CARD STYLE ===== */
.pcsbb-main-wrapper[data-variant="card"] .pcsbb-product-item {
  background-color: #fff;
  border: 1px solid var(--pcsbb-border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--pcsbb-transition);
  /* No margin — wrapper padding gives the breathing room instead */
}

.pcsbb-main-wrapper[data-variant="card"] .pcsbb-product-item:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: transparent;
}

.pcsbb-main-wrapper[data-variant="card"] .pcsbb-product-image-wrapper {
  margin-bottom: 0;
  border-radius: 0;
  background-color: #fff;
}

.pcsbb-main-wrapper[data-variant="card"] .pcsbb-product-info {
  padding: clamp(12px, 2vw, 20px);
}

/* ===== VARIANT: ART GALLERY ===== */
.pcsbb-main-wrapper[data-variant="gallery"] .pcsbb-product-item {
  background-color: transparent;
}

.pcsbb-main-wrapper[data-variant="gallery"] .pcsbb-product-image-wrapper {
  border-radius: 0;
  background-color: transparent;
}

.pcsbb-main-wrapper[data-variant="gallery"] .pcsbb-product-info {
  align-items: center;
  text-align: center;
}

.pcsbb-main-wrapper[data-variant="gallery"] .pcsbb-product-title {
  font-size: clamp(11px, 1.8vw, 13px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: clamp(0.5px, 0.15vw, 1px);
}

.pcsbb-main-wrapper[data-variant="gallery"] .pcsbb-product-price {
  font-size: clamp(12px, 2vw, 14px);
  font-weight: 400;
  /* Use the custom price color variable instead of hardcoded secondary color */
  color: var(--pcsbb-price-color, #333);
}

/* Gallery variant: soften badge visual if user hasn't overridden colors in block settings */
.pcsbb-main-wrapper[data-variant="gallery"] .pcsbb-sale-badge:not([style]),
.pcsbb-main-wrapper[data-variant="gallery"] .pcsbb-sold-out-badge:not([style]) {
  background-color: rgba(255, 255, 255, 0.95);
  color: #666;
  border: 1px solid var(--pcsbb-border-color);
}

/* ===== HOVER EFFECTS ===== */
/* Zoom - Only affects hovered item's image */
.pcsbb-carousel-wrapper[data-hover-effect="zoom"]
  .pcsbb-product-item:hover
  .pcsbb-main-image {
  transform: scale(1.08);
}

/* Lift - Only affects hovered item */
.pcsbb-carousel-wrapper[data-hover-effect="lift"] .pcsbb-product-item:hover {
  transform: translateY(-10px);
}

/* Glow - Only affects hovered item's image wrapper */
.pcsbb-carousel-wrapper[data-hover-effect="glow"]
  .pcsbb-product-item:hover
  .pcsbb-product-image-wrapper {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ===== GALLERY HOVER ===== */
/* Show gallery image on hover only if it exists and has valid src */
.pcsbb-carousel-wrapper[data-show-gallery-on-hover="true"]
  .pcsbb-product-item:hover
  .pcsbb-main-image {
  opacity: 0;
}

.pcsbb-carousel-wrapper[data-show-gallery-on-hover="true"]
  .pcsbb-product-item:hover
  .pcsbb-gallery-image {
  opacity: 1;
}

/* If no gallery image exists, zoom the main image instead */
.pcsbb-carousel-wrapper[data-show-gallery-on-hover="true"]
  .pcsbb-product-item:hover
  .pcsbb-product-image-wrapper:not(:has(.pcsbb-gallery-image[src]))
  .pcsbb-main-image,
.pcsbb-carousel-wrapper[data-show-gallery-on-hover="true"]
  .pcsbb-product-item:hover
  .pcsbb-product-image-wrapper:has(.pcsbb-gallery-image[src=""])
  .pcsbb-main-image {
  opacity: 1;
  transform: scale(1.08);
}

/* ===== NO PRODUCTS MESSAGE ===== */
.pcsbb-no-products {
  text-align: center;
  padding: clamp(40px, 8vw, 80px) 20px;
  color: var(--pcsbb-secondary-color);
  font-size: clamp(14px, 2.5vw, 18px);
  letter-spacing: 1px;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 1279px) {
  .pcsbb-carousel-container {
    padding: 0;
  }

  /* gap: 20px — matches JS: windowWidth >= 768 → this.gap = 20 */
  .pcsbb-carousel-track {
    gap: 20px;
  }

  .pcsbb-nav-arrow-prev {
    left: 10px;
  }

  .pcsbb-nav-arrow-next {
    right: 10px;
  }

  .pcsbb-nav-arrow .dashicons {
    font-size: 13px;
    width: 13px !important;
    height: 13px !important;
    line-height: 13px !important;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .pcsbb-carousel-container {
    padding: 0;
  }

  /* gap: 16px — matches JS: windowWidth >= 480 → this.gap = 16 */
  .pcsbb-carousel-track {
    gap: 16px;
  }

  .pcsbb-nav-arrow {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    max-width: 26px;
    max-height: 26px;
  }

  .pcsbb-nav-arrow-prev {
    left: 5px;
  }

  .pcsbb-nav-arrow-next {
    right: 5px;
  }

  .pcsbb-nav-arrow .dashicons {
    font-size: 11px;
    width: 11px !important;
    height: 11px !important;
    line-height: 11px !important;
  }

  .pcsbb-main-wrapper[data-variant="card"] .pcsbb-product-info {
    padding: 12px;
  }

  .pcsbb-sale-badge {
    padding: 4px 8px;
    font-size: 10px;
  }
}

/* Phone */
@media (max-width: 479px) {
  .pcsbb-carousel-container {
    padding: 0;
  }

  /* gap: 12px — matches JS: windowWidth < 480 → this.gap = 12 */
  .pcsbb-carousel-track {
    gap: 12px;
  }

  .pcsbb-nav-arrow {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    max-width: 22px;
    max-height: 22px;
  }

  .pcsbb-nav-arrow .dashicons {
    font-size: 10px;
    width: 10px !important;
    height: 10px !important;
    line-height: 10px !important;
  }

  .pcsbb-nav-dots {
    margin-top: 20px;
    gap: 6px;
  }

  .pcsbb-nav-dot {
    width: 8px;
    height: 8px;
  }

  .pcsbb-mobile-vertical-container {
    gap: 16px;
  }

  .pcsbb-mobile-vertical-mode .pcsbb-product-item {
    margin-bottom: 0;
  }

  .pcsbb-main-wrapper[data-variant="card"]
    .pcsbb-mobile-vertical-mode
    .pcsbb-product-item {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
}

/* Tablet/Mobile vertical mode improvements */
@media (max-width: 767px) {
  /* When mobile slider is disabled, ensure vertical stacking */
  .pcsbb-mobile-vertical-mode {
    display: block !important;
  }

  .pcsbb-mobile-vertical-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px;
  }

  /* Ensure hover effects work on touch devices */
  .pcsbb-mobile-vertical-mode .pcsbb-product-item:active {
    transform: translateY(-3px) !important;
  }
}

/* ===== LOADING STATE ===== */
.pcsbb-carousel-wrapper.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ===== ACCESSIBILITY ===== */
.pcsbb-nav-arrow:focus,
.pcsbb-nav-dot:focus,
.pcsbb-dot:focus {
  outline: 2px solid var(--pcsbb-product-title-color, #333);
  outline-offset: 2px;
}

.pcsbb-product-title a:focus,
.pcsbb-product-link:focus,
.pcsbb-add-to-cart:focus,
.pcsbb-view-all-button:focus {
  outline: 2px solid var(--pcsbb-product-title-color, #333);
  outline-offset: 2px;
}

/* ===== VIEW ALL BUTTON ===== */
.pcsbb-view-all-wrapper {
  text-align: center;
  margin-top: clamp(30px, 5vw, 50px);
  padding-top: clamp(20px, 4vw, 40px);
}

.pcsbb-view-all-button {
  display: inline-block;
  padding: clamp(12px, 2vw, 16px) clamp(32px, 5vw, 48px);
  background-color: var(--pcsbb-view-all-bg, #333333);
  color: var(--pcsbb-view-all-text, #ffffff);
  text-decoration: none;
  font-size: var(--pcsbb-view-all-font-size, 14px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  transition: all var(--pcsbb-transition);
  border: 2px solid var(--pcsbb-view-all-border, #333333);
}

.pcsbb-view-all-button:hover {
  background-color: var(--pcsbb-view-all-hover-bg, #000000);
  color: var(--pcsbb-view-all-hover-text, #ffffff);
  border-color: var(--pcsbb-view-all-hover-bg, #000000);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
