/* Hidden on tablets/desktop. All visual changes are scoped to phone screens. */
.a4u-bundle-mobile,
.a4u-bundle-mobile-remainder { display: none; }

@media (max-width: 767px) {
  body.single-product.a4u-has-bundle-contents .a4u-bundle-legacy { display: none; }

  /* Keep contents before the existing specifications table, under purchase. */
  body.single-product.a4u-has-bundle-contents .elementor-5624 .elementor-element-d9d2415 > .elementor-container {
    flex-direction: column;
  }
  body.single-product.a4u-has-bundle-contents .elementor-5624 .elementor-element.elementor-element-6f04ce0 {
    order: -1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  /* Split the existing 7px side inset evenly: keep card widths unchanged.
     Remove Elementor's -6px top margin so the purchase section's 8px gap
     matches the cart -> benefits gap, without moving either purchase block. */
  body.single-product.a4u-has-bundle-contents .elementor-5624 .elementor-element-6f04ce0 > .elementor-widget-wrap {
    margin: 0 3.5px !important;
  }
  body.single-product.a4u-has-bundle-contents .elementor-5624 .elementor-element.elementor-element-1f9ed75 {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 14px;
  }

  body.single-product .a4u-bundle-mobile {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 9px 8px 8px;
    border-radius: 9px;
    background: linear-gradient(110deg, #faf4e2, #f9f3df 52%, #faf4e2);
    color: #111;
    font-family: Assistant, sans-serif;
    text-align: right;
  }

  body.single-product .a4u-mobile-bundle-title {
    margin: 0 0 7px;
    color: #000;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: 26px;
    text-align: center;
    scroll-margin-top: 90px;
  }

  body.single-product .a4u-mobile-bundle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 5px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  body.single-product .a4u-mobile-bundle-card {
    box-sizing: border-box;
    min-width: 0;
    min-height: 106px;
    margin: 0;
    padding: 5px 4px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    text-align: center;
    overflow-wrap: anywhere;
  }

  body.single-product .a4u-mobile-bundle-centered-bottle {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  body.single-product .a4u-mobile-bundle-centered-bottle > .a4u-bundle-picture { flex-shrink: 0; }

  body.single-product .a4u-bundle-mobile .a4u-bundle-picture {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    height: 62px;
    margin: 0 0 2px;
    overflow: hidden;
  }

  body.single-product .a4u-bundle-mobile .a4u-bundle-image {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    object-fit: contain;
    mix-blend-mode: multiply;
  }

  /* Imagify moves the image class to <picture>. Style its inner img too. */
  body.single-product .a4u-bundle-mobile .a4u-bundle-picture picture.a4u-bundle-image > img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    margin: 0;
  }

  body.single-product .a4u-bundle-mobile .a4u-bundle-picture-pair .a4u-bundle-image { width: calc(50% - 1px); }

  body.single-product .a4u-bundle-mobile .a4u-bundle-name,
  body.single-product .a4u-bundle-mobile .a4u-bundle-amount {
    margin: 0;
    color: #111;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 15px;
  }

  body.single-product .a4u-bundle-mobile .a4u-bundle-amount { font-weight: 400; }
  body.single-product .a4u-bundle-mobile .a4u-bundle-amount-can { font-weight: 700; }

  body.single-product .a4u-bundle-mobile .a4u-bundle-count-badge {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    padding: 1px 3px;
    border: 1px solid #dadada;
    border-radius: 3px;
    background: #fff;
    color: #000;
    font-size: 10px;
    font-weight: 700;
    line-height: 13px;
  }

  body.single-product .a4u-mobile-bundle-choice { grid-column: span 2; }
  /* Keep the 1:2 bottle/options split above four equal accessory cards.
     Twelve tracks allow both proportions without changing ordinary grids. */
  body.single-product .a4u-mobile-bundle-grid-choices { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  body.single-product .a4u-mobile-bundle-grid-choices > .a4u-mobile-bundle-card { grid-column: span 3; }
  body.single-product .a4u-mobile-bundle-grid-choices > .a4u-mobile-bundle-centered-bottle { grid-column: span 4; }
  body.single-product .a4u-mobile-bundle-grid-choices > .a4u-mobile-bundle-choice { grid-column: span 8; }
  /* Wine choices have no separate bottle card and three included extras. */
  body.single-product .a4u-mobile-bundle-grid-no-bottle > .a4u-mobile-bundle-card { grid-column: span 4; }
  body.single-product .a4u-mobile-bundle-grid-no-bottle > .a4u-mobile-bundle-choice { grid-column: 1 / -1; }
  body.single-product .a4u-mobile-choice-title { margin: 0 0 3px; color: #000; font-size: 12px; font-weight: 700; line-height: 15px; }
  body.single-product .a4u-mobile-bundle-options { display: grid; grid-template-columns: minmax(0, 1fr) 17px minmax(0, 1fr); align-items: start; }
  body.single-product .a4u-mobile-bundle-option { min-width: 0; }
  body.single-product .a4u-mobile-bundle-or { align-self: center; color: #000; font-size: 12px; font-weight: 700; }
  body.single-product .a4u-mobile-choice-note { margin: 4px 0 0; padding-top: 3px; border-top: 1px solid #e4e1e1; color: #333; font-size: 11px; line-height: 14px; }
  body.single-product .a4u-mobile-bundle-note { margin: 0 0 7px; color: #333; font-size: 12px; line-height: 16px; text-align: center; }
  body.single-product .a4u-bundle-mobile .a4u-bundle-details { margin: 3px 0 0; padding: 0; list-style: none; font-size: 11px; line-height: 14px; }

  body.single-product .a4u-mobile-bundle-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 3px 0 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #333;
    font: inherit;
    font-size: 13px;
    font-weight: 400;
    text-decoration: underline;
    cursor: pointer;
  }
  body.single-product .a4u-mobile-bundle-toggle[hidden] { display: none; }
  body.single-product .a4u-mobile-bundle-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
  body.single-product .a4u-mobile-bundle-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  body.single-product .a4u-mobile-bundle-toggle:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
  body.single-product .a4u-bundle-mobile [hidden] { display: none !important; }
  body.single-product .a4u-bundle-mobile-remainder { display: block; margin-top: 12px; font-family: Assistant, sans-serif; font-size: 16px; line-height: 1.6; }
}
