/* ============================================================
   Alfath Theme Store — Design Tokens & Base
   ============================================================ */

:root {
  --lavender: #F3E8FF;
  --lavender-deep: #E7D6FB;
  --twilight: #3B2A5E;
  --twilight-soft: #7C6798;
  --parchment: #FFFBF3;
  --peony: #FF8FB1;
  --peony-deep: #FF6B9D;
  --periwinkle: #B4A7F5;
  --mint: #9FE8CF;
  --gold: #FFC857;
  --gold-deep: #F2A93B;

  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Quicksand', system-ui, sans-serif;

  --radius-card: 22px;
  --radius-btn: 16px;
  --radius-sheet: 26px;

  --shadow-card: 0 8px 24px rgba(59, 42, 94, 0.12);
  --shadow-cta: 0 6px 16px rgba(255, 107, 157, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--lavender);
  color: var(--twilight);
  font-family: var(--font-body);
  font-weight: 500;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Fokus keyboard selalu terlihat */
:focus-visible {
  outline: 3px solid var(--periwinkle);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================
   Layout wrapper
   ============================================================ */

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px;
}

/* ============================================================
   Topbar
   ============================================================ */

.topbar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 18px;
}

.topbar__brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.topbar__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 5vw, 30px);
  color: var(--twilight);
  margin: 0;
}

.topbar__badge {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  background: var(--mint);
  color: var(--twilight);
  padding: 3px 10px;
  border-radius: 100px;
}

.topbar__tagline {
  font-size: 14px;
  color: var(--twilight-soft);
  font-weight: 500;
  margin: 0;
}

/* ============================================================
   Filter kategori (chips)
   ============================================================ */

.filter-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px 18px;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  background: var(--parchment);
  border: 1.5px solid var(--lavender-deep);
  color: var(--twilight-soft);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 100px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chip:hover {
  transform: translateY(-1px);
}

.chip.is-active {
  background: linear-gradient(135deg, var(--peony), var(--peony-deep));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

/* ============================================================
   Grid katalog
   ============================================================ */

.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 620px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (min-width: 960px) {
  .catalog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }
}

/* ============================================================
   Kartu tema
   ============================================================ */

.theme-card {
  background: var(--parchment);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: left;
  border: none;
  padding: 0;
  width: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.theme-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(59, 42, 94, 0.18);
}

.theme-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--lavender-deep);
}

.theme-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ribbon kategori */
.theme-card__ribbon {
  position: absolute;
  top: 12px;
  left: 0;
  background: var(--periwinkle);
  color: white;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  padding: 5px 12px 5px 14px;
  border-radius: 0 100px 100px 0;
  box-shadow: 0 3px 8px rgba(59, 42, 94, 0.2);
}

/* Wax-seal rating badge — signature element */
.theme-card__seal {
  position: absolute;
  top: -6px;
  right: 10px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold), var(--gold-deep));
  color: var(--twilight);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(-9deg);
  box-shadow: 0 4px 10px rgba(242, 169, 59, 0.45), inset 0 -2px 4px rgba(0,0,0,0.08);
  font-family: var(--font-display);
}

.theme-card__seal svg {
  width: 14px;
  height: 14px;
  margin-bottom: 1px;
}

.theme-card__seal span {
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.theme-card__body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.theme-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--twilight);
  margin: 0;
  line-height: 1.25;
}

.theme-card__items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.theme-card__item-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--twilight-soft);
  background: var(--lavender);
  padding: 3px 9px;
  border-radius: 100px;
}

.theme-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.theme-card__price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--peony-deep);
}

.theme-card__sold {
  font-size: 12px;
  color: var(--twilight-soft);
  font-weight: 600;
}

/* ============================================================
   Skeleton loading
   ============================================================ */

.skeleton-card {
  background: var(--parchment);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.skeleton-card__media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(100deg, var(--lavender-deep) 30%, #f0e6fb 50%, var(--lavender-deep) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  height: 12px;
  border-radius: 100px;
  background: linear-gradient(100deg, var(--lavender-deep) 30%, #f0e6fb 50%, var(--lavender-deep) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton-line--wide { width: 80%; }
.skeleton-line--mid { width: 55%; }
.skeleton-line--narrow { width: 35%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   Empty state
   ============================================================ */

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 20px;
  color: var(--twilight-soft);
}

.empty-state svg {
  width: 96px;
  height: 96px;
  margin-bottom: 14px;
}

.empty-state__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--twilight);
  margin: 0 0 4px;
}

.empty-state__text {
  font-size: 14px;
  margin: 0;
  max-width: 280px;
}

/* ============================================================
   Checkout page
   ============================================================ */

.page--narrow {
  max-width: 560px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--twilight-soft);
  margin-bottom: 14px;
}

.back-link svg {
  width: 16px;
  height: 16px;
}

.back-link:hover {
  color: var(--twilight);
}

.order-summary {
  background: var(--parchment);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 20px;
}

.order-summary__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--lavender-deep);
}

.order-summary__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-summary__ribbon {
  position: absolute;
  top: 12px;
  left: 0;
  background: var(--periwinkle);
  color: white;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11.5px;
  padding: 5px 12px 5px 14px;
  border-radius: 0 100px 100px 0;
  box-shadow: 0 3px 8px rgba(59, 42, 94, 0.2);
}

.order-summary__body {
  padding: 18px;
}

.order-summary__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--twilight);
  margin: 0 0 10px;
}

.order-summary__items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.order-summary__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-summary__price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  color: var(--peony-deep);
}

.checkout-form {
  background: var(--parchment);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--twilight);
}

.field input {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--twilight);
  background: var(--lavender);
  border: 1.5px solid var(--lavender-deep);
  border-radius: 12px;
  padding: 12px 14px;
}

.field input::placeholder {
  color: var(--twilight-soft);
  opacity: 0.7;
}

.field input:focus {
  outline: none;
  border-color: var(--periwinkle);
  background: var(--parchment);
}

.field__hint {
  font-size: 12px;
  color: var(--twilight-soft);
  font-weight: 500;
}

.checkout-note {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--twilight-soft);
  background: var(--lavender);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 4px 0 16px;
}

.field-error {
  font-size: 13px;
  font-weight: 600;
  color: #C24E63;
  margin: 0 0 14px;
}

/* ============================================================
   Paginasi
   ============================================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.pagination__btn,
.pagination__nav {
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1.5px solid var(--lavender-deep);
  background: var(--parchment);
  color: var(--twilight-soft);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pagination__btn:hover,
.pagination__nav:hover:not(:disabled) {
  transform: translateY(-1px);
}

.pagination__btn.is-active {
  background: linear-gradient(135deg, var(--peony), var(--peony-deep));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

.pagination__nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination__ellipsis {
  color: var(--twilight-soft);
  font-weight: 700;
  padding: 0 4px;
}

/* ============================================================
   Bottom-sheet detail
   ============================================================ */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(59, 42, 94, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

@media (min-width: 620px) {
  .sheet-backdrop {
    align-items: center;
  }
}

.sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  background: var(--parchment);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  padding: 20px 20px 24px;
  transform: translateY(24px);
  transition: transform 0.24s ease;
}

@media (min-width: 620px) {
  .sheet {
    border-radius: var(--radius-sheet);
  }
}

.sheet-backdrop.is-open .sheet {
  transform: translateY(0);
}

.sheet__handle {
  width: 40px;
  height: 4px;
  background: var(--lavender-deep);
  border-radius: 100px;
  margin: 0 auto 16px;
}

@media (min-width: 620px) {
  .sheet__handle { display: none; }
}

.sheet__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--lavender);
  color: var(--twilight);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet__media {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--lavender-deep);
  margin-bottom: 16px;
}

.sheet__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sheet__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  color: var(--twilight);
  margin: 0 0 6px;
}

.sheet__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--twilight-soft);
}

.sheet__rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold-deep);
}

.sheet__rating svg {
  width: 14px;
  height: 14px;
}

.sheet__desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--twilight);
  margin: 0 0 16px;
}

.sheet__section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--twilight);
  margin: 0 0 8px;
}

.sheet__items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.sheet__item-tag {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--twilight);
  background: var(--lavender);
  padding: 5px 12px;
  border-radius: 100px;
}

.sheet__price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sheet__price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--peony-deep);
}

.sheet__sold {
  font-size: 12.5px;
  color: var(--twilight-soft);
  font-weight: 600;
}

/* ============================================================
   Tombol CTA (WhatsApp / Checkout)
   ============================================================ */

.btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: var(--radius-btn);
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--peony), var(--peony-deep));
  color: white;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  box-shadow: var(--shadow-cta);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255, 107, 157, 0.45);
}

.btn-cta svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   Auth page (Login)
   ============================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 40px;
}

.auth-card {
  background: var(--parchment);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px 24px;
}

.auth-card__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  margin-bottom: 26px;
}

.auth-card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 6px;
}

.auth-card__icon svg {
  width: 100%;
  height: 100%;
}

.auth-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--twilight);
  margin: 0;
}

.auth-card__subtitle {
  font-size: 13.5px;
  color: var(--twilight-soft);
  font-weight: 500;
  margin: 0;
  max-width: 260px;
}

.auth-card__checking {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--twilight-soft);
}

.auth-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid var(--lavender-deep);
  border-top-color: var(--peony-deep);
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  padding-right: 44px;
}

.password-field__toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--twilight-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-field__toggle svg {
  width: 18px;
  height: 18px;
}

.password-field__toggle.is-active {
  color: var(--peony-deep);
}

/* ============================================================
   Dashboard Seller
   ============================================================ */

.dash-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  flex-wrap: wrap;
}

.dash-topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-topbar__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--peony), var(--periwinkle));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.dash-topbar__email {
  font-size: 12.5px;
  color: var(--twilight-soft);
  font-weight: 600;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--lavender-deep);
  background: var(--parchment);
  color: var(--twilight-soft);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 100px;
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-logout:hover {
  color: #C24E63;
  border-color: #f2c9d1;
  transform: translateY(-1px);
}

.btn-logout svg {
  width: 15px;
  height: 15px;
}

.demo-banner {
  background: var(--lavender);
  border: 1.5px dashed var(--periwinkle);
  color: var(--twilight-soft);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 18px;
  line-height: 1.5;
}

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (min-width: 620px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: var(--parchment);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card__icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.stat-card__icon svg {
  width: 16px;
  height: 16px;
}

.stat-card__icon--peony { background: rgba(255, 143, 177, 0.18); color: var(--peony-deep); }
.stat-card__icon--periwinkle { background: rgba(180, 167, 245, 0.22); color: var(--periwinkle); }
.stat-card__icon--gold { background: rgba(255, 200, 87, 0.22); color: var(--gold-deep); }
.stat-card__icon--mint { background: rgba(159, 232, 207, 0.28); color: #3f9e80; }

.stat-card__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--twilight);
  line-height: 1.1;
}

.stat-card__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--twilight-soft);
}

/* Toolbar */
.dash-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dash-toolbar__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--twilight);
  margin: 0;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: linear-gradient(135deg, var(--peony), var(--peony-deep));
  color: white;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13.5px;
  padding: 11px 18px;
  border-radius: 100px;
  box-shadow: var(--shadow-cta);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.btn-add:hover {
  transform: translateY(-1px);
}

.btn-add svg {
  width: 16px;
  height: 16px;
}

/* Theme management list */
.manage-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.manage-card {
  background: var(--parchment);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.manage-card__media {
  width: 66px;
  height: 66px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--lavender-deep);
  flex-shrink: 0;
}

.manage-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manage-card__body {
  flex: 1;
  min-width: 0;
}

.manage-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--twilight);
  margin: 0 0 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--twilight-soft);
}

.manage-card__meta .price {
  color: var(--peony-deep);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13.5px;
}

.manage-card__meta .rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--gold-deep);
}

.manage-card__meta .rating svg {
  width: 12px;
  height: 12px;
}

.manage-card__ribbon {
  display: inline-block;
  background: var(--periwinkle);
  color: white;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 100px;
}

.manage-card__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1.5px solid var(--lavender-deep);
  background: var(--lavender);
  color: var(--twilight-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.icon-btn:hover {
  transform: translateY(-1px);
}

.icon-btn--edit:hover { color: var(--periwinkle); border-color: var(--periwinkle); }
.icon-btn--delete:hover { color: #C24E63; border-color: #f2c9d1; }
.icon-btn--sold {
  border-color: transparent;
  background: rgba(159, 232, 207, 0.35);
  color: #2f7c63;
}
.icon-btn--sold:hover { color: #1f6650; }

.manage-card__actions-row {
  display: flex;
  gap: 6px;
}

/* Modal (Tambah/Edit Tema) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(59, 42, 94, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--parchment);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-sheet);
  padding: 22px;
  position: relative;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}

.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--lavender);
  color: var(--twilight);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  color: var(--twilight);
  margin: 0 0 18px;
  padding-right: 30px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field textarea {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--twilight);
  background: var(--lavender);
  border: 1.5px solid var(--lavender-deep);
  border-radius: 12px;
  padding: 12px 14px;
  resize: vertical;
  min-height: 76px;
}

.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--periwinkle);
  background: var(--parchment);
}

.field select {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--twilight);
  background: var(--lavender);
  border: 1.5px solid var(--lavender-deep);
  border-radius: 12px;
  padding: 12px 14px;
}

/* Tag input (isi paket) */
.tag-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--lavender);
  border: 1.5px solid var(--lavender-deep);
  border-radius: 12px;
  padding: 8px 10px;
}

.tag-input:focus-within {
  border-color: var(--periwinkle);
  background: var(--parchment);
}

.tag-input__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--periwinkle);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 6px 4px 11px;
  border-radius: 100px;
}

.tag-input__chip button {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.3);
  color: white;
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tag-input input {
  flex: 1;
  min-width: 100px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--twilight);
  padding: 6px 4px;
}

.tag-input input:focus {
  outline: none;
}

.field__hint--tag {
  font-size: 11.5px;
  color: var(--twilight-soft);
  font-weight: 500;
}

/* Image upload dropzone */
.image-upload {
  display: flex;
  gap: 14px;
  align-items: center;
}

.image-upload__preview {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--lavender);
  border: 1.5px dashed var(--lavender-deep);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--twilight-soft);
}

.image-upload__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-upload__preview svg {
  width: 26px;
  height: 26px;
}

.image-upload__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--lavender-deep);
  background: var(--lavender);
  color: var(--twilight);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 100px;
}

.image-upload__btn svg {
  width: 14px;
  height: 14px;
}

.image-upload__info {
  font-size: 11.5px;
  color: var(--twilight-soft);
  font-weight: 500;
  margin-top: 6px;
}

.image-upload__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.image-upload__thumb {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--lavender);
  border: 1.5px solid var(--lavender-deep);
}

.image-upload__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-upload__thumb button {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(59, 42, 94, 0.65);
  color: white;
  font-size: 10px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-upload__thumb--cover::after {
  content: "Cover";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(59, 42, 94, 0.72);
  color: white;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  padding: 2px 0;
  letter-spacing: 0.02em;
}

/* ============================================================
   Carousel — galeri gambar tema (bottom-sheet detail)
   ============================================================ */

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.32s ease;
  touch-action: pan-y;
}

.carousel__track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(59, 42, 94, 0.55);
  color: white;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.carousel__nav:hover {
  background: rgba(59, 42, 94, 0.75);
}

.carousel__nav--prev { left: 10px; }
.carousel__nav--next { right: 10px; }

.carousel__dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.carousel__dot {
  width: 6px;
  height: 6px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.55);
  border: none;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

.carousel__dot.is-active {
  width: 16px;
  background: white;
}

.carousel__counter {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(59, 42, 94, 0.55);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
}

.modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-secondary {
  flex: 0 0 auto;
  border: 1.5px solid var(--lavender-deep);
  background: var(--parchment);
  color: var(--twilight-soft);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: var(--radius-btn);
}

.modal__actions .btn-cta {
  flex: 1;
}

.btn-cta:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-cta__spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  animation: spin 0.7s linear infinite;
}

/*view detail gambar tema di bottom-sheet*/
.image-viewer{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.92);
  display:flex;
  justify-content:center;
  align-items:center;
  visibility:hidden;
  opacity:0;
  transition:.3s;
  z-index:99999;
  touch-action: pan-x;
  overscroll-behavior: contain;
}

.image-viewer img{
  user-select:none;
  -webkit-user-drag:none;
}

.image-viewer.show{
  display:flex;
  visibility:visible;
  opacity:1;
}

.image-viewer img{
  max-width:92vw;
  max-height:92vh;
  border-radius:12px;
  transition:.25s;
}

.image-viewer button{
  position:absolute;
  width:50px;
  height:50px;
  border:none;
  border-radius:50%;
  background:rgba(255,255,255,.25);
  color:white;
  font-size:28px;
  cursor:pointer;
}

.image-viewer__close{
  position:absolute;
  top:20px;
  right:20px;
  width:42px;
  height:42px;
  border:none;
  border-radius:50%;
  background:rgba(0,0,0,.5);
  color:#fff;
  font-size:26px;
  z-index:100000;

}

.image-viewer__prev{
  left:20px;
  top:50%;
  transform:translateY(-50%);
}

.image-viewer__next{
  right:20px;
  top:50%;
  transform:translateY(-50%);
}

.image-viewer__counter{
  position:absolute;
  bottom:25px;
  left:50%;
  transform:translateX(-50%);
  color:white;
  padding:6px 14px;
  border-radius:20px;
  font-size:18px;
}

/* Confirm modal (Hapus / Tandai Terjual) */
.confirm-modal {
  max-width: 360px;
  text-align: center;
  padding: 26px 22px 22px;
}

.confirm-modal__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-modal__icon svg {
  width: 24px;
  height: 24px;
}

.confirm-modal__icon--danger { background: rgba(194, 78, 99, 0.14); color: #C24E63; }
.confirm-modal__icon--success { background: rgba(159, 232, 207, 0.35); color: #2f7c63; }

.confirm-modal__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--twilight);
  margin: 0 0 6px;
}

.confirm-modal__text {
  font-size: 13.5px;
  color: var(--twilight-soft);
  font-weight: 500;
  margin: 0 0 20px;
  line-height: 1.5;
}

.confirm-modal__actions {
  display: flex;
  gap: 10px;
}

.confirm-modal__actions button {
  flex: 1;
}

.btn-danger {
  border: none;
  background: linear-gradient(135deg, #E0637A, #C24E63);
  color: white;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: var(--radius-btn);
  box-shadow: 0 6px 16px rgba(194, 78, 99, 0.3);
}

.btn-success {
  border: none;
  background: linear-gradient(135deg, #9FE8CF, #6FCDA9);
  color: #1f4a3a;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: var(--radius-btn);
  box-shadow: 0 6px 16px rgba(111, 205, 169, 0.35);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  background: var(--twilight);
  color: white;
  font-size: 13.5px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 100px;
  box-shadow: 0 8px 20px rgba(59, 42, 94, 0.3);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
}

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

.toast--error {
  background: #C24E63;
}

.toast svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================================
   Utility
   ============================================================ */

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* ============================================================
   Varian tema — dashboard (manajemen) & bottom-sheet (pemilihan)
   ============================================================ */

/* --- Dashboard: baris manajemen varian --- */

.variant-manager {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.variant-row {
  position: relative;
  border: 1.5px solid var(--lavender-deep);
  background: var(--lavender);
  border-radius: 18px;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.variant-row__remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(194, 78, 99, 0.14);
  color: #C24E63;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.variant-row__remove:hover:not(:disabled) {
  transform: scale(1.08);
}

.variant-row__remove:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.variant-row__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.variant-row__fields input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--twilight);
  background: var(--parchment);
  border: 1.5px solid var(--lavender-deep);
  border-radius: 12px;
  padding: 10px 12px;
}

.variant-row__fields input:focus {
  outline: none;
  border-color: var(--periwinkle);
}

.variant-row__images-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--twilight-soft);
}

.btn-add-variant {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  border: 1.5px dashed var(--periwinkle);
  background: transparent;
  color: var(--periwinkle);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13.5px;
  padding: 11px 14px;
  border-radius: 100px;
  transition: background 0.15s ease;
}

.btn-add-variant:hover {
  background: rgba(180, 167, 245, 0.14);
}

.btn-add-variant svg {
  width: 15px;
  height: 15px;
}

/* --- Bottom-sheet: pilihan varian buat customer --- */

.sheet__variants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.variant-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border: 1.5px solid var(--lavender-deep);
  background: var(--parchment);
  border-radius: 14px;
  padding: 8px 14px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.variant-pill:hover {
  transform: translateY(-1px);
}

.variant-pill__label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--twilight);
}

.variant-pill__price {
  font-size: 12px;
  font-weight: 600;
  color: var(--twilight-soft);
}

.variant-pill.is-active {
  border-color: var(--peony-deep);
  background: linear-gradient(135deg, rgba(255, 143, 177, 0.12), rgba(255, 107, 157, 0.12));
}

.variant-pill.is-active .variant-pill__price {
  color: var(--peony-deep);
}

/* --- Checkout: badge nama varian terpilih --- */

.order-summary__variant-badge {
  display: inline-flex;
  align-items: center;
  background: var(--mint);
  color: #1f4a3a;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  margin: -2px 0 10px;
}

/* --- Confirm modal: picker varian buat "Tandai Terjual" --- */

.confirm-modal__variant-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 18px;
}

.btn-success:disabled,
.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
