/* =========================================================
   MARKETPLACE - DETALLE DE PRODUCTO
   ========================================================= */

:root {
    --mp-alert-color:#dc3545;
    --mp-alert-bg:#fff6f7;
    --mp-alert-border:#efa5ad;
    --mp-alert-soft:#fff0f2;
}

.mp-product-modal .modal-dialog {
    max-width:980px;
}

.mp-product-modal .modal-content {
    overflow:hidden;
    border:0;
    border-radius:22px;
    box-shadow:0 20px 60px rgba(0,0,0,.18);
}

/* =========================================================
   HEADER
   ========================================================= */

.mp-product-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:18px 22px;
    border-bottom:1px solid #edf0f3;
    background:#fff;
}

.mp-product-header-copy {
    min-width:0;
}

.mp-product-category {
    display:block;
    margin-bottom:3px;
    color:#8a929b;
    font-size:.72rem;
    font-weight:700;
    letter-spacing:.06em;
    text-transform:uppercase;
}

.mp-product-name {
    margin:0;
    color:#16191d;
    font-size:1.35rem;
    font-weight:800;
}

.mp-product-close {
    display:flex;
    width:38px;
    height:38px;
    align-items:center;
    justify-content:center;
    padding:0;
    border-radius:50%;
    opacity:.55;
}

.mp-product-close:hover {
    background:#f4f5f6;
    opacity:1;
}

/* =========================================================
   BODY
   ========================================================= */

.mp-product-body {
    padding:22px;
    background:#fff;
}

/* =========================================================
   IMAGEN
   ========================================================= */

.mp-product-image-card {
    position:sticky;
    top:0;
}

.mp-product-image {
    width:100%;
    overflow:hidden;
    border-radius:20px;
    background:#f5f6f7;
}

.mp-product-image-file {
    display:block;
    width:100%;
    height:340px;
    object-fit:cover;
}

.mp-product-image-empty {
    display:flex;
    min-height:340px;
    align-items:center;
    justify-content:center;
    color:#adb3b9;
    font-size:4rem;
}

.mp-product-image-price {
    display:flex;
    align-items:center;
    gap:8px;
    margin-top:14px;
    padding:13px 16px;
    border:1px solid #edf0f3;
    border-radius:15px;
    background:#fff;
}

.mp-product-price-label {
    color:#8a929b;
    font-size:.8rem;
}

.mp-product-price {
    margin-left:auto;
    color:#171a1d;
    font-size:1.4rem;
    font-weight:800;
}

.mp-product-base-price {
    color:#a1a7ad;
    font-size:.85rem;
}

/* =========================================================
   INTRO
   ========================================================= */

.mp-product-intro {
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:14px;
    padding:12px 14px;
    border-radius:14px;
    background:#f8f7ff;
}

.mp-product-intro-icon {
    display:flex;
    width:34px;
    height:34px;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    border-radius:50%;
    background:var(--mp-color-primary);
    color:var(--mp-color-on-primary);
}

.mp-product-intro strong {
    display:block;
    margin-bottom:1px;
    font-size:.9rem;
}

.mp-product-intro span {
    display:block;
    color:#737b83;
    font-size:.78rem;
    line-height:1.3;
}

.mp-product-description {
    margin:0 0 14px;
    color:#6f7780;
    font-size:.88rem;
    line-height:1.45;
}

/* =========================================================
   BLOQUES DE OPCIONES
   ========================================================= */

.mp-product-option-block {
    margin-top:14px;
    padding:15px;
    border:1px solid #edf0f3;
    border-radius:16px;
    background:#fff;
    transition:border-color .2s ease,box-shadow .2s ease,background .2s ease;
}

.mp-product-option-block:first-child {
    margin-top:0;
}

.mp-product-option-block-complete {
    border-color:#dce8df;
    background:#fcfffd;
}

.mp-product-option-header {
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:8px;
}

.mp-product-option-header-icon {
    display:flex;
    width:35px;
    height:35px;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    border-radius:11px;
    background:#f3f4f6;
    color:var(--mp-color-primary);
}

.mp-product-option-header-copy {
    display:flex;
    min-width:0;
    flex:1;
    flex-direction:column;
}

.mp-product-option-header-copy .lblGrupo {
    color:#202328;
    font-size:.92rem;
    font-weight:800;
}

.mp-product-option-header-copy .lblOpcion {
    margin-top:1px;
    color:#8a929b;
    font-size:.76rem;
}

.mp-product-required {
    padding:5px 8px;
    flex-shrink:0;
    border-radius:20px;
    background:#f4f5f6;
    color:#626970;
    font-size:.68rem;
    font-weight:700;
}

/* =========================================================
   OPCIONES
   ========================================================= */

.mp-product-option-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    min-height:56px;
    margin-top:6px;
    padding:9px 10px;
    border-radius:12px;
    transition:background .15s ease,transform .15s ease;
}

.mp-product-option-row:hover {
    background:#fafafa;
}

.mp-product-option-row-selected {
    background:color-mix(in srgb, var(--mp-color-primary) 6%, #fff);
}

.mp-product-option-description {
    display:flex;
    min-width:0;
    flex:1;
    flex-direction:column;
}

.mp-product-option-name {
    color:#30343a;
    font-size:.88rem;
    font-weight:600;
}

.mp-product-option-price {
    margin-top:2px;
    color:#8a929b;
    font-size:.75rem;
}

.mp-product-option-counter {
    display:flex;
    align-items:center;
    flex-shrink:0;
    gap:7px;
}

.mp-product-option-counter .btn-cnt {
    display:flex;
    width:34px;
    height:34px;
    align-items:center;
    justify-content:center;
    padding:0;
    border:1px solid #e2e5e8;
    border-radius:50%;
    background:#fff;
    color:#34383d;
}

.mp-product-option-counter .cntAdd {
    border-color:rgba(0,0,0,.08);
    background:var(--mp-color-primary);
    color:var(--mp-color-on-primary);
}

.mp-product-option-counter .btn-cnt:hover {
    transform:scale(1.06);
}

.mp-product-option-counter .btn-cnt:disabled {
    opacity:.35;
    transform:none;
}

.mp-product-option-counter .btnSug {
    display:flex;
    min-width:27px;
    height:27px;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#f0f1f3;
    color:#262a2f;
    font-size:.8rem;
    font-weight:800;
}

/* =========================================================
   SELECCIÓN ÚNICA
   ========================================================= */

.mp-product-single-row {
    cursor:pointer;
}

.mp-product-single-control {
    display:flex;
    width:34px;
    height:34px;
    align-items:center;
    justify-content:center;
    padding:0;
    border:1px solid #dfe3e6;
    border-radius:50%;
    background:#fff;
    color:#8a929b;
    transition:border-color .15s ease,background .15s ease,color .15s ease,transform .15s ease;
}

.mp-product-single-control:hover {
    transform:scale(1.06);
}

.mp-product-single-row.mp-product-option-row-selected .mp-product-single-control {
    border-color:var(--mp-color-primary);
    background:var(--mp-color-primary);
    color:var(--mp-color-on-primary);
    box-shadow:0 0 0 2px color-mix(in srgb, var(--mp-color-primary) 10%, transparent);
}

.mp-product-single-row.mp-product-option-row-selected {
    background:color-mix(in srgb, var(--mp-color-primary) 6%, #fff);
}

/* =========================================================
   PÍDELO SIN
   ========================================================= */

.mp-product-without-row {
    margin-top:7px;
    padding:11px 12px;
    border-radius:11px;
    background:#fafafa;
    transition:background .15s ease;
}

.mp-product-without-row-selected {
    background:#fff7f7;
}

.mp-product-without-row .custom-control-label {
    color:#34383d;
    font-size:.87rem;
    font-weight:500;
}

/* =========================================================
   OBSERVACIONES
   ========================================================= */

.mp-product-notes {
    margin-top:16px;
    padding:15px;
    border:1px dashed #d9dde1;
    border-radius:16px;
    background:#fafbfc;
}

.mp-product-notes-title {
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:10px;
}

.mp-product-notes-icon {
    display:flex;
    width:34px;
    height:34px;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    border-radius:50%;
    background:#fff;
    color:var(--mp-color-primary);
}

.mp-product-notes-title strong {
    display:block;
    font-size:.88rem;
}

.mp-product-notes-title small {
    display:block;
    margin-top:1px;
    color:#8a929b;
    font-size:.74rem;
    line-height:1.3;
}

.mp-product-notes textarea {
    min-height:68px;
    border:1px solid #dfe3e6;
    border-radius:11px;
    resize:none;
}

/* =========================================================
   VALIDACIÓN / ALERTAS
   ========================================================= */

.mp-product-validation {
    display:flex;
    align-items:center;
    gap:8px;
    margin:8px 0 5px;
    padding:9px 11px;
    border-radius:10px;
    background:var(--mp-alert-bg);
    color:var(--mp-alert-color);
    font-size:.77rem;
    font-weight:600;
    line-height:1.35;
}

.mp-product-validation-icon {
    display:flex;
    width:22px;
    height:22px;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    border-radius:50%;
    background:var(--mp-alert-soft);
    color:var(--mp-alert-color);
}

.mp-product-option-block-error {
    border-color:var(--mp-alert-border);
    background:#fff;
    box-shadow:0 0 0 2px rgba(220,53,69,.05);
}

.mp-product-option-block-error .mp-product-option-header-icon {
    background:var(--mp-alert-soft);
    color:var(--mp-alert-color);
}

.mp-product-option-block-error .mp-product-required {
    background:var(--mp-alert-soft);
    color:var(--mp-alert-color);
}

@keyframes mp-product-shake {

    0%,
    100% {
        transform:translateX(0);
    }

    25% {
        transform:translateX(-4px);
    }

    50% {
        transform:translateX(4px);
    }

    75% {
        transform:translateX(-2px);
    }
}

.mp-product-option-block-shake {
    animation:mp-product-shake .35s ease;
}

/* =========================================================
   FOOTER
   ========================================================= */

.mp-product-footer {
    display:flex;
    align-items:center;
    gap:16px;
    padding:14px 20px;
    border-top:1px solid #edf0f3;
    background:#fff;
}

.mp-product-main-quantity {
    display:flex;
    align-items:center;
    gap:10px;
}

.mp-product-main-quantity-label {
    color:#777f87;
    font-size:.75rem;
    font-weight:600;
}

.mp-product-quantity {
    display:flex;
    align-items:center;
    gap:5px;
}

.mp-product-quantity .btn {
    display:flex;
    width:38px;
    height:38px;
    align-items:center;
    justify-content:center;
    padding:0;
    border:1px solid #e0e4e7;
    border-radius:50%;
    background:#fff;
    color:#2f3338;
}

.mp-product-quantity .btnMas {
    background:#f4f5f7;
}

.mp-product-quantity .txtCantidadProducto {
    width:42px;
    height:38px;
    padding:0;
    border:0;
    background:transparent;
    text-align:center;
    font-size:.95rem;
    font-weight:800;
}

.mp-product-footer .btn-aceptar {
    display:flex;
    min-height:50px;
    align-items:center;
    justify-content:center;
    flex:1;
    gap:11px;
    border:0;
    border-radius:14px;
    font-size:.9rem;
    font-weight:700;
    box-shadow:0 6px 18px rgba(0,0,0,.10);
}

.mp-product-add-label {
    display:flex;
    align-items:center;
    gap:6px;
}

.mp-product-add-divider {
    width:1px;
    height:18px;
    background:rgba(255,255,255,.35);
}

.mp-product-footer .total {
    white-space:nowrap;
    font-size:1rem;
    font-weight:800;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (min-width:768px) and (max-width:991px) {

    .mp-product-modal .modal-dialog {
        width:calc(100% - 32px);
        max-width:760px;
        margin:16px auto;
    }

    .mp-product-modal .modal-content {
        max-height:calc(100vh - 32px);
        border-radius:20px;
    }

    .mp-product-body {
        padding:20px 22px;
    }

    .mp-product-image-card {
        position:static;
    }

    .mp-product-image-file {
        height:340px;
    }

    .mp-product-image-empty {
        min-height:340px;
    }

    .mp-product-footer {
        position:sticky;
        bottom:0;
        z-index:10;
        background:#fff;
        box-shadow:0 -8px 20px rgba(0,0,0,.05);
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width:767px) {

    .mp-product-modal {
        padding:0 !important;
    }

    .mp-product-modal .modal-dialog {
        width:100%;
        max-width:none;
        height:100%;
        min-height:100%;
        margin:0;
    }

    .mp-product-modal .modal-content {
        width:100%;
        height:100vh;
        min-height:100vh;
        max-height:100vh;
        border-radius:0;
    }

    .mp-product-modal .modal-header {
        flex-shrink:0;
    }

    .mp-product-modal .modal-body {
        min-height:0;
        flex:1 1 auto;
        overflow-x:hidden;
        overflow-y:auto;
        overscroll-behavior:contain;
        padding:13px;
    }

    .mp-product-body > .row {
        margin-right:0;
        margin-left:0;
    }

    .mp-product-body > .row > [class*="col-"] {
        padding-right:0;
        padding-left:0;
    }

    .mp-product-header {
        padding:14px 15px;
    }

    .mp-product-name {
        font-size:1.15rem;
    }

    .mp-product-image-card {
        position:static;
    }

    .mp-product-image {
        border-radius:16px;
    }

    .mp-product-image-file {
        height:auto;
        max-height:300px;
        aspect-ratio:4 / 3;
        object-fit:cover;
    }

    .mp-product-image-empty {
        min-height:230px;
    }

    .mp-product-image-price {
        margin-top:9px;
    }

    .mp-product-intro {
        margin-top:2px;
    }

    .mp-product-option-block {
        padding:13px;
    }

    .mp-product-option-row {
        min-height:52px;
        padding:8px 5px;
    }

    .mp-product-option-counter {
        gap:5px;
    }

    .mp-product-option-counter .btn-cnt {
        width:36px;
        height:36px;
    }

    .mp-product-single-control {
        width:36px;
        height:36px;
    }

    .mp-product-footer {
        position:relative;
        flex-shrink:0;
        bottom:auto;
        z-index:10;
        gap:9px;
        padding:10px 12px;
        background:#fff;
        box-shadow:0 -8px 20px rgba(0,0,0,.06);
    }

    .mp-product-main-quantity {
        gap:3px;
    }

    .mp-product-main-quantity-label {
        display:none;
    }

    .mp-product-quantity .btn {
        width:38px;
        height:42px;
    }

    .mp-product-quantity .txtCantidadProducto {
        width:35px;
        height:42px;
    }

    .mp-product-footer .btn-aceptar {
        min-height:48px;
        border-radius:13px;
    }

    .mp-product-add-label {
        font-size:.84rem;
    }

    .mp-product-footer .total {
        font-size:.9rem;
    }
}

/* =========================================================
   MOBILE PEQUEÑO
   ========================================================= */

@media (max-width:400px) {

    .mp-product-modal .modal-body {
        padding:12px;
    }

    .mp-product-image-file {
        max-height:260px;
    }

    .mp-product-footer {
        gap:7px;
        padding-left:9px;
        padding-right:9px;
    }

    .mp-product-quantity .btn {
        width:35px;
    }

    .mp-product-quantity .txtCantidadProducto {
        width:30px;
    }

    .mp-product-footer .btn-aceptar {
        gap:7px;
        padding-left:10px;
        padding-right:10px;
    }

    .mp-product-add-divider {
        display:none;
    }
}