/*
 * Veya mobile catalogue menu.
 * Product data and filters are shared with the homepage catalogue module;
 * this layer only defines the compact, full-screen menu composition.
 */

@media (max-width: 820px) {
  .veya-drawer .vpc__sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    white-space: nowrap !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
  }

  .veya-header {
    grid-template-columns: 44px minmax(0, 1fr) 132px;
  }

  .veya-header .veya-wordmark {
    width: 92px;
    height: 28px;
    justify-self: center;
  }

  .veya-mobile-actions {
    gap: 0;
  }

  .veya-mobile-search,
  .veya-mobile-account,
  .veya-mobile-cart {
    position: relative;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
  }

  .veya-mobile-search svg,
  .veya-mobile-account svg,
  .veya-mobile-cart svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .veya-drawer {
    padding: 0;
    background: rgb(30 31 31 / 28%);
    transition: opacity 180ms ease, visibility 0s linear 180ms;
  }

  .veya-drawer__panel {
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    margin: 0;
    padding: env(safe-area-inset-top) 0 0;
    display: grid;
    grid-template-rows: 64px minmax(0, 1fr);
    overflow: hidden;
    border-radius: 0;
    color: #000;
    background: #fff !important;
    transform: translate3d(100%, 0, 0);
    transition: transform 220ms cubic-bezier(.22, 1, .36, 1);
  }

  .veya-drawer__top {
    position: relative;
    z-index: 2;
    min-width: 0;
    height: 64px;
    padding: 0 12px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    border-bottom: 1px solid var(--v-line, #d2ceca);
    background: #fff;
  }

  .veya-drawer__brand {
    width: 92px;
    height: 28px;
    flex: 0 0 92px;
    overflow: hidden;
    color: transparent !important;
    background: url("/image/catalog/veya/brand/veya-wordmark-black-v1.svg") center / contain no-repeat;
    font-size: 0;
    text-indent: -9999px;
  }

  .veya-drawer__actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
  }

  .veya-drawer__action,
  .veya-drawer-close {
    position: relative;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #000 !important;
    background: transparent;
    text-decoration: none;
  }

  .veya-drawer__action svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .veya-drawer-close span {
    color: #000 !important;
    -webkit-text-fill-color: #000;
    font: 300 31px/1 system-ui, sans-serif;
    transform: translateY(-1px);
  }

  .veya-drawer__action:hover,
  .veya-drawer__action:focus-visible,
  .veya-drawer-close:hover,
  .veya-drawer-close:focus-visible {
    color: #000 !important;
    background: rgb(0 0 0 / 6%);
  }

  .veya-drawer__action:active,
  .veya-drawer-close:active {
    background: rgb(0 0 0 / 10%);
  }

  .veya-drawer__action:focus-visible,
  .veya-drawer-close:focus-visible,
  .veya-drawer__brand:focus-visible {
    outline: 3px solid #000 !important;
    outline-offset: -3px;
  }

  .vpc-menu__filter:focus-visible {
    outline: 2px solid var(--v-ink-strong, #2e3031) !important;
    outline-offset: 3px;
  }

  .veya-drawer__action .veya-header-icon__badge {
    position: absolute;
    top: 1px;
    right: 0;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border-radius: 99px;
    border: 1px solid #fff;
    color: #fff;
    background: #000;
    font: 600 9px/1 var(--v-font-text, "Veya Text", sans-serif);
    font-variant-numeric: tabular-nums;
  }

  .veya-drawer__action .veya-header-icon__badge.is-updated {
    animation: veya-menu-cart-pulse 200ms cubic-bezier(.22, 1, .36, 1);
  }

  .veya-drawer .vpc--menu {
    box-sizing: border-box;
    --vpc-menu-gutter: 16px;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-rows: 56px minmax(0, 1fr);
    overflow: hidden;
    border: 0;
    border-radius: 0;
    color: var(--v-ink-strong, #2e3031);
    background: #fff;
  }

  .vpc-menu__filters {
    min-width: 0;
    height: 56px;
    padding: 0 var(--vpc-menu-gutter);
    display: flex;
    align-items: stretch;
    gap: 28px;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid var(--v-line, #d2ceca);
    background: #fff;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }

  .vpc-menu__filters::-webkit-scrollbar {
    display: none;
  }

  .vpc-menu__filter {
    position: relative;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    border: 0;
    color: var(--v-muted, #707274);
    background: transparent;
    font: 600 12px/1 var(--v-font-text, "Veya Text", sans-serif);
    letter-spacing: .035em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .vpc-menu__filter::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    content: "";
    background: #000;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 180ms ease;
  }

  .vpc-menu__filter.is-active {
    color: var(--v-ink-strong, #2e3031);
  }

  .vpc-menu__filter.is-active::after {
    transform: scaleX(1);
    transform-origin: left center;
  }

  .vpc-menu__viewport {
    min-height: 0;
    overflow: hidden;
    background: #fff;
  }

  .vpc-menu__list {
    height: 100%;
    margin: 0;
    padding: 0 var(--vpc-menu-gutter) calc(16px + env(safe-area-inset-bottom));
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
    scrollbar-width: thin;
    scrollbar-color: var(--v-line, #d2ceca) transparent;
  }

  .vpc-menu__item {
    margin: 0;
    border-bottom: 1px solid var(--v-line, #d2ceca);
  }

  .vpc-menu__item[hidden] {
    display: none !important;
  }

  .vpc-menu-card {
    min-width: 0;
    min-height: 124px;
    display: block;
    color: inherit;
    background: #fff;
  }

  .vpc-menu-card__product {
    min-width: 0;
    min-height: 124px;
    padding: 10px 0;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    color: inherit;
    background: #fff;
    text-decoration: none;
    transition: background-color 160ms ease;
  }

  .vpc-menu-card__media {
    width: 104px;
    height: 104px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #fff;
  }

  .vpc-menu-card__media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    transition: transform 180ms ease;
  }

  .vpc-menu-card__copy {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 4px;
  }

  .vpc-menu-card__copy strong {
    display: block;
    color: var(--v-ink-strong, #2e3031);
    font: 600 13px/17px var(--v-font-text, "Veya Text", sans-serif);
    hyphens: auto;
    letter-spacing: .01em;
    overflow-wrap: normal;
    text-transform: uppercase;
    text-wrap: pretty;
    word-break: normal;
  }

  .vpc-menu-card__name-secondary {
    color: var(--v-muted, #707274);
    font: 500 11px/15px var(--v-font-text, "Veya Text", sans-serif);
    hyphens: auto;
    overflow-wrap: normal;
    text-transform: uppercase;
    text-wrap: pretty;
    word-break: normal;
  }

  .vpc-menu-card__status {
    margin-top: 2px;
    color: var(--v-ink-strong, #2e3031);
    font: 600 11px/15px var(--v-font-text, "Veya Text", sans-serif);
    letter-spacing: .02em;
    text-transform: uppercase;
  }

  .vpc-menu-card__product:hover,
  .vpc-menu-card__product:focus-visible {
    background: #f7f4f0;
  }

  .vpc-menu-card__product:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 2px var(--v-ink-strong, #2e3031);
  }

  .vpc-menu-card__product:active {
    background: #eef0f0;
  }

  .vpc-menu-card__product:hover .vpc-menu-card__media img,
  .vpc-menu-card__product:focus-visible .vpc-menu-card__media img {
    transform: scale(1.025);
  }

  .vpc-menu__secondary {
    margin: 24px 0 0;
    padding: 0 0 max(24px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--v-line, #d2ceca);
  }

  .vpc-menu-links {
    display: grid;
    background: #fff;
  }

  .vpc-menu-links__eyebrow {
    margin: 0;
    padding: 16px 0 8px;
    color: var(--v-muted, #707274);
    font: 600 10px/14px var(--v-font-text, "Veya Text", sans-serif);
    letter-spacing: .07em;
    text-transform: uppercase;
  }

  .vpc-menu-links a {
    min-height: 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    border-bottom: 1px solid var(--v-line, #d2ceca);
    color: var(--v-ink-strong, #2e3031);
    font: 600 13px/16px var(--v-font-text, "Veya Text", sans-serif);
    letter-spacing: .02em;
    text-decoration: none;
    text-transform: uppercase;
  }

  .vpc-menu-links a > span:last-child {
    width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    color: var(--v-muted, #707274);
    font-size: 18px;
    transition: color 180ms ease, transform 180ms ease;
  }

  .vpc-menu-links a:hover > span:last-child,
  .vpc-menu-links a:focus-visible > span:last-child {
    color: var(--v-ink-strong, #2e3031);
    transform: translateX(3px);
  }

  @keyframes veya-menu-cart-pulse {
    50% { transform: scale(1.16); }
  }

}

@media (max-width: 340px) {
  .veya-header {
    grid-template-columns: 44px minmax(0, 1fr) 132px;
    padding-right: 0;
    padding-left: 0;
  }

  .veya-header .veya-wordmark,
  .veya-drawer__brand {
    width: 84px;
    height: 24px;
  }

  .veya-drawer__top {
    height: 60px;
    padding-right: 0;
    padding-left: 12px;
  }

  .veya-drawer__panel {
    grid-template-rows: 60px minmax(0, 1fr);
  }

  .veya-drawer .vpc--menu {
    --vpc-menu-gutter: 12px;
    grid-template-rows: 52px minmax(0, 1fr);
  }

  .vpc-menu__filters {
    height: 52px;
    gap: 20px;
  }

  .vpc-menu__filter {
    font-size: 11px;
  }

  .vpc-menu-card {
    min-height: 116px;
  }

  .vpc-menu-card__product {
    min-height: 116px;
    padding: 8px 0;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
  }

  .vpc-menu-card__media {
    width: 84px;
    height: 96px;
  }

  .vpc-menu-card__copy strong {
    font-size: 12px;
    line-height: 16px;
  }

  .vpc-menu-card__name-secondary,
  .vpc-menu-card__status {
    font-size: 11px;
    line-height: 15px;
  }

}

@media (min-width: 821px) {
  .veya-mobile-account,
  .veya-drawer .vpc--menu {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .veya-drawer,
  .veya-drawer__panel,
  .vpc-menu__filter::after,
  .vpc-menu-card__product,
  .vpc-menu-card__media img,
  .vpc-menu-links a > span:last-child {
    transition: none !important;
  }

  .veya-drawer__action .veya-header-icon__badge.is-updated {
    animation: none !important;
  }

}
