/* Shared interaction layer. Load after style.css and category-showcase.css. */
.storefront {
  --ui-ease: cubic-bezier(.22, 1, .36, 1);
  --ui-ring: #1b212a;
}

.storefront :is(button, a, select) {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Keep the category trigger the same size in both header layouts. */
.storefront .header-discovery .category-menu-button {
  box-sizing: border-box;
  flex: none;
  width: 126px;
  min-width: 126px;
  height: 44px;
  min-height: 44px;
  padding: 0 10px;
  gap: 7px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 5px 13px rgba(25, 30, 40, .13);
  transition: background-color .2s ease, border-color .2s ease,
    box-shadow .24s var(--ui-ease), transform .24s var(--ui-ease);
}
.storefront .header-discovery .category-menu-button svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.storefront .header-discovery .category-menu-button > span {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}
.storefront .header-discovery .category-menu-button[aria-expanded="true"] {
  background: #181d25;
  border-color: #181d25;
  box-shadow: 0 0 0 4px rgba(27, 33, 42, .13);
}
@media (max-width: 800px) {
  .storefront .header-discovery {
    grid-template-columns: 126px minmax(0, 1fr) 72px;
  }
  .storefront .header-discovery .category-menu-button {
    grid-column: 1;
    width: 126px;
    min-width: 126px;
    font-size: 12px;
    gap: 7px;
  }
}
@media (max-width: 650px) {
  .storefront .header-discovery {
    grid-template-columns: 126px minmax(0, 1fr) 44px;
  }
}
@media (max-width: 360px) {
  .storefront .header-discovery {
    grid-template-columns: 126px minmax(0, 1fr) 44px;
    gap: 7px;
  }
}

/* An interaction should feel immediate without shifting the surrounding layout. */
.storefront :is(.header-tool, .header-cart, .locale-button, .category-all,
  .mega-card, .mega-back, .mega-pagination button, .showcase-back,
  .showcase-browse, .showcase-child-link, .subcategory-chip,
  .product-card-link, .product-favorite, .product-info-box, .product-add,
  .button, .cart-continue, .cart-item-quantity button, .cart-remove,
  .cart-support-link, .support-float, .support-telegram) {
  transition: color .2s ease, background-color .2s ease, border-color .2s ease,
    box-shadow .24s var(--ui-ease), transform .24s var(--ui-ease), opacity .2s ease;
}
.storefront .showcase-grid > .showcase-tile {
  transition: border-color .22s ease, background-color .22s ease,
    box-shadow .26s var(--ui-ease), transform .26s var(--ui-ease);
}
.storefront .product-add.is-added,
.storefront .product-add.is-added:hover:not(:disabled) {
  background: #168652;
  border-color: #168652;
  color: #fff;
  box-shadow: 0 5px 15px rgba(22, 134, 82, .2);
}
.storefront .product-add.is-added svg { display: none; }
.storefront .product-add.is-added::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font: 800 12px/1 var(--font);
}
.storefront :is(.showcase-arrow, .showcase-browse-arrow, .mega-card-arrow,
  .showcase-child-link > svg, .product-favorite svg) {
  transition: transform .22s var(--ui-ease), color .2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .storefront .header-discovery .category-menu-button:hover {
    box-shadow: 0 8px 19px rgba(25, 30, 40, .19);
    transform: translateY(-1px);
  }
  .storefront .showcase-grid > .showcase-tile:hover,
  .storefront .showcase-grid > .showcase-browse:hover {
    transform: translateY(-3px);
  }
  .storefront .showcase-child-link:hover > svg,
  .storefront .mega-card:hover .mega-card-arrow {
    transform: translateX(3px);
  }
  .storefront .product-favorite:hover svg { transform: scale(1.12); }
  .storefront .product-add:hover:not(:disabled),
  .storefront .button:hover:not(:disabled),
  .storefront .cart-continue:hover:not(:disabled) {
    transform: translateY(-1px);
  }
}

.storefront .header-discovery .category-menu-button:active,
.storefront :is(.header-tool, .header-cart, .locale-button, .category-all,
  .mega-card, .mega-back, .mega-pagination button, .showcase-back,
  .showcase-browse, .showcase-child-link, .subcategory-chip,
  .product-card-link, .product-favorite, .product-info-box, .product-add,
  .button, .cart-continue, .cart-item-quantity button, .cart-remove,
  .cart-support-link, .support-float, .support-telegram):active:not(:disabled),
.storefront .showcase-grid > .showcase-tile:active {
  transform: scale(.975);
  box-shadow: 0 2px 8px rgba(16, 19, 25, .1);
}
.storefront :is(.category-menu-button, .header-tool, .header-cart,
  .locale-button, .category-all, .mega-card, .mega-back,
  .mega-pagination button, .showcase-back, .showcase-browse,
  .showcase-child-link, .subcategory-chip, .product-card-link,
  .product-favorite, .product-info-box, .product-add, .button,
  .cart-continue, .cart-item-quantity button, .cart-remove,
  .cart-support-link, .support-float, .support-telegram):focus-visible,
.storefront .showcase-grid > .showcase-tile:focus-visible {
  outline: 3px solid var(--ui-ring);
  outline-offset: 3px;
}
.storefront .showcase-back:focus-visible { outline-color: #fff; }

/* The support and document headers use a separate markup for the same action. */
.storefront .legal-catalog-button,
.support-page .legal-catalog-button {
  box-sizing: border-box;
  flex: none;
  width: 126px;
  min-width: 126px;
  height: 44px;
  min-height: 44px;
  padding: 0 10px;
  gap: 7px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 5px 13px rgba(25, 30, 40, .13);
}
.storefront .legal-catalog-button svg,
.support-page .legal-catalog-button svg {
  width: 18px;
  height: 18px;
}
.storefront :is(.legal-catalog-button, .legal-header-tool, .legal-aside a,
  .pd-favorite, .pd-stepper button, .pd-support-telegram, .pd-related-item,
  .favorites-cart-link, .favorite-open, .favorite-remove, .favorite-empty a,
  .orders-hero-link, .orders-lookup-row button, .orders-recent button,
  .orders-primary-link, .orders-refresh, .orders-download, .orders-secondary-link),
.support-page :is(.legal-catalog-button, .legal-header-tool, .telegram-card,
  .support-shortcut, .form-actions button) {
  transition: color .2s ease, background-color .2s ease, border-color .2s ease,
    box-shadow .24s cubic-bezier(.22, 1, .36, 1),
    transform .24s cubic-bezier(.22, 1, .36, 1);
}
.storefront :is(.legal-catalog-button, .legal-header-tool, .pd-favorite,
  .pd-stepper button, .pd-support-telegram, .favorites-cart-link,
  .favorite-open, .favorite-remove, .orders-hero-link,
  .orders-lookup-row button, .orders-recent button, .orders-primary-link,
  .orders-refresh, .orders-download, .orders-secondary-link):active:not(:disabled),
.support-page :is(.legal-catalog-button, .legal-header-tool,
  .telegram-card, .support-shortcut, .form-actions button):active:not(:disabled) {
  transform: scale(.975);
}
.storefront :is(.legal-catalog-button, .legal-header-tool, .pd-favorite,
  .pd-stepper button, .pd-support-telegram, .favorites-cart-link,
  .favorite-open, .favorite-remove, .orders-hero-link,
  .orders-lookup-row button, .orders-recent button, .orders-primary-link,
  .orders-refresh, .orders-download, .orders-secondary-link):focus-visible,
.support-page :is(.legal-catalog-button, .legal-header-tool,
  .telegram-card, .support-shortcut, .form-actions button):focus-visible {
  outline: 3px solid #1b212a;
  outline-offset: 3px;
}
.storefront #categoryShowcaseChildren:not([hidden]) {
  animation: category-stage-in .32s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes category-stage-in {
  from { opacity: 0; transform: translateY(10px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (hover: none) {
  .storefront .product-card:hover { transform: none; }
  .storefront .showcase-grid > .showcase-tile:hover:not(:active) { transform: none; }
  .storefront .showcase-grid > .showcase-browse:hover:not(:active) { transform: none; }
  .storefront .mega-card:hover:not(:active) { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .storefront #categoryShowcaseChildren:not([hidden]) { animation: none !important; }
  .storefront :is(.legal-catalog-button, .legal-header-tool, .legal-aside a,
    .pd-favorite, .pd-stepper button, .pd-support-telegram, .pd-related-item,
    .favorites-cart-link, .favorite-open, .favorite-remove, .favorite-empty a,
    .orders-hero-link, .orders-lookup-row button, .orders-recent button,
    .orders-primary-link, .orders-refresh, .orders-download, .orders-secondary-link),
  .support-page :is(.legal-catalog-button, .legal-header-tool, .telegram-card,
    .support-shortcut, .form-actions button) { transition: none !important; }
  .storefront :is(.legal-catalog-button, .legal-header-tool, .pd-favorite,
    .pd-stepper button, .pd-support-telegram, .favorites-cart-link,
    .favorite-open, .favorite-remove, .orders-hero-link,
    .orders-lookup-row button, .orders-recent button, .orders-primary-link,
    .orders-refresh, .orders-download, .orders-secondary-link):active,
  .support-page :is(.legal-catalog-button, .legal-header-tool,
    .telegram-card, .support-shortcut, .form-actions button):active {
    transform: none !important;
  }
  .storefront .header-discovery .category-menu-button,
  .storefront .showcase-grid > .showcase-tile,
  .storefront :is(.header-tool, .header-cart, .locale-button, .category-all,
    .mega-card, .mega-back, .mega-pagination button, .showcase-back,
    .showcase-browse, .showcase-child-link, .subcategory-chip,
    .product-card-link, .product-favorite, .product-info-box, .product-add,
    .button, .cart-continue, .cart-item-quantity button, .cart-remove,
    .cart-support-link, .support-float, .support-telegram),
  .storefront :is(.showcase-arrow, .showcase-browse-arrow, .mega-card-arrow,
    .showcase-child-link > svg, .product-favorite svg) {
    transition: none !important;
  }
  .storefront .header-discovery .category-menu-button:hover,
  .storefront .header-discovery .category-menu-button:active,
  .storefront .showcase-grid > .showcase-tile:hover,
  .storefront .showcase-grid > .showcase-tile:active,
  .storefront .showcase-grid > .showcase-browse:hover,
  .storefront .mega-card:hover,
  .storefront .mega-card:active,
  .storefront :is(.header-tool, .header-cart, .locale-button, .category-all,
    .mega-back, .mega-pagination button, .showcase-back, .showcase-browse,
    .showcase-child-link, .subcategory-chip, .product-card-link,
    .product-favorite, .product-info-box, .product-add, .button,
    .cart-continue, .cart-item-quantity button, .cart-remove,
    .cart-support-link, .support-float, .support-telegram):active,
  .storefront :is(.showcase-arrow, .showcase-browse-arrow, .mega-card-arrow,
    .showcase-child-link > svg, .product-favorite svg) {
    transform: none !important;
  }
}

/* A shared motion language for controls, selection and page navigation. */
.storefront :is(button, a[href], summary, [role="button"], label:has(input[type="radio"]), label:has(input[type="checkbox"])) {
  -webkit-tap-highlight-color: transparent;
}
.storefront :is(input:not([type="radio"]):not([type="checkbox"]), textarea, select) {
  transition: border-color .2s ease, background-color .2s ease, box-shadow .26s var(--ui-ease);
}
.storefront :is(input:not([type="radio"]):not([type="checkbox"]), textarea, select):focus-visible {
  outline: none;
  border-color: #1b212a;
  box-shadow: 0 0 0 4px rgba(27, 33, 42, .13);
}
.storefront :is(.cart-wizard-steps button, .cart-wizard-next, .cart-wizard-back,
  .cart-coin-choice, .cart-network-choice, .cart-payment-method, .cart-page-clear) {
  transition: color .22s ease, background-color .22s ease, border-color .22s ease,
    box-shadow .28s var(--ui-ease), transform .28s var(--ui-ease);
}
@media (hover: hover) and (pointer: fine) {
  .storefront :is(.cart-wizard-steps button:not(:disabled), .cart-coin-choice:not(:disabled),
    .cart-network-choice:not(:disabled), .cart-payment-method:not(:has(input:disabled))):hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(21, 24, 29, .09);
  }
}
.storefront :is(.cart-wizard-steps button, .cart-wizard-next, .cart-wizard-back,
  .cart-coin-choice, .cart-network-choice):active:not(:disabled),
.storefront .cart-payment-method:not(:has(input:disabled)):active {
  transform: scale(.985);
}
.storefront :is(.locale-menu, .cart-crypto-options):not([hidden]) {
  animation: site-surface-in .3s var(--ui-ease) both;
}
@keyframes site-surface-in {
  from { opacity: 0; transform: translateY(9px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.site-click-flash {
  position: fixed;
  z-index: 9999;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle 115px at var(--flash-x) var(--flash-y),
    rgba(255, 255, 255, .50) 0, rgba(27, 33, 42, .14) 38%, transparent 100%);
  box-shadow: inset 0 0 0 1px rgba(27, 33, 42, .13);
  animation: site-click-wave .48s var(--ui-ease, ease-out) both;
}
@keyframes site-click-wave {
  0% { opacity: 0; transform: scale(.96); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.025); }
}

/* Browsers that support cross-document view transitions animate our own pages. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .16s ease-in both site-page-out; }
::view-transition-new(root) { animation: .3s cubic-bezier(.22, 1, .36, 1) both site-page-in; }
@keyframes site-page-out { to { opacity: 0; } }
@keyframes site-page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .site-click-flash { display: none !important; }
  .storefront :is(.locale-menu, .cart-crypto-options):not([hidden]) { animation: none !important; }
  .storefront :is(input, textarea, select, .cart-wizard-steps button, .cart-wizard-next,
    .cart-wizard-back, .cart-coin-choice, .cart-network-choice, .cart-payment-method,
    .cart-page-clear) { transition: none !important; }
  .storefront :is(.cart-wizard-steps button, .cart-coin-choice, .cart-network-choice,
    .cart-payment-method):is(:hover, :active) { transform: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .01ms !important; }
}
