/* ---------- Updated Most Selling Carousel CSS (price below, left-aligned text, floating round card) ---------- */

/* Import font if needed */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root{
  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --accent: #ff6a00;
  --dark: #0b0b0d;
  --muted: #6b7280;
  --slide-bg: #ffffff;
  --pill-shadow: 0 6px 14px rgba(255,106,0,0.12);
  --card-shadow: 0 6px 16px rgba(0,0,0,0.08);
  --radius: 8px;
  --gap: 3px;
  --fallback-img: "/mnt/data/Screenshot 2025-11-25 024837.png";
}

/* Base */
* { box-sizing: border-box; }
.most_selling_slider_wrapper,
.most_selling_carousel,
.most_selling_carousel * { font-family: var(--font-sans); }

/* Wrapper */
.most_selling_slider_wrapper {
  margin: .35rem auto;
  width: 100%;
  display: flex;
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
}

/* Nav buttons */
.most_selling_slider_wrapper i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 30px;
  width: 30px;
  line-height: 30px;
  font-size: 1.3rem;
  text-align: center;
  color: #343F4F;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
  z-index: 20;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.most_selling_slider_wrapper i:hover { background:#f2f2f2; transform: translateY(-50%) scale(1.02); }
.most_selling_slider_wrapper i:active { transform: translateY(-50%) scale(.95); }
.most_selling_slider_wrapper i:first-child { left: 8px; }
.most_selling_slider_wrapper i:last-child  { right: 8px; }

/* Carousel track (allow horizontal scroll) */
.most_selling_slider_wrapper .most_selling_carousel {
  display:flex;
  gap: var(--gap);
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.most_selling_slider_wrapper .most_selling_carousel::-webkit-scrollbar { height: 8px; }
.most_selling_slider_wrapper .most_selling_carousel::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 8px; }

/* Slide card */
.most_selling_carousel .most_selling_slide {
  flex: 0 0 auto;
  width: 15%;
  min-width: 140px;
  border-radius: var(--radius);
  background: var(--slide-bg);
  display:flex;
  flex-direction: column;
  align-items: stretch;
  text-decoration: none;
  box-shadow: var(--card-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative; /* for pills + floating circle */
  overflow: visible;
}

/* Hover lift */
.most_selling_carousel .most_selling_slide:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* Image area */
.most_selling_carousel .most_selling_slide img {
  width: 100%;
  height: 120px;
  max-height: 120px;
  object-fit: contain;
  display: block;
  background: #fff;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  z-index: 1;
  transition: transform .35s ease;
  user-select: none;
}
.most_selling_carousel .most_selling_slide:hover img { transform: scale(1.08); }

/* Caption area (left-aligned) */
.most_selling_carousel .caption {
  padding: 10px 10px 14px 10px;
  background: var(--slide-bg);
  display: block;
  width: 100%;
  box-sizing: border-box;
  color: var(--dark);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  text-align: left; /* force left alignment */
}

/* Title (single line with ellipsis) */
.most_selling_carousel .caption .p_name {
  margin: 0 0 3px 0;
  font-size: 8.5pt;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

/* Price area layout: price-block on left, floating circle to the right */
.most_selling_carousel .caption .price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

/* Left column: current price (top) and old price (below) */
.most_selling_carousel .caption .price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* left align */
  gap: 4px;
}

/* Current price (bold) */
.most_selling_carousel .caption .price-current {
  margin: 0;
  font-weight: 800;
  font-size: 10pt;
  color: var(--dark);
  text-align: left;
}

/* Old price (double strike) below current */
.most_selling_carousel .caption .price-old {
  margin: 0;
  position: relative;
  color: rgba(0,0,0,0.65);
  font-size: 10px;
  padding-top: 2px;
  text-align: left;
}
.most_selling_carousel .caption .price-old.del-line {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0,0,0,0.72);
}
.most_selling_carousel .caption .price-old.del-line::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(0,0,0,0.55);
  top: 60%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Floating circular card to the right of the price */
.most_selling_carousel .caption .price-float {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  color: var(--accent);
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  border: 2px solid rgba(255,106,0,0.08);
  transform: translateY(0);
  transition: transform .12s ease, box-shadow .12s ease;
}

/* Example: put + sign or icon inside. On hover nudge up slightly */
.most_selling_carousel .caption .price-float:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,0.14); }

/* Black Friday pills (top-left percent, top-right BF) */
.most_selling_carousel .bf-percent {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  padding: 5px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 11px;
  z-index: 40;
  box-shadow: var(--pill-shadow);
  white-space: nowrap;
}
.most_selling_carousel .bf-label {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #000;
  color: #fff;
  padding: 4px 7px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 10px;
  z-index: 40;
  white-space: nowrap;
}

/* Ensure pills sit above image */
.most_selling_carousel .bf-percent,
.most_selling_carousel .bf-label { pointer-events: none; }

/* Dragging state */
.most_selling_carousel.dragging { cursor: grabbing; scroll-behavior: auto; }
.most_selling_carousel.dragging img { pointer-events: none; }

/* Accessibility focus */
.most_selling_carousel .most_selling_slide:focus-within,
.most_selling_carousel .most_selling_slide:focus { outline: 3px solid rgba(255,106,0,0.12); outline-offset: 4px; }

/* Responsive adjustments */
@media (max-width: 1200px) {
  .most_selling_carousel .most_selling_slide { width: 20%; min-width: 140px; }
  .most_selling_slider_wrapper { width: calc(100vw - 10px); }
}
@media (max-width: 900px) {
  .most_selling_carousel .most_selling_slide { width: calc(33.333% - 12px); min-width: 140px; }
  .most_selling_slider_wrapper { width: calc(100vw - 10px); }
}
@media (max-width: 550px) {
  .most_selling_carousel .most_selling_slide { width: calc(48% - 8px); min-width: 120px; }
  .most_selling_carousel .caption { font-size: 8pt; padding: 8px; }
  .most_selling_carousel .caption .price-current { font-size: 9pt; }
  .most_selling_carousel .caption .price-old { font-size: 10px; }
  .most_selling_slider_wrapper { padding: 6px; }
  .most_selling_slider_wrapper i { display: none; } /* touch-friendly */
}
@media (max-width: 400px) {
  .most_selling_carousel .most_selling_slide { width: calc(50% - 8px); min-width: 110px; }
  .most_selling_carousel img { height: 110px; }
  .most_selling_carousel .caption .p_name { font-size: 8pt; }
}

/* Fallback image helper (optional) */
.most_selling_carousel .most_selling_slide .img-fallback {
  width: 100%;
  height: 120px;
  background:#f2f2f2;
}
