/* Wicked Corporation — one screen, swipe sideways, 10 Nov 2026 (revision c).
 * Revision c: long names keep two lines on narrow cards; belts (four sizes and a colour)
 * fit low cards.
 * On phones every preview card and the "Ajouter un article" panel is a full-width case,
 * side by side, one per swipe. Nothing scrolls vertically: each case is exactly the height
 * of the area under the 3D scene (100cqh of the card scroller, a size container set by
 * card-fit). A thin position bar is drawn by /ui/card-dots-20261110.js. CSS only here;
 * nothing removed. Loaded after card-fit.
 */
@media (max-width: 900px) {
  [class*="_scroll_1neug_"]:has([class*="_card_1214w_"]) {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 !important;
  }
  [class*="_scroll_1neug_"]:has([class*="_card_1214w_"])::-webkit-scrollbar { display: none; }

  [class*="_list_1neug_"]:has([class*="_card_1214w_"]) {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-template-columns: none !important;
    grid-template-rows: 100cqh !important;
    grid-auto-columns: 100cqw !important;
    gap: 0 !important;
    width: max-content !important;
    max-width: none !important;
    height: 100cqh !important;
  }
  [class*="_list_1neug_"] > [class*="_cards_equal_mobile_"]:has([class*="_card_1214w_"]) { display: contents !important; }
  [class*="_list_1neug_"]:has([class*="_card_1214w_"]) > *,
  [class*="_list_1neug_"] > [class*="_cards_equal_mobile_"] > [class*="_card_1214w_"] {
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
    width: 100cqw !important;
    height: 100cqh !important;
    min-height: 0 !important;
    max-height: 100cqh !important;
  }

  /* Order: every card first, "Ajouter un article" last, one row. */
  [class*="_list_1neug_"] > [class*="_cards_equal_mobile_"] > [class*="_card_1214w_"] { grid-row: 1 !important; grid-column: auto !important; order: 0 !important; }
  [class*="_list_1neug_"]:has([class*="_card_1214w_"]) > :not([class*="_cards_equal_mobile_"]) { grid-row: 1 !important; grid-column: auto !important; order: 1 !important; }

  /* Full description, no 2-line cut (sizes come from card-fit). */
  [class*="_card_1214w_"] [class*="_description_1214w_"] { display: block !important; -webkit-line-clamp: unset !important; max-height: none !important; overflow: visible !important; }
  [class*="_card_1214w_"] [class*="_descriptionBlock_1214w_"] { overflow: visible !important; max-height: none !important; }

  /* "Ajouter un article": fits the case at any height. */
  [class*="_list_1neug_"]:has([class*="_card_1214w_"]) > [class*="_picker_fi5xe_"] {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    gap: clamp(3px, 2.4cqh, 8px) !important;
    padding: clamp(5px, 3.6cqh, 10px) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  [class*="_picker_fi5xe_"] [class*="_head_fi5xe_"] { min-height: 0 !important; padding: 0 !important; }
  [class*="_picker_fi5xe_"] [class*="_title_fi5xe_"] { font-size: clamp(9px, 4.7cqh, 12px) !important; }
  [class*="_picker_fi5xe_"] [class*="_list_fi5xe_"] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(0, 1fr) !important;
    gap: clamp(4px, 2.4cqh, 8px) !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
  }
  [class*="_picker_fi5xe_"] :is([class*="_categoryChoice_fi5xe_"], [class*="_choiceShell_fi5xe_"], [class*="_chip_fi5xe_"]) {
    height: 100% !important;
    min-height: 0 !important;
  }
  [class*="_picker_fi5xe_"] [class*="_chip_fi5xe_"] { padding-block: clamp(4px, 3cqh, 12px) clamp(30px, 22cqh, 46px) !important; gap: clamp(1px, 1.2cqh, 6px) !important; }
  [class*="_picker_fi5xe_"] [class*="_chipPlus_fi5xe_"] { font-size: clamp(24px, 22cqh, 64px) !important; line-height: 1 !important; height: auto !important; }
  [class*="_picker_fi5xe_"] [class*="_chipLabel_fi5xe_"] { font-size: clamp(9.5px, 5.2cqh, 13.5px) !important; }
  [class*="_picker_fi5xe_"] [class*="_chip_fi5xe_"] { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; }
  [class*="_picker_fi5xe_"] [class*="_eyewearChipMeta_fi5xe_"] { position: static !important; inset: auto !important; transform: none !important; margin: 0 !important; font-size: clamp(8px, 4cqh, 11px) !important; line-height: 1.1 !important; white-space: nowrap !important; }
  [class*="_picker_fi5xe_"] [class*="_listButton_fi5xe_"] {
    height: clamp(22px, 15cqh, 34px) !important;
    min-height: 0 !important;
    bottom: clamp(4px, 2.4cqh, 10px) !important;
    font-size: clamp(9.5px, 4.7cqh, 12.5px) !important;
  }

  /* Position bar drawn by card-dots-20261110.js (decorative, no touch target). */
  .wc-dots { position: absolute; top: 1px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; z-index: 5; pointer-events: none; }
  .wc-dots i { display: block; width: 14px; height: 2px; background: rgba(201, 207, 215, 0.28); transition: background 0.2s, width 0.2s; }
  .wc-dots i.on { background: #e9edf1; width: 22px; }
}
@media (prefers-reduced-motion: reduce) { .wc-dots i { transition: none; } }

/* Narrow cards: category and PHOTOS labels follow the card's own width. */
@media (max-width: 900px) {
  [class*="_card_1214w_"] { container-type: inline-size; container-name: wc-card; }
}
@container wc-card (max-width: 350px) {
  [class*="_card_1214w_"] :is([class*="_previewCategory_1214w_"], [class*="_realPhotoBtn_1214w_"]) {
    font-size: min(var(--wc-lbl, 11px), 10px) !important;
    letter-spacing: 0.02em !important;
    padding-inline: 4px !important;
    white-space: nowrap !important;
  }
}

/* Narrow cards: thinner arrows so long names (Violet Infestation, Lunettes Obsidian Star)
   hold on two lines instead of losing the third. */
@container wc-card (max-width: 380px) {
  [class*="_card_1214w_"] [class*="_previewNavigation_1214w_"] { grid-template-columns: 22px minmax(0, 1fr) 22px !important; }
  [class*="_card_1214w_"] [class*="_navBtn_1214w_"] { width: 22px !important; }
  [class*="_card_1214w_"] [class*="_previewName_1214w_"] {
    padding-inline: 0 !important;
    letter-spacing: 0 !important;
    line-height: 1.12 !important;
    text-wrap: balance;
    overflow-wrap: normal !important;
  }
}

/* Low cards with size choices (belts, UNISIZE chips): one row of sizes, colour on one line,
   so the price and the button stay inside the case. */
@container wc-cards (max-height: 200px) {
  [class*="_card_1214w_"] [class*="_sizes_1214w_"] { flex-wrap: nowrap !important; gap: 3px !important; min-width: 0 !important; }
  [class*="_card_1214w_"] [class*="_sizes_1214w_"] [class*="_size_1214w_"] { height: auto !important; min-height: 0 !important; flex: 1 1 0 !important; min-width: 0 !important; padding: 2px !important; font-size: var(--wc-lbl) !important; line-height: 1.25 !important; white-space: nowrap !important; letter-spacing: 0 !important; }
  [class*="_card_1214w_"] [class*="_mobileColor_1214w_"] { flex-direction: row !important; align-items: center !important; gap: 6px !important; height: auto !important; margin-top: 3px !important; }
  [class*="_card_1214w_"] [class*="_mobileColor_1214w_"] > [class*="_mobileInfoLabel_1214w_"] { width: auto !important; flex: none !important; }
  [class*="_card_1214w_"] [class*="_mobileColorValue_1214w_"] { width: auto !important; font-size: var(--wc-lbl) !important; }
  [class*="_card_1214w_"] [class*="_mobileColorDot_1214w_"] { width: 10px !important; height: 10px !important; flex: none !important; }
}
