/* =========================
   Box globale
========================= */

.cdte-bundle-box {
    margin: 14px 0 18px;
    padding: 20px 20px 20px 20px !important;
    border-radius: 15px;
    background: #F6F5F8;
    box-shadow: 0 1px 0px rgba(0, 0, 0, 0.1);
}

/* Header : titre + sous-titre % */
.cdte-bundle-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 10px;
    margin-bottom: 10px;
}

.cdte-bundle-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #464646 !important;
}

.cdte-bundle-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: #464646 !important;
}

/* =========================
   Liste
========================= */

.cdte-bundle-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2px !important;
}

.cdte-bundle-item {
    border: 1px solid #dddddd;
    background: #FFF;
    border-radius: 10px;
    padding: 10px 10px 0px 10px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

/* Hover + état sélectionné (checkbox cochée) = même style */
.cdte-bundle-item:hover,
.cdte-bundle-item:has(.cdte-bundle-checkbox:checked) {
    border-color: #FD4C1E;
    background: #FFF4F2;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

/* =========================
   Ligne : checkbox + image + contenu + icône info
========================= */

.cdte-bundle-label {
    display: grid;
    grid-template-columns: 18px 44px 1fr auto;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    width: 100%;
}

/* Checkbox réelle + custom */

.cdte-bundle-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cdte-bundle-checkbox-custom {
    width: 17px;
    height: 17px;
    border-radius: 4px;
    border: 1px solid #DDDDDD !important;
    background: #ffffff;
    box-shadow: inset 0 0 0 2px transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    transition: all .15s ease;
}

.cdte-bundle-checkbox:checked + .cdte-bundle-checkbox-custom {
    background: #ff3b30;
    border-color: #ff3b30;
    box-shadow: 0 0 0 1px rgba(255, 59, 48, 0.25);
}

.cdte-bundle-checkbox:checked + .cdte-bundle-checkbox-custom::before {
    content: "✓";
}

/* Vignette produit */

.cdte-bundle-thumb img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 0px;
    background: #fff;
}

/* Contenu texte */

.cdte-bundle-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
}

.cdte-bundle-name {
    font-size: 13px;
    line-height: 1.25;
    font-weight: 600;
    color: #464646;
    min-width: 0;
}

/* Prix old/new alignés à droite dans le bloc texte */

.cdte-bundle-prices {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 8px;
    margin-top: 2px;
}

.cdte-price-old {
    color: #959496 !important;
    text-decoration: line-through;
    font-size: 13px !important;
}

.cdte-price-new {
    color: #FD4C1E !important;
    font-weight: 700 !important;
    font-size: 15px !important;
}

/* =========================
   Icône info + tooltip
========================= */

.cdte-bundle-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    flex: 0 0 auto;
    outline: none;
}

.cdte-bundle-info-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #FD4C1E;
    background: #FD4C1E;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Tooltip principal */

.cdte-bundle-tooltip {
    position: absolute;
    top: 26px;
    right: 0;
    width: 260px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 50;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .15s ease, visibility .15s ease, transform .15s ease;
}

.cdte-bundle-info:hover .cdte-bundle-tooltip,
.cdte-bundle-info:focus .cdte-bundle-tooltip,
.cdte-bundle-info:focus-within .cdte-bundle-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Petite flèche */

.cdte-bundle-tooltip::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 10px;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
    transform: rotate(45deg);
}

/* Contenu interne tooltip */

.cdte-bundle-tooltip-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cdte-bundle-tooltip-header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 2px;
}

.cdte-bundle-tooltip-header img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    background: #f8fafc;
}

.cdte-bundle-tooltip-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.cdte-bundle-tooltip-body {
    font-size: 11.5px;
    color: #4b5563;
    line-height: 1.35;
}

.cdte-bundle-tooltip-footer a {
    font-size: 11.5px;
    font-weight: 600;
    color: #ff3b30;
    text-decoration: none;
}

.cdte-bundle-tooltip-footer a:hover {
    text-decoration: underline;
}

/* =========================
   Bouton & prix dynamiques
========================= */

button.single_add_to_cart_button.cdte-bundle-active {
    filter: saturate(1.05);
}

/* Prix total injecté dans .price */
.cdte-total-old {
    margin-right: 6px;
    opacity: 1; /* plus de gris "délavé" */
}

.cdte-total-new {
    text-decoration: none;
    font-weight: 700;
}

/* Couleur grise uniforme pour tous les prix barrés
   (lignes de bundle + total dynamique) */
.cdte-price-old,
.cdte-price-old .woocommerce-Price-amount,
.cdte-price-old .woocommerce-Price-amount bdi,
.cdte-price-old .woocommerce-Price-amount .woocommerce-Price-currencySymbol,
.cdte-total-old,
.cdte-total-old .woocommerce-Price-amount,
.cdte-total-old .woocommerce-Price-amount bdi,
.cdte-total-old .woocommerce-Price-amount .woocommerce-Price-currencySymbol {
    color: #959496 !important;
}


/* Mobile : padding 15px partout */
@media (max-width: 767px) {
  .cdte-bundle-box {
    padding: 15px !important;
  }
}
