/* =========================================================
   Woo Category Products Tabs — Rumluh Style
   Exact replica of rumluh.com featured collections section
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&family=Jost:wght@300;400;500&display=swap');

/* ── Widget wrapper ────────────────────────────────────────────────── */
.wct-widget {
  --wct-black:      #111111;
  --wct-mid:        #888888;
  --wct-light:      #aaaaaa;
  --wct-border:     #dddddd;
  --wct-bg:         transparent;
  --wct-badge-bg:   #ffffff;
  --wct-sale-bg:    #ffffff;
  --wct-ease:       0.3s ease;
  background: transparent;
  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  color: var(--wct-black);
  padding: 0 0 60px;
}

/* ── Section Label "FEATURED COLLECTIONS" ──────────────────────────── */
.wct-section-label {
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wct-mid);
  margin-bottom: 18px;
}

/* ── Horizontal Scroll Tabs ──────────────────────────────────────────── */
.wct-tabs-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap; /* Force single line */
  justify-content: flex-start; /* Default, can be overridden by Elementor alignment */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 0;
  padding: 0 12px 6px;
  margin: 0;
  border-bottom: none;
}

.wct-tabs-nav::-webkit-scrollbar {
  display: none;
}

.wct-tab-btn {
  flex: 0 0 auto;
  scroll-snap-align: start;
  white-space: nowrap;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Cormorant Garamond', 'Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--wct-light);
  padding: 6px 18px 10px;
  transition: color var(--wct-ease);
  outline: none;
}

/* Underline indicator */
.wct-tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 1.5px;
  background-color: transparent;
  transition: background-color var(--wct-ease);
}

.wct-tab-btn:hover {
  color: var(--wct-black);
}

.wct-tab-btn.wct-active {
  color: var(--wct-black);
  font-weight: 500;
}

.wct-tab-btn.wct-active::after {
  background-color: var(--wct-black);
}

/* ── Products Panel ────────────────────────────────────────────────── */
.wct-products-panel {
  min-height: 200px;
  position: relative;
}

.wct-products-grid-wrapper {
  display: none;
  width: 100%;
}

.wct-products-grid-wrapper.wct-active {
  display: block;
  animation: wct-fadein 0.4s ease forwards;
}

/* ── Products Grid (When Slider is OFF) ────────────────────────────── */
body .wct-widget .wct-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
}

/* Base Desktop sizing (columns) for Grid explicitly */
body .wct-widget .wct-products-grid.wct-cols-1 { grid-template-columns: repeat(1, 1fr); }
body .wct-widget .wct-products-grid.wct-cols-2 { grid-template-columns: repeat(2, 1fr); }
body .wct-widget .wct-products-grid.wct-cols-3 { grid-template-columns: repeat(3, 1fr); }
body .wct-widget .wct-products-grid.wct-cols-4 { grid-template-columns: repeat(4, 1fr); }
body .wct-widget .wct-products-grid.wct-cols-5 { grid-template-columns: repeat(5, 1fr); }

/* Mobile Grid Fallbacks */
@media (max-width: 768px) {
  body .wct-widget .wct-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ── Universal Native Slider (Desktop & Mobile) ────────────────────── */
body .wct-widget .wct-products-grid.wct-is-slider {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  box-sizing: border-box !important;
  gap: 12px !important;
  padding: 0 12px 24px !important; /* Space for scroll area / shadow */
  margin: 0 -12px !important;
}

body .wct-widget .wct-products-grid.wct-is-slider::-webkit-scrollbar,
.elementor .wct-widget .wct-products-grid.wct-is-slider::-webkit-scrollbar {
  display: none !important;
}

/* ── Product Card Container ────────────────────────────────────────── */
.wct-product-card {
  box-sizing: border-box;
  background: transparent;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Product Card Settings when inside Slider */
.wct-is-slider .wct-product-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* Desktop sizing (columns) for Slider */
.wct-cols-2.wct-is-slider .wct-product-card { width: calc((100% - 12px) / 2); max-width: calc((100% - 12px) / 2); }
.wct-cols-3.wct-is-slider .wct-product-card { width: calc((100% - 24px) / 3); max-width: calc((100% - 24px) / 3); }
.wct-cols-4.wct-is-slider .wct-product-card { width: calc((100% - 36px) / 4); max-width: calc((100% - 36px) / 4); }
.wct-cols-5.wct-is-slider .wct-product-card { width: calc((100% - 48px) / 5); max-width: calc((100% - 48px) / 5); }

.wct-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ── Product Image ─────────────────────────────────────────────────── */
.wct-product-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background-color: transparent; /* Changed to transparent so Elementor settings apply */
}

.wct-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wct-product-card:hover .wct-product-image {
  transform: scale(1.04);
}

/* ── Badges (SAVE / ON SALE) ───────────────────────────────────────── */
.wct-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ffffff;
  font-family: 'Jost', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wct-black);
  padding: 4px 8px;
  line-height: 1;
  z-index: 2;
}

.wct-badge-onsale {
  background: var(--wct-black);
  color: #ffffff;
}

/* ── Quick Add "+" button ──────────────────────────────────────────── */
.wct-quick-add {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 30px;
  height: 30px;
  background: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  color: var(--wct-black);
  cursor: pointer;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 3;
  text-decoration: none;
}

.wct-product-card:hover .wct-quick-add {
  opacity: 1;
  transform: translateY(0);
}

/* ── Product Info ──────────────────────────────────────────────────── */
.wct-product-info {
  padding: 12px 4px 20px;
}

.wct-product-title {
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
  margin: 0 0 6px;
  color: var(--wct-black);
}

.wct-product-price {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--wct-black);
}

/* WooCommerce price HTML overrides */
.wct-product-price .woocommerce-Price-amount {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.wct-product-price del {
  opacity: 0.45;
  margin-right: 5px;
  font-size: 10px;
}

.wct-product-price ins {
  text-decoration: none;
  font-weight: 400;
}

.wct-price-from {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wct-mid);
  margin-right: 4px;
}

/* ── Loading Dots ──────────────────────────────────────────────────── */
.wct-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 80px 0;
}

.wct-loader span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--wct-black);
  animation: wct-pulse 1.2s ease-in-out infinite;
}

.wct-loader span:nth-child(2) { animation-delay: 0.2s; }
.wct-loader span:nth-child(3) { animation-delay: 0.4s; }

@keyframes wct-pulse {
  0%, 80%, 100% { transform: scale(0.35); opacity: 0.25; }
  40%            { transform: scale(1);    opacity: 1;    }
}

/* ── No Products ───────────────────────────────────────────────────── */
.wct-no-products {
  text-align: center;
  padding: 60px 0;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--wct-mid);
  text-transform: uppercase;
}

/* ── Fade in on panel load ─────────────────────────────────────────── */
.wct-products-grid {
  animation: wct-fadein 0.4s ease;
}

@keyframes wct-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ── Responsive Mobile Overrides ───────────────────────────────────── */
@media (max-width: 768px) {
  .wct-tab-btn {
    font-size: 14px !important;
    padding: 6px 14px 10px !important;
  }

  /* Card width: show 1 card + peek of next (~1.6 visible) matching reference HTML */
  body .wct-widget .wct-products-grid.wct-is-slider .wct-product-card,
  .elementor .wct-widget .wct-products-grid.wct-is-slider .wct-product-card {
    flex: 0 0 62vw !important;
    width: 62vw !important;
    max-width: 62vw !important;
    min-width: 62vw !important;
    scroll-snap-align: start !important;
    box-sizing: border-box !important;
  }
}

