/* Page-level layout: PLP grid, PDP, homepage. Depends on tokens.css. */

/* ------------------------------------------------------------------ PLP */

/*
 * Columns are percentages that sum to exactly 100%, so there is NO column-gap.
 * Horizontal separation comes from padding inside .pm-card.
 *
 * Adding `column-gap` here makes the row 100% + gap wide and every listing page
 * gets a horizontal scrollbar. Switching to `repeat(4, 1fr)` + gap removes the
 * overflow but makes every card narrower than the reference and the whole grid
 * reads subtly wrong. Leave this as row-gap only.
 */
.pm-grid {
  display: grid;
  grid-template-columns: repeat(2, 50%);
  grid-row-gap: var(--pm-sp-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 600px) {
  .pm-grid {
    grid-template-columns: repeat(3, 33.33333%);
  }
}

@media (min-width: 960px) {
  .pm-grid {
    grid-template-columns: repeat(4, 25%);
  }
}

.pm-grid > li {
  min-width: 0;
}

/* Staggered reveal, 50ms per column. --pm-stagger-i is set per item inline. */
.pm-grid > li {
  animation: pm-rise var(--pm-dur-complex, 375ms) var(--pm-ease-out) both;
  animation-delay: calc(var(--pm-stagger-i, 0) * 50ms);
}

@keyframes pm-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pm-grid > li {
    animation: none;
  }
}

.pm-plp__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--pm-sp-4);
  margin-bottom: var(--pm-sp-5);
}

.pm-plp__count {
  font-size: var(--pm-caption-size);
  color: var(--pm-text-2);
}

/* Filter bar clears the fixed header and stays put while the grid scrolls. */
.pm-filterbar {
  position: sticky;
  top: calc(var(--pm-promobar-h) + var(--pm-header-h-sm));
  background: var(--pm-surface);
  border-bottom: 1px solid var(--pm-hairline);
  z-index: var(--pm-z-sticky);
  display: flex;
  align-items: center;
  gap: var(--pm-sp-3);
  padding: var(--pm-sp-3) 0;
  margin-bottom: var(--pm-sp-5);
  overflow-x: auto;
  transition: top var(--pm-dur-std) linear;
}

@media (min-width: 960px) {
  .pm-filterbar {
    top: var(--pm-filterbar-top);
  }
}

/* Facets are pill-shaped dropdown buttons in the current reference design. */
.pm-filterbar__item {
  font-size: var(--pm-caption-size);
  font-weight: 300;
  white-space: nowrap;
  background: var(--pm-surface);
  border: 1px solid var(--pm-hairline);
  border-radius: var(--pm-r-pill);
  height: 36px;
  padding: 0 var(--pm-sp-4);
  cursor: pointer;
  color: var(--pm-text);
  display: inline-flex;
  align-items: center;
  gap: var(--pm-sp-2);
  transition: border-color var(--pm-dur-micro) var(--pm-ease);
}

.pm-filterbar__item:hover {
  border-color: var(--pm-chip-border);
}

/* Dropdown chevron, drawn not glyphed so it can never fall back to a font. */
.pm-filterbar__item::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--pm-text);
  border-bottom: 1px solid var(--pm-text);
  transform: rotate(45deg) translateY(-2px);
  flex-shrink: 0;
}

.pm-filterbar__label {
  display: inline-flex;
  align-items: center;
  margin-right: var(--pm-sp-2);
  white-space: nowrap;
  color: var(--pm-text);
}

.pm-filterbar__label svg {
  width: 20px;
  height: 20px;
}

/* ------------------------------------------------------------------ PDP */

.pm-pdp {
  display: grid;
  gap: var(--pm-sp-6);
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .pm-pdp {
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: var(--pm-sp-section-sm);
    align-items: start;
  }
}

/* Desktop: stacked scrolling two-column grid. Mobile: a swipeable
 * scroll-snap carousel with the "1 / 6" counter. */
.pm-gallery-wrap {
  position: relative;
}

.pm-gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.pm-gallery::-webkit-scrollbar {
  display: none;
}

.pm-gallery__item {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

/* Dot indicator, tappable, below the photo per the reference. */
.pm-gallery__dots {
  display: flex;
  justify-content: center;
  gap: var(--pm-sp-2);
  padding-block: var(--pm-sp-3);
}

.pm-gallery__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: background-color var(--pm-dur-micro) var(--pm-ease);
}

.pm-gallery__dot.is-active {
  background: var(--pm-brand);
}

@media (min-width: 960px) {
  .pm-gallery {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: var(--pm-sp-1);
    overflow-x: visible;
  }

  .pm-gallery__dots {
    display: none;
  }
}

.pm-gallery__item {
  aspect-ratio: var(--pm-card-ratio);
  overflow: hidden;
  background: var(--pm-surface-2);
  cursor: zoom-in;
}

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

/* Hover magnifier — the transform-origin is steered per-cursor from JS.
 * Hover-capable pointers only, so touch scrolling never sticks mid-zoom. */
@media (hover: hover) {
  .pm-gallery__item img {
    transition: transform var(--pm-dur-std) var(--pm-ease);
  }

  .pm-gallery__item:hover img {
    transform: scale(1.75);
  }
}

/* Fullscreen lightbox: white stage, gradient-scrim arrows at .7 opacity,
 * 44px counter — the reference's viewer anatomy. */
.pm-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--pm-surface);
  /* Above the header overlay layer (50). */
  z-index: 60;
}

.pm-lightbox[data-open="true"] {
  display: flex;
}

.pm-lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  cursor: zoom-out;
}

.pm-lightbox__close {
  position: absolute;
  top: var(--pm-sp-4);
  right: var(--pm-sp-4);
}

.pm-lightbox__close svg {
  width: 28px;
  height: 28px;
}

.pm-lightbox__nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 88px;
  border: 0;
  background: linear-gradient(to right, rgba(238, 239, 233, 0.9), rgba(238, 239, 233, 0));
  opacity: 0.7;
  cursor: pointer;
  color: var(--pm-text);
  transition: opacity var(--pm-dur-micro) var(--pm-ease);
}

.pm-lightbox__nav:hover {
  opacity: 1;
}

.pm-lightbox__nav--prev {
  left: 0;
}

.pm-lightbox__nav--next {
  right: 0;
  background: linear-gradient(to left, rgba(238, 239, 233, 0.9), rgba(238, 239, 233, 0));
}

.pm-lightbox__nav svg {
  width: 32px;
  height: 32px;
}

.pm-lightbox__counter {
  position: absolute;
  bottom: var(--pm-sp-5);
  left: 50%;
  transform: translateX(-50%);
  height: 44px;
  display: inline-flex;
  align-items: center;
  padding-inline: var(--pm-sp-4);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: var(--pm-caption-size);
  border-radius: var(--pm-r-pill);
}

.pm-pdp__summary {
  position: sticky;
  top: calc(var(--pm-promobar-h) + var(--pm-header-h-lg) + var(--pm-sp-5));
}

@media (max-width: 959px) {
  .pm-pdp__summary {
    position: static;
  }
}

.pm-pdp__name {
  font-family: var(--pm-font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 var(--pm-sp-2);
}

.pm-pdp__sku {
  font-size: var(--pm-caption-size);
  color: var(--pm-text-2);
  margin-bottom: var(--pm-sp-4);
}

.pm-pdp__group {
  margin-block: var(--pm-sp-5);
}

.pm-pdp__group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--pm-sp-3);
}

.pm-pdp__group-label {
  font-size: var(--pm-caption-size);
  font-weight: 400;
}

.pm-pdp__group-value {
  font-size: var(--pm-caption-size);
  color: var(--pm-text-2);
}

.pm-sizelink {
  font-size: var(--pm-caption-size);
  color: var(--pm-text-2);
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.pm-pdp__price {
  margin-top: var(--pm-sp-5);
}

/* The static block above already shows the price; Woo's per-variation panel
 * contributes only the availability line. */
.single_variation .woocommerce-variation-price {
  display: none;
}

.single_variation .woocommerce-variation-availability {
  font-size: var(--pm-caption-size);
  color: var(--pm-text-2);
  margin-top: var(--pm-sp-2);
}

.single_variation .woocommerce-variation-availability p {
  margin: 0;
}

/* Stepper on top, then Beli Sekarang, then Tambahkan ke Keranjang — both
 * buttons full width at the same height. Visual order comes from flex
 * `order` so add-to-cart stays the first submit in the DOM (an implicit
 * Enter submission must add to cart, not jump to checkout). */
.pm-pdp__actions {
  margin-top: var(--pm-sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--pm-sp-3);
}

.pm-pdp__actions .pm-qty {
  align-self: flex-start;
  order: 0;
}

.pm-pdp__actions .pm-buy-now {
  order: 1;
}

.pm-pdp__actions .single_add_to_cart_button {
  order: 2;
}

/* ------------------------------------------------------- cart drawer */

.pm-cartdrawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--pm-surface);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform var(--pm-dur-leave) var(--pm-ease);
  z-index: 60;
}

.pm-cartdrawer[data-open="true"] {
  transform: none;
  transition: transform var(--pm-dur-enter) var(--pm-ease);
}

.pm-cartdrawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  border: 0;
  z-index: 59;
}

.pm-cartdrawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--pm-sp-4) var(--pm-sp-5);
  border-bottom: 1px solid var(--pm-hairline);
}

.pm-cartdrawer__title {
  margin: 0;
  font-size: var(--pm-title-size);
  font-weight: 400;
}

.pm-cartdrawer__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: var(--pm-sp-5);
}

.pm-cartdrawer__empty {
  margin: auto;
  text-align: center;
  color: var(--pm-text-2);
}

.pm-cartdrawer__items {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.pm-cartdrawer__item {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--pm-sp-3);
  padding-block: var(--pm-sp-4);
  border-bottom: 1px solid var(--pm-hairline);
}

.pm-cartdrawer__thumb img {
  width: 64px;
  height: 85px;
  object-fit: cover;
  display: block;
}

.pm-cartdrawer__name {
  display: block;
  padding-right: var(--pm-sp-5);
  font-size: var(--pm-body-size);
  text-decoration: none;
}

.pm-cartdrawer__size {
  display: block;
  margin-top: var(--pm-sp-1);
  font-size: var(--pm-caption-size);
  color: var(--pm-text-2);
}

.pm-cartdrawer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--pm-sp-2);
}

.pm-cartdrawer__qty {
  height: 36px;
}

.pm-cartdrawer__qty .pm-qty__btn {
  width: 32px;
  font-size: 16px;
}

.pm-cartdrawer__qty-val {
  min-width: 24px;
  text-align: center;
  font-size: var(--pm-body-size);
  font-weight: 400;
}

.pm-cartdrawer__price {
  font-family: var(--pm-font-display);
  font-weight: 400;
  letter-spacing: var(--pm-price-tracking);
}

.pm-cartdrawer__remove {
  position: absolute;
  top: var(--pm-sp-4);
  right: 0;
  border: 0;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: var(--pm-text-2);
  cursor: pointer;
}

.pm-cartdrawer__remove:hover {
  color: var(--pm-red);
}

.pm-cartdrawer__footer {
  padding-top: var(--pm-sp-4);
  border-top: 1px solid var(--pm-hairline);
}

.pm-cartdrawer__subtotal {
  display: flex;
  justify-content: space-between;
  font-weight: 400;
  letter-spacing: var(--pm-price-tracking);
}

.pm-cartdrawer__note {
  margin: var(--pm-sp-1) 0 var(--pm-sp-4);
  font-size: var(--pm-caption-size);
  color: var(--pm-text-2);
}

.pm-cartdrawer__footer .pm-btn--secondary {
  margin-top: var(--pm-sp-2);
}

/* Size-chart modal. Same panel machinery as the drawer/search overlays. */
.pm-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  padding: var(--pm-sp-4);
  z-index: var(--pm-z-header-overlay);
}

.pm-modal[data-open="true"] {
  display: flex;
}

.pm-modal__panel {
  width: min(720px, 100%);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--pm-surface);
}

.pm-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--pm-sp-4) var(--pm-sp-5);
  border-bottom: 1px solid var(--pm-hairline);
}

.pm-modal__title {
  margin: 0;
  font-size: var(--pm-title-size);
  font-weight: 400;
}

.pm-modal__scroll {
  overflow: auto;
  padding: var(--pm-sp-5);
}

.pm-sizechart {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: var(--pm-body-size);
}

.pm-sizechart th {
  background: var(--pm-surface-2);
  padding: var(--pm-sp-3);
  font-weight: 700;
}

.pm-sizechart th span {
  display: block;
  font-weight: 300;
  font-size: var(--pm-caption-size);
  color: var(--pm-text-2);
}

.pm-sizechart td {
  padding: var(--pm-sp-3);
  border-bottom: 1px solid var(--pm-hairline);
  font-weight: 300;
}

.pm-sizechart tbody tr:nth-child(even) td {
  background: var(--pm-surface-4);
}

.pm-accordion {
  border-top: 1px solid var(--pm-hairline);
  margin-top: var(--pm-sp-6);
}

.pm-accordion__item {
  border-bottom: 1px solid var(--pm-hairline);
}

.pm-accordion__summary {
  padding: var(--pm-sp-4) 0;
  cursor: pointer;
  font-size: var(--pm-body-size);
  font-weight: 400;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pm-accordion__summary::-webkit-details-marker {
  display: none;
}

.pm-accordion__summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 300;
}

.pm-accordion__item[open] .pm-accordion__summary::after {
  content: "\2013";
}

.pm-accordion__body {
  padding-bottom: var(--pm-sp-4);
  font-weight: 300;
  color: var(--pm-text);
}

/* ------------------------------------------------------------- homepage */

.pm-hero {
  position: relative;
  aspect-ratio: 5 / 2;
  min-height: 320px;
  overflow: hidden;
  background: var(--pm-surface-2);
}

@media (max-width: 599px) {
  .pm-hero {
    aspect-ratio: 4 / 3;
    /* min-height + aspect-ratio transfers the width: 320px tall at 4:3
     * forces a 427px-wide hero on a 390px phone and the whole page
     * side-scrolls. Height comes from the ratio alone down here. */
    min-height: 0;
  }
}

.pm-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pm-hero__content {
  position: relative;
  height: 100%;
  max-width: var(--pm-content-max);
  margin-inline: auto;
  padding: var(--pm-sp-6) var(--pm-grid-margin-md);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  z-index: 2;
}

/* ---- banner slideshow ----
 * The studio shots are bright, so the copy flips to dark text; slides
 * crossfade under the static content layer.
 */
.pm-hero--slider {
  background: #f5f5f3;
}

.pm-hero__slides {
  position: absolute;
  inset: 0;
}

.pm-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 600ms var(--pm-ease);
}

.pm-hero__slide.is-active {
  opacity: 1;
}

/* Full image, no crop. The blurred cover copy behind it fills the stage in
 * the shot's own background colour, and the main image fades out at its
 * vertical edges so the border never reads as a hard seam.
 *
 * The img element is sized to the photo (height 100%, width auto) instead of
 * object-fit:contain on a full-width box — a mask measures the element box,
 * so this is what puts the fade exactly on the photo's edges. Both rules
 * out-specify the legacy `.pm-hero img` cover rule. */
.pm-hero__slide {
  display: flex;
  justify-content: center;
}

.pm-hero .pm-hero__slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(28px);
  transform: scale(1.12);
}

.pm-hero .pm-hero__slide-img {
  position: relative;
  height: 100%;
  width: auto;
  max-width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
}

.pm-hero--slider .pm-hero__content {
  color: var(--pm-text);
}

.pm-hero--slider .pm-hero__sub {
  color: var(--pm-text-2);
}

.pm-hero__dots {
  position: absolute;
  bottom: var(--pm-sp-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--pm-sp-2);
  z-index: 3;
}

.pm-hero__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: background-color var(--pm-dur-micro) var(--pm-ease);
}

.pm-hero__dot.is-active {
  background: var(--pm-brand);
}

@media (min-width: 960px) {
  .pm-hero__content {
    padding-inline: var(--pm-grid-margin-lg);
  }
}

.pm-hero__title {
  font-family: var(--pm-font-display);
  font-size: 36px;
  font-weight: 300;
  line-height: 1.3;
  margin: 0 0 var(--pm-sp-3);
}

@media (min-width: 600px) {
  .pm-hero__title {
    font-size: 40px;
  }
}

@media (min-width: 960px) {
  .pm-hero__title {
    font-size: 44px;
  }
}

.pm-hero__sub {
  font-size: 17px;
  font-weight: 300;
  margin: 0 0 var(--pm-sp-5);
  max-width: 46ch;
}

.pm-hero__credit {
  position: absolute;
  right: var(--pm-sp-3);
  bottom: var(--pm-sp-2);
  font-size: 8px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  opacity: 0.8;
}

.pm-promo {
  display: grid;
  grid-template-columns: repeat(2, 50%);
  grid-row-gap: var(--pm-sp-5);
}

@media (min-width: 600px) {
  .pm-promo {
    grid-template-columns: repeat(3, 33.33333%);
  }
}

@media (min-width: 960px) {
  .pm-promo {
    grid-template-columns: repeat(4, 25%);
  }
}

.pm-promo__cell {
  padding-inline: var(--pm-sp-3);
}

.pm-promo__media {
  aspect-ratio: var(--pm-card-ratio);
  overflow: hidden;
  background: var(--pm-surface-2);
}

.pm-promo__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--pm-dur-std) var(--pm-ease);
}

.pm-promo__cell:hover .pm-promo__media img {
  transform: scale(1.03);
}

.pm-promo__label {
  font-size: var(--pm-body-size);
  font-weight: 300;
  margin-top: var(--pm-sp-3);
  text-decoration: none;
  color: var(--pm-text);
  display: block;
}

/* --------------------------------------------------------------- footer */

.pm-footer {
  background: var(--pm-star);
  border-top: 1px solid var(--pm-hairline);
  margin-top: var(--pm-sp-section-lg);
  padding-block: var(--pm-sp-6);
}

.pm-footer__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--pm-sp-5);
}

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

.pm-footer__heading {
  font-size: var(--pm-caption-size);
  font-weight: 400;
  margin: 0 0 var(--pm-sp-3);
  padding-bottom: var(--pm-sp-2);
  border-bottom: 1px solid var(--pm-hairline);
}

.pm-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--pm-sp-2);
}

.pm-footer__list a {
  font-size: var(--pm-caption-size);
  font-weight: 300;
  color: var(--pm-text-2);
  text-decoration: none;
}

.pm-footer__list a:hover {
  color: var(--pm-text);
  text-decoration: underline;
}

.pm-footer__legal {
  margin-top: var(--pm-sp-6);
  padding-top: var(--pm-sp-4);
  border-top: 1px solid var(--pm-hairline);
  font-size: 11px;
  color: var(--pm-text-2);
}

/* ------------------------------------------------- static page shell */

.pm-page {
  padding-top: var(--pm-sp-6);
  padding-bottom: var(--pm-sp-section-lg);
}

.pm-page__title {
  margin-bottom: var(--pm-sp-5);
}

/* ----------------------------------------------------------- notices */

/* Woo's stock notice markup, styled rather than template-overridden.
 * Red only on errors — it is the transactional/error colour. */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
  list-style: none;
  margin: 0 0 var(--pm-sp-5);
  padding: var(--pm-sp-3) var(--pm-sp-4);
  border: 1px solid var(--pm-hairline);
  font-size: var(--pm-body-size);
}

.woocommerce-error {
  border-color: var(--pm-red);
  color: var(--pm-red);
}

.woocommerce-error li + li {
  margin-top: var(--pm-sp-2);
}

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
  float: right;
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* -------------------------------------------------------------- cart */

.pm-cart {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--pm-sp-6);
}

@media (min-width: 960px) {
  .pm-cart {
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: start;
  }
}

/* Fixed layout: column widths come from the header cells below. Auto layout
 * starves the thumbnail column because a max-width:100% image contributes
 * zero min-content width. */
.pm-cart__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.pm-cart__table thead .product-price {
  width: 110px;
}

.pm-cart__table thead .product-quantity {
  width: 96px;
}

.pm-cart__table thead .product-subtotal {
  width: 110px;
}

.pm-cart__table thead th {
  padding: 0 0 var(--pm-sp-3);
  border-bottom: 1px solid var(--pm-hairline);
  font-size: var(--pm-caption-size);
  font-weight: 400;
  color: var(--pm-text-2);
  text-align: left;
}

.pm-cart__table td {
  padding: var(--pm-sp-4) var(--pm-sp-3) var(--pm-sp-4) 0;
  border-bottom: 1px solid var(--pm-hairline);
  vertical-align: top;
}

.pm-cart__table .product-remove {
  width: 32px;
}

.pm-cart__table .product-thumbnail {
  width: 112px;
}

.pm-cart__table .product-thumbnail img {
  display: block;
  width: 96px;
  height: 128px;
  object-fit: cover;
}

.pm-cart__remove {
  font-size: 20px;
  line-height: 1;
  color: var(--pm-text-2);
  text-decoration: none;
}

.pm-cart__remove:hover {
  color: var(--pm-red);
}

.pm-cart__table .product-name a {
  text-decoration: none;
}

.pm-cart__table .product-name a:hover {
  text-decoration: underline;
}

/* Variation meta (wash / waist / inseam) under the item name. */
.pm-cart__table .variation {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0 var(--pm-sp-2);
  margin: var(--pm-sp-2) 0 0;
  font-size: var(--pm-caption-size);
  color: var(--pm-text-2);
}

.pm-cart__table .variation dt,
.pm-cart__table .variation dd {
  margin: 0;
  font-weight: 300;
}

/* The stepper is compact inside the cart table. */
.pm-cart__table .pm-qty {
  height: 36px;
}

.pm-cart__table .pm-qty__btn {
  width: 32px;
  font-size: 16px;
}

.pm-cart__table .pm-qty .qty {
  width: 32px;
}

.pm-cart__table .product-subtotal {
  letter-spacing: var(--pm-price-tracking);
}

.pm-cart__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pm-sp-3);
  border-bottom: 0 !important;
}

.pm-cart__actions .pm-btn {
  height: 40px;
  font-size: 14px;
}

.pm-cart__coupon {
  display: flex;
  align-items: center;
  gap: var(--pm-sp-2);
}

.pm-cart__coupon input {
  height: 40px;
  border: 1px solid var(--pm-chip-border);
  padding-inline: var(--pm-sp-3);
  font-size: 14px;
  font-weight: 300;
}

/* Mobile cart: the fixed-column table cannot fit 390px — it becomes a
 * stacked card list. Thumbnail left, details right, price column dropped
 * (the subtotal says it), actions wrap full-width. */
@media (max-width: 759px) {
  .pm-cart__table,
  .pm-cart__table tbody {
    display: block;
    width: 100%;
  }

  .pm-cart__table thead {
    display: none;
  }

  .pm-cart__table tr.pm-cart__row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: var(--pm-sp-2) var(--pm-sp-3);
    position: relative;
    padding-block: var(--pm-sp-4);
    border-bottom: 1px solid var(--pm-hairline);
  }

  .pm-cart__table tr.pm-cart__row td {
    display: block;
    padding: 0;
    border: 0;
  }

  .pm-cart__table .product-thumbnail {
    grid-column: 1;
    grid-row: 1 / span 3;
  }

  .pm-cart__table .product-name {
    grid-column: 2;
    padding-right: var(--pm-sp-6);
  }

  /* Must out-specify the td display:block reset above. */
  .pm-cart__table tr.pm-cart__row td.product-price {
    display: none;
  }

  .pm-cart__table .product-quantity,
  .pm-cart__table .product-subtotal {
    grid-column: 2;
  }

  .pm-cart__table .product-subtotal {
    font-weight: 400;
  }

  .pm-cart__table .product-remove {
    position: absolute;
    top: var(--pm-sp-4);
    right: 0;
    width: auto;
  }

  .pm-cart__table tr:has(.pm-cart__actions) {
    display: block;
  }

  .pm-cart__actions {
    display: flex;
    flex-wrap: wrap;
    padding-top: var(--pm-sp-4);
  }

  .pm-cart__coupon {
    flex: 1 1 100%;
  }

  .pm-cart__coupon input {
    flex: 1;
  }

  .pm-cart__actions > .pm-btn {
    flex: 1 1 100%;
  }
}

/* Totals box. Sticky so the checkout button stays reachable on long carts. */
.pm-cart__aside .cart_totals {
  position: sticky;
  top: calc(var(--pm-header-h-lg) + var(--pm-sp-3));
  border: 1px solid var(--pm-hairline);
  padding: var(--pm-sp-5);
}

.cart_totals h2 {
  margin: 0 0 var(--pm-sp-4);
  font-size: var(--pm-title-size);
  font-weight: 400;
}

.cart_totals table {
  width: 100%;
  border-collapse: collapse;
}

.cart_totals th,
.cart_totals td {
  padding: var(--pm-sp-2) 0;
  font-weight: 300;
  text-align: left;
}

.cart_totals td {
  text-align: right;
}

.cart_totals .order-total th,
.cart_totals .order-total td {
  padding-top: var(--pm-sp-4);
  border-top: 1px solid var(--pm-hairline);
  font-weight: 400;
}

.cart_totals .order-total td {
  font-size: 17px;
  letter-spacing: var(--pm-price-tracking);
}

.wc-proceed-to-checkout {
  margin-top: var(--pm-sp-5);
}

/* Primary commit action — near-black rounded, per the current reference. */
.wc-proceed-to-checkout .checkout-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  background: var(--pm-cta);
  color: #fff;
  border-radius: var(--pm-r-chip);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color var(--pm-dur-micro) var(--pm-ease);
}

.wc-proceed-to-checkout .checkout-button:hover {
  background: var(--pm-cta-hover);
}

/* Empty state — rendered by cart-empty.php outside the .pm-cart grid. */
.pm-page .cart-empty {
  border: 0;
  padding: var(--pm-sp-section-sm) 0 var(--pm-sp-4);
  text-align: center;
  font-size: var(--pm-title-size);
}

.pm-cart__empty-return {
  padding-bottom: var(--pm-sp-section-sm);
  text-align: center;
}

/* ---------------------------------------------------------- checkout */

/* Distraction-free checkout shell: slim static bar, back left, logo centre. */
.pm-checkout-bar {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  padding: var(--pm-sp-3) var(--pm-sp-4);
  border-bottom: 1px solid var(--pm-hairline);
  background: var(--pm-surface);
}

.pm-checkout-bar__back {
  justify-self: start;
  display: inline-flex;
  color: var(--pm-text);
  padding: var(--pm-sp-2);
}

.pm-checkout-bar__back svg {
  width: 24px;
  height: 24px;
}

.pm-checkout-bar__logo {
  justify-self: center;
  display: inline-flex;
  color: var(--pm-brand);
}

.pm-checkout-bar__logo svg {
  height: 26px;
  width: auto;
}

/* The bar is static — no fixed header to clear. */
.pm-body--checkout .pm-main--checkout {
  padding-top: 0;
}

.pm-page--checkout {
  padding-top: var(--pm-sp-6);
}

/* Single narrow column, the owner's spec: fields first, order summary and
 * payment right below. */
.pm-checkout {
  display: block;
  max-width: 640px;
  margin-inline: auto;
}

.pm-checkout__summary {
  margin-top: var(--pm-sp-6);
}

/* City / provinsi / kode pos are autocomplete-filled, never shown. */
.pm-hidden-field {
  display: none !important;
}

/* Notes flow as the fifth address field — no separate section heading. */
.woocommerce-additional-fields h3 {
  display: none;
}

/* Product photo per review line. */
.pm-review-item {
  display: flex;
  align-items: center;
  gap: var(--pm-sp-3);
}

.pm-review-thumb {
  width: 48px;
  height: 64px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Voucher inside "Pesanan Anda". */
.pm-voucher {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--pm-sp-2);
  margin-block: var(--pm-sp-4);
  padding-top: var(--pm-sp-4);
  border-top: 1px solid var(--pm-hairline);
}

.pm-voucher input {
  height: 44px;
  border: 1px solid var(--pm-chip-border);
  padding-inline: var(--pm-sp-3);
  font-size: var(--pm-body-size);
  font-weight: 300;
  border-radius: var(--pm-r-chip);
}

.pm-voucher .pm-btn {
  height: 44px;
  font-size: 14px;
}

.pm-voucher__msg {
  grid-column: 1 / -1;
  margin: 0;
  font-size: var(--pm-caption-size);
  color: var(--pm-red);
}

.pm-voucher__msg--ok {
  color: var(--pm-success);
}

/* Area autocomplete dropdown under the kecamatan field. */
.pm-checkout .form-row {
  position: relative;
}

.pm-arealist {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--pm-surface);
  border: 1px solid var(--pm-chip-border);
  border-top: 0;
  max-height: 260px;
  overflow-y: auto;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.pm-arealist li {
  padding: var(--pm-sp-3);
  font-size: var(--pm-caption-size);
  cursor: pointer;
}

.pm-arealist li:hover {
  background: var(--pm-surface-2);
}

.pm-checkout .col2-set .col-1,
.pm-checkout .col2-set .col-2 {
  width: 100%;
}

.pm-checkout .col2-set .col-2 {
  margin-top: var(--pm-sp-6);
}

/* Column headings sit outside the uppercase budget deliberately. */
.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
.woocommerce-additional-fields h3 {
  margin: 0 0 var(--pm-sp-4);
  font-size: var(--pm-title-size);
  font-weight: 400;
}

.pm-checkout .form-row {
  margin: 0 0 var(--pm-sp-4);
}

.pm-checkout .form-row label {
  display: block;
  margin-bottom: var(--pm-sp-1);
  font-size: var(--pm-caption-size);
  color: var(--pm-text-2);
}

.pm-checkout .form-row .required {
  color: var(--pm-red);
  text-decoration: none;
}

.pm-checkout .input-text,
.pm-checkout select,
.pm-checkout textarea {
  width: 100%;
  height: 44px;
  border: 1px solid var(--pm-chip-border);
  background: var(--pm-surface);
  padding-inline: var(--pm-sp-3);
  font-size: var(--pm-body-size);
  font-weight: 300;
  font-family: var(--pm-font-body);
}

.pm-checkout textarea {
  height: auto;
  min-height: 96px;
  padding-block: var(--pm-sp-2);
}

/* Woo swaps country/state selects for select2 — square it off to match. */
.pm-checkout .select2-container--default .select2-selection--single {
  height: 44px;
  border: 1px solid var(--pm-chip-border);
  border-radius: var(--pm-r-0);
}

.pm-checkout .select2-container--default .select2-selection__rendered {
  line-height: 42px;
  padding-left: var(--pm-sp-3);
}

.pm-checkout .select2-container--default .select2-selection__arrow {
  height: 42px;
}

/* Two-up name row, classic Woo float layout. */
.pm-checkout .form-row-first,
.pm-checkout .form-row-last {
  float: left;
  width: calc(50% - var(--pm-sp-2));
}

.pm-checkout .form-row-last {
  float: right;
}

.pm-checkout .form-row-wide {
  clear: both;
}

/* Order summary column. */
.pm-checkout__summary {
  border: 1px solid var(--pm-hairline);
  padding: var(--pm-sp-5);
}

.pm-checkout__summary .pm-section-title {
  margin: 0 0 var(--pm-sp-4);
}

.woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: collapse;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
  padding: var(--pm-sp-2) 0;
  font-weight: 300;
  text-align: left;
  vertical-align: top;
}

.woocommerce-checkout-review-order-table td:last-child,
.woocommerce-checkout-review-order-table .product-total {
  text-align: right;
}

.woocommerce-checkout-review-order-table thead th {
  padding-bottom: var(--pm-sp-3);
  border-bottom: 1px solid var(--pm-hairline);
  font-size: var(--pm-caption-size);
  font-weight: 400;
  color: var(--pm-text-2);
}

.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
  padding-top: var(--pm-sp-4);
  border-top: 1px solid var(--pm-hairline);
  font-weight: 400;
}

.woocommerce-checkout-review-order-table .order-total td {
  font-size: 17px;
  letter-spacing: var(--pm-price-tracking);
}

/* Payment methods. */
#payment {
  margin-top: var(--pm-sp-5);
  background: none;
}

#payment .wc_payment_methods {
  list-style: none;
  margin: 0 0 var(--pm-sp-4);
  padding: 0;
}

#payment .wc_payment_method {
  padding: var(--pm-sp-3) 0;
  border-bottom: 1px solid var(--pm-hairline);
}

#payment .wc_payment_method label {
  font-size: var(--pm-body-size);
  font-weight: 300;
  cursor: pointer;
}

#payment .payment_box {
  margin-top: var(--pm-sp-2);
  font-size: var(--pm-caption-size);
  color: var(--pm-text-2);
}

#payment #place_order {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  border: 0;
  background: var(--pm-cta);
  color: #fff;
  border-radius: var(--pm-r-chip);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--pm-dur-micro) var(--pm-ease);
}

#payment #place_order:hover {
  background: var(--pm-cta-hover);
}

#payment #place_order:disabled {
  background: var(--pm-hairline);
  cursor: not-allowed;
}

/* The blockUI overlay Woo throws over the summary while recalculating. */
.pm-checkout .blockUI.blockOverlay {
  background: var(--pm-surface) !important;
  opacity: 0.6 !important;
}
