/* Wicked Corporation — preview card adapts to the phone that opens it, 10 Nov 2026.
 * The card height comes from the phone's screen height (140 px on a 320x568 phone,
 * 172 px on an iPhone SE, 257 px on a Pro Max). Every size below follows the real card
 * height through a size container on the card scroller (cqh = 1 % of that height),
 * with floors and ceilings. Loaded after card-qty, card-sym and card-a-b; nothing removed.
 */
@media (max-width: 900px) {
  [class*="_scroll_1neug_"]:has(> [class*="_list_1neug_"] [class*="_card_1214w_"]) {
    container-type: size;
    container-name: wc-cards;
  }
  [class*="_card_1214w_"] {
    --wc-pad: clamp(5px, 3.6cqh, 10px);
    --wc-top: clamp(24px, 13.5cqh, 34px);
    --wc-bot: clamp(32px, 18.5cqh, 48px);
    --wc-gap: clamp(3px, 2.4cqh, 6px);
    --wc-lbl: clamp(9.5px, 4.7cqh, 12px);
    --wc-txt: clamp(11px, 5.6cqh, 14.5px);
    --wc-price: clamp(14px, 7.8cqh, 21px);
  }
  [class*="_card_1214w_"] [class*="_body_1214w_"] { row-gap: clamp(2px, 1.3cqh, 4px) !important; }

  /* Type follows the card height. */
  [class*="_card_1214w_"] :is([class*="_previewCategory_1214w_"], [class*="_productInfoLabel_1214w_"], [class*="_mobileQtyLabel_1214w_"], [class*="_mobileInfoLabel_1214w_"], [class*="_badge_1214w_"], [class*="_realPhotoBtn_1214w_"]) {
    font-size: var(--wc-lbl) !important;
  }
  [class*="_card_1214w_"] :is([class*="_description_1214w_"], [class*="_uniqueSize_1214w_"], [class*="_previewName_1214w_"]) {
    font-size: var(--wc-txt) !important;
    line-height: 1.25 !important;
  }
  [class*="_card_1214w_"] [class*="_prix_1214w_"] { font-size: var(--wc-price) !important; }

  /* Controls follow the top and bottom rows. */
  [class*="_card_1214w_"] :is([class*="_toggleBtn_1214w_"], [class*="_close_1214w_"]) {
    width: var(--wc-top) !important;
    height: var(--wc-top) !important;
    font-size: calc(var(--wc-top) * 0.52) !important;
  }
  [class*="_card_1214w_"] [class*="_previewNavigation_1214w_"] { grid-template-columns: clamp(26px, 9vw, 36px) minmax(0, 1fr) clamp(26px, 9vw, 36px) !important; }
  [class*="_card_1214w_"] [class*="_navBtn_1214w_"] { width: clamp(26px, 9vw, 36px) !important; }
  [class*="_card_1214w_"] :is([class*="_previewCategory_1214w_"], [class*="_realPhotoBtn_1214w_"]) { padding-inline: clamp(4px, 1.6vw, 9px) !important; }
}

/* Low cards (small or short phones): the size label shares the line with its value. */
@container wc-cards (max-height: 200px) {
  [class*="_card_1214w_"] [class*="_sizeBlock_1214w_"] {
    flex-direction: row !important;
    align-items: baseline;
    gap: 6px !important;
  }
  [class*="_card_1214w_"] [class*="_description_1214w_"] { line-height: 1.2 !important; }
}

/* Very low cards (about 320x568 phones): tighter floors so everything stays inside. */
@container wc-cards (max-height: 155px) {
  [class*="_card_1214w_"] {
    --wc-pad: 4px;
    --wc-top: 22px;
    --wc-bot: 30px;
    --wc-lbl: 9px;
    --wc-txt: 10.5px;
    --wc-price: 13px;
  }
  [class*="_card_1214w_"] [class*="_body_1214w_"] { row-gap: 2px !important; }
}
/* Narrow phones: category and PHOTOS keep their full words. */
@media (max-width: 340px) {
  [class*="_card_1214w_"] :is([class*="_previewCategory_1214w_"], [class*="_realPhotoBtn_1214w_"]) {
    letter-spacing: 0.02em !important;
    padding-inline: 4px !important;
    width: auto !important;
    max-width: none !important;
    white-space: nowrap !important;
  }
}
