/* ==========================================================================
   SHOP - toko digital (design-v2)
   ========================================================================== */

.shop-page { padding: 48px 24px 88px; }
.shop-page .wrap { max-width: 1200px; margin: 0 auto; }

.shop-page .page-header { max-width: 700px; margin-bottom: 32px; }
.shop-page .page-header .ds-breadcrumb { margin-bottom: 12px; }
.shop-page .page-header .ds-body { max-width: 68ch; }
.shop-page .shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* --- Kartu produk ------------------------------------------------------- */
.shop-page .product-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--ds-card);
  border: 1px solid var(--ds-line);
  border-radius: 18px;
  box-shadow: var(--ds-shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease;
}
.shop-page .product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ds-shadow-md);
}

.shop-page .product-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--ds-bg-soft);
  border-bottom: 1px solid var(--ds-line);
}
.shop-page .product-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.shop-page .product-card:hover .product-cover { transform: scale(1.025); }

.shop-page .product-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--ds-ink-3);
  background: var(--ds-bg-soft);
}
.shop-page .product-placeholder svg { width: 34px; height: 34px; }

.shop-page .product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.shop-page .product-cover-label,
.shop-detail-page .product-cover-label {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 28px 14px 12px;
  color: #fff;
  font-family: var(--ds-font-heading, "Plus Jakarta Sans", "Inter", system-ui, sans-serif);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.3;
  background: linear-gradient(transparent, rgba(8, 13, 24, .82));
  pointer-events: none;
}

.shop-page .product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 18px;
}

.shop-page .product-title {
  margin: 0 0 8px;
  color: var(--ds-ink);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-page .product-meta {
  margin-bottom: 10px;
  color: var(--ds-ink-3);
  font-size: 12px;
}

.shop-page .product-desc {
  margin: 0 0 16px;
  color: var(--ds-ink-2);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-page .product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--ds-line);
}

.shop-page .product-price {
  color: var(--ds-ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}
.shop-page .product-price.free { color: var(--ds-blue-ink); }

.shop-page .product-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ds-blue-ink);
  font-size: 12.5px;
  font-weight: 700;
}
.shop-page .product-link svg { width: 14px; height: 14px; transition: transform .2s; }
.shop-page .product-card:hover .product-link svg { transform: translateX(2px); }

/* --- Kosong ------------------------------------------------------------- */
.shop-page .shop-empty {
  padding: 70px 24px;
  text-align: center;
  background: var(--ds-card);
  border: 1px solid var(--ds-line);
  border-radius: 20px;
  box-shadow: var(--ds-shadow-sm);
}
.shop-page .shop-empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 15px;
  color: var(--ds-blue-ink);
  background: var(--ds-blue-soft);
  border: 1px solid var(--ds-line-strong);
  border-radius: 15px;
}
.shop-page .shop-empty-title { margin-bottom: 7px; color: var(--ds-ink); font-size: 16px; font-weight: 700; }
.shop-page .shop-empty-text { color: var(--ds-ink-2); font-size: 13.5px; line-height: 1.6; }

/* --- Detail produk ------------------------------------------------------ */
.shop-detail-page { padding: 24px 16px 72px; }
.shop-detail-page .wrap { max-width: 1160px; margin: 0 auto; }

.shop-detail-page .detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.shop-detail-page .detail-topbar .ds-breadcrumb {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.shop-detail-page .breadcrumb-current { color: var(--ds-ink-3); }

.shop-detail-page .detail-topbar .ds-back {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Hero ringkas: identitas produk + meta penting */
.shop-detail-page .shop-hero {
  margin-bottom: 28px;
  padding: 24px 20px;
  background: linear-gradient(135deg, var(--ds-blue-soft), var(--ds-card) 68%);
  border: 1px solid var(--ds-line);
  border-radius: 20px;
  box-shadow: var(--ds-shadow-sm);
}

.shop-detail-page .shop-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.shop-detail-page .main-title {
  max-width: 820px;
  margin: 0 0 12px;
  color: var(--ds-ink);
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.7rem, 4.2vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.16;
  text-wrap: balance;
}

.shop-detail-page .shop-lead {
  max-width: 68ch;
  margin: 0;
  color: var(--ds-ink-2);
  font-size: 15.5px;
  line-height: 1.68;
}

.shop-detail-page .shop-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--ds-line);
}

.shop-detail-page .shop-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
}

.shop-detail-page .shop-meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid var(--ds-line);
  border-radius: 9px;
  background: var(--ds-card);
  color: var(--ds-blue-ink);
}

.shop-detail-page .shop-meta-icon svg { width: 16px; height: 16px; }

.shop-detail-page .shop-meta dt {
  margin: 0 0 3px;
  color: var(--ds-ink-3);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.shop-detail-page .shop-meta dd {
  margin: 0;
  color: var(--ds-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.shop-detail-page .shop-meta-star { color: var(--ds-star); }

/* Grid konten */
.shop-detail-page .product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.shop-detail-page .product-main {
  display: grid;
  gap: 20px;
  min-width: 0;
  max-width: 720px;
}

.shop-detail-page .content-block {
  padding: 20px;
  background: var(--ds-card);
  border: 1px solid var(--ds-line);
  border-radius: 16px;
  box-shadow: var(--ds-shadow-sm);
}

.shop-detail-page .block-title {
  margin: 0;
  color: var(--ds-ink);
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.35;
}

.shop-detail-page .block-text {
  margin-top: 12px;
  color: var(--ds-ink-2);
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.shop-detail-page .block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.shop-detail-page .block-meta {
  flex-shrink: 0;
  color: var(--ds-ink-3);
  font-size: 12.5px;
}

/* Ulasan */
.shop-detail-page .review-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ds-line);
}

.shop-detail-page .review-average {
  color: var(--ds-ink);
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
}

.shop-detail-page .review-stars {
  color: var(--ds-star);
  font-size: 13px;
  letter-spacing: 1px;
  line-height: 1.3;
}

.shop-detail-page .review-stars-lg { font-size: 15px; }

.shop-detail-page .rating-caption {
  margin-top: 3px;
  color: var(--ds-ink-3);
  font-size: 12.5px;
}

.shop-detail-page .review-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.shop-detail-page .review-item {
  padding: 14px 16px;
  background: var(--ds-bg-soft);
  border: 1px solid var(--ds-line);
  border-radius: 12px;
}

.shop-detail-page .review-item-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 6px;
}

.shop-detail-page .review-author {
  color: var(--ds-ink);
  font-size: 13.5px;
  font-weight: 700;
}

.shop-detail-page .review-date {
  margin-left: auto;
  color: var(--ds-ink-3);
  font-size: 12px;
}

.shop-detail-page .review-body {
  color: var(--ds-ink-2);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.shop-detail-page .review-empty {
  margin-top: 14px;
  color: var(--ds-ink-3);
  font-size: 14px;
}

.shop-detail-page .review-note {
  margin-top: 16px;
  color: var(--ds-ink-3);
  font-size: 12.5px;
  line-height: 1.6;
}

.shop-detail-page .review-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--ds-line);
}

.shop-detail-page .review-form-title {
  margin-bottom: 14px;
  color: var(--ds-ink);
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.shop-detail-page .review-field { margin-bottom: 14px; }

.shop-detail-page .review-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ds-ink-3);
  font-size: 12px;
  font-weight: 700;
}

.shop-detail-page .review-textarea {
  display: block;
  width: 100%;
  padding: 11px 12px;
  background: var(--ds-bg-soft);
  border: 1px solid var(--ds-line);
  border-radius: 10px;
  color: var(--ds-ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.shop-detail-page .review-textarea:focus {
  border-color: var(--ds-blue);
  box-shadow: 0 0 0 3px var(--ds-blue-soft);
}

.shop-detail-page .review-submit { width: 100%; }

/* Panel pembelian */
.shop-detail-page .purchase-panel {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px;
  background: var(--ds-card);
  border: 1px solid var(--ds-line);
  border-radius: 20px;
  box-shadow: var(--ds-shadow-sm);
}

.shop-detail-page .purchase-summary { order: 2; }

.shop-detail-page .purchase-cover {
  position: relative;
  order: 1;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin-bottom: 18px;
  background: var(--ds-bg-soft);
  border-radius: 14px;
}

.shop-detail-page .purchase-cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-detail-page .purchase-cover-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--ds-ink-3);
}

.shop-detail-page .purchase-cover-placeholder svg { width: 42px; height: 42px; }

.shop-detail-page .purchase-cover-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.shop-detail-page .product-cover-label {
  padding: 26px 12px 10px;
  font-size: 10.5px;
}

.shop-detail-page .purchase-label {
  color: var(--ds-ink-3);
  font-size: 12px;
  font-weight: 600;
}

.shop-detail-page .purchase-price {
  margin-top: 2px;
  color: var(--ds-ink);
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.2;
}

.shop-detail-page .purchase-price.free { color: var(--ds-blue-ink); }

.shop-detail-page .purchase-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
  padding: 13px 18px;
  background: var(--ds-btn-bg);
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .24);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.shop-detail-page .purchase-action:hover {
  background: var(--ds-btn-bg-hover);
  transform: translateY(-1px);
}

.shop-detail-page .purchase-action:focus-visible {
  outline: 3px solid rgba(59, 130, 246, .45);
  outline-offset: 2px;
}

.shop-detail-page .purchase-notice {
  margin-top: 12px;
  color: var(--ds-ink-3);
  font-size: 12.5px;
  line-height: 1.6;
}

.shop-detail-page .benefit-list {
  display: grid;
  order: 3;
  gap: 11px;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--ds-line);
  list-style: none;
}

.shop-detail-page .benefit-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ds-ink-2);
  font-size: 13.5px;
  line-height: 1.5;
}

.shop-detail-page .benefit-list li svg {
  flex-shrink: 0;
  stroke: var(--ds-blue);
}

/* --- Responsif ---------------------------------------------------------- */
@media (min-width: 640px) {
  .shop-detail-page { padding: 32px 24px 80px; }
  .shop-detail-page .shop-hero { padding: 28px 24px; }
  .shop-detail-page .content-block { padding: 24px; }
}

@media (min-width: 900px) {
  .shop-detail-page .shop-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shop-detail-page .review-submit { width: auto; min-width: 170px; }
}

@media (max-width: 900px) {
  .shop-detail-page .product-layout { grid-template-columns: 1fr; gap: 24px; }
  /* Di HP panel beli (sampul, harga, tombol) naik ke atas supaya aksi utama
     langsung terlihat tanpa harus menggulir seluruh deskripsi. */
  .shop-detail-page .product-main { order: 2; }
  .shop-detail-page .purchase-panel {
    order: 1;
    position: static;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
  }
  .shop-detail-page .purchase-summary { order: 1; }
  .shop-detail-page .purchase-cover {
    order: 2;
    max-width: 280px;
    margin: 18px auto 0;
  }
}

@media (max-width: 1023px) {
  .shop-page .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .shop-page { padding: 24px 16px 60px; }
  .shop-page .shop-grid { grid-template-columns: 1fr; gap: 16px; }
  .shop-detail-page { padding: 24px 16px 60px; }
  .shop-detail-page .shop-hero { padding: 20px 16px; }
  .shop-detail-page .shop-lead { font-size: 15px; }
}

@media (max-width: 560px) {
  .shop-detail-page .detail-topbar {
    gap: 9px;
    margin-bottom: 20px;
  }

  .shop-detail-page .detail-topbar .ds-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 11px;
    white-space: nowrap;
    overflow: hidden;
    background: var(--ds-bg-soft);
    border: 1px solid var(--ds-line);
    border-radius: 11px;
  }

  .shop-detail-page .breadcrumb-current,
  .shop-detail-page .breadcrumb-current-separator {
    display: none;
  }
}

@media (max-width: 360px) {
  .shop-detail-page .detail-topbar .ds-breadcrumb > a:first-child,
  .shop-detail-page .detail-topbar .ds-breadcrumb > .ds-breadcrumb-sep:first-of-type {
    display: none;
  }
}
