/* SupBro commerce layer.
   Isolated from the legacy editorial stylesheet so later checkout and 3D media
   can be connected without rewriting the product catalogue. */

.commerce-modal-open {
  overflow: hidden;
}

.commerce-dialog-backdrop {
  position: fixed;
  inset: 0;
  /* PayPal Web SDK presents its checkout layer at 1000. Keep the cart below it. */
  z-index: 800;
  background: rgba(4, 2, 8, 0.78);
}

.commerce-dialog-backdrop[hidden] {
  display: none;
}

.commerce-cart.is-paypal-compatible-dialog {
  z-index: 801;
}

.commerce-cart-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid rgba(228, 190, 255, 0.34);
  border-radius: 999px;
  padding: 7px 8px 7px 12px;
  background: rgba(25, 10, 44, 0.88);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.commerce-cart-trigger:hover,
.commerce-cart-trigger:focus-visible {
  border-color: rgba(244, 255, 47, 0.78);
  background: rgba(51, 20, 86, 0.96);
  outline: none;
  transform: translateY(-1px);
}

.commerce-cart-icon {
  position: relative;
  width: 14px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.commerce-cart-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -6px;
  width: 7px;
  height: 6px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  transform: translateX(-50%);
}

.commerce-cart-trigger strong {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
}

.commerce-cart-trigger strong.has-items {
  background: var(--accent);
  color: #13071f;
}

.products-care {
  padding-bottom: clamp(56px, 6vw, 82px) !important;
}

.products-storage {
  padding-top: clamp(56px, 6vw, 82px) !important;
  border-top: 1px solid rgba(246, 230, 255, 0.08);
  background:
    radial-gradient(circle at 84% 14%, rgba(154, 78, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(18, 5, 31, 0.16), rgba(8, 3, 14, 0.22));
}

.commerce-category-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.commerce-category-nav::-webkit-scrollbar {
  display: none;
}

.commerce-category-nav a {
  flex: 0 0 auto;
  border: 1px solid rgba(230, 203, 255, 0.18);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(25, 10, 43, 0.68);
  color: rgba(226, 216, 237, 0.74);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.02em;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.commerce-category-nav a:hover,
.commerce-category-nav a:focus-visible,
.commerce-category-nav a.is-current {
  border-color: rgba(244, 255, 47, 0.68);
  background: rgba(244, 255, 47, 0.09);
  color: var(--accent);
  outline: none;
}

.commerce-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.commerce-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 480px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 192, 255, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(61, 24, 99, 0.72), rgba(22, 8, 40, 0.92)),
    rgba(29, 11, 51, 0.88);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
  contain: layout paint;
}

.commerce-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 74% 12%, rgba(194, 99, 255, 0.18), transparent 30%),
    linear-gradient(120deg, transparent 52%, rgba(255, 255, 255, 0.035), transparent 68%);
}

.commerce-card-media {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 10;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid rgba(232, 211, 255, 0.12);
  padding: 18px;
  background:
    radial-gradient(circle at 50% 42%, rgba(166, 96, 255, 0.3), transparent 46%),
    linear-gradient(145deg, rgba(115, 52, 202, 0.24), rgba(8, 4, 16, 0.2));
  color: #fff;
  cursor: pointer;
}

.commerce-card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(13, 5, 25, 0.36));
}

.commerce-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(1.05) brightness(1.08) contrast(1.03);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 200ms ease;
}

.commerce-card-media > span {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(13, 6, 22, 0.72);
  color: rgba(255, 255, 255, 0.84);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}

.commerce-card-media > span i {
  color: var(--accent);
  font-style: normal;
}

.commerce-card-media:hover img,
.commerce-card-media:focus-visible img {
  transform: scale(1.035);
  filter: saturate(1.12) brightness(1.13) contrast(1.04);
}

.commerce-card-media:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.commerce-card-copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 250px;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 20px;
}

.commerce-product-tag {
  width: fit-content;
  color: var(--accent);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.commerce-card h3 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: clamp(1.55rem, 2.1vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.commerce-card-copy > p {
  min-height: 2.8em;
  margin: 0;
  color: rgba(222, 212, 233, 0.68);
  font-size: 14px;
  line-height: 1.5;
}

.commerce-card-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 16px;
  border-top: 1px solid rgba(232, 211, 255, 0.11);
  padding-top: 13px;
  color: rgba(211, 199, 225, 0.62);
  font-size: 12px;
}

.commerce-card-status strong {
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 720;
}

.commerce-card-actions {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 10px;
  margin-top: auto;
}

.commerce-primary-action,
.commerce-secondary-action {
  min-height: 42px;
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 820;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.commerce-primary-action {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #13071f;
}

.commerce-primary-action:hover:not(:disabled),
.commerce-primary-action:focus-visible:not(:disabled) {
  background: #fff;
  border-color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.commerce-primary-action.is-confirmed {
  background: #fff;
  border-color: #fff;
}

.commerce-secondary-action {
  border: 1px solid rgba(232, 211, 255, 0.2);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.86);
}

.commerce-secondary-action:hover:not(:disabled),
.commerce-secondary-action:focus-visible:not(:disabled) {
  border-color: rgba(212, 156, 255, 0.74);
  background: rgba(158, 78, 255, 0.14);
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.commerce-primary-action:disabled,
.commerce-secondary-action:disabled {
  opacity: 0.42;
  cursor: default;
}

.commerce-storage-showcase {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(225, 190, 255, 0.2);
  border-radius: 26px;
  padding: clamp(22px, 4vw, 48px);
  background:
    radial-gradient(circle at 18% 48%, rgba(172, 86, 255, 0.28), transparent 36%),
    linear-gradient(135deg, rgba(57, 21, 96, 0.84), rgba(12, 5, 22, 0.94));
}

.commerce-storage-showcase figure {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(120, 54, 209, 0.18);
}

.commerce-storage-showcase img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(1.12) saturate(1.08);
}

.commerce-storage-showcase > div {
  display: grid;
  gap: 18px;
}

.commerce-storage-showcase span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.13em;
}

.commerce-storage-showcase strong {
  max-width: 15ch;
  color: #fff;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.commerce-storage-showcase p {
  max-width: 38rem;
  margin: 0;
  color: rgba(224, 214, 235, 0.72);
  font-size: 15px;
  line-height: 1.7;
}

.commerce-noscript {
  border: 1px solid rgba(244, 255, 47, 0.26);
  padding: 18px;
  color: var(--accent);
}

.commerce-dialog {
  position: fixed;
  inset: 0;
  width: min(1120px, calc(100vw - 36px));
  max-width: none;
  max-height: min(820px, calc(100dvh - 36px));
  overflow: visible;
  border: 1px solid rgba(228, 190, 255, 0.28);
  border-radius: 24px;
  padding: 0;
  background: #140822;
  color: #fff;
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.62), 0 0 62px rgba(141, 77, 255, 0.24);
}

.commerce-dialog::backdrop {
  background: rgba(4, 2, 8, 0.78);
}

.commerce-dialog-close-form {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 8;
  margin: 0;
}

.commerce-dialog-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 7, 24, 0.82);
  color: #fff;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.commerce-dialog-close:hover,
.commerce-dialog-close:focus-visible {
  border-color: var(--accent);
  background: rgba(244, 255, 47, 0.12);
  color: var(--accent);
  outline: none;
  transform: rotate(4deg);
}

.commerce-product-view {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  min-height: min(700px, calc(100dvh - 40px));
  overflow: hidden;
  border-radius: inherit;
}

.commerce-product-media {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
  overflow: hidden;
  padding: clamp(30px, 5vw, 70px);
  background:
    radial-gradient(circle at 48% 40%, rgba(180, 93, 255, 0.36), transparent 43%),
    linear-gradient(145deg, rgba(80, 31, 136, 0.78), rgba(13, 6, 23, 0.96));
}

.commerce-product-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 620px;
  object-fit: contain;
  filter: brightness(1.12) saturate(1.08) drop-shadow(0 34px 44px rgba(0, 0, 0, 0.28));
}

.commerce-product-media > span {
  position: absolute;
  left: 20px;
  bottom: 18px;
  border: 1px solid rgba(244, 255, 47, 0.34);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(12, 5, 20, 0.7);
  color: var(--accent);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.1em;
}

.commerce-product-detail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px, 5vw, 72px);
  background:
    radial-gradient(circle at 100% 0, rgba(165, 79, 255, 0.15), transparent 36%),
    #130821;
}

.commerce-product-detail h2 {
  margin: 14px 0 18px;
  color: #fff;
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.commerce-product-detail > p {
  margin: 0;
  color: rgba(226, 216, 237, 0.72);
  font-size: 15px;
  line-height: 1.76;
}

.commerce-product-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 30px 0 18px;
  border-top: 1px solid rgba(232, 211, 255, 0.14);
  border-bottom: 1px solid rgba(232, 211, 255, 0.14);
  padding: 16px 0;
  color: rgba(210, 198, 224, 0.66);
  font-size: 13px;
}

.commerce-product-status strong {
  color: #fff;
}

.commerce-product-detail .commerce-product-future {
  margin-bottom: 26px;
  color: rgba(197, 181, 215, 0.58);
  font-size: 12px;
}

.commerce-product-detail > .commerce-primary-action {
  width: 100%;
  min-height: 50px;
  margin-top: auto;
}

.commerce-cart {
  inset: 0 0 0 auto;
  width: min(520px, calc(100vw - 16px));
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  border-width: 0 0 0 1px;
  border-radius: 24px 0 0 24px;
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1), display 240ms allow-discrete, overlay 240ms allow-discrete;
}

.commerce-cart[open] {
  transform: translateX(0);
}

@starting-style {
  .commerce-cart[open] {
    transform: translateX(100%);
  }
}

.commerce-cart-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.commerce-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(231, 210, 255, 0.12);
  padding: 20px 22px;
  background: rgba(39, 15, 67, 0.72);
}

.commerce-cart-head span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.13em;
}

.commerce-cart-head h2 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1;
}

.commerce-cart-items {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(198, 145, 255, 0.52) transparent;
}

.commerce-cart-line {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  grid-template-areas:
    "image copy quantity"
    "image copy remove";
  gap: 8px 14px;
  align-items: center;
  border-bottom: 1px solid rgba(232, 211, 255, 0.11);
  padding: 16px 0;
}

.commerce-cart-thumb {
  grid-area: image;
  width: 82px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(224, 190, 255, 0.16);
  border-radius: 12px;
  padding: 5px;
  background: rgba(111, 49, 188, 0.18);
  cursor: pointer;
}

.commerce-cart-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(1.08);
}

.commerce-cart-line > div:nth-of-type(1) {
  grid-area: copy;
  min-width: 0;
}

.commerce-cart-line span {
  color: var(--accent);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.08em;
}

.commerce-cart-line h3 {
  margin: 5px 0 6px;
  color: #fff;
  font-size: 17px;
  line-height: 1.12;
}

.commerce-cart-line small {
  color: rgba(211, 198, 224, 0.6);
  font-size: 11px;
}

.commerce-quantity {
  grid-area: quantity;
  display: grid;
  grid-template-columns: 28px 30px 28px;
  align-items: center;
  border: 1px solid rgba(229, 205, 255, 0.16);
  border-radius: 999px;
  padding: 2px;
}

.commerce-quantity button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.commerce-quantity button:hover,
.commerce-quantity button:focus-visible {
  background: rgba(244, 255, 47, 0.12);
  color: var(--accent);
  outline: none;
}

.commerce-quantity output {
  color: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.commerce-line-remove {
  grid-area: remove;
  justify-self: end;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(211, 198, 224, 0.56);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.commerce-line-remove:hover,
.commerce-line-remove:focus-visible {
  color: #fff;
  outline: none;
  text-decoration: underline;
}

.commerce-cart-empty {
  display: grid;
  min-height: 52vh;
  place-content: center;
  justify-items: center;
  padding: 40px;
  text-align: center;
}

.commerce-cart-empty > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(244, 255, 47, 0.34);
  border-radius: 999px;
  color: var(--accent);
  font-size: 28px;
}

.commerce-cart-empty strong {
  margin-top: 18px;
  font-size: 22px;
}

.commerce-cart-empty p {
  max-width: 28ch;
  margin: 8px 0 0;
  color: rgba(214, 202, 228, 0.62);
  font-size: 13px;
  line-height: 1.6;
}

.commerce-cart-footer {
  border-top: 1px solid rgba(231, 210, 255, 0.12);
  padding: 18px 20px 22px;
  background: rgba(31, 12, 53, 0.94);
}

.commerce-cart-footer > p {
  margin: 0 0 14px;
  color: rgba(211, 199, 225, 0.64);
  font-size: 11px;
  line-height: 1.55;
}

.commerce-cart-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
}

.commerce-cart-clear {
  display: block;
  margin: 12px auto 0;
  border: 0;
  background: transparent;
  color: rgba(210, 198, 224, 0.54);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.commerce-cart-clear:hover:not(:disabled),
.commerce-cart-clear:focus-visible:not(:disabled) {
  color: #fff;
  outline: none;
  text-decoration: underline;
}

.commerce-cart-clear:disabled {
  opacity: 0.35;
  cursor: default;
}

.commerce-live {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 220;
  max-width: min(360px, calc(100vw - 44px));
  border: 1px solid rgba(244, 255, 47, 0.36);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(18, 7, 30, 0.92);
  color: #fff;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.commerce-live:not(:empty) {
  animation: commerce-toast 2.2s both;
}

@keyframes commerce-toast {
  0%,
  100% {
    opacity: 0;
    transform: translateY(8px);
  }
  12%,
  82% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .commerce-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .commerce-product-view {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.86fr);
  }
}

@media (max-width: 860px) {
  .commerce-cart-trigger > span:not(.commerce-cart-icon) {
    display: none;
  }

  .commerce-cart-trigger {
    padding-left: 10px;
  }

  .products-care {
    padding-bottom: 48px !important;
  }

  .products-storage {
    padding-top: 48px !important;
  }

  .commerce-product-grid {
    grid-template-columns: 1fr;
  }

  .commerce-card {
    min-height: 0;
  }

  .commerce-card-media {
    aspect-ratio: 4 / 3;
  }

  .commerce-storage-showcase {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .commerce-storage-showcase figure {
    aspect-ratio: 16 / 10;
  }

  .commerce-storage-showcase strong {
    max-width: 16ch;
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .commerce-product-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    overflow: auto;
    border-radius: 18px;
  }

  .commerce-product-view {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .commerce-product-media {
    min-height: 300px;
    aspect-ratio: 4 / 3;
    padding: 30px;
  }

  .commerce-product-detail {
    padding: 28px 22px 24px;
  }

  .commerce-product-detail h2 {
    font-size: clamp(2.2rem, 11vw, 3.2rem);
  }

  .commerce-product-detail > .commerce-primary-action {
    margin-top: 4px;
  }

  .commerce-cart {
    width: min(100vw - 8px, 480px);
    border-radius: 18px 0 0 18px;
  }
}

@media (max-width: 520px) {
  .commerce-category-nav a {
    padding: 9px 13px;
  }

  .commerce-card-copy {
    min-height: 0;
  }

  .commerce-cart-actions {
    grid-template-columns: 1fr;
  }

  .commerce-cart-line {
    grid-template-columns: 68px minmax(0, 1fr);
    grid-template-areas:
      "image copy"
      "quantity remove";
  }

  .commerce-cart-thumb {
    width: 68px;
  }

  .commerce-quantity {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .commerce-card-media img,
  .commerce-primary-action,
  .commerce-secondary-action,
  .commerce-cart-trigger,
  .commerce-dialog-close,
  .commerce-cart {
    transition: none;
  }

  .commerce-live:not(:empty) {
    animation: none;
    opacity: 1;
    transform: none;
  }
}


/* 2026-07-20: full FLEX look view with two-step purchase actions. */
.commerce-product-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: auto;
}

.commerce-product-actions > button {
  min-height: 50px;
}

.commerce-product-dialog.is-flex-product {
  width: min(1380px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
}

.commerce-product-dialog.is-flex-product .commerce-product-view {
  grid-template-columns: minmax(0, 1.34fr) minmax(330px, 0.66fr);
  min-height: min(820px, calc(100dvh - 24px));
}

.commerce-product-dialog.is-flex-product .commerce-product-media {
  min-height: 0;
  padding: clamp(14px, 2vw, 26px);
}

.commerce-product-dialog.is-flex-product .commerce-product-media img {
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 52px);
  object-fit: contain;
  filter: brightness(1.05) saturate(1.04) drop-shadow(0 32px 44px rgba(0, 0, 0, 0.3));
}

@media (max-width: 860px) {
  .commerce-product-dialog.is-flex-product .commerce-product-view {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .commerce-product-dialog.is-flex-product .commerce-product-media {
    min-height: min(62dvh, 580px);
    aspect-ratio: auto;
  }

  .commerce-product-dialog.is-flex-product .commerce-product-media img {
    max-height: min(58dvh, 540px);
  }
}

@media (max-width: 520px) {
  .commerce-product-actions {
    grid-template-columns: 1fr;
  }
}
/* 2026-07-20: destination picker and same-parcel global shipping calculator. */
.commerce-card-copy > .commerce-card-shipping {
  min-height: 0;
  margin: -6px 0 16px;
  border-left: 2px solid rgba(244, 255, 47, 0.72);
  padding-left: 10px;
  color: rgba(244, 255, 47, 0.8);
  font-size: 11px;
  line-height: 1.45;
}

.commerce-product-detail .commerce-product-shipping {
  margin: -4px 0 18px;
  border-left: 3px solid var(--accent);
  padding: 10px 12px;
  background: rgba(244, 255, 47, 0.055);
  color: rgba(244, 255, 47, 0.86);
  font-size: 12px;
  line-height: 1.55;
}

.commerce-cart-shell {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.commerce-shipping {
  max-height: min(39dvh, 430px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid rgba(231, 210, 255, 0.14);
  padding: 18px 20px;
  background:
    radial-gradient(circle at 90% 0, rgba(171, 87, 255, 0.18), transparent 34%),
    rgba(22, 8, 39, 0.96);
  scrollbar-width: thin;
  scrollbar-color: rgba(198, 145, 255, 0.52) transparent;
}

.commerce-shipping > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.commerce-shipping > header span {
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.commerce-shipping > header h3 {
  margin: 5px 0 0;
  color: #fff;
  font-size: 20px;
  line-height: 1.05;
}

.commerce-shipping > header > strong {
  flex: 0 0 auto;
  border: 1px solid rgba(244, 255, 47, 0.36);
  border-radius: 999px;
  padding: 7px 9px;
  color: var(--accent);
  background: rgba(244, 255, 47, 0.06);
  font-size: 9px;
  line-height: 1;
}

.commerce-country-field {
  display: grid;
  gap: 7px;
}

.commerce-country-field > span {
  color: rgba(220, 208, 233, 0.7);
  font-size: 11px;
  font-weight: 720;
}

.commerce-country-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(228, 202, 255, 0.22);
  border-radius: 10px;
  padding: 0 38px 0 12px;
  background: #211134;
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.commerce-country-field select:hover,
.commerce-country-field select:focus-visible {
  border-color: rgba(244, 255, 47, 0.62);
  outline: none;
}

.commerce-shipping-summary {
  margin-top: 14px;
}

.commerce-shipping-empty,
.commerce-shipping-route,
.commerce-shipping-parcel-note,
.commerce-shipping-warning {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
}

.commerce-shipping-empty,
.commerce-shipping-parcel-note {
  color: rgba(214, 201, 229, 0.6);
}

.commerce-shipping-route {
  border-left: 2px solid rgba(228, 190, 255, 0.5);
  padding-left: 9px;
  color: rgba(229, 216, 243, 0.72);
}

.commerce-shipping-route.is-ready {
  border-left-color: var(--accent);
  color: #fff;
}

.commerce-shipping-heading {
  display: block;
  margin: 15px 0 7px;
  color: #fff;
  font-size: 12px;
}

.commerce-shipping-summary ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.commerce-shipping-summary li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: rgba(216, 202, 231, 0.72);
  font-size: 11px;
}

.commerce-shipping-summary li strong {
  color: #fff;
  font-size: 11px;
  text-align: right;
}

.commerce-shipping-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  border-top: 1px solid rgba(232, 211, 255, 0.12);
  padding-top: 11px;
  color: rgba(218, 205, 232, 0.72);
  font-size: 12px;
}

.commerce-shipping-total strong {
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
}

.commerce-shipping-total.is-pending strong {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.commerce-shipping-warning {
  margin-top: 9px;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 189, 92, 0.09);
  color: #ffd39a;
}

.commerce-shipping-parcel-note {
  margin-top: 10px;
}

.commerce-shipping-countries {
  margin-top: 13px;
  border-top: 1px solid rgba(232, 211, 255, 0.1);
  padding-top: 11px;
}

.commerce-shipping-countries summary {
  color: rgba(244, 255, 47, 0.84);
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.commerce-shipping-countries > div {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.commerce-shipping-countries section h4 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 11px;
}

.commerce-shipping-countries section p {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.commerce-shipping-countries section p span {
  border: 1px solid rgba(228, 202, 255, 0.14);
  border-radius: 999px;
  padding: 4px 7px;
  color: rgba(221, 209, 234, 0.68);
  background: rgba(255, 255, 255, 0.025);
  font-size: 9px;
}

.commerce-shipping-compliance {
  margin: 13px 0 0;
  border-top: 1px solid rgba(232, 211, 255, 0.1);
  padding-top: 11px;
  color: rgba(202, 188, 217, 0.52);
  font-size: 9px;
  line-height: 1.55;
}

@media (max-height: 760px) {
  .commerce-shipping {
    max-height: 34dvh;
  }

  .commerce-cart-footer {
    padding-top: 13px;
    padding-bottom: 14px;
  }
}

@media (max-width: 520px) {
  .commerce-shipping {
    max-height: 42dvh;
    padding-inline: 16px;
  }

  .commerce-shipping-summary li {
    display: grid;
    gap: 3px;
  }

  .commerce-shipping-summary li strong {
    text-align: left;
  }
}

/* Unified cart drawer and checkout flow — 2026-07-22 */
.commerce-cart-shell {
  display: block;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.commerce-cart-view,
.commerce-checkout-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  background:
    radial-gradient(circle at 88% 6%, rgba(158, 88, 255, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(17, 8, 29, 0.99), rgba(8, 4, 15, 0.995));
}

.commerce-cart-view[hidden],
.commerce-checkout-view[hidden] {
  display: none !important;
}

.commerce-cart-scroll,
.commerce-checkout-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 255, 47, 0.45) rgba(255, 255, 255, 0.04);
}

.commerce-cart-scroll .commerce-cart-items {
  min-height: auto;
  overflow: visible;
  padding: 12px 20px 6px;
}

.commerce-cart-scroll .commerce-shipping {
  max-height: none;
  overflow: visible;
  border-top: 1px solid rgba(233, 212, 255, 0.12);
}

.commerce-cart-head p {
  margin: 7px 0 0;
  color: rgba(226, 213, 239, 0.62);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.commerce-cart-totals {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  border: 1px solid rgba(230, 205, 255, 0.13);
  border-radius: 14px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.035);
}

.commerce-cart-totals > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.commerce-cart-totals span {
  color: rgba(221, 208, 235, 0.66);
  font-size: 12px;
}

.commerce-cart-totals strong {
  color: #fff;
  font-size: 14px;
}

.commerce-cart-totals .is-grand {
  margin-top: 2px;
  border-top: 1px solid rgba(230, 205, 255, 0.13);
  padding-top: 10px;
}

.commerce-cart-totals .is-grand strong {
  color: var(--accent);
  font-size: 23px;
  line-height: 1;
}

.commerce-checkout-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.commerce-checkout-back {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(230, 205, 255, 0.19);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.commerce-checkout-back:hover,
.commerce-checkout-back:focus-visible {
  border-color: rgba(244, 255, 47, 0.74);
  color: var(--accent);
}

.commerce-checkout-scroll {
  padding: 16px 20px 28px;
}

.commerce-checkout-items {
  display: grid;
  gap: 10px;
}

.commerce-checkout-line {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(230, 205, 255, 0.12);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.commerce-checkout-line img {
  width: 66px;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
}

.commerce-checkout-line h3 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 13px;
  line-height: 1.25;
}

.commerce-checkout-line span,
.commerce-checkout-line small {
  display: block;
  color: rgba(219, 206, 233, 0.62);
  font-size: 10px;
  line-height: 1.45;
}

.commerce-checkout-line > strong {
  color: var(--accent);
  font-size: 14px;
  white-space: nowrap;
}

.commerce-checkout-summary {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  border: 1px solid rgba(244, 255, 47, 0.2);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(244, 255, 47, 0.06), rgba(146, 83, 255, 0.07));
}

.commerce-checkout-summary h3 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 14px;
}

.commerce-checkout-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  color: rgba(221, 208, 235, 0.68);
  font-size: 12px;
}

.commerce-checkout-summary strong {
  color: #fff;
}

.commerce-checkout-summary .is-grand {
  margin-top: 2px;
  border-top: 1px solid rgba(230, 205, 255, 0.14);
  padding-top: 11px;
}

.commerce-checkout-summary .is-grand strong {
  color: var(--accent);
  font-size: 24px;
}

.commerce-checkout-note {
  margin: 15px 2px 0;
  color: rgba(219, 206, 233, 0.6);
  font-size: 11px;
  line-height: 1.65;
}

.commerce-checkout-footer {
  border-top: 1px solid rgba(230, 205, 255, 0.12);
  padding: 16px 20px max(18px, env(safe-area-inset-bottom));
  background: rgba(11, 5, 19, 0.96);
}

.commerce-checkout-footer button {
  width: 100%;
  min-height: 54px;
}

.commerce-product-actions,
.flex-gallery-action-buttons {
  grid-template-columns: 1fr;
}

@media (max-width: 640px) {
  .commerce-cart {
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
  }

  .commerce-cart-head,
  .commerce-checkout-head {
    padding: 16px;
  }

  .commerce-cart-scroll .commerce-cart-items,
  .commerce-checkout-scroll {
    padding-inline: 14px;
  }

  .commerce-cart-scroll .commerce-shipping {
    padding-inline: 14px;
  }

  .commerce-cart-footer,
  .commerce-checkout-footer {
    padding: 13px 14px max(14px, env(safe-area-inset-bottom));
  }

  .commerce-cart-totals {
    gap: 6px;
    margin-bottom: 10px;
    padding: 10px 12px;
  }

  .commerce-cart-totals .is-grand strong {
    font-size: 20px;
  }

  .commerce-checkout-line {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 8px;
  }

  .commerce-checkout-line img {
    width: 56px;
  }
}
