/* Custom Pack – ficha de producto (Warehouse 4.5 / classic) */

/* Precio nativo oculto solo en el producto principal (el JS añade esta clase);
   los precios de carruseles y productos relacionados no se tocan. */
.cp-native-price-hidden {
    display: none !important;
}

/* ---------- Precio del pack (mismo diseño que tenía la web) ---------- */
.cp-main-price-container {
    margin-bottom: 20px;
    font-family: inherit;
}
.cp-price-display-wrapper {
    display: inline-flex;
    align-items: flex-start;
    color: #b30000;
    line-height: 0.9;
}
.cp-price-whole-part {
    font-size: 58px;
    font-weight: bold;
    letter-spacing: -2px;
}
.cp-price-decimal-part {
    font-size: 26px;
    font-weight: bold;
    margin-top: 8px;
    margin-left: 2px;
}
.cp-price-symbol-part {
    font-size: 20px;
    font-weight: 500;
    margin-top: 12px;
    margin-left: 3px;
}
.cp-price-tax-label {
    font-size: 12px;
    color: #777;
    margin-top: 6px;
}

/* ---------- Selector ---------- */
.product-custompack {
    margin-top: 1.5rem;
}
.product-custompack .cp-title {
    margin-bottom: .75rem;
}
.cp-total-rule {
    margin-bottom: .5rem;
    font-weight: 600;
}
.cp-items-list {
    margin-bottom: .75rem;
}
.cp-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity .2s;
}
.cp-item-inactive {
    opacity: .5;
}
.cp-item-soldout {
    opacity: .4;
}
.cp-item-media {
    flex: 0 0 52px;
}
.cp-item-media img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 4px;
}
.cp-item-media:empty {
    display: none;
}
.cp-item-info {
    flex: 1 1 auto;
    min-width: 0;
}
.cp-item-name {
    font-weight: 600;
    color: inherit;
}
.cp-item-meta {
    font-size: 12px;
    color: #777;
}
.cp-badge-required {
    color: #b30000;
    font-weight: bold;
    margin-left: 2px;
}
.cp-item-qty {
    flex: 0 0 auto;
}
.cp-stepper {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}
.cp-qty-btn {
    width: 34px;
    border: 0;
    background: #f5f5f5;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.cp-qty-btn:hover:not(:disabled) {
    background: #e8e8e8;
}
.cp-qty-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}
.cp-qty-input {
    width: 46px;
    height: 34px;
    border: 0;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    text-align: center;
    font-weight: 600;
    -moz-appearance: textfield;
}
.cp-qty-input::-webkit-outer-spin-button,
.cp-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.cp-summary {
    margin-bottom: .5rem;
    font-size: 14px;
}
.cp-units.cp-invalid {
    color: #b30000;
    font-weight: 600;
}
.cp-feedback {
    margin-top: .5rem;
}
.cp-loading {
    opacity: .6;
    pointer-events: none;
}

@media (max-width: 575px) {
    .cp-price-whole-part { font-size: 44px; }
    .cp-price-decimal-part { font-size: 20px; margin-top: 6px; }
    .cp-price-symbol-part { font-size: 16px; margin-top: 9px; }
    .cp-item-row { gap: 8px; }
}

/* ---------- Ahorro frente a comprar por separado ---------- */
.cp-savings {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 14px;
}
.cp-savings-regular {
    color: #777;
}
.cp-savings-regular s {
    color: #777;
}
.cp-savings-badge {
    background: #2e7d32;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    padding: 2px 8px;
    border-radius: 3px;
}

/* ---------- Barra fija inferior (solo móvil) ---------- */
.cp-sticky-bar {
    display: none;
}
@media (max-width: 767px) {
    body > .cp-sticky-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: #fff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, .15);
        transform: translateY(110%);
        transition: transform .25s ease;
    }
    body > .cp-sticky-bar.cp-sticky-visible {
        transform: translateY(0);
    }
    .cp-sticky-info {
        display: flex;
        flex-direction: column;
        line-height: 1.15;
    }
    .cp-sticky-units {
        font-size: 12px;
        color: #777;
    }
    .cp-sticky-invalid .cp-sticky-units {
        color: #b30000;
        font-weight: 600;
    }
    .cp-sticky-price {
        font-size: 20px;
        font-weight: bold;
        color: #b30000;
    }
    .cp-sticky-buy {
        flex: 0 0 auto;
        min-width: 130px;
    }
}
