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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #F0EBE3;
  color: #2C1000;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.page-wrapper {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #F0EBE3;
  min-height: 100vh;
  position: relative;
  padding-bottom: max(90px, calc(75px + env(safe-area-inset-bottom, 0px)));
}

/* ===== TOP BAR ===== */
.dp-topbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid rgba(74, 21, 0, 0.08);
  box-shadow: 0 2px 10px rgba(74, 21, 0, 0.04);
  transition: box-shadow 0.2s;
}

.dp-topbar.scrolled {
  box-shadow: 0 4px 16px rgba(74, 21, 0, 0.1);
}

.dp-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(74, 21, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: #2C1000;
  transition: background 0.2s;
}

.dp-back-btn:hover {
  background: rgba(74, 21, 0, 0.12);
}

.dp-topbar-title {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 700;
  color: #2C1000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dp-topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dp-cart-btn,
.dp-share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(74, 21, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #2C1000;
  position: relative;
  text-decoration: none;
  transition: background 0.2s;
}

.dp-cart-btn:hover,
.dp-share-btn:hover {
  background: rgba(74, 21, 0, 0.12);
}

.cart-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #C0392B;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
}

/* ===== MAIN CONTENT CONTAINER ===== */
.dp-content-container {
  margin-top: 60px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== GALLERY SECTION (Full square view, never cut off) ===== */
.dp-gallery-section {
  background: #fff;
  border-radius: 18px;
  padding: 12px;
  border: 1px solid rgba(74, 21, 0, 0.07);
  box-shadow: 0 4px 16px rgba(74, 21, 0, 0.05);
}

.dp-main-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #fcf8f2;
  border: 1px solid rgba(74, 21, 0, 0.06);
}

.dp-main-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.2s ease, transform 0.3s ease;
  display: block;
}

.dp-discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #C0392B;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(192, 57, 43, 0.35);
  z-index: 2;
}

/* Thumbnails Row */
.dp-thumbnails-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.dp-thumbnails-row::-webkit-scrollbar {
  display: none;
}

.dp-thumb-item {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #f8f2e9;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.dp-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dp-thumb-item:hover {
  transform: translateY(-2px);
  border-color: rgba(181, 102, 27, 0.4);
}

.dp-thumb-item.active {
  border-color: #B5661B;
  box-shadow: 0 3px 10px rgba(181, 102, 27, 0.25);
  transform: scale(1.04);
}

/* ===== PRODUCT INFO CARD ===== */
.dp-info-card {
  background: #fff;
  border-radius: 18px;
  padding: 18px 16px 10px;
  border: 1px solid rgba(74, 21, 0, 0.07);
  box-shadow: 0 4px 16px rgba(74, 21, 0, 0.05);
}

/* Breadcrumb */
.dp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  color: rgba(44, 16, 0, 0.5);
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.dp-breadcrumb a {
  color: rgba(44, 16, 0, 0.5);
  text-decoration: none;
  font-weight: 500;
}

.dp-breadcrumb a:hover {
  color: #B5661B;
}

.dp-cat-link {
  color: #B5661B !important;
  font-weight: 600;
}

/* Tags Row */
.dp-tags-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.dp-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
}

.dp-tag-baru {
  background: #FF4081;
  color: #fff;
}

.dp-tag-promo {
  background: #00BFA5;
  color: #fff;
}

.dp-tag-best {
  background: #FF6D00;
  color: #fff;
}

.dp-tag-halal {
  background: #E8F5E9;
  color: #2E7D32;
}

/* Product Name & Subtitle */
.dp-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #2C1000;
  line-height: 1.3;
  margin-bottom: 4px;
}

.dp-short-desc {
  font-size: 0.76rem;
  color: rgba(44, 16, 0, 0.65);
  line-height: 1.4;
  margin-bottom: 10px;
}

/* Rating */
.dp-rating-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.dp-stars {
  display: flex;
  gap: 2px;
}

.dp-star {
  color: #F5C842;
  font-size: 0.82rem;
}

.dp-star-empty {
  color: #D4C4A8;
  font-size: 0.82rem;
}

.dp-rating-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: #2C1000;
}

.dp-review-count {
  font-size: 0.72rem;
  color: rgba(44, 16, 0, 0.5);
}

.dp-sep {
  color: rgba(44, 16, 0, 0.2);
  font-size: 0.72rem;
}

.dp-min-order {
  font-size: 0.72rem;
  color: #B5661B;
  font-weight: 600;
}

/* Price */
.dp-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.dp-price {
  font-size: 1.45rem;
  font-weight: 800;
  color: #D32F2F;
}

.dp-price-ori {
  font-size: 0.82rem;
  color: rgba(44, 16, 0, 0.4);
  text-decoration: line-through;
  font-weight: 500;
}

.dp-savings {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: #D32F2F;
  padding: 2px 7px;
  border-radius: 4px;
}

/* Delivery Info */
.dp-delivery-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.dp-delivery-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(44, 16, 0, 0.7);
  background: rgba(74, 21, 0, 0.04);
  padding: 5px 9px;
  border-radius: 6px;
}

.dp-delivery-item svg {
  flex-shrink: 0;
  stroke: #B5661B;
}

/* Divider */
.dp-divider {
  height: 1px;
  background: rgba(74, 21, 0, 0.07);
  margin: 14px 0;
}

/* Sections */
.dp-section {
  margin-bottom: 14px;
}

.dp-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #2C1000;
  margin-bottom: 8px;
}

.dp-desc {
  font-size: 0.8rem;
  color: rgba(44, 16, 0, 0.78);
  line-height: 1.65;
}

/* Isi Paket */
.dp-isi-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dp-isi-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(44, 16, 0, 0.8);
}

.dp-isi-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(39, 174, 96, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.dp-isi-check svg {
  stroke: #27ae60;
}

/* ===== QUANTITY ===== */
.dp-qty-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dp-qty-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dp-qty-label span:first-child {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2C1000;
}

.dp-min-note {
  font-size: 0.68rem;
  color: rgba(44, 16, 0, 0.5);
}

.dp-qty-ctrl {
  display: flex;
  align-items: center;
  border: 1.5px solid rgba(74, 21, 0, 0.2);
  border-radius: 10px;
  overflow: hidden;
  background: #FEFAF3;
}

.dp-qty-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #2C1000;
  transition: background 0.15s;
}

.dp-qty-btn:hover {
  background: rgba(74, 21, 0, 0.08);
}

.dp-qty-input {
  width: 52px;
  height: 38px;
  border: none;
  border-left: 1.5px solid rgba(74, 21, 0, 0.12);
  border-right: 1.5px solid rgba(74, 21, 0, 0.12);
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #2C1000;
  background: #fff;
  outline: none;
  -moz-appearance: textfield;
}

.dp-qty-input::-webkit-outer-spin-button,
.dp-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.dp-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(74, 21, 0, 0.04);
  border-radius: 10px;
  margin-bottom: 4px;
}

.dp-total-row span:first-child {
  font-size: 0.82rem;
  color: rgba(44, 16, 0, 0.65);
  font-weight: 500;
}

.dp-total-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: #4A1500;
}

/* ===== RELATED PRODUCTS ===== */
.dp-related-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.dp-related-scroll::-webkit-scrollbar {
  display: none;
}

.dp-related-card {
  min-width: 130px;
  max-width: 130px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(74, 21, 0, 0.08);
  border: 1px solid rgba(74, 21, 0, 0.06);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  display: block;
}

.dp-related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(74, 21, 0, 0.14);
}

.dp-related-img {
  width: 100%;

  object-fit: cover;
  object-position: center;
}

.dp-related-info {
  padding: 8px;
}

.dp-related-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: #2C1000;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dp-related-price {
  font-size: 0.72rem;
  font-weight: 700;
  color: #4A1500;
}

/* ===== CTA BAR (Royal Nusantara Theme) ===== */
.dp-cta-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  gap: 10px;
  padding: 12px 16px max(16px, env(safe-area-inset-bottom, 0px));
  background: #4A1500;
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(212, 160, 23, 0.3);
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(74, 21, 0, 0.25);
}

.dp-btn-keranjang {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 10px;
  border-radius: 25px;
  border: 1.5px solid #F5C842;
  background: transparent;
  color: #F5C842;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.dp-btn-keranjang:hover {
  background: rgba(245, 200, 66, 0.15);
}

.dp-btn-keranjang.added {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
}

.dp-btn-beli {
  flex: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 25px;
  border: none;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  white-space: nowrap;
}

.dp-btn-beli:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

.dp-btn-beli:active {
  transform: translateY(0);
}

/* ===== TOAST ===== */
.dp-toast {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2C1000;
  color: #F5C842;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 30px;
  z-index: 200;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(44, 16, 0, 0.35);
}

.dp-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== CS WHATSAPP MODAL POPUP ===== */
.ds-cs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 16px;
}

.ds-cs-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.ds-cs-modal-card {
  width: 100%;
  max-width: 380px;
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(212, 160, 23, 0.4);
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.ds-cs-modal-overlay.show .ds-cs-modal-card {
  transform: translateY(0) scale(1);
}

.ds-cs-modal-header {
  background: linear-gradient(135deg, #4A1500 0%, #300A00 100%);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  position: relative;
  border-bottom: 1.5px solid rgba(212, 160, 23, 0.3);
}

.ds-cs-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.ds-cs-modal-titles {
  flex: 1;
}

.ds-cs-modal-titles h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #F5C842;
  margin: 0 0 2px;
}

.ds-cs-modal-titles p {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.ds-cs-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}

.ds-cs-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.ds-cs-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FEFAF3;
}

.ds-cs-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 1.5px solid rgba(74, 21, 0, 0.12);
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(74, 21, 0, 0.05);
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.ds-cs-item:hover,
.ds-cs-item:active {
  border-color: #25D366;
  background: #F0FFF4;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.22);
}

.ds-cs-item-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(37, 211, 102, 0.3);
}

.ds-cs-item-info {
  flex: 1;
  min-width: 0;
}

.ds-cs-item-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #2C1000;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.ds-cs-badge {
  font-size: 0.62rem;
  font-weight: 600;
  background: rgba(37, 211, 102, 0.15);
  color: #128C7E;
  padding: 2px 6px;
  border-radius: 4px;
}

.ds-cs-item-phone {
  font-size: 0.76rem;
  font-weight: 600;
  color: #7B3A10;
}

.ds-cs-item-arrow {
  font-size: 1.1rem;
  font-weight: 700;
  color: #25D366;
}

.ds-cs-modal-footer {
  padding: 10px 16px 12px;
  text-align: center;
  font-size: 0.7rem;
  color: #7B3A10;
  background: #FEFAF3;
  border-top: 1px solid rgba(74, 21, 0, 0.08);
}