/* Gstore Slider Layout - minimal vertical spacing between sliders */
.gstore-slider {
  display: flex;
  gap: 0;
  align-items: center;
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
}

/* Collapse gap between consecutive sliders (e.g. in shortcode list) */
.gstore-slider + .gstore-slider {
  margin-top: 4px;
}

.gstore-slider__col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gstore-slider__col--banner {
  flex: 0 0 18%;
}

.gstore-slider__col--products {
  flex: 0 0 82%;
  width: 82%;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  height: 75%;
  position: relative;
}

.gstore-slider--right .gstore-slider__col--banner {
  order: 2;
}

.gstore-slider--right .gstore-slider__col--products {
  order: 1;
}

/* Banner image sizing
   IMPORTANT: the banner column is 225x225 (regular slider) and uses padding.
   The image must shrink with padding, otherwise padding won't be visible. */
.gstore-slider:not(.gstore-slider--tabbed) .gstore-slider__col--banner .gstore-slider__banner-link,
.gstore-slider:not(.gstore-slider--tabbed) .gstore-slider__col--banner .gstore-slider__banner-img {
  width: calc(225px - var(--gstore-banner-padding, 30px) - var(--gstore-banner-padding, 30px));
  height: calc(225px - var(--gstore-banner-padding, 30px) - var(--gstore-banner-padding, 30px));
  max-width: calc(225px - var(--gstore-banner-padding, 30px) - var(--gstore-banner-padding, 30px));
  max-height: calc(225px - var(--gstore-banner-padding, 30px) - var(--gstore-banner-padding, 30px));
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.gstore-slider__col--banner {
  background: #f6f6f7;
  border-radius: 12px;
  padding: var(--gstore-banner-padding, 30px);
  align-self: center;
  overflow: hidden;
  box-sizing: border-box;
}

.gstore-slider__banner-link,
.gstore-slider__banner-img {
  background: #f6f6f7;
}

.gstore-slider--tabbed .gstore-slider__col--banner {
  background: #edeef3;
  aspect-ratio: 1 / 1;
  padding: var(--gstore-banner-padding, 30px);
}

.gstore-slider:not(.gstore-slider--tabbed) .gstore-slider__col--banner {
  width: 225px;
  height: 225px;
  flex: 0 0 225px;
  filter: drop-shadow(3px 3px 3px #777);
  z-index: 1;
}

.gstore-slider--right:not(.gstore-slider--tabbed) .gstore-slider__col--banner {
  filter: drop-shadow(-3px 3px 3px #777);
}

.gstore-slider:not(.gstore-slider--tabbed) .gstore-slider__banner-link,
.gstore-slider:not(.gstore-slider--tabbed) .gstore-slider__banner-img {
  display: block;
}

.gstore-slider__tabbed-banner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.gstore-slider__banner-html {
  width: 100%;
}

.gstore-slider__tabs {
  display: grid;
  gap: 12px;
  width: 100%;
}

.gstore-slider__tabs--2 {
  grid-template-columns: 1fr;
}

.gstore-slider__tabs--4 {
  grid-template-columns: repeat(2, 1fr);
}

.gstore-tab-btn {
  width: 100%;
  background: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #e7e7e7;
  box-shadow: 4px 4px 0px 0px #d1e2ff;
  cursor: pointer;
  transition: 0.15s;
  color: #333;
  font-weight: 600;
}

.gstore-tab-btn img {
  width: 22px;
  height: 22px;
}

.gstore-tab-btn.is-active {
  color: #0048c7;
  transform: translateY(-1px);
}

@media (max-width: 1024px) {
  .gstore-slider {
    flex-direction: column;
    align-items: stretch;
  }
  .gstore-slider__col--banner,
  .gstore-slider__col--products {
    flex: 1 1 auto;
    width: 100%;
  }
  .gstore-slider__banner-link,
  .gstore-slider__banner-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

/* Carousel core (from sliders-out) */
.gstore-slider .mc-stage,
.gstore-slider .mc-stage * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.gstore-slider .mc-stage {
  width: calc((var(--slider-visible) * var(--slider-card)) + ((var(--slider-visible) - 1) * var(--slider-gap)));
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  overflow-x: scroll;
  overflow-y: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  z-index: 0;
  -webkit-overflow-scrolling: touch;
}

.gstore-slider .mc-stack {
  --slider-visible: 6;
  --slider-card: 150px;
  --slider-gap: 12px;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  overflow: visible;
  padding-bottom: 0;
  width: max-content;
  cursor: grab;
}

.gstore-slider .mc-stack.is-dragging {
  cursor: grabbing;
}

.gstore-slider .mc-stage.is-dragging {
  user-select: none;
  -webkit-user-select: none;
}

.gstore-slider .mc-stack::-webkit-scrollbar {
  display: none;
}

.gstore-slider .mc-stack {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gstore-slider .mc-stage::-webkit-scrollbar {
  display: none;
}

.gstore-slider .mc-stage {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Carousel item - high specificity for consistent width */
.gstore-slider .mc-stage .mc-track .mc-item {
  position: relative;
  width: 150px;
  flex: 0 0 150px;
  opacity: 1;
  pointer-events: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
}

.gstore-slider .mc-track {
  display: flex;
  gap: var(--slider-gap);
  align-items: center;
  height: 100%;
  width: max-content;
  flex: 0 0 auto;
  will-change: transform;
}

.gstore-slider .mc-stack.mc-stack--desktop-loop {
  width: 100%;
  overflow: hidden;
}

/* Skeleton loading state before slider JS hydrates cards */
.gstore-slider .mc-stack--skeleton {
  cursor: default;
}

.gstore-slider .mc-stack--skeleton .product-card-container {
  pointer-events: none;
}

.gstore-slider .mc-stack--skeleton .product-card-container:hover .product-card {
  transform: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.gstore-slider .mc-stack--skeleton .gstore-skel {
  position: relative;
  overflow: hidden;
  background: #e6e9ef !important;
  color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.gstore-slider .mc-stack--skeleton .gstore-skel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(230, 233, 239, 0) 0%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(230, 233, 239, 0) 100%
  );
  animation: gstore-slider-skel-shimmer 1.2s ease-in-out infinite;
}

.gstore-slider .mc-stack--skeleton .gstore-skel-title {
  height: 10px;
  width: 84%;
  border-radius: 999px;
  margin: 0 2px 6px;
}

.gstore-slider .mc-stack--skeleton .gstore-skel-title--short {
  width: 62%;
}

.gstore-slider .mc-stack--skeleton .gstore-skel-price {
  width: 100%;
  min-height: 26px;
}

.gstore-slider .mc-stack--skeleton .gstore-skel-cart {
  width: 36px;
  height: 36px;
}

@keyframes gstore-slider-skel-shimmer {
  100% {
    transform: translateX(100%);
  }
}

.gstore-slider .mc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.25));
  box-shadow:
    0 10px 28px rgba(0,0,0,0.18),
    inset 0 0 0 1px rgba(255,255,255,0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: auto;
  color: #1d1d1f;
  font-weight: 700;
}

.gstore-slider .mc-arrow:hover {
  box-shadow:
    0 10px 28px rgba(0,0,0,0.2),
    inset 0 0 0 1px rgba(255,255,255,0.5);
  transform: translateY(-50%) scale(1.03);
}

.gstore-slider .mc-arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.gstore-slider .mc-arrow--prev {
  left: var(--mc-arrow-prev-left, 6px);
}

.gstore-slider .mc-arrow--next {
  right: var(--mc-arrow-next-right, 6px);
}

/* Product Card (from sliders-out) - high specificity for transform */
.gstore-slider .mc-stage .mc-track .mc-item .product-card-container {
  position: relative;
  width: 100%;
  max-width: 180px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transform: scale(0.9);
  transform-origin: center center;
}

.gstore-slider .product-card {
  position: relative;
  background: white;
  border-radius: 6px;
  padding: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gstore-slider .product-card-container:hover .product-card {
  box-shadow: 0 5px 15px rgba(0,0,0,.3);
  transform: translateY(-2px);
}

.gstore-slider .product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.9;
  background: linear-gradient(135deg, #c0c0c0, #b0b0b0);
  border-radius: 6px;
  margin-bottom: 10px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Badges on slider cards - same glassmorphic style as live search */
.gstore-slider .gstore-badge-group {
  position: absolute;
  top: 3px;
  left: 3px;
  gap: 3px;
  z-index: 2;
}
.gstore-slider .gstore-badge {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
}
.gstore-slider .gstore-badge.condition {
  background: #E8F5E9;
  color: #2E7D32;
}
.gstore-slider .gstore-badge.sale {
  background: #FDECEA;
  color: #C62828;
}

.gstore-slider .gstore-valentine-ribbon {
  position: absolute;
  top: 93px;
  left: -30px;
  transform: rotate(35deg);
  background: linear-gradient(135deg, #ff3b6b, #ff6fa5);
  color: #fff;
  padding: 3px 32px;
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.3px;
  box-shadow: 0 10px 20px rgba(255, 0, 80, 0.25);
  z-index: 6;
  pointer-events: none;
}

.gstore-slider .gstore-badge-rose {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 18px;
  color: inherit;
  animation: roseFloat 1.6s infinite;
  z-index: 6;
  pointer-events: none;
}

.gstore-slider .gstore-online-only-badge {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 6px;
  background: #cffafe;
  color: #0e7490;
  border: 1px solid rgba(14, 116, 144, 0.22);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  z-index: 7;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .gstore-slider .gstore-valentine-ribbon {
    text-align: center;
    width: 80px;
    top: 100px;
    left: -15px;
    padding: 2px 24px;
    font-size: 9px;
    line-height: 1.5;
  }

  .gstore-slider .gstore-badge-rose {
    right: 6px;
    top: 6px;
    font-size: 13px;
  }
}

@media (max-width: 767px), (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  body.home .gstore-slider .gstore-badge-group,
  body.front-page .gstore-slider .gstore-badge-group {
    gap: 6px;
    top: 2px;
    left: 2px;
  }
}

@keyframes roseFloat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.15); }
  50% { transform: scale(1); }
  75% { transform: scale(1.2); }
}

.gstore-slider .product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
  height: calc(1.15em * 2);
  padding: 0 2px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #1d1d1f;
}

.gstore-slider .floating-controls {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding: 0;
}

.gstore-slider .price-box {
  flex: 1;
  background: white;
  border-radius: 6px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  border: 1px solid rgba(0,0,0,0.05);
  min-height: 38px;
}

.gstore-slider .price-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.gstore-slider .regular-price {
  font-size: 11px;
  color: #888;
  text-decoration: line-through;
  font-weight: 500;
}

.gstore-slider .sale-price {
  font-size: 13px;
  color: #e60023;
  font-weight: 700;
}

.gstore-slider .price {
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
}

.gstore-slider .currency {
  font-size: 12px;
  margin-left: 2px;
  color: #1d1d1f;
}

/* Cart button: same as shop page (glassmorphic, icon, loader) */
.gstore-slider .cart-button,
.gstore-slider .pc-cart-button {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
  font-family: inherit;
  pointer-events: auto;
}

.gstore-slider .cart-button:hover,
.gstore-slider .pc-cart-button:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.gstore-slider .cart-button:active,
.gstore-slider .pc-cart-button:active {
  transform: scale(0.95);
}

.gstore-slider .cart-icon,
.gstore-slider .pc-cart-button .cart-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  position: relative;
  transition: opacity 0.2s ease;
}

.gstore-slider .cart-icon img,
.gstore-slider .pc-cart-button .cart-icon img {
  width: 20px;
  height: 20px;
  display: block;
}

.gstore-slider .cart-loader,
.gstore-slider .pc-cart-button .cart-loader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  display: none;
  z-index: 2;
  /* loader SVG animates itself; don't add extra CSS spin */
  animation: none;
}

.gstore-slider .cart-button.loading .cart-icon,
.gstore-slider .pc-cart-button.loading .cart-icon {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .gstore-slider .mc-stack--skeleton .gstore-skel::after {
    animation: none;
  }
}

.gstore-slider .cart-button.loading .cart-loader,
.gstore-slider .pc-cart-button.loading .cart-loader {
  display: block;
}

.gstore-slider .cart-button.animate-add,
.gstore-slider .pc-cart-button.animate-add {
  animation: gstore-slider-add-bounce 0.6s ease, gstore-slider-add-color 0.6s ease;
}

@keyframes gstore-slider-add-bounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); }
  50% { transform: scale(0.9); }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes gstore-slider-add-color {
  0% { background-color: rgba(255, 255, 255, 0.78); color: #1d1d1f; }
  20% { background-color: #34c759; color: white; }
  80% { background-color: #34c759; color: white; }
  100% { background-color: rgba(255, 255, 255, 0.78); color: #1d1d1f; }
}
.gstore-slider--tabbed .gstore-slider__banner-link,
.gstore-slider--tabbed .gstore-slider__banner-img {
  background: transparent;
}

.gstore-slider .gstore-badge.custom.custom-pre_order {
  background: #eef5ff;
  color: #2f6fed;
  border: 1px solid rgba(47, 111, 237, 0.28);
}

.gstore-slider .product-card--pre-order {
  border: 1px solid rgba(47, 111, 237, 0.9);
  box-shadow: 0 5px 15px rgba(47, 111, 237, 0.18);
}

.gstore-slider .product-card-container--pre-order .price-box,
.gstore-slider .product-card-container--pre-order .pc-cart-button,
.gstore-slider .product-card-container--pre-order .cart-button {
  border-color: rgba(47, 111, 237, 0.9);
  box-shadow: 0 5px 15px rgba(47, 111, 237, 0.18);
}
