/* products-explorer.css (Merged & Integrated)
   - Integrated carousel UI fixes: centered non-wrapping controls, prev/dots/next alignment, separator between New & Trending.
   - Carousel items now include badges that mirror product cards (NEW, TREND, discount, availability).
   - Reduced carousel title font so names fit on mobile, ensured strike-through ("orig") is visible.
   - Product-detail layout adjusted so info column won't overlap images (flex basis applied).
   - Kept all original rules and variables; cleaned duplicates and merged additions.
*/

/* Variables */
:root {
  --black-base: #000;
  --dark-panel-bg-desktop: rgba(0, 0, 0, 0.75);
  --dark-panel-bg-mobile: rgba(0, 0, 0, 0.95);
  --dark-text-color: #f0f0f0;
  --product-card-bg: rgba(255, 255, 255, 0.12);
  --primary-color: #FF5B00;
  --badge-in-stock: #28a745;
  --badge-out-of-stock: #e74c3c; /* coming soon red */
  --badge-discount: #e53935;
}

/* === Base Layout === */
.explorer-page {
  display: flex;
  min-height: calc(100vh - 85px);
  gap: 1rem;
  background: url("../assets/bg-sandal.png") no-repeat center center / cover;
  background-color: var(--black-base);
  overflow: hidden;
  padding: 1rem;
  box-sizing: border-box;
}

/* === Category Panel === */
#category-panel {
  flex: 0 0 260px;
  background: var(--dark-panel-bg-desktop);
  padding: 1rem;
  border-radius: 12px;
  overflow-y: auto;
  color: var(--dark-text-color);
  box-sizing: border-box;
}

/* === Filters & Sort Section === */
.filters-container {
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.filter-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0.8rem;
}

.filter-block label {
  font-size: 0.9em;
  font-weight: 600;
  color: #ddd;
}

.filter-block input,
.filter-block select {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 6px;
  font-size: 0.9em;
}

.filter-block input::placeholder {
  color: #aaa;
}

/* more-filters toggle spacing (ensures gap between "More filters" and Apply/Reset) */
#more-filters-toggle {
  margin-bottom: 10px;
  display: inline-block;
}

/* === Filter Buttons === */
.small-btn {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}
.small-btn:hover { background: #ff7f32; }
.small-btn.outline {
  background: transparent;
  border: 1px solid #aaa;
  color: #fff;
}

/* === Product Panel === */
#product-panel {
  flex: 1;
  background: var(--dark-panel-bg-desktop);
  color: var(--dark-text-color);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Ensure product-panel fits mobile viewport */
@media (max-width: 768px) {
  #product-panel {
    width: 100%;
    max-width: none;
    padding: 0.5rem;
    box-sizing: border-box;
  }
}

/* === Breadcrumb === */
#breadcrumb {
  margin-bottom: 1rem;
  font-weight: bold;
}
#breadcrumb .breadcrumb-link {
  color: #fff;
}
#breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  cursor: pointer;
}
#breadcrumb a:hover { text-decoration: underline; }

/* === Default Hero Image (now hidden) === */
.initial-hero {
  display: none !important;
}

/* === Category Headers === */
.category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: white;
  background: var(--product-card-bg);
  padding: 8px;
  border-radius: 6px;
  font-weight: bold;
  transition: background 0.25s ease;
}
.category-header:hover { background: rgba(255,255,255,0.25); }

/* === Product Grid === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
  justify-items: center;
}

/* === Product Card === */
.product-card {
  background: var(--product-card-bg);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
  width: 100%;
  max-width: 240px;
  position: relative;
  box-sizing: border-box;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-color);
}

/* Card Image */
.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(0,0,0,0.28);
  display: block;
  position: relative;
  z-index: 2;
}

/* === Product Card Badges === */
.discount-label {
  position: absolute;
  left: 6px;
  background: var(--badge-discount);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 50;
}

/* stacked badge positions */
.discount-label.price-badge { top: 6px; left: 6px; } /* primary discount badge */
.discount-label.new-badge { top: 34px; left: 6px; background: #00aaff; } /* NEW */
.discount-label.trending-badge { top: 62px; left: 6px; background: #ffcc00; color: #000; } /* TREND */

.avail-badge.in,
.avail-badge.out {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #fff;
  z-index: 50;
}
.avail-badge.in  { background: var(--badge-in-stock); }
.avail-badge.out { background: var(--badge-out-of-stock); }

/* === Product Card Details === */
.product-card h4 {
  font-size: 1.1em;
  margin: 8px 0 4px;
  color: #fff;
}
.product-benefit {
  font-size: 0.9em;
  color: #ccc;
  margin-bottom: 6px;
  min-height: 2em;
  text-align: center;
}

/* price display: ensure orig has strike styling */
.weight-price {
  color: var(--primary-color);
  font-weight: bold;
  margin: 4px 0 10px;
}
.weight-price .orig {
  text-decoration: line-through;
  color: #ff4d4d;
  margin-right: 8px;
}

/* keep button area */
.btn-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

/* Coming soon small placeholder look */
.product-card.coming-card {
  opacity: 0.98;
  border-style: dashed;
}

/* Disable qty for Coming Soon */
.product-card.coming-card .qty-selector button,
.product-card.coming-card .qty-display {
  cursor: not-allowed;
  opacity: 0.5;
}

/* === Add to Cart / Coming Soon === */
.add-cart {
  width: 100%;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  font-weight: 600;
}
.coming-soon-btn {
  width: 100%;
  text-align: center;
  background: transparent;
  color: #fff;
  border: 1px solid #ff6666;
  border-radius: 6px;
  padding: 6px 8px;
  font-weight: 700;
  cursor: not-allowed;
  background: linear-gradient(180deg, rgba(255,0,0,0.06), rgba(0,0,0,0.0));
}

/* === Quantity Selector === */
.qty-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.qty-selector button {
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
}
.qty-display {
  min-width: 24px;
  text-align: center;
  color: #fff;
}

/* === Product Detail View === */
.product-detail-flex {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: flex-start;
  padding: 20px;
  background: var(--product-card-bg);
  border-radius: 10px;
  position: relative;
  box-sizing: border-box;
}

/* Close button behavior - improved visibility */
.product-detail-flex .close-x {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 22px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 999;
}

/* Mobile: pin the close button to viewport top for better UX */
@media (max-width: 768px) {
  .product-detail-flex .close-x {
    position: fixed;
    top: 78px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    padding: 6px 10px;
    border-radius: 6px;
    z-index: 2000;
  }
}

/* detail image col */
.product-detail-flex .product-image-col {
  flex: 0 0 45%;
  max-width: 450px;
  position: relative;
  box-sizing: border-box;
}
.product-detail-flex .product-image-col img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  z-index: 2;
}

/* Carousel Arrows on image */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  z-index: 10;
}
.carousel-arrow.left  { left: 4px; }
.carousel-arrow.right { right: 4px; }

/* Product Info Column: left-aligned for better readability on detail */
.product-detail-flex .product-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left; /* left align the content for readability */
  position: relative;
  box-sizing: border-box;
}
.product-detail-flex h2 {
  color: #fff;
  margin: 0;
}
.product-detail-flex p {
  color: #ccc;
  margin: 2px 0;
}

/* Highlights */
.highlights-list {
  text-align: left;
  padding-left: 20px;
  margin-top: 10px;
}
.highlights-list li { margin-bottom: 5px; }

/* Multi-variant select */
select.variant-select {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 6px;
  font-size: 0.9em;
  width: 100%;
}
select.variant-select option {
  background: #111;
  color: #fff;
}
select.variant-select option:hover {
  background: var(--primary-color);
  color: #fff;
}

/* Subcategory filter dropdown box */
.subcategory-dropdown {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #fff;
  padding: 6px;
  font-size: 0.9em;
  width: 100%;
  margin-bottom: 0.8rem;
}
.subcategory-dropdown option {
  background: #000;
  color: #fff;
}

/* Mobile */
@media (max-width: 768px) {
  .explorer-page {
    flex-direction: column;
    padding: 0.5rem;
  }

  #category-panel {
    position: fixed;
    top: 70px;
    left: 0;
    width: 80vw;
    max-width: 300px;
    height: calc(100vh - 70px);
    background: var(--dark-panel-bg-mobile);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }
  #category-panel.panel-active { transform: translateX(0); }

  #mobile-category-toggle {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    font-size: 1em;
    font-weight: bold;
    border-radius: 6px;
    margin-bottom: 10px;
  }

  #product-panel {
    order: 3;
    padding: 0.5rem;
  }

  .product-detail-flex {
    flex-direction: column;
    align-items: center;
    text-align: left;
    padding-top: 50px;
  }
  .product-detail-flex .product-image-col {
    width: 100%;
    max-height: 250px;
    margin-bottom: 15px;
  }
  .product-detail-flex .product-info-col { width: 100%; }
  .highlights-list { text-align: left; }
}

/* Small fixes for banner sizing and dropdown */
.coming-banner, .initial-hero {
  max-width: 600px;
  width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
}
#subcategory-dropdown, .subcategory-dropdown, #filter-subcategories select {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

/* === Carousel & overlay additions / fixes === */

/* Ensure product-container can host positioned hero wrapper */
#product-container {
  position: relative;
  box-sizing: border-box;
}

/* Hero wrapper */
.hero-wrapper {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  min-height: 360px;
}

/* Hero overlay container (holds both carousels stacked) */
.hero-carousel-overlay {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 8%;
  width: 88%;
  max-width: 1100px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
}

/* Each block inside overlay */
.hero-carousel-overlay .hero-carousel-block {
  background: rgba(0,0,0,0.35);
  padding: 8px;
  border-radius: 8px;
  box-sizing: border-box;
  backdrop-filter: blur(4px);
}

/* Heading (title + motion icon) */
.hero-carousel-overlay .carousel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-weight: 700;
  padding: 0 4px 6px 4px;
  font-size: 1.05rem;
}
.hero-carousel-overlay .motion-icon {
  display:inline-block; color:var(--primary-color); font-size:1.1rem;
  animation: motion-pulse 1.6s linear infinite;
  opacity: 0.95;
}
@keyframes motion-pulse {
  0% { transform: translateX(0); opacity:0.9; }
  50% { transform: translateX(6px); opacity:1; }
  100% { transform: translateX(0); opacity:0.9; }
}

/* Controls row: center and do not wrap (prevents stacking arrows/dots) */
.hero-carousel-overlay .carousel-controls-row {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin-bottom:6px;
  flex-wrap: nowrap; /* key fix to stop wrapping on small screens */
}

/* Make prev/next a fixed small flex item so dots stay centered */
.hero-carousel-overlay .carousel-prev,
.hero-carousel-overlay .carousel-next {
  flex: 0 0 42px;
  height: 36px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* Dots: flexible center element between arrows */
.hero-carousel-overlay .carousel-dots {
  display:flex;
  align-items:center;
  gap:6px;
  justify-content:center;
  flex: 1 1 auto;
  min-width: 80px; /* prevents dots from collapsing on narrow screens */
}

/* Track */
.hero-carousel-overlay .carousel-track {
  display:block;
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.hero-carousel-overlay .carousel-track::-webkit-scrollbar { height:8px; }
.hero-carousel-overlay .carousel-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius:6px; }

/* Items */
.hero-carousel-overlay .carousel-item {
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  padding: 8px;
  box-sizing: border-box;
  transition: transform 0.18s ease;
  display: inline-block;
  position: relative; /* badges rely on this */
}
.hero-carousel-overlay .carousel-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}
.hero-carousel-overlay .carousel-item img { border-radius:6px; display:block; }

/* Carousel item badges (mirror product card badges) */
.hero-carousel-overlay .carousel-item .discount-label {
  position: absolute;
  left: 6px;
  z-index: 30;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}
.hero-carousel-overlay .carousel-item .price-badge { top: 6px; background: var(--badge-discount); color: #fff; }
.hero-carousel-overlay .carousel-item .new-badge { top: 30px; background: #00aaff; color: #fff; }
.hero-carousel-overlay .carousel-item .trending-badge { top: 54px; background: #ffcc00; color: #000; }
.hero-carousel-overlay .carousel-item .avail-badge {
  position: absolute;
  right: 6px;
  top: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  z-index: 30;
}
.hero-carousel-overlay .carousel-item .avail-badge.in { background: var(--badge-in-stock); color: #fff; }
.hero-carousel-overlay .carousel-item .avail-badge.out { background: var(--badge-out-of-stock); color: #fff; }

/* Dots */
.hero-carousel-overlay .carousel-dots { display:flex; align-items:center; gap:6px; }
.hero-carousel-overlay .carousel-dot { width:10px; height:10px; border-radius:50%; border:none; background:rgba(255,255,255,0.15); cursor:pointer; padding:0; }

/* Separator between carousel blocks */
.hero-carousel-overlay .carousel-separator {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 6px 0;
  border-radius: 2px;
}

/* Keep price strike-through styling consistent */
.weight-price .orig, .carousel-item-price .orig { text-decoration: line-through; color: #ff4d4d; margin-right: 8px; font-size: 0.88em; }

/* Reduce carousel item title font so long names fit */
.hero-carousel-overlay .carousel-item-name,
.carousel-item-name { font-size: 0.88em !important; }

/* Responsive adjustments */
@media (max-width: 900px) {
  .hero-carousel-overlay { width: 92%; top: 6%; }
  .hero-carousel-overlay .carousel-item { width: 160px !important; }
}
@media (max-width: 520px) {
  .hero-carousel-overlay { width: 96%; top: 5%; gap:8px; }
  .hero-carousel-overlay .carousel-item { width: 140px !important; }
  .hero-carousel-overlay .carousel-heading { font-size: 0.96rem; }
  .hero-carousel-overlay .carousel-prev,
  .hero-carousel-overlay .carousel-next { flex: 0 0 36px; height: 34px; }
  .hero-carousel-overlay .carousel-item { padding: 6px; }
  .carousel-item-name { font-size: 0.82em !important; }
  .carousel-item-price .orig { font-size: 0.78em; }
}

/* end of merged additions */

/* Updated CSS additions (integrated) - replace or merge into your existing products-explorer.css
   Two targeted visual changes:
   1) Prev/Next arrow button appearance: darker rounded button with white arrow (better contrast)
   2) Keeps controls centered and non-wrapping (prevents arrows/dots stacking on mobile)
*/

/* Carousel prev/next button final look (override earlier rule) */
.hero-carousel-overlay .carousel-prev,
.hero-carousel-overlay .carousel-next {
  /* dark background with white arrow - good contrast on overlay */
  background: rgba(0,0,0,0.85);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
  transition: transform 0.12s ease, background 0.12s ease;
}
.hero-carousel-overlay .carousel-prev:hover,
.hero-carousel-overlay .carousel-next:hover {
  transform: translateY(-2px);
  background: rgba(0,0,0,0.95);
}

/* Slightly larger arrow icon and bold for clarity */
.hero-carousel-overlay .carousel-prev,
.hero-carousel-overlay .carousel-next {
  font-size: 18px;
  font-weight: 700;
}

/* Keep controls row centered and ensure no wrap (redundant but safe) */
.hero-carousel-overlay .carousel-controls-row {
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}

/* If you prefer an inverted style (white circular bg with black arrow) use this instead:
.hero-carousel-overlay .carousel-prev,
.hero-carousel-overlay .carousel-next {
  background: #fff; color: #111; border: 1px solid rgba(0,0,0,0.06);
}
*/

/* Ensure dots area remains centered between arrows */
.hero-carousel-overlay .carousel-dots {
  flex: 1 1 auto;
  display: flex;
  gap: 6px;
  justify-content: center;
  min-width: 80px;
}

/* Ensure carousel badges are visible and consistent (already included earlier) */
.hero-carousel-overlay .carousel-item .discount-label { z-index: 30; font-size: 11px; }
.hero-carousel-overlay .carousel-item .avail-badge { z-index: 31; font-size: 11px; }

/* Make sure strike-through is visible in mobile items */
.hero-carousel-overlay .carousel-item-price .orig,
.weight-price .orig { text-decoration: line-through; color: #ff4d4d; }

/* Reduced title font already set; ensure small devices still readable */
.hero-carousel-overlay .carousel-item-name { font-size: 0.88em; }

/* Minor spacing tweak for separator */
.hero-carousel-overlay .carousel-separator { margin: 8px 0; }

/* Product-detail safety (if overlapping still occurs in some environments) */
.product-detail-flex .product-image-col { flex: 0 0 45%; max-width: 480px; }
.product-detail-flex .product-info-col { flex: 1 1 50%; }

/* End of targeted CSS changes */