/* ================= GLOBAL & WRAPPER ================= */
.m10-section {
  margin-bottom: 35px;
}

.m10-slider-wrapper {
  position: relative;
  padding: 0; /* tidak ada padding, tombol nav pakai positioning */
}

/* ================= HEADER ================= */
.m10-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.m10-header .left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.m10-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.m10-link {
  font-size: 12px;
  color: #0d6efd;
  text-decoration: none;
}

/* ================= TIMER ================= */
.m10-timer {
  display: flex;
  align-items: center;
  gap: 6px;
}

.m10-timer span {
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff3b3b, #d71920);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  position: relative;
}

.m10-timer span:not(:last-child)::after {
  content: ":";
  position: absolute;
  right: -6px;
  color: #d71920;
  font-weight: bold;
}

/* ================= TABS ================= */
.m10-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.m10-tabs::-webkit-scrollbar {
  display: none;
}

.m10-tab {
  border: 1px solid #e31e24;
  background: #fff;
  color: #e31e24;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.m10-tab.active,
.m10-tab:hover {
  background: #e31e24;
  color: #fff;
}

/* ================= NAV BUTTONS ================= */
.m10-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  z-index: 100;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.m10-nav-btn.prev {
  left: -18px;
}

.m10-nav-btn.next {
  right: -18px;
}

.m10-nav-btn:hover {
  color: #e31e24;
  border-color: #e31e24;
}

/* ================= SLIDER ================= */
.m10-slider {
  display: flex;
  align-items: stretch;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 10px 0 20px;
}

.m10-slider::-webkit-scrollbar {
  display: none;
}

/* ================= CARD ================= */
.m10-slider .m10-card-v2,
.product-grid .m10-card-v2,
.diskon-grid .m10-card-v2,
.flash-slider .m10-card-v2,
.search-grid .m10-card-v2,
.related-grid .m10-card-v2 {
  flex: 0 0 170px;
  width: 170px;
  min-height: 268px;
  height: auto;

  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8e8e8;

  overflow: hidden;

  display: flex;
  flex-direction: column;

  transition: transform 0.25s ease,
              box-shadow 0.25s ease,
              border-color 0.25s ease;
}

.m10-card-v2.terlaris-card {
  position: relative;
}

.terlaris-rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 20px;
  z-index: 3;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

.m10-card-v2.is-out-of-stock {
  opacity: 0.92;
}

.m10-card-v2.is-out-of-stock .m10-img img {
  filter: grayscale(0.35);
}

.m10-slider .m10-card-v2:hover,
.product-grid .m10-card-v2:hover,
.diskon-grid .m10-card-v2:hover,
.flash-slider .m10-card-v2:hover,
.search-grid .m10-card-v2:hover,
.related-grid .m10-card-v2:hover {
  transform: translateY(-4px);
  border-color: #f1d3d4;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.m10-card-v2 > a,
.m10-card-v2 > .m10-card-link {
  text-decoration: none;
  color: inherit;

  display: flex;
  flex-direction: column;

  flex: 1;
  min-height: 0;
}

/* ================= IMAGE ================= */
.m10-img {
  position: relative;
  height: 132px;
  min-height: 132px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 10px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}

.m10-badge {
  position: absolute;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  border-radius: 6px;
  padding: 4px 7px;
  letter-spacing: 0.2px;
}

.m10-badge-discount {
  top: 8px;
  left: 8px;
  background: #e31e24;
  color: #fff;
  box-shadow: 0 2px 6px rgba(227, 30, 36, 0.25);
}

.m10-badge-stock {
  bottom: 8px;
  left: 8px;
  right: 8px;
  text-align: center;
  padding: 5px 8px;
}

.m10-badge-stock.is-out {
  background: rgba(30, 30, 30, 0.82);
  color: #fff;
}

.m10-badge-stock.is-low {
  background: rgba(255, 152, 0, 0.92);
  color: #fff;
}

.m10-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.m10-card-v2:hover .m10-img img {
  transform: scale(1.03);
}

/* ================= BODY ================= */
.m10-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.m10-brand {
  font-size: 10px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m10-body .title {
  font-size: 12.5px;
  font-weight: 600;
  color: #222;

  min-height: 36px;
  max-height: 36px;

  line-height: 1.4;

  margin-bottom: 6px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  overflow: hidden;
}

.m10-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: auto;
}

.m10-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #777;
  line-height: 1.3;
}

.m10-meta-item i {
  font-size: 9px;
}

.m10-sold {
  color: #666;
}

.m10-stock-ok {
  color: #2e7d32;
  font-weight: 600;
}

/* Legacy footer (partial lama) */
.m10-footer-info {
  margin-top: auto;
}

.m10-progress {
  height: 5px;
  background: #eee;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 6px;
}

.m10-progress div {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, #ff9800, #e31e24);
}

.m10-label-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.m10-label-area .star {
  color: #ffc107;
  font-weight: 600;
}

.m10-label-area .status {
  color: #777;
}

/* ================= WA BUTTON ================= */
.m10-wa-action {
  padding: 8px 10px 10px;
  margin-top: auto;
  border-top: 1px solid #f3f3f3;
  background: #fafafa;
}

.btn-wa-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;

  background: #25d366;
  color: #fff !important;

  text-align: center;
  padding: 9px 8px;

  border-radius: 8px;

  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;

  text-decoration: none;

  transition: background 0.25s ease, transform 0.2s ease;
}

.btn-wa-full i {
  font-size: 14px;
}

.btn-wa-full:hover {
  background: #1da851;
  color: #fff !important;
  transform: translateY(-1px);
}

/* ================= BANNER ================= */
.m10-banner-v2 {
  flex: 0 0 200px;
  min-width: 200px;
  height: 278px;        /* sama dengan kartu desktop */
  align-self: stretch;

  border-radius: 14px;
  padding: 20px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;

  position: relative;
  overflow: hidden;

  color: #fff;

  background:
    linear-gradient(
      135deg,
      #051937 0%,
      #0d47a1 40%,
      #d71920 80%,
      #ff3b3b 100%
    );

  box-shadow: 0 8px 20px rgba(13, 71, 161, 0.2);
}

.m10-banner-v2::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  bottom: -50px;
  right: -50px;
  background: radial-gradient(circle, rgba(255, 59, 59, 0.4) 0%, transparent 70%);
  border-radius: 50%;
}

.m10-banner-v2::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  top: -30px;
  left: -30px;
  background: radial-gradient(circle, rgba(100, 181, 246, 0.35) 0%, transparent 70%);
  border-radius: 50%;
}

.m10-banner-v2 > * {
  position: relative;
  z-index: 2;
}

.m10-badge {
  font-size: 11px;
  background: #fff;
  color: #d71920;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 800;
  margin-bottom: 12px;
}

.m10-big {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
}

.m10-big span {
  display: block;
  font-size: 32px;
  font-weight: 900;
  color: #ffe082;
}

.m10-sub {
  font-size: 12px;
  margin-top: 6px;
  color: rgba(255,255,255,0.9);
}

.m10-end {
  font-size: 11px;
  margin-top: 10px;
  opacity: 0.8;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {

  .m10-slider-wrapper {
    padding: 0 4px;
  }

  .m10-nav-btn {
    display: none !important;
  }

  .m10-title {
    font-size: 15px;
  }

  .m10-slider .m10-card-v2,
  .product-grid .m10-card-v2 {
    flex: 0 0 150px;
    width: 150px;
    min-height: 252px;
    height: auto;
  }

  .m10-img {
    height: 110px;
    min-height: 110px;
  }

  .btn-wa-full {
    font-size: 10px;
    padding: 8px 6px;
  }

  .m10-banner-v2 {
    flex: 0 0 160px;
    min-width: 160px;

    min-height: 255px;
    height: 255px;

    padding: 14px;
  }

  .m10-big {
    font-size: 14px;
  }

  .m10-big span {
    font-size: 24px;
  }

  .m10-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .m10-sub {
    font-size: 11px;
  }

  .btn-wa-full {
    font-size: 11px;
    padding: 7px;
  }
}