/* =========================================================
   BMX BUILDER
   ========================================================= */

html,
body {
    background: #ffffff !important;
}


/* =========================================================
   CONTENEDOR
   ========================================================= */

#bmx-builder {
    width: 100%;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 700px;
    background: #ffffff;
    box-sizing: border-box;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.bmx-sidebar {
    grid-column: 1;
    grid-row: 1;

    width: 250px;

    margin-top: 25px;

    padding: 20px;
    padding-bottom: 5px;

    border: 1px solid #ddd;
    border-radius: 5px;

    background: #fafafa;

    box-sizing: border-box;

    align-self: start;

    position: sticky;
    top: 110px;

    z-index: 2;
}


.bmx-sidebar h3 {
    margin: 0 0 25px 0;
    font-size: 22px;
}


#bmx-steps {
    padding: 0;
    margin: 0;
}


#bmx-steps li {
    list-style: none;

    padding: 15px;

    margin: 0 0 5px 0;

    cursor: pointer;

    border-radius: 8px;

    color: #444;

    font-weight: 500;

    transition: .25s ease;
}


#bmx-steps li:hover {
    background: #eeeeee;
}


#bmx-steps li.active {
    background: #ff1b1b;
    color: #ffffff;
    font-weight: 700;
}


/* =========================================================
   PRODUCTOS
   ========================================================= */

.bmx-products {
    grid-column: 2;
    grid-row: 1;

    width: 100%;
    min-width: 0;

    padding: 30px;

    box-sizing: border-box;

    position: relative;
    z-index: 1;
}


#step-title {
    margin: 0 0 25px 0;
}


/* =========================================================
   GRID DE PRODUCTOS
   ========================================================= */

#products-container {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;

    box-sizing: border-box;
}


/* =========================================================
   TARJETAS
   ========================================================= */

.bmx-card {
    width: 100%;
    min-width: 0;

    padding: 15px;

    border: 1px solid #ddd;
    border-radius: 12px;

    background: #ffffff;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border .25s ease;
}


.bmx-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, .12);
}


.bmx-card.selected {
    border: 3px solid #ff1b1b;

    box-shadow:
        0 0 18px rgba(255, 27, 27, .30);
}


.bmx-card img {
    display: block;

    width: 100%;
    height: 220px;

    object-fit: contain;
}


/* =========================================================
   NOMBRE
   ========================================================= */

.bmx-card h3 {
    margin: 15px 0 0 0 !important;
    padding: 0 !important;

    font-size: 18px;

    line-height: 1.2 !important;
}


/* =========================================================
   PRECIO
   ========================================================= */

.bmx-card p {
    margin: 2px 0 0 0 !important;
    padding: 0 !important;

    font-size: 17px;

    font-weight: 700;

    line-height: 1.2 !important;
}


/* =========================================================
   FOOTER
   ========================================================= */

.bmx-footer {
    position: fixed;

    left: 0;
    bottom: 0;

    width: 100%;
    height: 100px;

    padding: 0 30px;

    background: #ffffff;

    border-top: 1px solid #ddd;

    box-sizing: border-box;

    z-index: 999;

    display: grid !important;

    grid-template-columns: 1fr 1fr 1fr 1fr !important;

    align-items: center !important;

    margin: 0 !important;
}


/* =========================================================
   TOTAL
   ========================================================= */

.bmx-total {
    grid-column: 1;
    grid-row: 1;

    display: flex !important;

    flex-direction: column !important;

    align-items: flex-start !important;

    justify-content: center !important;

    gap: 0 !important;

    width: auto !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 20px !important;
    font-weight: 700 !important;

    line-height: 1 !important;

    white-space: nowrap !important;
}


/* PRECIO */

#bmx-total {
    display: block !important;

    width: auto !important;
    height: auto !important;

    margin: 3px 0 0 0 !important;
    padding: 0 !important;

    color: #ff1b1b !important;

    font-size: 20px !important;
    font-weight: 700 !important;

    line-height: 1 !important;

    white-space: nowrap !important;
}


/* =========================================================
   CONTENEDOR DE BOTONES
   ========================================================= */

.bmx-actions {
    grid-column: 2 / 5;
    grid-row: 1;

    width: 100% !important;
    height: 100% !important;

    display: grid !important;

    grid-template-columns: repeat(3, 1fr) !important;

    align-items: center !important;

    justify-items: center !important;

    gap: 20px !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;
}


/* =========================================================
   BOTONES
   ========================================================= */

.bmx-footer button {
    display: grid !important;

    place-items: center !important;

    align-self: center !important;
    justify-self: center !important;

    width: auto !important;

    min-width: 110px !important;

    height: 54px !important;
    min-height: 54px !important;

    margin: 0 !important;

    padding: 0 20px !important;

    box-sizing: border-box !important;

    border: none !important;

    border-radius: 8px !important;

    background: #111111 !important;
    color: #ffffff !important;

    font-family: Arial, sans-serif !important;

    font-size: 15px !important;
    font-weight: 600 !important;

    line-height: normal !important;

    text-align: center !important;

    white-space: nowrap !important;

    cursor: pointer;

    transition:
        transform .25s ease,
        opacity .25s ease;
}


.bmx-footer button:hover {
    transform: translateY(-2px);

    opacity: .85;
}


#finish-bmx {
    background: #ff1b1b !important;
}


#finish-bmx:hover {
    background: #d90000 !important;
}


/* =========================================================
   MODAL VARIACIONES
   ========================================================= */

.variation-modal {
    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, .7);

    justify-content: center;
    align-items: center;

    z-index: 99999;
}


.variation-box {
    position: relative;

    width: 450px;
    max-width: calc(100% - 30px);

    padding: 30px;

    background: #ffffff;

    border-radius: 12px;

    box-sizing: border-box;
}


.variation-box h3 {
    margin: 0 0 20px 0;
}


.variation-box label {
    display: block;

    margin-top: 15px;
}


.variation-box select {
    width: 100%;

    padding: 10px;

    margin-top: 5px;

    box-sizing: border-box;
}


#variation-confirm {
    width: 100%;

    margin-top: 25px;

    padding: 12px;
}


#variation-close {
    position: absolute;

    top: 10px;
    right: 15px;

    padding: 0;

    border: none;

    background: transparent;

    color: #000000;

    font-size: 28px;

    line-height: 1;

    cursor: pointer;
}


#variation-close:hover {
    opacity: .7;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    #bmx-builder {
        display: flex;

        flex-direction: column;

        width: 100%;

        min-height: 0;
    }


    /* SIDEBAR */

    .bmx-sidebar {
        width: 100%;

        margin: 0;

        padding: 10px 15px;

        position: static;

        border-radius: 5px 5px 0 0;

        box-sizing: border-box;
    }


    .bmx-sidebar h3 {
        margin: 0 0 8px 0;

        font-size: 20px;

        line-height: 1.2;
    }


    #bmx-steps {
        display: flex;

        width: 100%;

        gap: 6px;

        overflow-x: auto;
        overflow-y: hidden;

        padding: 0 0 3px 0;
    }


    #bmx-steps li {
        flex: 0 0 auto;

        padding: 7px 10px;

        margin: 0;

        white-space: nowrap;

        font-size: 13px;

        line-height: 1.2;

        border-radius: 6px;
    }


    /* PRODUCTOS */

    .bmx-products {
        width: 100%;

        padding: 20px 15px;

        box-sizing: border-box;
    }


    #step-title {
        margin: 0 0 18px 0;

        font-size: 24px;
    }


    #products-container {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 15px;
    }


    .bmx-card {
        padding: 12px;
    }


    .bmx-card img {
        height: 180px;
    }


    .bmx-card h3 {
        margin-top: 12px;

        font-size: 16px;
    }


    .bmx-card p {
        margin-top: 2px !important;

        font-size: 15px;
    }


    /* =====================================================
       FOOTER TABLET
       ===================================================== */

    .bmx-footer {
        position: static;

        width: 100%;

        height: auto;

        padding: 10px 15px;

        display: flex !important;

        flex-direction: column !important;

        align-items: stretch !important;

        gap: 7px;

        box-sizing: border-box;
    }


    .bmx-total {
        display: flex !important;

        flex-direction: row !important;

        align-items: center !important;

        justify-content: center !important;

        width: 100% !important;

        height: auto !important;

        font-size: 18px !important;
    }


    #bmx-total {
        margin: 0 0 0 8px !important;

        font-size: 18px !important;
    }


    .bmx-actions {
        width: 100% !important;

        height: auto !important;

        display: grid !important;

        grid-template-columns:
            1fr 1fr !important;

        gap: 7px !important;
    }


    .bmx-footer button {
        width: 100%;

        min-width: 0;

        height: 40px;

        padding: 0 10px !important;

        font-size: 14px;
    }


    #finish-bmx {
        grid-column: 1 / -1;

        height: 42px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .bmx-sidebar {
        padding: 7px 10px;
    }


    .bmx-sidebar h3 {
        margin-bottom: 6px;

        font-size: 17px;
    }


    #bmx-steps {
        gap: 5px;

        padding-bottom: 2px;
    }


    #bmx-steps li {
        padding: 6px 9px;

        font-size: 12px;

        border-radius: 5px;
    }


    .bmx-products {
        padding: 12px 10px;
    }


    #step-title {
        margin-bottom: 12px;

        font-size: 22px;

        line-height: 1.2;
    }


    #products-container {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;
    }


    .bmx-card {
        padding: 8px;

        border-radius: 8px;
    }


    .bmx-card img {
        height: 130px;
    }


    .bmx-card h3 {
        margin-top: 8px;

        font-size: 14px;

        line-height: 1.2;
    }


    .bmx-card p {
        margin-top: 2px !important;

        font-size: 13px;

        line-height: 1.2;
    }


    /* =====================================================
       FOOTER MOBILE
       ===================================================== */

    .bmx-footer {
        height: 150px;

        min-height: 150px;
        max-height: 150px;

        padding: 7px 10px;

        justify-content: center;

        gap: 6px;
    }


    .bmx-total {
        font-size: 16px !important;

        line-height: 1 !important;
    }


    #bmx-total {
        margin: 0 0 0 6px !important;

        font-size: 16px !important;
    }


    .bmx-actions {
        width: 100% !important;

        display: grid !important;

        grid-template-columns:
            1fr 1fr !important;

        gap: 6px !important;
    }


    .bmx-footer button {
        width: 100%;

        height: 38px;

        min-height: 38px;
        max-height: 38px;

        padding: 0 6px !important;

        font-size: 13px;

        line-height: 1 !important;

        display: flex !important;

        align-items: center !important;
        justify-content: center !important;
    }


    #finish-bmx {
        grid-column: 1 / -1;

        height: 40px;

        min-height: 40px;
        max-height: 40px;
    }
}


/* =========================================================
   MOBILE PEQUEÑO
   ========================================================= */

@media (max-width: 420px) {

    .bmx-products {
        padding: 10px 8px;
    }


    .bmx-sidebar {
        padding-left: 8px;
        padding-right: 8px;
    }


    .bmx-sidebar h3 {
        font-size: 16px;
    }


    #bmx-steps {
        gap: 4px;
    }


    #bmx-steps li {
        padding: 5px 8px;

        font-size: 11px;
    }


    #products-container {
        grid-template-columns: 1fr;

        gap: 10px;
    }


    .bmx-card img {
        height: 190px;
    }


    .bmx-card h3 {
        font-size: 15px;
    }


    .bmx-card p {
        font-size: 14px;
    }


    .bmx-footer {
        height: 140px;

        min-height: 140px;
        max-height: 140px;

        padding: 6px 8px;

        gap: 5px;
    }


    .bmx-total {
        font-size: 15px !important;
    }


    #bmx-total {
        margin-left: 6px !important;

        font-size: 15px !important;
    }


    .bmx-actions {
        gap: 5px;
    }


    .bmx-footer button {
        height: 35px;

        min-height: 35px;
        max-height: 35px;

        padding: 0 5px !important;

        font-size: 12px;
    }


    #finish-bmx {
        height: 37px;

        min-height: 37px;
        max-height: 37px;
    }
}