/* ==========================================================================
   i-Store ASPHALT ALOHA DESIGN SYSTEM (Gojek-Inspired Clean Modern Purple)
   1. Unified Canonical Container Width (Header -> Main -> Bottom Nav -> Footer)
   2. Precision Bounded Overlays & Modals (Zero Jumbo, Always Above Bottom Nav)
   3. Clean 2-Column Desktop Product Detail & Proportional Topbar
   4. Single-Row Asphalt Aloha Pill Tabs on Pesanan Saya
   5. Equal-Height 3-Column Desktop Catalog Cards + Legible Rating/Sold
   6. Purposeful Smooth Animations + 3D Icon Depth + Custom Form Controls
   ========================================================================== */

:root {
  --aloha-max: 1080px;
  --aloha-gutter: clamp(12px, 2.4vw, 24px);
  --aloha-purple: #7C3AED;
  --aloha-purple-deep: #5B21B6;
  --aloha-purple-dark: #4C1D95;
  --aloha-purple-soft: #F5F3FF;
  --aloha-purple-tint: #EDE9FE;
  --aloha-green: #00AA13;
  --aloha-bg: #F4F5F9;
  --aloha-surface: #FFFFFF;
  --aloha-ink: #101828;
  --aloha-muted: #475467;
  --aloha-border: rgba(124, 58, 237, 0.14);
  --aloha-border-strong: rgba(124, 58, 237, 0.30);
  --aloha-shadow-xs: 0 2px 8px rgba(16, 24, 40, 0.04);
  --aloha-shadow-sm: 0 6px 18px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(124, 58, 237, 0.06);
  --aloha-shadow-md: 0 14px 32px rgba(16, 24, 40, 0.09), 0 4px 12px rgba(124, 58, 237, 0.08);
  --aloha-shadow-purple: 0 10px 24px rgba(124, 58, 237, 0.25);
  --aloha-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page: 1080px !important;
  --content-width: 1080px !important;
}

html[data-theme="dark"] {
  --aloha-bg: #0B1020;
  --aloha-surface: #131B2E;
  --aloha-ink: #F8FAFC;
  --aloha-muted: #94A3B8;
  --aloha-purple-soft: rgba(124, 58, 237, 0.16);
  --aloha-purple-tint: rgba(124, 58, 237, 0.24);
  --aloha-border: rgba(167, 139, 250, 0.20);
  --aloha-border-strong: rgba(167, 139, 250, 0.38);
  --aloha-shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.32);
  --aloha-shadow-md: 0 18px 38px rgba(0, 0, 0, 0.48);
}

/* Global Canvas & Zero Horizontal Overflow */
html {
  scroll-behavior: smooth;
  overflow-x: clip !important;
  background: var(--aloha-bg) !important;
}
body {
  overflow-x: clip !important;
  background: var(--aloha-bg) !important;
  color: var(--aloha-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ==========================================================================
   1. UNIFIED CONTAINER WIDTH — HEADER, MAIN, BOTTOM NAV, FOOTER ALIGNED
   ========================================================================== */
.announcement-line {
  width: min(calc(100% - var(--aloha-gutter) * 2), var(--aloha-max)) !important;
  margin: 10px auto 0 !important;
  padding: 8px 16px !important;
  border-radius: 14px !important;
  background: linear-gradient(95deg, #4C1D95 0%, #6D28D9 52%, #7C3AED 100%) !important;
  color: #ffffff !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  box-shadow: var(--aloha-shadow-xs);
}

.market-header,
.page-top,
.co-header,
.pd-topbar {
  width: min(calc(100% - var(--aloha-gutter) * 2), var(--aloha-max)) !important;
  max-width: var(--aloha-max) !important;
  margin: 10px auto 0 !important;
  padding: 0 16px !important;
  height: 64px !important;
  border-radius: 20px !important;
  background: color-mix(in srgb, var(--aloha-surface) 94%, transparent) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--aloha-border) !important;
  box-shadow: var(--aloha-shadow-sm) !important;
  top: 8px !important;
}

.address-row,
.main-content,
.customer-page .page-content,
.page-content,
.orders-premium,
.cart-page-content,
.co-wrap,
.pd-main,
.ft,
footer.ft,
.site-footer,
.footer-neubrutalism {
  width: min(calc(100% - var(--aloha-gutter) * 2), var(--aloha-max)) !important;
  max-width: var(--aloha-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.main-content,
.customer-page .page-content,
.pd-main {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.bottom-nav-shell,
.bottom-nav-shell.pd-bottom-shell {
  width: min(calc(100% - 24px), 620px) !important;
  border-radius: 999px !important;
  border: 1.5px solid var(--aloha-border-strong) !important;
  background: color-mix(in srgb, var(--aloha-surface) 96%, transparent) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 14px 36px rgba(91, 33, 182, 0.18) !important;
  z-index: 90 !important;
}

@media (max-width: 720px) {
  .announcement-line,
  .market-header,
  .page-top,
  .co-header,
  .pd-topbar {
    width: calc(100% - 16px) !important;
    margin-top: 6px !important;
    border-radius: 16px !important;
    padding: 0 10px !important;
    height: 56px !important;
  }
  .address-row,
  .main-content,
  .customer-page .page-content,
  .page-content,
  .co-wrap,
  .pd-main,
  .ft,
  footer.ft {
    width: calc(100% - 16px) !important;
  }
}

/* ==========================================================================
   2. ASPHALT ALOHA VISUAL LANGUAGE (CLEAN, TACTILE, ANIMATED, PURPLE)
   ========================================================================== */
@keyframes alohaSlideUp {
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes alohaSheetIn {
  0% { opacity: 0; transform: translateY(18px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes alohaPulseSoft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.28); }
  50% { box-shadow: 0 0 0 8px rgba(124, 58, 237, 0); }
}

.section-block,
.card,
.title-card,
.co-card,
.order-card-istorex,
.cart-card,
.pd-card,
.pd-related,
.account-section,
.account-panel,
.bisnis-card {
  animation: alohaSlideUp 0.36s var(--aloha-ease) both;
}

.card,
.title-card,
.co-card,
.order-card-istorex,
.cart-card,
.account-section,
.account-panel,
.pd-card,
.pd-related,
.member-card {
  border-radius: 22px !important;
  border: 1.5px solid var(--aloha-border) !important;
  box-shadow: var(--aloha-shadow-sm) !important;
  transition: transform 0.22s var(--aloha-ease), box-shadow 0.22s var(--aloha-ease), border-color 0.2s ease;
}

/* Product Cards — Equal Height, Crisp Asphalt Aloha Elevation, Legible Rating/Sold */
.nusa-grid,
.product-grid,
.product-grid-current,
.product-results,
.pd-related-grid {
  align-items: stretch !important;
}

@media (min-width: 1024px) {
  .nusa-grid,
  .product-grid,
  .product-grid-current,
  .product-results,
  .catalog-grid,
  .cat-prod-grid,
  .pd-related-grid,
  .pd-related .nusa-grid,
  .pd-related .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }
}

.nusa-grid > *,
.product-grid > *,
.product-grid-current > *,
.product-card,
.p-card,
.pcard,
.nusa-card,
.product-result {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 20px !important;
  border: 1.5px solid var(--aloha-border) !important;
  background: var(--aloha-surface) !important;
  box-shadow: var(--aloha-shadow-sm) !important;
  overflow: hidden;
  transition: transform 0.22s var(--aloha-ease), box-shadow 0.22s var(--aloha-ease), border-color 0.2s ease;
}

.product-card:hover,
.p-card:hover,
.pcard:hover,
.nusa-card:hover,
.product-result:hover {
  transform: translateY(-4px);
  border-color: var(--aloha-border-strong) !important;
  box-shadow: var(--aloha-shadow-md) !important;
}

/* Larger, Readable Rating, Sold Count & SVGs inside Desktop Product Cards */
@media (min-width: 768px) {
  .product-card .p-meta,
  .product-card .p-rating,
  .product-card .p-sold,
  .product-card .card-meta,
  .product-card .meta-row,
  .nusa-card .meta-row,
  .product-card footer,
  .product-copy small {
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
  }
  .product-card .p-meta svg,
  .product-card .p-rating svg,
  .product-card footer svg,
  .product-card footer img {
    width: 18px !important;
    height: 18px !important;
  }
}

/* ==========================================================================
   3. PRECISION BOUNDED OVERLAYS & MODALS (ZERO JUMBO, ALWAYS VISIBLE)
   ========================================================================== */
.cart-voucher-overlay,
.cart-promotion-overlay,
.co-picker-overlay,
.co-shipping-detail-overlay,
.order-detail-modal,
.order-tracking-overlay,
.ppob-picker-overlay,
.service-order-voucher-overlay,
.pd-purchase-overlay,
.digital-access-modal,
.member-barcode-overlay,
.priority-request-overlay,
.address-editor-overlay,
.iu-ai-overlay,
.iu-tier-overlay,
.iu-select-overlay,
.nusa-voucher-terms-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2200 !important;
  display: grid !important;
  place-items: center !important;
  padding: max(16px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom)) !important;
  background: rgba(15, 10, 30, 0.56) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  overflow: hidden !important;
}

.cart-voucher-sheet,
.cart-voucher-reference-sheet,
.cart-promotion-sheet,
.co-picker-sheet,
.co-shipping-detail-sheet,
.order-detail-sheet,
.order-detail-sheet.order-detail-premium,
.order-tracking-sheet,
.ppob-picker-sheet,
.pd-purchase-sheet,
.digital-access-modal > section,
.member-barcode-sheet,
.priority-request-sheet,
.address-editor-overlay-sheet,
.iu-ai-sheet,
.iu-tier-sheet,
.iu-tier-premium,
.iu-select-sheet,
.nusa-voucher-terms-dialog {
  width: min(580px, calc(100vw - 24px)) !important;
  max-width: min(580px, calc(100vw - 24px)) !important;
  max-height: min(82dvh, 660px) !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  overflow: hidden !important;
  border-radius: 24px !important;
  border: 1.5px solid var(--aloha-border-strong) !important;
  background: var(--aloha-surface) !important;
  box-shadow: 0 28px 72px rgba(15, 10, 35, 0.34) !important;
  animation: alohaSheetIn 0.24s var(--aloha-ease) both;
}

.cart-voucher-sheet > header,
.co-picker-sheet > header,
.order-detail-sheet > header,
.order-tracking-sheet > header,
.ppob-picker-sheet > header,
.pd-purchase-sheet > header,
.iu-ai-sheet > header {
  position: relative !important;
  z-index: 4 !important;
  flex-shrink: 0 !important;
}

.cart-voucher-reference-body,
.cart-voucher-sheet > div:not(.cart-voucher-reference-actions),
.co-picker-body,
.order-detail-body,
.order-tracking-sheet > [data-order-tracking-live],
.ppob-picker-list,
.pd-purchase-scroll,
.iu-ai-messages {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overscroll-behavior: contain;
}

.cart-voucher-reference-actions,
.co-voucher-reference-actions,
.order-detail-sheet > footer,
.order-tracking-sheet > footer,
.pd-purchase-sheet > footer,
.iu-ai-sheet > footer {
  position: relative !important;
  z-index: 4 !important;
  flex-shrink: 0 !important;
}

@media (max-width: 600px) {
  .cart-voucher-overlay,
  .co-picker-overlay,
  .order-detail-modal,
  .ppob-picker-overlay,
  .pd-purchase-overlay,
  .iu-ai-overlay {
    place-items: end center !important;
    padding: 12px 0 0 !important;
  }
  .cart-voucher-sheet,
  .co-picker-sheet,
  .order-detail-sheet,
  .order-detail-sheet.order-detail-premium,
  .ppob-picker-sheet,
  .pd-purchase-sheet,
  .iu-ai-sheet {
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 84dvh !important;
    border-radius: 24px 24px 0 0 !important;
    border-bottom: 0 !important;
  }
}

/* ==========================================================================
   4. PRODUCT DETAIL PAGE (/b11) — CLEAN TOPBAR & 2-COLUMN DESKTOP HERO
   ========================================================================== */
.pd-topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}
.pd-topbar > button,
.pd-topbar > div > a {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 14px !important;
  background: var(--aloha-purple-soft) !important;
  color: var(--aloha-purple-deep) !important;
  border: 1px solid var(--aloha-border) !important;
  display: grid !important;
  place-items: center !important;
}
.pd-topbar .pd-brand {
  margin: 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.pd-topbar .pd-brand img {
  height: 38px !important;
  width: auto !important;
  max-width: 160px !important;
  object-fit: contain !important;
}
.pd-topbar > div {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

@media (min-width: 900px) {
  .pd-card {
    display: grid !important;
    grid-template-columns: 410px minmax(0, 1fr) !important;
    gap: 24px !important;
    padding: 24px !important;
    align-items: start !important;
  }
  .pd-gallery {
    padding: 0 !important;
    position: sticky !important;
    top: 86px !important;
  }
  .pd-hero {
    max-width: 410px !important;
    max-height: 410px !important;
    border-radius: 22px !important;
    border: 1.5px solid var(--aloha-border) !important;
  }
  .pd-body {
    padding: 0 !important;
  }
  .pd-buybar {
    width: min(calc(100% - var(--aloha-gutter) * 2), var(--aloha-max)) !important;
    max-width: var(--aloha-max) !important;
    border-radius: 20px !important;
    border: 1.5px solid var(--aloha-border-strong) !important;
  }
}

/* ==========================================================================
   5. PESANAN SAYA — SINGLE-ROW ASPHALT ALOHA PILL TABS
   ========================================================================== */
.orders-premium .order-tabs,
.order-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  overflow-x: auto !important;
  padding: 6px !important;
  border-radius: 18px !important;
  background: var(--aloha-surface) !important;
  border: 1.5px solid var(--aloha-border) !important;
  box-shadow: var(--aloha-shadow-xs) !important;
  scrollbar-width: none;
}
.orders-premium .order-tabs::-webkit-scrollbar,
.order-tabs::-webkit-scrollbar {
  display: none;
}
.orders-premium .order-tabs button,
.order-tabs button {
  flex: 1 0 auto !important;
  min-width: 110px !important;
  min-height: 42px !important;
  padding: 8px 16px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  border: 1px solid transparent !important;
  background: var(--aloha-purple-soft) !important;
  color: var(--aloha-muted) !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}
.orders-premium .order-tabs button.active,
.order-tabs button.active {
  background: linear-gradient(135deg, var(--aloha-purple), var(--aloha-purple-deep)) !important;
  color: #ffffff !important;
  box-shadow: var(--aloha-shadow-purple) !important;
}

/* ==========================================================================
   6. BUTTONS, 3D ICONS, FORM CONTROLS & EXPERT BOT CHAT POLISH
   ========================================================================== */
button,
.btn,
[role="button"] {
  transition: transform 0.16s var(--aloha-ease), box-shadow 0.2s var(--aloha-ease), background-color 0.2s ease, border-color 0.2s ease;
}

.cat-ico,
.shortcut-ico,
.tile-ico,
.service-ico,
.bn-ico,
.iu-chat-trigger-icon {
  filter: drop-shadow(0 4px 6px rgba(91, 33, 182, 0.20));
  transition: transform 0.2s var(--aloha-ease);
}
a:hover .cat-ico,
button:hover .cat-ico,
a:hover .shortcut-ico {
  transform: translateY(-2px) scale(1.06);
}

select:not(.unstyled),
input[type="text"]:not(.unstyled):not(.otp-box-item),
input[type="email"]:not(.unstyled),
input[type="tel"]:not(.unstyled),
input[type="number"]:not(.unstyled),
input[type="search"]:not(.unstyled),
textarea:not(.unstyled) {
  border-radius: 14px;
  border: 1.5px solid var(--aloha-border);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
select:not(.unstyled):focus,
input:not(.unstyled):focus,
textarea:not(.unstyled):focus {
  outline: none;
  border-color: var(--aloha-purple);
  box-shadow: 0 0 0 3.5px rgba(124, 58, 237, 0.16);
}

input[type="file"] {
  font-size: 13px;
  color: var(--aloha-muted);
  border: 1.5px dashed var(--aloha-border-strong);
  border-radius: 14px;
  padding: 8px 10px;
  background: var(--aloha-purple-soft);
  width: 100%;
  cursor: pointer;
}
input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--aloha-purple), var(--aloha-purple-deep));
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

/* Expert Bot Chat Header & Quick Chips */
.iu-ai-sheet > header {
  background: linear-gradient(135deg, #5B21B6 0%, #7C3AED 55%, #9333EA 100%) !important;
  color: #ffffff !important;
}
.iu-ai-sheet > header h2,
.iu-ai-sheet > header span {
  color: #ffffff !important;
}
.iu-ai-sheet > header button {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
}
.iu-ai-quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.iu-ai-quick-grid button,
.iu-ai-suggestions button {
  padding: 8px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--aloha-border-strong);
  background: var(--aloha-purple-soft);
  color: var(--aloha-purple-deep);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.iu-ai-quick-grid button:hover,
.iu-ai-suggestions button:hover {
  background: var(--aloha-purple);
  color: #ffffff;
}
.iu-global-chat-trigger {
  background: linear-gradient(145deg, #7C3AED, #5B21B6) !important;
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.36) !important;
  animation: alohaPulseSoft 2.8s infinite;
}

/* Checkout Submit Bar Aligned to Unified Container */
.co-submit {
  width: min(calc(100% - var(--aloha-gutter) * 2), var(--aloha-max)) !important;
  max-width: var(--aloha-max) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  border-radius: 20px !important;
  border: 1.5px solid var(--aloha-border-strong) !important;
  box-shadow: 0 16px 36px rgba(91, 33, 182, 0.16) !important;
}

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

/* === CANONICAL 10-POINT AUDIT OVERRIDES === */

/* 1. Unified 1080px Container Width Across ALL Pages (Acuan: Domain Utama /) */
:root {
  --aloha-max: 1080px;
}
#app, #pageApp, #productApp, #checkoutApp,
.customer-page, .page-content, .pd-page, .pd-main, .pd-related,
.cart-page, .cart-shell, .cart-sticky-bar, .cart-summary-bar, .cart-summary-dock,
.orders-premium, .account-page, .wallet-subpage, .istorepay-shell,
.promo-duo-section, .ist-footer, .site-header, .top-bar, .pd-head, .page-header, .account-header {
  max-width: var(--aloha-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Fix Pesanan Saya 5-tab bar so all 5 tabs sit evenly in 1 row without stretching */
.orders-premium .order-tabs {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  overflow: visible !important;
}
.orders-premium .order-tabs > button {
  flex: none !important;
  width: 100% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  padding: 10px 8px !important;
  border-radius: 999px !important;
  font-size: clamp(11.5px, 1.3vw, 13.5px) !important;
  font-weight: 700 !important;
  text-align: center !important;
}

/* 2. Consistent 3-Col Desktop / 2-Col Mobile Grid Everywhere (Home + Produk Serupa) */
@media (min-width: 769px) {
  .product-grid,
  .products-grid,
  .catalog-grid,
  .nusa-catalog-grid,
  .pd-related .pd-related-grid,
  .pd-related .product-grid,
  .pd-related .product-grid-current,
  .products-section .product-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
    align-items: stretch !important;
  }

  /* Equal canonical card height for banner & main-category discovery cards in the Home grid */
  .product-grid > *,
  .products-grid > *,
  .catalog-grid > *,
  .pd-related-grid > * {
    height: 100% !important;
    min-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
  }
  .product-grid > .grid-banner-card,
  .product-grid > .grid-category-card,
  .product-grid > .discovery-card,
  .product-grid > .promo-grid-card,
  .product-grid > .cat-grid-card,
  .product-grid > [class*="banner-card"],
  .product-grid > [class*="category-card"],
  .product-grid > [class*="niche-card"] {
    height: 100% !important;
    min-height: 100% !important;
    justify-content: space-between !important;
    border-radius: 22px !important;
    overflow: hidden !important;
  }

  /* Scale UP desktop rating stars, review count, sold count, and fulfillment SVG (mobile stays as-is) */
  .premium-metric-row,
  .product-card .product-meta,
  .product-card .premium-meta-row,
  .pd-related .premium-metric-row {
    font-size: 13.5px !important;
    line-height: 1.35 !important;
    gap: 8px !important;
    align-items: center !important;
  }
  .premium-metric-row .star,
  .premium-metric-row svg,
  .product-card .rating-star,
  .product-card .metric-star {
    width: 17px !important;
    height: 17px !important;
    font-size: 16px !important;
  }
  .premium-metric-row .sold,
  .premium-metric-row .metric-sold,
  .premium-metric-row .metric-rating,
  .premium-metric-row span {
    font-size: 13.5px !important;
    font-weight: 700 !important;
  }
  .premium-fulfillment-svg,
  .product-card img.premium-fulfillment-svg,
  .pd-related img.premium-fulfillment-svg {
    height: 24px !important;
    width: auto !important;
    max-width: 54px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
  }
}

@media (max-width: 768px) {
  .product-grid,
  .products-grid,
  .catalog-grid,
  .nusa-catalog-grid,
  .pd-related .pd-related-grid,
  .pd-related .product-grid,
  .pd-related .product-grid-current {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    align-items: stretch !important;
  }
}

/* 3. PromoDuo Flash Sale GIF Protection */
.promo-duo-flash-head img,
.promo-duo-head-art,
.flash-sale-gif,
.promo-duo-section .flash-title-art {
  flex-shrink: 0 !important;
  min-width: 84px !important;
  height: auto !important;
  object-fit: contain !important;
}

/* 4. Unified Footer Logo Independent Large Scale */
.ist-footer .brand-s .blogo,
footer .brand-s img.blogo {
  height: clamp(68px, 8.5vw, 96px) !important;
  width: auto !important;
  max-width: 280px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto 10px !important;
}

/* 5. Overlay Close (×) Precision Alignment & ZERO Vertical Drop/Jump Hover Animation */
.modal-head, .sheet-head, .overlay-head, .drawer-head, .order-detail-head, .ui-modal-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}
.modal-close, .sheet-close, .overlay-close, .drawer-close, .order-detail-close,
.ui-modal-close, .pd-sheet-close, .istorepay-sheet-close, .aloha-close,
button[aria-label="Tutup"], button[data-close-modal], .detail-close-btn {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border-radius: 999px !important;
  line-height: 1 !important;
  margin: 0 !important;
  transform: none !important;
  translate: none !important;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease !important;
}
.modal-close:hover, .sheet-close:hover, .overlay-close:hover, .drawer-close:hover,
.order-detail-close:hover, .ui-modal-close:hover, .pd-sheet-close:hover,
.istorepay-sheet-close:hover, .aloha-close:hover,
button[aria-label="Tutup"]:hover, button[aria-label="Tutup"]:focus-visible,
button[data-close-modal]:hover, .detail-close-btn:hover {
  transform: none !important;
  translate: none !important;
  top: auto !important;
  background-color: rgba(124, 58, 237, 0.14) !important;
  color: #5b21b6 !important;
}

/* 6. Circular Order-Count Badge at Top-Right of Bottom Nav Pesanan Icon */
.bottom-item {
  position: relative !important;
}
.bottom-item .order-badge,
.bottom-item .cart-badge {
  position: absolute !important;
  top: 4px !important;
  right: calc(50% - 22px) !important;
  min-width: 19px !important;
  height: 19px !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  line-height: 19px !important;
  text-align: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4) !important;
  border: 1.5px solid #ffffff !important;
  pointer-events: none !important;
  z-index: 4 !important;
}
.bottom-item .order-badge.zero,
.bottom-item .cart-badge.zero,
.bottom-item .order-badge[hidden],
.bottom-item .cart-badge[hidden] {
  display: none !important;
}

/* 7. Coin Claim "SELAMAT" Celebration Overlay (Matches Reference photo_6338843740436372453_y.jpg) */
.coin-claim-effect {
  position: fixed !important;
  inset: 0 !important;
  z-index: 3500 !important;
  background: radial-gradient(circle at 50% 42%, rgba(59, 30, 112, 0.88), rgba(15, 10, 28, 0.94)) !important;
  backdrop-filter: blur(6px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  animation: coinFadeIn 0.24s ease-out !important;
}
.coin-claim-effect.leaving {
  opacity: 0 !important;
  transition: opacity 0.2s ease !important;
}
.coin-claim-effect .coin-claim-close {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 999px !important;
  border: 2px solid rgba(255, 255, 255, 0.85) !important;
  background: rgba(15, 10, 28, 0.45) !important;
  color: #ffffff !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 3510 !important;
  transform: none !important;
}
.coin-claim-effect .coin-claim-close:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  transform: none !important;
}
.coin-claim-stage {
  position: relative;
  width: min(400px, 100%);
  text-align: center;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
}
.coin-claim-headline {
  font-size: clamp(32px, 8vw, 44px);
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #fff7c2 0%, #fbbf24 52%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.55));
  margin: 0;
  animation: coinPopIn 0.4s cubic-bezier(0.22, 1.28, 0.36, 1);
}
.coin-claim-burst {
  position: relative;
  width: 176px;
  height: 176px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
}
.coin-claim-rays {
  position: absolute;
  inset: -26px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(253, 224, 71, 0.32) 0deg 14deg, transparent 14deg 28deg);
  -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 72%);
  mask-image: radial-gradient(circle, #000 35%, transparent 72%);
  animation: coinSpinSlow 14s linear infinite;
}
.coin-claim-emblem {
  position: relative;
  z-index: 2;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fef08a 0%, #facc15 45%, #d97706 100%);
  border: 6px solid #fffbeb;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.55), inset 0 -6px 12px rgba(180, 83, 9, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 3px 8px rgba(180, 83, 9, 0.5);
  animation: coinPopIn 0.48s cubic-bezier(0.22, 1.35, 0.36, 1);
}
.coin-claim-title {
  margin: 4px 0 0;
  font-size: clamp(22px, 5.5vw, 28px);
  font-weight: 800;
  color: #ffffff;
}
.coin-claim-title em {
  font-style: normal;
  color: #fde047;
}
.coin-claim-sub {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 999px;
}
.coin-claim-cta {
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 15.5px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #9333ea 0%, #7c3aed 55%, #ec4899 100%);
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.48);
  cursor: pointer;
}
.coin-claim-confetti i {
  position: fixed;
  top: 22%;
  left: calc(15% + var(--i) * 5.8%);
  width: 10px;
  height: 16px;
  border-radius: 3px;
  background: hsl(calc(var(--i) * 34deg), 92%, 62%);
  animation: coinConfettiFall 1.8s ease-out forwards;
  pointer-events: none;
}

/* 8. Pecah Telur Emas Coin Game Card (Matches Reference photo_6338843740436372452_y.jpg) */
.egg-game-section {
  margin: 18px 0;
}
.egg-game-heading {
  font-size: 20px;
  font-weight: 800;
  color: #5b21b6;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.egg-game-stage {
  position: relative;
  border-radius: 24px;
  border: 4px solid #b45309;
  background: linear-gradient(180deg, #e0f2fe 0%, #ede9fe 52%, #fde68a 100%);
  padding: 20px 18px 22px;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(91, 33, 182, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 280px;
}
.egg-game-topbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  z-index: 2;
}
.egg-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #4c1d95;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(76, 29, 149, 0.28);
}
.egg-pill-limit {
  background: #ffffff;
  color: #5b21b6;
  border: 1.5px solid rgba(124, 58, 237, 0.25);
}
.egg-pedestal-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 6px 0 14px;
  cursor: pointer;
  user-select: none;
}
.golden-egg-btn {
  position: relative;
  width: 122px;
  height: 154px;
  border: 0;
  background: radial-gradient(circle at 34% 26%, #fef9c3 0%, #facc15 44%, #f59e0b 80%, #b45309 100%);
  border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
  box-shadow: 0 14px 28px rgba(217, 119, 6, 0.42), inset 0 8px 18px rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: transform 0.15s ease;
  z-index: 2;
  overflow: hidden;
}
.golden-egg-btn:hover {
  transform: scale(1.04) rotate(-2deg);
}
.golden-egg-btn.cracking {
  animation: eggShake 0.42s ease-in-out;
}
.golden-egg-crack {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  height: 28px;
  background: transparent;
  pointer-events: none;
}
.golden-egg-pedestal {
  width: 184px;
  height: 30px;
  margin-top: -12px;
  border-radius: 50%;
  background: linear-gradient(180deg, #d97706 0%, #92400e 100%);
  border: 3px solid #fde68a;
  box-shadow: 0 8px 18px rgba(146, 64, 14, 0.35);
  z-index: 1;
}
.egg-cta-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  background: #ffffff;
  color: #4c1d95;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(76, 29, 149, 0.16);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.egg-cta-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.egg-game-meta {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #4c1d95;
}

@keyframes coinFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes coinPopIn { from { opacity: 0; transform: scale(0.72); } to { opacity: 1; transform: scale(1); } }
@keyframes coinSpinSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes coinConfettiFall {
  0% { opacity: 1; transform: translateY(-40px) rotate(0deg); }
  100% { opacity: 0; transform: translateY(260px) rotate(260deg); }
}
@keyframes eggShake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-10deg) scale(1.06); }
  45% { transform: rotate(10deg) scale(1.08); }
  70% { transform: rotate(-7deg) scale(1.04); }
}

/* === ROUND 2: ZERO SCROLLBAR, EQUAL GRID, ZERO ELLIPSIS, PREMIUM DETAIL === */

/* 1. Permanently Hide Native Browser Scrollbars Globally */
html, body, *, *::before, *::after {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

/* 2. Equal Height for ALL 3 Grid Card Types (Banner + Product + Category/Kost Card) */
@media (min-width: 769px) {
  .product-grid,
  .product-grid-current,
  .products-grid,
  .catalog-grid {
    align-items: stretch !important;
  }
  .product-grid > *,
  .product-grid-current > *,
  .products-grid > * {
    height: 100% !important;
    align-self: stretch !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .product-grid > .catalog-grid-banner,
  .product-grid > .catalog-grid-banner-card,
  .product-grid > .catalog-grid-category-card,
  .product-grid > .catalog-grid-niche-card,
  .product-grid > .catalog-promo-card,
  .product-grid > .niche-reco-card,
  .product-grid > a:not(.premium-reference-card),
  .product-grid > article:not(.premium-reference-card),
  .product-grid > div:not(.premium-reference-card) {
    height: 100% !important;
    min-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    padding: 0 !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(124, 58, 237, 0.14) !important;
  }
  .product-grid .catalog-grid-banner-track,
  .product-grid .catalog-grid-banner-viewport,
  .product-grid .catalog-grid-banner-slide,
  .product-grid .catalog-grid-banner-slide > img,
  .product-grid .catalog-grid-niche-card > img,
  .product-grid .niche-reco-card > img {
    flex: 1 1 auto !important;
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
  }
}

/* 3. ZERO Text Ellipsis (...) Globally — Responsive Scaled Typography Instead */
h1, h2, h3, h4, p, a, span, strong, b, small, button,
.product-title, .premium-title, .market-reference-title, .market-reference-copy h3,
.order-item-title, .order-detail-item-name, .order-card-title, .order-tabs button,
.feature-card b, .cart-item-title, .checkout-item-title {
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}
.market-reference-title,
.product-title,
.premium-title {
  font-size: clamp(12.5px, 1.35vw, 15px) !important;
  line-height: 1.32 !important;
  max-height: none !important;
  overflow: visible !important;
}
.order-detail-item-name,
.order-item-title {
  font-size: clamp(13px, 1.4vw, 15px) !important;
  line-height: 1.35 !important;
  overflow: visible !important;
}

/* 4. High-Contrast Colored Container Buttons in Detail Pesanan & ALL Overlays */
.order-detail-footer,
.order-detail-actions,
.modal-footer,
.sheet-footer {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)) !important;
  gap: 10px !important;
  padding: 14px 16px !important;
  background: #f8f7ff !important;
  border-top: 1px solid rgba(124, 58, 237, 0.14) !important;
}
.order-detail-footer button,
.order-detail-footer a,
.order-detail-actions button,
.order-detail-actions a {
  min-height: 48px !important;
  padding: 10px 14px !important;
  border-radius: 16px !important;
  font-size: clamp(12px, 1.3vw, 14px) !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  text-align: center !important;
  cursor: pointer !important;
  opacity: 1 !important;
}
.order-detail-footer [data-close-order-detail],
.order-detail-actions [data-close-order-detail] {
  background: #ede9fe !important;
  color: #4c1d95 !important;
  border: 1.5px solid #c4b5fd !important;
}
.order-detail-footer [data-print-invoice],
.order-detail-footer .btn-invoice,
.order-detail-actions [data-print-invoice] {
  background: #e0f2fe !important;
  color: #075985 !important;
  border: 1.5px solid #7dd3fc !important;
}
.order-detail-footer [data-order-pay],
.order-detail-footer [data-detail-pay-submit],
.order-detail-footer .order-pay-btn,
.order-detail-footer .primary,
.order-detail-footer button[type="submit"],
.order-detail-actions .primary {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 60%, #db2777 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.34) !important;
}
.order-detail-footer [data-order-pay] *,
.order-detail-footer [data-detail-pay-submit] *,
.order-detail-footer .order-pay-btn *,
.order-detail-footer .primary * {
  color: #ffffff !important;
}
.order-detail-footer [data-order-track],
.order-detail-actions [data-order-track] {
  background: linear-gradient(135deg, #0ea5e9 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3) !important;
}
.order-detail-footer [data-order-track] * {
  color: #ffffff !important;
}

/* 5. Premium 3D Status Cards in Detail Pesanan (Pembayaran Berhasil, Dibatalkan, dll.) */
.order-outcome {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 22px !important;
  padding: 22px 18px !important;
  text-align: center !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08) !important;
}
.order-outcome-success {
  background: linear-gradient(160deg, #ecfdf5 0%, #ffffff 55%, #f5f3ff 100%) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.34) !important;
}
.order-outcome-success::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 120px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), transparent 70%);
  pointer-events: none;
}
.order-outcome-success .order-success-check {
  width: 68px !important;
  height: 68px !important;
  margin: 0 auto 12px !important;
  border-radius: 50% !important;
  background: linear-gradient(145deg, #34d399 0%, #10b981 55%, #059669 100%) !important;
  box-shadow: 0 12px 26px rgba(16, 185, 129, 0.4), inset 0 3px 6px rgba(255, 255, 255, 0.5) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  font-size: 32px !important;
  font-weight: 900 !important;
}
.order-outcome-success h3 {
  font-size: clamp(19px, 2.4vw, 23px) !important;
  font-weight: 900 !important;
  color: #065f46 !important;
  margin: 0 0 8px !important;
}
.order-outcome-success p {
  font-size: clamp(12.5px, 1.3vw, 14px) !important;
  color: #334155 !important;
  margin: 4px 0 !important;
}
.order-outcome-cancelled {
  background: linear-gradient(160deg, #fff1f2 0%, #ffffff 60%, #faf5ff 100%) !important;
  border: 1.5px solid rgba(244, 63, 94, 0.32) !important;
}
.order-outcome-cancelled .order-outcome-icon {
  width: 64px !important;
  height: 64px !important;
  margin: 0 auto 12px !important;
  border-radius: 50% !important;
  background: linear-gradient(145deg, #fb7185, #e11d48) !important;
  color: #ffffff !important;
  font-size: 30px !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 10px 22px rgba(225, 29, 72, 0.34) !important;
}

/* === ROUND 3 POLISH: NO MID-WORD BREAK ON BUTTONS + ENLARGED DESKTOP METRICS === */
button, .btn, a.btn, .pd-sticky-bar button, .pd-action-bar button, .bottom-item, .bottom-label, .order-tabs button {
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}
@media (min-width: 769px) {
  .product-card .market-bottom-row .market-rating,
  .product-card .market-bottom-row .market-sold-count,
  .premium-reference-card .market-bottom-row .market-rating,
  .premium-reference-card .market-bottom-row .market-sold-count {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
  }
  .product-card .market-bottom-row .premium-fulfillment-svg,
  .premium-reference-card .market-bottom-row .premium-fulfillment-svg {
    width: 42px !important;
    height: 24px !important;
    max-width: 48px !important;
  }
}
