/* Основной контейнер */
#wcpb-wrapper,
#woo-custom-product-bundles-wrapper {
    margin-top: 15px;
}

/* CSS для прокрутки товаров в админке */
.ui-autocomplete {
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
    z-index: 10000 !important;
  }
  

/* Стили наборов */
.wcpb-bundle,
.custom-bundle {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2c7be5;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

.wcpb-bundle:hover,
.custom-bundle:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.wcpb-bundle h4,
.custom-bundle h4 {
    font-size: 16px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcpb-bundle h4::before,
.custom-bundle h4::before {
    content: "\1F4E6"; /* 📦 */
    display: inline-block;
}

.wcpb-bundle label,
.custom-bundle label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.wcpb-bundle input[type="text"],
.wcpb-bundle input[type="number"],
.wcpb-bundle select,
.custom-bundle input[type="text"],
.custom-bundle input[type="number"],
.custom-bundle select {
    width: 100%;
    /*max-width: 400px;*/
    padding: 6px 8px;
    margin-top: 4px;
    margin-bottom: 10px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-sizing: border-box;
}

.wcpb-settings,
.bundle-settings {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
}

.wcpb-summary,
.bundle-summary {
    background: #f9f9f9;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    margin-top: 10px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.wcpb-summary div,
.bundle-summary div {
    margin-bottom: 0;
    white-space: nowrap;
}

.wcpb-summary strong,
.bundle-summary strong {
    color: #007cba;
}

.wcpb-products,
.bundle-products {
    margin-top: 10px;
    margin-bottom: 10px;
}

.wcpb-products .wcpb-product,
.bundle-products .product {
    background: #fdfdfd;
    border: 1px dashed #bbb;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #20c997;
    border-radius: 5px;
    position: relative;
}

.wcpb-products .wcpb-product img,
.bundle-products .product img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-bottom: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    display: block;
}

.wcpb-products .wcpb-product .wcpb-sku,
.bundle-products .product .product-sku {
    font-size: 13px;
    color: #777;
    margin-bottom: 5px;
}

.wcpb-products .wcpb-product,
.bundle-products .product .product-price {
    font-size: 14px;
    font-weight: bold;
    color: #444;
    margin-bottom: 10px;
}


.wcpb-fields {
    display: grid;
    grid-template-columns: auto 2fr auto 70px;
    gap: 15px;
    /*align-items: end;*/
    margin-bottom: 12px;
}


  .wcpb-price-block label {
    /*font-size: 14px;*/
    font-weight: 500;
    /*color: #333;*/
    /*display: block;*/
    margin-bottom: 4px;
}

/*.wcpb-price-block {
    /*text-align: right;
}*/

.wcpb-qty-block input {
    width: 100%;
    max-width: 60px;
}

.wcpb-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wcpb-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin-bottom: 5px;
}

.wcpb-sku {
    font-size: 13px;
    color: #777;
    text-align: center;
}

.wcpb-price {
    font-size: 14px;
    font-weight: bold;
    color: #007cba;
    /*text-align: right;*/
    white-space: nowrap;
}

.wcpb-qty-wrapper input {
    width: 100%;
}

@media (max-width: 768px) {
    .wcpb-info {
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }
}



.add-product {
    display: inline-block;
    background: #28a745;
    margin: 15 0 0;
    padding: 10px 20px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: normal;
}

.wcpb-remove-product {
    display: inline-block;
    margin: 15px 0 0;
    padding: 10px 20px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: normal;
}

.remove-bundle {
    padding: 10px 20px;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    float: right;
    background-color: #dc3545;
}

.remove-bundle:hover {
    background-color: #c82333;
}

.remove-bundle::before {
    content: "\2716"; /* ✖ — крестик */
    display: inline-block;
    font-size: 12px;
}

.add-product {
    background-color: #28a745;
    color: #fff;
}

.add-product:hover {
    background-color: #218838;
}


.wcpb-remove-product:hover {
    background-color: #c82333;
}


#wcpb-add-bundle,
#add-custom-bundle {
    margin-top: 20px;
    padding: 10px 20px;
    background: #f0f0f1;
    /*color: white;*/
    border: 1px solid #0160b4;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}

#wcpb-add-bundle:hover,
#add-custom-bundle:hover {
    background: #fff;
}

#wcpb-add-bundle::before,
#add-custom-bundle::before {
    /*content: "\2795"; /* ➕ */
    display: inline-block;
}

#save-bundles {
    margin-top: 20px;
    padding: 10px 20px;
    background: #f0f0f1;
    color: #0160b4;
    border: 1px solid #0160b4;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}

#save-bundles:hover {
    background: #fff;
}

/*.wcpb-woo-bundle-item,
.woo-bundle-item {
    min-width: 300px;
    max-width: 100%;
    width: 100%;
}*/

.woo-bundles-frontend {
    width: 100%;
}

/* Адаптивность */
@media (max-width: 768px) {
    .wcpb-settings,
    .bundle-settings
     {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .wcpb-bundle,
    .custom-bundle {
        padding: 12px;
    }

    .wcpb-bundle h4,
    .custom-bundle h4 {
        font-size: 16px;
    }

    .wcpb-bundle input,
    .wcpb-bundle select,
    .custom-bundle input,
    .custom-bundle select {
        width: 100%;
        font-size: 13px;
        padding: 6px 10px;
    }

    .add-product {
        font-size: 12px;
        padding: 6px 10px;
        margin: 12px 0;
    }

    .wcpb-remove-product {
        font-size: 12px;
        padding: 6px 10px;
    }

   

    #wcpb-add-bundle,
    #add-custom-bundle {
        font-size: 14px;
        padding: 10px 20px;
        justify-content: center;
    }

    .remove-bundle {
        font-size: 12px;
        padding: 6px 10px;
        margin: 12px 0;
    }

    .wcpb-sku,
    .wcpb-price,
    .product-sku,
    .product-price {
        font-size: 13px;
    }


    .wcpb-fields,
    .product-fields {
        gap: 8px;
    }
}

/* Адаптивность mobile */
@media (max-width: 768px) {
    .wcpb-fields {
      display: flex;
      flex-direction: column;
      align-items: stretch;
    }
  
    .wcpb-price-block,
    .wcpb-qty-block,
    .wcpb-name,
    .wcpb-info {
      width: 100%;
      text-align: left;
    }
  
    .wcpb-price {
      text-align: left;
      margin-top: 5px;
    }
  
    .wcpb-price-block label {
        margin: 0 0 10px 0;
    }
  }
  
/* блок свернуть, развернуть */
/* Контейнер обёртки всех комплектов */
.wcpb-bundles-wrapper {
    margin-top: 20px;
}

/* Кнопка показать/скрыть */
a.wcpb-toggle-bundles {
    display: block;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 15px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-weight: normal !important;
    color: #fff !important;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.3s;
    width: 100%;
    background-color:#007cba;
}

a.wcpb-toggle-bundles:hover {
    background-color:#005a9e;
}

/* Скрытые комплекты до разворота */
.wcpb-bundle-hidden {
    display: none;
    opacity: 0.3;
    filter: blur(2px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.wcpb-bundle-expanded .wcpb-bundle-hidden.visible {
    display: block;
    opacity: 1;
    filter: none;
    pointer-events: auto;
}

/* Стиль карточки комплекта */
.wcpb-woo-bundle-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    /*border-left: 4px solid #20c997 !important;*/
    border-left: 3px solid #0f834d;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 25px;
    transition: box-shadow 0.2s;
}

.wcpb-woo-bundle-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Отступ между карточками */
.wcpb-bundles-wrapper > .wcpb-woo-bundle-item + .wcpb-woo-bundle-item {
    margin-top: 20px;
}

/* Подстрой под высоту 1 комплекта + немного второго */
/*.wcpb-mask-scroll {
    max-height: 750px; 
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    transition: max-height 0.4s ease;
  }
  
  .wcpb-bundle-expanded .wcpb-mask-scroll {
    max-height: none;
    mask-image: none;
    -webkit-mask-image: none;
  }*/
  

  .single_add_to_cart_button:hover {
    background-color: #01559e !important;
  }

  .wcpb-bundle-inline {
    white-space: nowrap;
}

.wcpb-button-green {
    background: #28a745;
    color: white;
}

.wcpb-button-red {
    background: #dc3545;
    color: white;
}
