/* Owner-authorized mobile delta, 2026-11-30.
   Scope is deliberately limited to the open-menu presentation and the shared
   product-card surface/typography. The closed approved header is untouched. */

:root {
  --ss-product-shell: #fff;
  --ss-product-border: #c9c9c9;
  --ss-product-meta: #666;
  --ss-product-code: #545454;
  --ss-product-ink: #151724;
  --ss-product-photo: #f2f4ef;
  --ss-motion: cubic-bezier(.16, 1, .3, 1);
}

@keyframes ss-mobile-menu-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 24px)) scale(.94);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.ss-mobile-menu-heading {
  display: none;
}

@media (max-width: 768px) {
  body.ss-mobile-menu-open {
    overflow: hidden;
  }

  .ss-mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #151724a6;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    cursor: default;
  }

  .ss-mobile-menu-backdrop[hidden] {
    display: none;
  }

  body.ss-mobile-menu-open > .storefront-header,
  html body.figma-desktop-home.ss-mobile-menu-open > header.storefront-header {
    position: fixed !important;
    top: max(18px, env(safe-area-inset-top)) !important;
    left: 50% !important;
    right: auto !important;
    z-index: 1002;
    width: min(420px, calc(100vw - 60px)) !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: translateX(-50%) scale(1.025) !important;
    transition: transform .35s var(--ss-motion), width .35s var(--ss-motion);
  }

  body.ss-mobile-menu-open > .storefront-header .mainhead {
    width: 100% !important;
    margin: 0 !important;
    background: rgba(245, 250, 245, .985) !important;
    box-shadow: 0 18px 54px rgba(0, 0, 0, .34) !important;
  }

  body > #primary-menu.ss-mobile-menu-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    z-index: 1003;
    display: flex !important;
    width: min(416px, calc(100vw - 24px));
    max-height: calc(100dvh - 142px);
    margin: 0;
    padding: 28px;
    overflow-y: auto;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    border: 0;
    border-radius: 22px;
    background: #f5faf5;
    color: #1e1e30;
    box-shadow: 0 24px 90px rgba(0, 0, 0, .34);
    font-family: var(--splitstream-public-font);
    transform: translate(-50%, -50%);
    animation: ss-mobile-menu-in .35s var(--ss-motion) both;
    text-align: left;
  }

  body > #primary-menu.ss-mobile-menu-panel .ss-mobile-menu-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 28px;
  }

  body > #primary-menu.ss-mobile-menu-panel .ss-mobile-menu-heading h2 {
    margin: 0;
    color: #151724;
    font-family: var(--splitstream-public-font);
    font-size: 26px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -.025em;
    text-align: left;
  }

  body > #primary-menu.ss-mobile-menu-panel .ss-mobile-menu-close {
    position: relative;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    flex-shrink: 0;
    border: 0;
    background: transparent;
  }

  body > #primary-menu.ss-mobile-menu-panel .ss-mobile-menu-close span {
    position: absolute;
    top: 15px;
    left: 5px;
    width: 22px;
    height: 1px;
    background: #151724;
    transform: rotate(45deg);
  }

  body > #primary-menu.ss-mobile-menu-panel .ss-mobile-menu-close span + span {
    transform: rotate(-45deg);
  }

  body > #primary-menu.ss-mobile-menu-panel .mobile-menu-item {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(21, 23, 36, .13);
    color: #1e1e30;
    font-family: var(--splitstream-public-font);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    transition: color .2s ease, padding-left .3s var(--ss-motion);
  }

  body > #primary-menu.ss-mobile-menu-panel .mobile-menu-item:hover,
  body > #primary-menu.ss-mobile-menu-panel .mobile-menu-item:focus-visible {
    color: #ec623f;
    padding-left: 5px;
  }

  body > #primary-menu.ss-mobile-menu-panel .desktop-menu-item {
    display: none !important;
  }

  /* Both homepage and catalog use the same approved product tokens. */
  .mproto-product,
  body:not(.figma-desktop-home) .catalog-products .product-card {
    border: 1px solid var(--ss-product-border);
    border-radius: 20px;
    background: var(--ss-product-shell);
    box-shadow: none;
  }

  .mproto-product-meta,
  body:not(.figma-desktop-home) .catalog-products .product-card .product-brand {
    color: var(--ss-product-meta);
    font-family: var(--splitstream-public-font);
    font-size: 9px;
    font-weight: 700;
    line-height: normal;
    text-transform: uppercase;
  }

  .mproto-product-title,
  body:not(.figma-desktop-home) .catalog-products .product-card .product-info h3 {
    color: var(--ss-product-ink);
    font-family: var(--splitstream-public-font);
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: 0;
  }

  .mproto-product-image.photo-background-enabled,
  body:not(.figma-desktop-home) .catalog-products .product-card .product-photo.photo-background-enabled {
    background: var(--ss-product-photo);
  }

  .mproto-product-image.photo-background-disabled,
  body:not(.figma-desktop-home) .catalog-products .product-card .product-photo.photo-background-disabled {
    background: transparent !important;
  }

  .mproto-product-image.photo-background-disabled > img:first-child,
  body:not(.figma-desktop-home) .catalog-products .product-card .product-photo.photo-background-disabled > a > img {
    mix-blend-mode: normal;
  }

  body:not(.figma-desktop-home) .catalog-products {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 18px;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card {
    position: relative;
    display: block;
    width: 252px;
    min-width: 252px;
    min-height: 409px;
    padding: 16px;
    overflow: hidden;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .product-photo {
    position: relative;
    display: block;
    width: 218px;
    height: 218px;
    min-height: 218px;
    padding: 0;
    overflow: hidden;
    border-radius: 3px;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .product-photo > a {
    display: block;
    width: 100%;
    height: 100%;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .product-photo > a > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .product-info {
    position: static;
    display: block;
    padding: 0;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .product-brand {
    position: static;
    display: block;
    min-height: 0;
    margin: 16px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .product-info h3 {
    position: static;
    height: auto;
    min-height: 0;
    margin: 14px 0 0;
    padding: 0;
    overflow: hidden;
    text-align: left;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .product-info h3 a {
    color: inherit;
    font: inherit;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .product-card-code {
    position: static;
    margin: 0;
    overflow: hidden;
    color: var(--ss-product-code);
    font-family: var(--splitstream-public-font);
    font-size: 9px;
    font-weight: 400;
    line-height: 2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .specchips,
  body:not(.figma-desktop-home) .catalog-products .product-card .compare {
    display: none;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .price-row {
    position: static;
    display: flex;
    height: auto;
    margin: 11px 0 0;
    padding: 0;
    align-items: flex-start;
    gap: 7px;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .price-row strong {
    color: var(--ss-product-ink);
    font-family: var(--splitstream-public-font);
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    white-space: nowrap;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .price-row form {
    width: 43px;
    height: 43px;
    margin-left: auto;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .square,
  body:not(.figma-desktop-home) .catalog-products .product-card .square img {
    width: 43px;
    height: 43px;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .product-availability {
    position: static;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ss-product-ink);
    font-family: var(--splitstream-public-font);
    margin-top: -4px;
    font-size: 9px;
    line-height: normal;
  }

  body:not(.figma-desktop-home) .catalog-products .product-card .product-availability i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #7ebd54;
  }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  body > #primary-menu.ss-mobile-menu-panel {
    animation: none;
  }
}
