/* W06 — scoped to configurator controls; no desktop layout changes. */
@media (max-width: 767px) {
  product-wizard .btn,
  product-cart .btn,
  product-wizard .pills-row a,
  product-wizard .pills-row .pill,
  product-wizard .nav-cart {
    min-height: 44px !important;
    min-width: 44px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  product-wizard input,
  product-wizard select,
  product-cart input,
  product-cart select,
  product-cart textarea { font-size: 16px !important; }
  product-wizard .product-wizard {
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom: 120px;
  }
  product-wizard .dimensions {
    padding-bottom: 24px;
    scroll-margin-bottom: 120px;
  }
  product-wizard .dimensions-help { padding: 16px !important; }
  product-wizard .dimensions-help > .d-flex:first-child {
    max-height: 140px;
    justify-content: center;
  }
  product-wizard .dimensions-help > .d-flex:first-child img {
    max-height: 140px;
    max-width: 65%;
    width: auto;
    object-fit: contain;
  }
  product-wizard .dimensions form { margin-top: 12px !important; }
  product-wizard .dimensions input,
  product-wizard .dimensions button { scroll-margin: 80px 0 120px; }
}

/* W06b: cart layout only. No business logic or desktop changes. */
@media (max-width: 767px) {
  product-cart .cart-navigation {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-left: 0 !important;
    margin-right: 0 !important;
    white-space: normal;
    overflow: visible;
  }
  product-cart .cart-navigation > li:not(.pointer) { display: none; }
  product-cart .cart-navigation > li.pointer {
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    min-height: 48px;
    min-width: 0;
    margin: 0;
    padding: 0 !important;
    text-align: center;
    font-size: 12px;
    line-height: 18px;
  }
  product-cart .cart-navigation .step-circle,
  product-cart .cart-navigation .icon-check { margin-right: 0 !important; }
  product-cart .product-card .d-block.d-md-none > .card {
    margin-left: 0;
    margin-right: 0;
  }
  product-cart .card .btn { white-space: normal; }
  product-cart .cart-item .cart-image {
    flex: 0 0 88px;
    max-width: 88px;
    margin-right: 12px;
  }
  product-cart .cart-item .cart-image img {
    max-width: 72px;
    height: auto;
    object-fit: contain;
    padding-left: 0 !important;
  }
  product-cart .cart-item .flex-grow-1 { min-width: 0; }
  product-cart .cart-item .flex-grow-1 > .d-flex.align-items-end {
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center !important;
    justify-content: flex-start !important;
  }
  product-cart .cart-item .qty-selector {
    flex: 0 0 72px;
    min-height: 44px;
  }
  product-cart .cart-item .flex-grow-1 > .d-flex.d-md-none {
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: flex-start !important;
  }
  product-cart .edit-container,
  product-cart .copy-container,
  product-cart .delete-container { min-height: 44px; margin: 0 !important; }
}

/* W06c: compact catalogue without hiding specifications or changing consent. */
@media (max-width: 767px) {
  product-wizard .w06c-material-card {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    column-gap: 12px;
    padding: 16px !important;
  }
  product-wizard .w06c-material-card .chosen-feature__img { grid-column: 1; margin: 0; }
  product-wizard .w06c-material-card .feature-card__image { max-width: 84px; max-height: 112px; object-fit: contain; }
  product-wizard .w06c-material-card .feature-card__content { display: contents !important; }
  product-wizard .w06c-material-card .feature-card__text-content { grid-column: 2; min-width: 0; }
  product-wizard .w06c-material-card .feature-card__name { margin-top: 0 !important; padding-right: 16px; }
  product-wizard .w06c-material-card .feature-card__description { margin-bottom: 0; }
  product-wizard .w06c-material-card .feature-card__description ul { margin: 8px 0 0; padding-left: 16px; font-size: 13px; line-height: 1.4; }
  product-wizard .w06c-material-card .feature-card__actions {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
  }
  product-wizard .w06c-material-card .feature-card__price { flex: 1; margin: 0; }
  product-wizard .w06c-material-card .feature-action { flex: 0 0 116px; margin: 0; }
  product-wizard .category-title { gap: 4px; padding-left: 16px !important; padding-right: 16px !important; }
  product-wizard .category-title .btn-arrow { min-width: 44px; min-height: 44px; align-items: center; }
  product-wizard .category-title h5 { white-space: normal; text-align: center; line-height: 1.35; min-width: 0; }
  product-wizard .w06c-progress-label { display: block; font-size: 12px; line-height: 18px; font-weight: 400; color: #595959; padding-top: 4px; }
  product-wizard .category-title h5[role="button"]:focus-visible { outline: 2px solid #333; outline-offset: 3px; }
  #alert-cookies { padding-top: 12px; padding-bottom: 12px; }
  #alert-cookies .container { padding-left: 16px; padding-right: 52px; }
  #alert-cookies .icon-cookies { display: none; }
  #alert-cookies .container > span { font-size: 13px; line-height: 18px; }
  #alert-cookies .container > span > a { display: inline-flex; align-items: center; min-height: 44px; }
  #alert-cookies .close { width: 44px; height: 44px; top: 0; right: 0; padding: 12px; }
  html.w06c-cookie-visible body { padding-bottom: var(--w06c-cookie-height, 160px); }
  html.w06c-cookie-visible product-wizard .summary:not(.expanded) { bottom: var(--w06c-cookie-height, 160px); }
  html.w06c-cookie-visible product-wizard .product-wizard { padding-bottom: calc(120px + var(--w06c-cookie-height, 160px)); }
}

/* W06d: the legal/payment footer row must fit a phone without page scrolling. */
@media (max-width: 767px) {
  .main-footer > .container > .d-flex.justify-content-between.align-items-end {
    flex-direction: column;
    align-items: center !important;
    gap: 16px;
    text-align: center;
  }
  .main-footer > .container > .d-flex.justify-content-between.align-items-end > p {
    width: 100%;
    min-width: 0;
  }
  .main-footer > .container > .d-flex.justify-content-between.align-items-end > .d-flex {
    flex-wrap: wrap;
    justify-content: center !important;
    max-width: 100%;
  }
  .main-footer > .container > .d-flex.justify-content-between.align-items-end > .pl-8 {
    padding-left: 0 !important;
  }
}
