*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #3a4ee5;
  --brand-dark: #2535c8;
  --brand-light: #eef0fd;
  --brand-mid: #6577ea;
  --text: #111827;
  --text-soft: #6b7280;
  --text-xs: #9ca3af;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --white: #ffffff;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --success: #16a34a;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow-lg: 0 8px 32px rgba(58,78,229,.12);
}

/* BREADCRUMB */
.spd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 1.5rem;
}
.spd-breadcrumb a { color: var(--brand); text-decoration: none; }
.spd-breadcrumb span { color: var(--text-xs); }

/* MAIN GRID - pastikan ini */
.spd-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;   /* ← penting, jangan stretch */
  margin-bottom: 2.5rem;
}

/* GALLERY - sticky agar sejajar */
.spd-gallery {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
}

/* COVER - naikkan height sedikit */
.spd-cover {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 490px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: border-color .2s;
}

.spd-thumb {
  width: 80px;            /* ← fixed width */
  height: 80px;           /* ← fixed height, hapus aspect-ratio */
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s;
}

.spd-cover:hover { border-color: var(--brand-mid); }
.spd-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.spd-cover:hover img { transform: scale(1.04); }

.spd-thumbs {
  display: flex;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.spd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.spd-thumb.active { border-color: var(--brand); }
.spd-thumb:not(.active):hover { border-color: var(--brand-mid); }

/* PRODUCT INFO */
.spd-info {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.spd-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 10px;
}
.spd-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}
.spd-rating-num { font-size: 13px; font-weight: 600; color: var(--text); }
.spd-rating-count { font-size: 13px; color: var(--text-soft); text-decoration: none; }
.spd-rating-dot { color: var(--border); }

/* PRICE */
.spd-price-box {
  background: var(--brand-light);
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid rgba(58,78,229,.15);
}
.spd-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.spd-price-final {
  font-size: 30px;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: -.01em;
}
.spd-price-pct {
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}
.spd-price-original {
  font-size: 13px;
  color: var(--text-soft);
}
.spd-price-original s { color: var(--text-xs); }
.spd-price-save {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  background: #f0fdf4;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* VARIATION LABEL */
.spd-var-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.spd-var-label span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* SIZES */
.spd-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.spd-size-btn {
  min-width: 46px;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: all .18s;
  text-transform: uppercase;
}
.spd-size-btn.active,
.spd-size-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
}
.spd-size-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* COLORS */
.spd-colors { display: flex; gap: 10px; align-items: center; }
.spd-color-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid transparent;
  outline: 2px solid transparent;
  outline-offset: 2px;
  cursor: pointer;
  transition: outline-color .18s;
  flex-shrink: 0;
}
.spd-color-btn.active { outline-color: var(--brand); }

/* QUANTITY */
.spd-qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.spd-qty-label { font-size: 13px; font-weight: 600; color: var(--text); }
.spd-qty-ctrl {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
}
.spd-qty-btn {
  width: 40px;
  height: 42px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-soft);
  transition: background .15s, color .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spd-qty-btn:hover { background: var(--brand-light); color: var(--brand); }
.spd-qty-val {
  width: 72px;
  height: 42px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: transparent;
  outline: none;
}
.spd-stock-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-soft);
}
.spd-stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
}
.spd-stock-num { font-weight: 700; color: var(--danger); }

/* CTA BUTTONS */
.spd-cta {
  display: grid;
  grid-template-columns: 48px 1fr 1fr;
  gap: 8px;
}
.spd-btn {
  height: 50px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.spd-btn-wish {
  width: 48px;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text-soft);
  border-radius: var(--radius-sm);
}
.spd-btn-wish:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.spd-btn-cart {
  background: var(--brand-light);
  border: 1.5px solid var(--brand);
  color: var(--brand);
}
.spd-btn-cart:hover { background: var(--brand); color: #fff; }
.spd-btn-buy {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.spd-btn-buy:hover { background: var(--brand-dark); transform: translateY(-1px); }
.spd-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* TRUST SECTION */
.spd-trust {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.spd-trust-item {
  flex: 1;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.spd-trust-icon {
  width: 36px;
  height: 36px;
  background: var(--brand-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.spd-trust-text { font-size: 12px; color: var(--text-soft); line-height: 1.4; }
.spd-trust-text strong { display: block; font-size: 13px; color: var(--text); font-weight: 600; }

@media (max-width: 768px) {
  .spd-gallery {
    position: static;   /* ← matikan sticky di mobile */
    top: unset;
  }

  .spd-main { grid-template-columns: 1fr; }
  .spd-trust { flex-direction: column; }
  .spd-cta { grid-template-columns: 48px 1fr 1fr; }
}


.rpc-section {
    position: relative;
    margin-top: 30px;
}

.rpc-header {
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.rpc-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #313b50;
    text-transform: capitalize;
    line-height: 1;
}

.rpc-viewport {
    overflow: hidden;
    position: relative;
}

.rpc-track {
    display: flex;
    gap: 20px;
    transition: transform 0.38s cubic-bezier(.4,0,.22,1);
    will-change: transform;
    cursor: grab;
    user-select: none;
}

.rpc-track.rpc-dragging {
    cursor: grabbing;
    transition: none;
}

.rpc-card {
    flex: 0 0 auto;
    border-radius: 15px;
    border: 1px solid #f1f2f7;
    padding: 10px;
    background: #fff;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, border-color .2s;
}

.rpc-card:hover {
    border-color: #e0e2f8;
    box-shadow: 0 4px 18px rgba(58,78,229,.08);
}

.rpc-img-wrap {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f6fa;
    margin-bottom: 10px;
    aspect-ratio: 1 / 1;
}

.rpc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.rpc-card:hover .rpc-img-wrap img {
    transform: scale(1.05);
}

.rpc-labels {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.rpc-lbl {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: .04em;
    line-height: 1.6;
}

.rpc-lbl.new      { background: #fff0f3; color: #f90c4c; }
.rpc-lbl.sale     { background: #e8fff9; color: #0e9f6e; }
.rpc-lbl.trending { background: #eef0fd; color: #3a4ee5; }

.rpc-detail {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.rpc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

.rpc-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #f5a623;
    font-size: 12px;
}

.rpc-rating span { color: #777; }

.rpc-name {
    font-size: 13.5px;
    font-weight: 500;
    color: #313b50;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rpc-price-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #3a4ee5;
    color: #fff;
    padding: 4px 9px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    width: fit-content;
}

.rpc-price-normal {
    font-size: 13px;
    font-weight: 700;
    color: #313b50;
}

.rpc-btn-prev,
.rpc-btn-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #e5e5e5;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.10);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .18s, border-color .18s, opacity .18s;
    color: #313b50;
    font-size: 18px;
    line-height: 1;
    padding: 0;
}

.rpc-btn-prev { left: -17px; }
.rpc-btn-next { right: -17px; }

.rpc-btn-prev:hover,
.rpc-btn-next:hover {
    background: #3a4ee5;
    border-color: #3a4ee5;
    color: #fff;
}

.rpc-btn-prev.rpc-disabled,
.rpc-btn-next.rpc-disabled {
    opacity: .35;
    pointer-events: none;
}

.rpc-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
}

.rpc-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ddd;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width .25s, background .25s;
}

.rpc-dot.rpc-dot-active {
    width: 22px;
    background: #3a4ee5;
}