/* ============================================================
   MBP Sticky Add To Cart — Frontend
   ============================================================ */

/* --- Barra principal --- */
.mbp-satc-bar {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100001;
    box-shadow: 0 -2px 12px rgba(0,0,0,.25);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mbp-satc-top    { top: 0;    box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.mbp-satc-bottom { bottom: 0; }

.mbp-satc-inner {
    display: flex;
    align-items: stretch;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Secciones --- */
.mbp-satc-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    flex-shrink: 0;
}

.mbp-satc-info {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-start;
    gap: 12px;
}

.mbp-satc-price-section,
.mbp-satc-stars-section {
    flex: 0 0 auto;
}

.mbp-satc-action {
    flex: 0 0 auto;
    padding: 0 20px;
}

/* --- Divisor --- */
.mbp-satc-divider {
    width: 1px;
    align-self: stretch;
    border-left: 1px solid #333;
    margin: 10px 0;
    flex-shrink: 0;
}

/* --- Thumbnail --- */
.mbp-satc-thumb {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
}

.mbp-satc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* --- Nombre --- */
.mbp-satc-name-wrap {
    min-width: 0;
}

.mbp-satc-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

/* --- Precio --- */
.mbp-satc-price,
.mbp-satc-sale-price {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

/* Strip WC's default <span> styling inside our badge */
.mbp-satc-price .woocommerce-Price-amount,
.mbp-satc-sale-price .woocommerce-Price-amount {
    color: inherit;
}

.mbp-satc-regular-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    gap: 2px;
}

.mbp-satc-regular-price del {
    text-decoration: line-through;
    opacity: .8;
}

/* --- Estrellas --- */
.mbp-satc-stars {
    display: flex;
    align-items: center;
}

/* --- Botón --- */
.mbp-satc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: filter .15s ease, transform .1s ease;
    line-height: 1.4;
}

.mbp-satc-btn:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
    text-decoration: none !important;
}

.mbp-satc-btn:active {
    transform: translateY(0);
}

.mbp-satc-out-of-stock {
    font-size: 13px;
    opacity: .7;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .mbp-satc-name-wrap  { display: none; }
    .mbp-satc-stars-section { display: none; }
    .mbp-satc-divider:last-of-type { display: none; }

    .mbp-satc-thumb {
        width: 42px;
        height: 42px;
    }

    .mbp-satc-info {
        flex: 0 0 auto;
    }

    .mbp-satc-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .mbp-satc-price,
    .mbp-satc-sale-price {
        padding: 3px 8px;
        font-size: 13px;
    }
}

/* --- RateYo (estrellas) --- */
.jq-ry-container {
    position: relative;
    padding: 0 3px;
    line-height: 0;
    display: block;
    cursor: default;
    box-sizing: content-box;
    direction: ltr;
}
.jq-ry-container[readonly="readonly"] { cursor: default; }
.jq-ry-container > .jq-ry-group-wrapper { position: relative; width: 100%; }
.jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group {
    position: relative;
    line-height: 0;
    z-index: 10;
    white-space: nowrap;
}
.jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group > svg { display: inline-block; }
.jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group.jq-ry-normal-group { width: 100%; }
.jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group.jq-ry-rated-group {
    width: 0;
    z-index: 11;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
}
.sticky-star-rating .jq-ry-group-wrapper { width: fit-content; }
