/* =========
   Try On Select Page (matches catalog v3 sizing)
   ========= */

   .tryon-v3 .v3-wrap{
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
  }
  
  /* 1) Centered hero */
  .tryon-hero{
    text-align: center;
    margin: 10px 0 14px;
  }
  .tryon-hero__title{
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
  }
  .tryon-hero__sub{
    margin: 0;
    font-size: 16px;
    color: #4b5563;
  }
  .tryon-hero__fee{
    margin-top: 10px;
    font-size: 15px;
    color: #111;
  }
  .tryon-hero__cur{ margin-right: 4px; font-weight: 800; color: #111; }
  .tryon-hero__until{ margin-left: 6px; color: #6b7280; font-size: 13px; }
  
  /* 2) Categories + Guide row */
  .tryon-topbar{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 14px;
    margin: 10px 0 14px;
  }
  
  .tryon-cats{
    display:flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .tryon-cat{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(72, 202, 228, 0.14);  /* light blue pill */
    color: #0b4a57;
    text-decoration:none;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid rgba(72, 202, 228, 0.22);
    transition: background .18s ease, border-color .18s ease, color .18s ease;
  }
  .tryon-cat:hover{
    background: #48CAE4(6, 107, 238, 0.399);
    border-color: rgba(72, 202, 228, 0.35);
  }
  .tryon-cat.is-active{
    background: #48CAE4(72, 202, 228, 0.26);
    border-color: rgba(2, 22, 26, 0.45);
    color: #05323a;
  }
  
  .tryon-guide{
    display:inline-flex;
    align-items:center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration:none;
    font-weight: 800;
    font-size: 14px;
    color:#111;
    background:#f3f4f6;
    transition: background .18s ease, color .18s ease;
  }
  .tryon-guide__mark{
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display:grid;
    place-items:center;
    font-weight: 900;
    background:#e24632;
  }
  .tryon-guide:hover{
    background: #e24632; /* light coral */
    color: #111;
  }
  
  /* 4) More visible search */
  .tryon-search{
    margin: 10px 0 14px;
  }
  .tryon-search form{
    display:flex;
    gap: 10px;
    align-items:center;
  }
  .tryon-search__input{
    flex: 1;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    background: #fff;
    font-size: 15px;
    outline: none;
  }
  .tryon-search__input:focus{
    border-color: #48CAE4;
    box-shadow: 0 0 0 3px rgba(72,202,228,.18);
  }
  .tryon-search__btn{
    height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    border: 0;
    background: #111;
    color:#fff;
    font-weight: 700;
    cursor:pointer;
    transition: transform .12s ease, opacity .18s ease;
  }
  .tryon-search__btn:hover{ opacity: .92; transform: translateY(-1px); }
  
  /* Tray (Temu-ish) */
  .tryon-tray{
    position: sticky;
    top: 10px;
    z-index: 50;
    margin: 10px 0 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,.06);
  }
  
  .tryon-tray__row{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
  }
  
  .tryon-tray__title{
    font-weight: 900;
    color:#111;
  }
  .tryon-tray__sub{
    color:#6b7280;
    font-size: 13px;
    margin-top: 2px;
  }
  
  .tryon-tray__thumbs{
    display:flex;
    justify-content: flex-start;   /* ✅ start from left */
    gap: 10px;
    align-items:center;
    overflow-x:auto;
    overflow-y: visible;
    padding: 2px 4px;
    scrollbar-width: none;
  }
  
  .tryon-tray__thumbs::-webkit-scrollbar{ height: 0; }
  
  /* 3) Bigger thumbs */
  .tryon-thumb{
    width: 76px;
    height: 58px;
    border-radius: 12px;
    background:#f3f4f6;
    overflow:hidden;
    position: relative;
    flex: 0 0 auto;
    border: 1px solid #e5e7eb;
  }
  .tryon-thumb img{
    width:100%;
    height:100%;
    object-fit: contain;
    display:block;
  }
  .tryon-thumb__x{
    position:absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 0;
    background: rgba(0,0,0,.55);
    color:#fff;
    cursor:pointer;
    line-height: 20px;
  }
  
  .tryon-tray__actions{
    display:flex;
    gap: 10px;
    align-items:center;
  }
  .tryon-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    background:#f3f4f6;
    color:#111;
    text-decoration:none;
    font-weight: 700;
  }
  .tryon-btn--primary{
    background:#18d30e;
    color:#fff;
  }
  .tryon-btn.is-disabled{
    opacity: .45;
    pointer-events: none;
  }
  
  .tryon-v3 .v3-badge--try{
    background: transparent;
    color: #0b4a57;
    border: 1px solid #48CAE4;
    font-weight: 700;
  }
  .tryon-v3 .v3-badge--try:hover{
    background: #48CAE4;
    color: #fff;
  }
  
  /* 6/7) + button bigger, same position as cart row, turns into trash when selected */
  .tryon-pick{
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111;
    display:grid;
    place-items:center;
    cursor:pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
  }
  .tryon-pick:hover{
    background: #ff7f6e;         /* light coral */
    border-color: #ff7f6e;
    color: #111;
    transform: translateY(-1px);
  }
  
  .tryon-pick__icon--trash{ display:none; }
  
  /* when selected -> show trash */
  .v3-card.is-selected .tryon-pick__icon--plus{ display:none; }
  .v3-card.is-selected .tryon-pick__icon--trash{ display:inline; }
  
  /* selected hover -> light red */
  .v3-card.is-selected .tryon-pick{
    border-color: #fecaca;
  }
  .v3-card.is-selected .tryon-pick:hover{
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
  }
  
  /* keep bottom row aligned even with missing brand/old price */
  .tryon-v3 .v3-row--bottom{
    align-items: center;
  }

  /* Tray: allow tooltips to show */
.tryon-tray__thumbs{
  overflow-x: auto;
  overflow-y: visible; /* important for tooltip */
}

/* Temu-ish tooltip on hover */
.tryon-thumb{
  position: relative;
}

.tryon-thumb::after{
  content: attr(data-name);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 8px);

  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  font-size: 12px;
  font-weight: 600;
  color: #fff;

  background: rgba(17,17,17,.92);
  padding: 6px 10px;
  border-radius: 10px;

  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}

.tryon-thumb:hover::after{
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.tryon-thumb__img{
  width: 76px;
  height: 58px;                /* keep the bigger image box */
  border-radius: 12px;
  background:#f3f4f6;
  overflow:hidden;
  position: relative;
  border: 1px solid #e5e7eb;
  display: grid;
  place-items: center;
}

.tryon-thumb__img img{
  width:100%;
  height:100%;
  object-fit: contain;
  display:block;
}

.tryon-thumb__name{
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  text-align: left;            /* ✅ aligns name under thumb, left */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === FINAL badges layout for Try-On select: pinned top + opposite corners === */
.tryon-v3 .v3-media{
  position: relative; /* anchor for absolute overlay */
}

.tryon-v3 .v3-badges{
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 6;

  display: grid;
  grid-template-columns: 1fr 1fr; /* left column + right column */
  row-gap: 6px;
  align-items: start;
}

/* Default (LTR): SALE/NEW stack on the left, TRY on the right */
.tryon-v3 .v3-badges .v3-badge{
  grid-column: 1;
  justify-self: start;
}
.tryon-v3 .v3-badges .v3-badge--try{
  grid-column: 2;
  grid-row: 1;         /* keep it on the top row */
  justify-self: end;
}

/* RTL: swap sides (TRY left, others right) */
html[dir="rtl"] .tryon-v3 .v3-badges .v3-badge{
  grid-column: 2;
  justify-self: end;
}
html[dir="rtl"] .tryon-v3 .v3-badges .v3-badge--try{
  grid-column: 1;
  justify-self: start;
}

