/* =========================================================
   1. ROOT
========================================================= */

.ucw-root{
    font-family:Arial;
    position:relative;
    margin-bottom:40px;
}


/* =========================================================
   2. VARIABLES
========================================================= */

:root{
    --ucw-primary:#ff1744;
    --ucw-primary-dark:#b71c1c;
    --ucw-green:#2e7d32;
    --ucw-wa:#25D366;

    --ucw-radius:12px;
    --ucw-shadow:0 2px 6px rgba(0,0,0,0.2);
}


/* =========================================================
   3. CART BUTTON
========================================================= */

.ucw-cart-btn{
    position:fixed;
    top:180px;
    right:25px;

    width:50px;
    height:50px;

    background:linear-gradient(135deg,#FFD700,#FFA500);

    border-radius:50%;

    display:flex;
    align-items:center;
    justify-content:center;

    cursor:pointer;
    z-index:9999;
    font-size:26px;
}

.ucw-count{
    position:absolute;
    top:-6px;
    right:-6px;

    background:red;
    color:#fff;

    font-size:12px;

    padding:4px 6px;
    border-radius:50%;
}


/* =========================================================
   4. SLIDER
========================================================= */

.ucw-slider-wrap{
    position:relative;
    overflow:hidden;
}

.ucw-track{
    display:flex;
    transition:transform .45s ease;
    will-change:transform;
}

.ucw-card{
    flex:0 0 25%;
    max-width:25%;
    box-sizing:border-box;
    padding:10px;
}

.ucw-card-inner{
    border:1px solid #eee;
    border-radius:12px;
    padding:10px;
    background:#fff;
}


/* =========================================================
   5. PRODUCT IMAGE
========================================================= */

.ucw-img-wrap{
    position:relative;
    aspect-ratio:1/1;
    overflow:hidden;
    border-radius:8px;
}

.ucw-img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.ucw-badge{
    position:absolute;
    top:5px;
    left:5px;

    background:var(--ucw-primary);
    color:#fff;

    padding:6px 8px;
    font-size:13px;
    font-weight:bold;

    border-radius:5px;
    box-shadow:var(--ucw-shadow);
}


/* =========================================================
   6. CARD PRICE
========================================================= */

.ucw-old{
    text-decoration:line-through;
    color:var(--ucw-primary);

    margin-right:8px;

    font-size:14px;
    opacity:.7;
}

.ucw-card b{
    color:var(--ucw-green);
    font-size:16px;
}


/* =========================================================
   7. SLIDER NAVIGATION
========================================================= */

.ucw-nav{
    position:absolute;
    top:30%;
    left:0;

    width:100%;

    transform:translateY(-50%);
    pointer-events:none;
}

.ucw-nav button{
    position:absolute;

    width:40px;
    height:40px;

    border:none;
    border-radius:50%;

    cursor:pointer;
    pointer-events:auto;

    background:linear-gradient(
        145deg,
        var(--ucw-primary),
        var(--ucw-primary-dark)
    );

    display:flex;
    align-items:center;
    justify-content:center;
}

.ucw-prev{
    left:0px;
}

.ucw-next{
    right:0px;
}

.ucw-prev::before{
    content:"‹";
    font-size:30px;
    color:#fff;
}

.ucw-next::before{
    content:"›";
    font-size:30px;
    color:#fff;
}


/* =========================================================
   8. QUANTITY
========================================================= */

.ucw-cart-row{
    display:flex;
    align-items:center;
    gap:8px;
    margin-top:10px;
}

.ucw-qty-box{
    display:flex;
    align-items:center;

    border:1px solid #ddd;
    border-radius:8px;
    overflow:hidden;
}

.ucw-qty-box button{
    width:32px;
    height:32px;

    border:none;
    background:#f5f5f5;

    cursor:pointer;
    font-size:16px;
}

.ucw-qty-box input{
    width:45px;

    text-align:center;

    border:none;
    outline:none;
}

.ucw-qty::-webkit-outer-spin-button,
.ucw-qty::-webkit-inner-spin-button{
    -webkit-appearance:none;
    margin:0;
}

.ucw-qty{
    -moz-appearance:textfield;
}

.ucw-qty[readonly]{
    background:#fafafa;
    cursor:default;
}


/* =========================================================
   9. SIDEBAR
========================================================= */

.ucw-overlay{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,.5);

    opacity:0;
    visibility:hidden;

    transition:.3s;
    z-index:99998;
}

.ucw-overlay.active{
    opacity:1;
    visibility:visible;
}

.ucw-sidebar{
    position:fixed;
    top:0;
    right:-400px;

    width:400px;
    height:100%;

    background:#fff;

    transition:.3s;
    z-index:99999;

    display:flex;
    flex-direction:column;
}

.ucw-sidebar.active{
    right:0;
}

.ucw-head{
    display:flex;
    justify-content:space-between;

    padding:12px;

    border-bottom:1px solid #eee;
    font-weight:bold;
}

.ucw-items{
    flex:1;
    overflow:auto;
    padding:10px;
}

.ucw-item{
    display:flex;
    gap:10px;

    border-bottom:1px solid #eee;
    padding:8px 0;
}

.ucw-thumb{
    width:50px;
    height:50px;
}

.ucw-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.ucw-total{
    text-align:right;
    font-weight:bold;
    padding:10px;
}


/* =========================================================
   10. PAYMENT AREA
========================================================= */

.ucw-paybox{
    padding:10px;
    border-top:1px solid #eee;
}

.ucw-paybox select{
    width:100%;
    padding:10px;
    margin-top:5px;
}

.ucw-wa{
    width:calc(100% - 20px);

    background:var(--ucw-wa);
    color:#fff;

    border:none;
    border-radius:6px;

    padding:10px;
    margin:10px;

    font-weight:bold;
    cursor:pointer;
}

.ucw-iban-box{
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:8px;
    margin-top:8px;

    background:#f7f7f7;
    border-radius:6px;

    font-size:14px;
}

.ucw-copy{
    background:#333;
    color:#fff;

    border:none;
    border-radius:5px;

    padding:6px 10px;

    cursor:pointer;
    font-size:12px;
}


/* =========================================================
   11. POPUP
========================================================= */

.ucw-popup{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,.7);

    display:flex;
    align-items:center;
    justify-content:center;

    padding:20px;

    z-index:999999;

    opacity:0;
    visibility:hidden;

    transition:.3s;
}

.ucw-popup.active{
    opacity:1;
    visibility:visible;
}

.ucw-popup-box{
    position:relative;

    width:100%;
    max-width:900px;

    background:#fff;
    border-radius:10px;

    overflow:hidden;

    display:grid;
    grid-template-columns:1fr 1fr;

    animation:ucwPop .25s ease;
}

.ucw-popup-close{
    position:absolute;
    top:10px;
    right:10px;

    width:40px;
    height:40px;

    border:none;
    border-radius:50%;

    background:#111;
    color:#fff;

    font-size:22px;
    cursor:pointer;
    z-index:5;
}


/* =========================================================
   12. POPUP CONTENT
========================================================= */

.ucw-popup-left{
    display:flex;
    gap:10px;
    padding:15px;
}

.ucw-popup-right{
    padding:25px;
}

.ucw-popup-title{
    font-size:28px;
    font-weight:bold;
    margin-bottom:10px;
}

.ucw-popup-desc{
    margin-bottom:15px;
    line-height:1.6;
    font-size:15px;
}

.ucw-popup-price{
    font-size:26px;
    font-weight:bold;
    color:var(--ucw-green);
    margin-bottom:10px;
}

.ucw-popup-old{
    text-decoration:line-through;
    color:var(--ucw-primary);

    font-size:20px;
    margin-right:10px;

    opacity:.5;
}

.ucw-popup-note{
    width:100%;
    min-height:70px;

    padding:10px;

    border:1px solid #ddd;
    border-radius:10px;

    resize:vertical;

    margin-bottom:15px;

    font-family:Arial;
    font-size:14px;

    box-sizing:border-box;
}

.ucw-popup-note:focus{
    outline:none;
    border-color:var(--ucw-wa);
}


/* =========================================================
   13. POPUP CART
========================================================= */

.ucw-popup-cart{
    display:flex;
    gap:12px;
    align-items:center;
    flex-wrap:nowrap;
}

.ucw-popup-add{
    flex:1;
    min-width:200px;
    height:42px;

    display:flex;
    align-items:center;
    justify-content:center;

    background:#111;
    color:#fff;

    border:none;
    border-radius:10px;

    padding:14px;

    font-size:15px;
    font-weight:600;

    cursor:pointer;
    transition:.2s;

    white-space:nowrap;
}

.ucw-popup-add:hover{
    transform:translateY(-2px);
}

.ucw-popup-qty-box{
    display:flex;
    align-items:center;

    height:42px;

    border-radius:8px;
    overflow:hidden;

    flex:0 0 auto;
}


/* =========================================================
   14. GALLERY
========================================================= */

.ucw-popup-main{
    position:relative;

    min-height:220px;
    max-height:40vh;

    flex:1;

    background:#f7f7f7;
    border-radius:14px;

    overflow:hidden;

    display:flex;
    align-items:center;
    justify-content:center;
}

.ucw-popup-main img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}

.ucw-popup-thumbs{
    width:80px;

    display:flex;
    flex-direction:column;
    gap:10px;
}

.ucw-thumb-item{
    width:80px;
    height:80px;

    border:2px solid transparent;
    border-radius:10px;

    overflow:hidden;

    cursor:pointer;
    background:#fafafa;

    transition:.2s;
}

.ucw-thumb-item.active{
    border-color:var(--ucw-primary);
}

.ucw-thumb-item:hover{
    transform:translateY(-2px);
}

.ucw-thumb-item img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}


/* =========================================================
   15. GALLERY ARROWS
========================================================= */

.ucw-gallery-prev,
.ucw-gallery-next{
    position:absolute;
    top:50%;

    transform:translateY(-50%);

    width:40px;
    height:40px;

    border:none;
    border-radius:50%;

    background:rgba(0,0,0,.6);
    color:#fff;

    font-size:30px;

    cursor:pointer;
    z-index:5;

    display:flex;
    align-items:center;
    justify-content:center;

    transition:.3s;
}

.ucw-gallery-prev:hover,
.ucw-gallery-next:hover{
    background:#111;
}

.ucw-gallery-prev{
    left:2px;
}

.ucw-gallery-next{
    right:2px;
}


/* =========================================================
   16. POPUP BADGES
========================================================= */

.ucw-popup-badges{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:10px;
}

.ucw-badge-off,
.ucw-badge-save{
    color:#fff;

    padding:6px 10px;

    font-size:12px;
    font-weight:bold;

    border-radius:6px;
}

.ucw-badge-off{
    background:var(--ucw-primary);
}

.ucw-badge-save{
    background:var(--ucw-green);
}


/* =========================================================
   17. ANIMATIONS
========================================================= */

@keyframes ucwPop{

    from{
        transform:scale(.9);
        opacity:0;
    }

    to{
        transform:scale(1);
        opacity:1;
    }

}


/* =========================================================
   18. TABLET
========================================================= */

@media(max-width:1024px){

    .ucw-card{
        flex:0 0 50%;
        max-width:50%;
    }

}


/* =========================================================
   19. MOBILE
========================================================= */

@media(max-width:768px){

    /* SLIDER */

    .ucw-card{
        flex:0 0 100%;
        max-width:100%;
    }


    /* POPUP */

    .ucw-popup{
        padding:10px;
        align-items:flex-start;
        overflow:auto;
    }

    .ucw-popup-box{
        grid-template-columns:1fr;
        max-height:90vh;
        overflow:auto;
    }

    .ucw-popup-close{
        width:44px;
        height:44px;

        font-size:20px;

        top:8px;
        right:8px;

        background:#000;
        opacity:.85;
    }


    /* POPUP CONTENT */

    .ucw-popup-left{
        flex-direction:column;
    }

    .ucw-popup-right{
        max-height:50vh;
        overflow-y:auto;
    }

    .ucw-popup-title{
        font-size:20px;
        margin-bottom:10px;
    }

    .ucw-popup-price{
        font-size:22px;
        margin-bottom:10px;
    }

    .ucw-popup-desc{
        font-size:13px;
        line-height:1.4;
    }


    /* GALLERY */

    .ucw-popup-thumbs{
        width:100%;
        flex-direction:row;
        overflow:auto;
    }

    .ucw-thumb-item{
        min-width:70px;
        height:70px;
    }

    .ucw-gallery-prev,
    .ucw-gallery-next{
        width:38px;
        height:38px;
        font-size:24px;
    }


    /* POPUP CART */

    .ucw-popup-cart{
        gap:8px;
    }

    .ucw-popup-qty-box button{
        width:30px;
        height:30px;
    }

    .ucw-popup-qty{
        width:40px;
    }


    /* SIDEBAR */

    .ucw-sidebar{
        width:100%;
    }

}