/* Interaction states + mobile input polish (loaded on every page, after page CSS). */
* {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
.mi,
.brand,
.chip,
.oc,
.sl,
.ro,
[role='button'] {
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s,
    box-shadow 0.15s,
    transform 0.15s,
    opacity 0.15s;
}
button:focus,
a:focus,
[role='button']:focus {
  outline: none;
}
button:focus-visible,
a:focus-visible,
[role='button']:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 111, 146, 0.28) !important;
}
button:disabled,
.wa:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
}
/* pressed */
.ib:active,
.brand:active,
.add:active,
.chip:active,
.oc:not(.fx):active,
.sl:active,
.stp button:active,
.cu-add:active,
.wa:not(:disabled):active,
.mbtn:active,
.cu-x:active,
.im-x:active,
.mx:active,
.ci-a button:active,
.hd-btn:active,
.seg button:active,
.acc-h:active,
.emp a:active,
.nf-x:active,
.rst:active {
  transform: scale(0.96);
}
#cartbar:active {
  transform: translateX(-50%) translateY(-3px) scale(0.98);
}
.mi,
a.brand {
  transition:
    background-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
  transform-origin: center center;
}
.mi:active:not(:has(.add:active)),
a.brand:active {
  transform: translateY(-3px) scale(0.98);
}
.add:active {
  transform: scale(0.92);
}
@media (prefers-reduced-motion: reduce) {
  .mi,
  a.brand,
  #cartbar {
    transition: none;
  }
  .mi:active,
  a.brand:active {
    transform: none !important;
  }
  #cartbar:active {
    transform: translateX(-50%);
  }
}
.chip:active,
.oc:not(.on):not(.fx):active,
.sl:not(.on):active,
.seg button:not(.on):active,
.ib:active,
.cu-x:active,
.im-x:active,
.nf-x:active {
  background-color: #eef1f5;
}
.add:active,
.hd-btn:active {
  background-color: #f8d7e3;
}
.stp button:active {
  background-color: #f1f5f9;
}
.cu-add:active,
.wa:not(:disabled):active,
#brand-clear:active,
#reset-ok:active,
.emp a:active {
  background-color: #9c4a6a;
}
.ci-a button:active,
.rst:active {
  opacity: 0.7;
}
@media (hover: hover) {
  .ib:hover,
  .cu-x:hover,
  .im-x:hover,
  .mx:hover,
  .nf-x:hover {
    background-color: #f4f6f9;
  }
  .brand:hover,
  .mi:hover,
  .ro:hover,
  .hd:hover {
    border-color: #e1e5eb;
    box-shadow: 0 4px 14px rgba(46, 52, 64, 0.08);
  }
  .chip:not(.on):hover,
  .oc:not(.on):not(.fx):hover,
  .sl:not(.on):hover,
  .seg button:not(.on):hover {
    border-color: #cdd3dc;
    background-color: #fafbfc;
  }
  .chip.on:hover,
  .oc.on:not(.m):hover,
  .seg button.on:hover {
    border-color: #ebb7cb;
  }
  .oc.m.on:hover,
  .sl.on:hover {
    border-color: #b5c6d9;
  }
  .add:hover,
  .hd-btn:hover {
    background-color: #fbe1eb;
  }
  .stp button:hover {
    background-color: #f6f8fb;
  }
  .cu-add:hover,
  .wa:not(:disabled):hover,
  #brand-clear:hover,
  #reset-ok:hover,
  .emp a:hover {
    background-color: #a5506f;
  }
  .mbtn[data-close]:hover {
    background-color: #f8f9fc !important;
  }
  .ci-a button:hover,
  .rst:hover {
    opacity: 0.8;
  }
  .acc-h:hover {
    background-color: #fafbfc;
    border-radius: 14px;
  }
  #cartbar:hover {
    background-color: #47658a;
    transform: translateX(-50%) translateY(-2px);
  }
}
/* inputs: >=16px prevents iOS focus zoom */
input,
textarea,
select,
.search input,
.in,
.cu-b textarea {
  font-size: 16px !important;
}
/* dialogs fit the visible viewport (keyboard-aware via --vvh set in ux.js) */
/* dialogs keep their normal (layout-viewport) height; ux.js slides the card up above the keyboard instead of shrinking it */
.ov > .modal {
  transition: translate 0.2s ease;
}
/* Font switcher (design-review tool) */
html {
  --font: 'Plus Jakarta Sans';
}
body,
.f-jakarta,
.f-nunito,
button,
input,
textarea,
select {
  font-family: var(--font), system-ui, sans-serif !important;
}

@media (hover: hover) {
}

/* Thin custom scrollbar matching the palette */
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: rgba(79, 111, 146, 0.35) transparent;
  }
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(79, 111, 146, 0.35);
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(79, 111, 146, 0.55);
}
*::-webkit-scrollbar-corner {
  background: transparent;
}

#cartbar {
  transition:
    background-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
}

/* menu skeleton */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
#skel {
  transition: opacity 0.3s;
}
#skel.out {
  opacity: 0;
}
#list.ld {
  opacity: 0;
}
#list {
  transition: opacity 0.35s;
}
.sk {
  background: #eef1f5;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.sk::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.65);
  transform: translateX(-100%);
  animation: skx 1.3s ease-in-out infinite;
}
@keyframes skx {
  60%,
  100% {
    transform: translateX(100%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sk::after {
    animation: none;
  }
}
.sk-sec {
  margin-top: 18px;
}
.sk-h {
  width: 110px;
  height: 14px;
  margin-bottom: 12px;
  background: var(--pk);
}
.sk-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh);
  padding: 10px;
  margin-bottom: 10px;
}
.sk-ph {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: var(--bl);
}
.sk-t {
  flex: 1;
}
.sk-l1 {
  height: 13px;
  width: 68%;
}
.sk-l2 {
  height: 12px;
  width: 34%;
  margin-top: 9px;
  background: var(--pk);
}
.sk-btn {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pk);
}
.sk-sec:nth-child(2) .sk-h {
  background: var(--bl);
}

.dact .mbtn {
  width: 100%;
  flex: none;
}
#m-closed .tile {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: var(--bl);
  color: var(--blD);
  display: flex;
  align-items: center;
  justify-content: center;
}
#m-closed .tile svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
#m-closed {
  z-index: 80;
}
.closed-banner {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 16px 0;
  padding: 10px 13px;
  border-radius: 14px;
  background: var(--pk);
  color: var(--pkD);
  font-size: 13px;
  font-weight: 600;
}
.closed-banner svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@keyframes ovOut {
  to {
    opacity: 0;
  }
}
@keyframes mdOut {
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}
.ov.closing {
  animation: ovOut 0.22s ease forwards;
  pointer-events: none;
}
.ov.closing > * {
  animation: mdOut 0.22s ease forwards;
}
#m-cartd #f-brand,
#m-cartd #f-brand *,
#m-cartd #f-name,
#m-cartd #f-outlet,
#m-cartd #f-when,
#m-cartd #f-when *,
#m-cartd .cd-b input,
#m-cartd .cd-b select {
  font-size: 14px !important;
}

.hd-t {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hd-del {
  margin-left: auto;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mu);
  background: transparent;
  transition:
    background-color 0.15s,
    transform 0.15s;
}
.hd-del svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
@media (hover: hover) {
  .hd-del:hover {
    background: #f1f3f6;
    color: var(--tx2);
  }
}
.hd-del:active {
  background: #eef1f5;
  transform: scale(0.94);
}
.hd-empty {
  text-align: center;
  color: var(--mu);
  font-size: 14px;
  padding: 28px 0;
}
#m-del {
  z-index: 85;
}
#m-del .tile {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: #fdecef;
  color: #c2415b;
  display: flex;
  align-items: center;
  justify-content: center;
}
#m-del .tile svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
#del-ok:active {
  background: #a3364c !important;
}

.closed-banner {
  margin: 10px 0;
}
.brands {
  align-items: stretch;
}
a.brand > div:last-child {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
a.brand > div:last-child > small {
  margin-top: auto;
  padding-top: 4px;
}

/* Dialog scrollbars stay inside the rounded shape */
.modal.im {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(var(--vvh, 100dvh) - 40px);
}
.im-s {
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 12px 5px 12px 0;
  padding: 8px 15px 6px 20px;
  min-height: 0;
}
.cu-b,
.cd-b,
#m-hist .hb {
  margin: 6px 5px 6px 0;
}
.cu-b {
  padding-right: 15px;
}
#m-hist .hb {
  padding-right: 11px;
}
.cd-b {
  padding-right: 9px;
}
#m-cust textarea,
.cu textarea {
  font-size: 14px !important;
}

/* search: no focus ring */
.search:focus-within,
.search:active {
  border-color: #d9dee6 !important;
  box-shadow: none !important;
  outline: none !important;
}
.search input:focus,
.search input:focus-visible,
.search input:active {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}
/* header buttons: blue hover */
@media (hover: hover) {
  header .ib:hover {
    background-color: #e1e9f1 !important;
  }
}
header .ib:active {
  background-color: #cfdce8 !important;
  transform: scale(0.96);
}
.cu-add {
  padding: 14px !important;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.search input,
.search input::placeholder {
  font-size: 14px !important;
}
#m-hist .hb {
  background: #f8f9fc !important;
}
/* Toast: white pill, soft border/shadow, dark text, pink check dot */
#toast {
  background: #fff !important;
  color: var(--tx) !important;
  border: 1px solid #eef0f4;
  box-shadow: 0 8px 24px rgba(46, 52, 64, 0.12) !important;
  font-weight: 600;
  font-size: 13.5px;
  padding: 10px 16px 10px 12px !important;
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  white-space: normal;
}
#toast > *:not(span) {
  flex: none;
}
#toast::before {
  content: '';
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--pk)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B0587A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center/11px no-repeat;
}
#m-hist .modal {
  background: #f8f9fc;
}
#m-hist .hh {
  background: #fff;
}

/* keep focused fields clear of sticky dialog footers */
.cu-b,
.cd-b {
  scroll-padding-top: 12px;
  scroll-padding-bottom: 12px;
}

/* Kustomisasi Tambahan card (custom.js) — Jasdor tokens only */
.kx {
  margin-top: 16px;
  border: 1px solid #e3e6ec;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}
.kx-h {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: none;
  border: none;
  font: inherit;
  color: var(--tx);
  text-align: left;
  cursor: pointer;
}
.kx-ic {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--pk);
  color: var(--pkD);
  display: flex;
  align-items: center;
  justify-content: center;
}
.kx-ic svg {
  width: 19px;
  height: 19px;
}
.kx-t {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kx-t b {
  font-size: 14.5px;
  font-weight: 700;
}
.kx-t small {
  font-size: 12px;
  color: var(--mu);
}
.kx-h > svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--mu);
  transition: transform 0.2s;
}
.kx.open .kx-h > svg {
  transform: rotate(180deg);
}
.kx-b {
  display: none;
  padding: 2px 14px 14px;
  border-top: 1px solid var(--line);
}
.kx.open .kx-b {
  display: block;
}
.kx-s {
  margin-top: 14px;
}
.kx-l {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.kx-li {
  display: inline-flex;
  color: var(--blD);
}
.kx-li svg {
  width: 14px;
  height: 14px;
}
.kx-bd {
  margin-left: auto;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--pkD);
  background: var(--pk);
  padding: 2px 8px;
  border-radius: 99px;
}
@media (hover: hover) {
  .kx-h:hover {
    background-color: #fafbfc;
  }
}

.kx-g {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.kx-g .oc {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
  text-align: left;
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 13px;
}
.kx-g .oc i {
  flex: none;
}
.search input {
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.search input {
  flex: 1;
  min-width: 0;
}
.q-x {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: -4px -6px -4px 0;
  padding: 0;
  border: none;
  background: none;
  color: #a3aab5;
  cursor: pointer;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.q-x[hidden] {
  display: none;
}
.q-x:focus-visible {
  box-shadow: none !important;
  color: var(--tx2);
}
@media (hover: hover) {
  .q-x:hover {
    color: var(--tx2);
  }
}

/* text fields: thin 1px pink focus border, no ring */
input:focus,
textarea:focus {
  outline: none;
  box-shadow: none !important;
}
.in:focus,
.cu-b textarea:focus {
  border-color: #d98aa8 !important;
}

/* order sheet: Add to Cart row scrolls with the content (not sticky), below the last field */
.cu-b > .cu-ft {
  margin-top: 14px;
  padding: 0;
  border-top: none;
  background: none;
}

/* Keyboard open (class set by useKeyboardViewport): the product popup must fit ABOVE the keyboard.
   --vvh = visualViewport height; 48px = the 24px margin the hook keeps above and below the card.
   Header stays visible, the options scroll, and the Add to Cart row is pinned so it never sinks. */
html.kb-open #m-cust .cu {
  max-height: calc(var(--vvh, 100dvh) - 48px);
}
html.kb-open #m-cust .cu-b > .cu-ft {
  position: sticky;
  bottom: -16px; /* .cu-b has 16px bottom padding: pin flush to the card's bottom edge */
  z-index: 2;
  margin: 10px -15px -16px -20px; /* span the full width of the scroll box incl. its side padding */
  padding: 10px 15px 14px 20px;
  background: #fff;
  border-top: 1px solid var(--line);
}

/* Keranjang: centered dialog on desktop (bottom sheet stays on phones) */
@media (min-width: 768px) {
  #m-cartd {
    align-items: center;
    padding: 24px;
  }
  #m-cartd > .modal.cd {
    border-radius: 22px;
    max-height: min(86vh, 780px);
    max-height: min(86dvh, 780px);
    box-shadow: 0 20px 50px rgba(46, 52, 64, 0.18);
  }
  #m-cartd.open > .cd {
    animation: cdIn 0.22s ease-out;
  }
  #m-cartd.closing > .cd {
    animation: cdOut 0.18s ease forwards;
  }
  #m-cartd .cd-gr {
    display: none;
  }
  #m-cartd .cd-hd {
    padding-top: 16px;
  }
}
@keyframes cdIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}
@keyframes cdOut {
  to {
    opacity: 0;
    transform: scale(0.96);
  }
}
