/* ================= RESET / GLOBAL ================= */
*{
    box-sizing:border-box;
}

body{
    font-family: Arial, sans-serif;
    margin:0;
    background:#f1f3f6;
    display:flex;
    flex-direction:column;
    min-height:100vh;
}


main{
    flex:1;
}

.container{
    max-width:1200px;
    margin:40px auto;
    padding:0 15px;
}

h2, h3{
    margin-bottom:15px;
}

p{
    line-height:1.6;
}

/* ================= NAVBAR ================= */
.navbar{
    box-shadow:0 2px 10px rgba(0,0,0,0.15);
}

.navbar-brand img{
    height:45px;
}
html, body{
    height:100%;
    margin:0;
}

body{
    display:flex;
    flex-direction:column;
}

.main-content{
    flex:1;
}
/*======================cart=====================*/
/* ================= CART LAYOUT ================= */
.cart-container{
    max-width:1100px;
    margin:auto;
    display:flex;
    gap:20px;
    padding:20px;
}

.cart-left{
    flex:2;
}

.cart-right{
    flex:1;
    background:#fff;
    padding:20px;
    border-radius:10px;
    height:fit-content;
}

/* ================= CARD ================= */
.cart-card{
    display:flex;
    gap:15px;
    background:#fff;
    padding:15px;
    border-radius:10px;
    margin-bottom:15px;
    align-items:center;
    border:1px solid #eee;
    transition:0.2s;
}

.cart-card:hover{
    box-shadow:0 8px 20px rgba(0,0,0,0.08);
}

.cart-card img{
    width:120px;
    height:120px;
    object-fit:cover;
    border-radius:8px;
}

/* ================= TEXT ================= */
.cart-title{
    font-weight:bold;

    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.price{
    color:green;
    font-weight:bold;
}

.old{
    text-decoration:line-through;
    color:#999;
    margin-left:10px;
}

/* ================= QTY ================= */
.qty-box a{
    text-decoration:none;
    padding:5px 10px;
    background:#eee;
    margin:0 5px;
    border-radius:4px;
}

/* ================= RIGHT PANEL ================= */
.row{
    display:flex;
    justify-content:space-between;
    margin:10px 0;
}

.cart-btn{
    width:100%;
    padding:14px;
    background:#28a745;
    color:#fff;
    border:none;
    margin-top:15px;
    border-radius:6px;
    font-size:16px;
}

/* ================= MOBILE FIX ================= */
@media (max-width:768px){

    .cart-container{
        flex-direction:column;
        padding:10px;
    }

    .cart-left, .cart-right{
        width:100%;
    }

    .cart-right{
        margin-top:15px;
    }

    .cart-card{
        align-items:flex-start;
    }

    .cart-card img{
        width:90px;
        height:90px;
    }

    .cart-title{
        font-size:16px;
    }

    .row{
        font-size:14px;
    }

}
.cart-right{
    position:sticky;
    top:20px;
}
/* ================= MOBILE NAV ================= */
@media(max-width:768px){

    .navbar-brand img{
        height:35px;
    }

    .mobile-nav{
        position:fixed;
        bottom:0;
        left:0;
        width:100%;
        background:#fff;
        display:flex;
        justify-content:space-around;
        padding:10px 0;
        box-shadow:0 -5px 20px rgba(0,0,0,0.1);
        z-index:999;
    }

    .mobile-nav a{
        font-size:18px;
        text-decoration:none;
        color:#000;
    }
}

/* ================= GRID ================= */
.grid{
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap:15px;
}

/* ================= PRODUCT CARD ================= */
.product-card{
    width:100%;
    max-width:240px;
    background:#fff;
    border-radius:14px;
    padding:14px;
    box-shadow:0 6px 20px rgba(0,0,0,0.08);
    transition:all 0.25s ease;
    cursor:pointer;
}

.product-card:hover{
    transform:translateY(-8px);
    box-shadow:0 12px 30px rgba(0,0,0,0.15);
}

.product-card img{
    width:100%;
    border-radius:10px;
    margin-bottom:10px;
}
.product-card{
    background:#fff;
    border-radius:12px;
    padding:10px;
    box-shadow:0 2px 10px rgba(0,0,0,0.08);
    transition:0.25s;
    cursor:pointer;
}

.product-card:hover{
    transform:translateY(-5px);
    box-shadow:0 10px 25px rgba(0,0,0,0.15);
}

.product-card img{
    width:100%;
    height:150px;
    object-fit:cover;
    border-radius:10px;
}

.product-card h3{
    font-size:14px;
    margin:8px 0;

    display: -webkit-box;
    -webkit-line-clamp: 2;  /* 👈 LIMIT TEXT */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* ================= PRICE ================= */
.price-box{
    display:flex;
    align-items:center;
    gap:6px;
}

.final{
    color:#16a34a;
    font-weight:700;
    font-size:16px;
}

.original{
    text-decoration:line-through;
    color:#999;
    font-size:12px;
}

.discount{
    background:#dcfce7;
    color:#16a34a;
    font-size:11px;
    padding:2px 5px;
    border-radius:4px;
}

/* ================= PRODUCT PAGE ================= */
.product{
    display:grid;
    grid-template-columns: 450px 1fr;
    gap:30px;
}
.product{
    max-width:1200px;
    margin:auto;
}
.product-page .col-lg-5{
    padding-right:20px;
}

.product-page .col-lg-7{
    padding-left:20px;
}
.row{
    margin-left:0;
    margin-right:0;
}
.viewer{
    background:#fff;
    padding:10px;
    border-radius:12px;
}

/* IMAGE */
.image-box{
    width:100%;
    height:420px; /* 👈 ADD THIS */
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fff;
    position:relative;
    overflow:hidden;
    border-radius:10px;
}

.main-img,
.rotate-img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}




/* 360 IMAGE */
.rotate-img{
    display:none;
}

.view360-btn{
    position:absolute;
    bottom:10px;
    right:10px;
    background:#000;
    color:#fff;
    padding:8px 12px;
    border:none;
    border-radius:5px;
    cursor:pointer;
}

/* THUMB */
.thumb{
    display:flex;
    gap:10px;
    margin-top:15px;
}

.thumb img{
    width:70px;
    cursor:pointer;
    border-radius:6px;
}

/* ================= TEXT ================= */
.title{
    font-size:28px;
    font-weight:700;
    margin-bottom:10px;
}

.big-price{
    font-size:32px;
    font-weight:700;
    margin-top:10px;
}

.tax{
    font-size:13px;
    color:#777;
    margin-bottom:10px;
}

/* ================= BUTTONS ================= */
.actions{
    margin-top:20px;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.btn{
    padding:14px;
    border:none;
    border-radius:8px;
    font-weight:600;
    cursor:pointer;
    transition:0.2s;
}

.cart{
    background:#ff9f00;
    color:white;
}

.cart:hover{
    background:#e68a00;
}

.buy{
    background:#22c55e;
    color:white;
}

.buy:hover{
    background:#16a34a;
}

/* ================= PRODUCT DETAILS ================= */
.product-details-box{
    background:#fff;
    padding:20px;
    border-radius:14px;
    box-shadow:0 6px 20px rgba(0,0,0,0.08);
    margin-top:25px;
}

.product-details-box h3{
    margin-bottom:10px;
}

.product-details-box p{
    margin:6px 0;
}

/* ================= REVIEWS ================= */
.review-box{
    margin-top:50px;
}

.review{
    padding:10px 0;
    border-bottom:1px solid #ddd;
}

.review-form textarea,
.review-form select{
    width:100%;
    padding:10px;
}

.review-form button{
    background:#22c55e;
    color:white;
    padding:10px;
    border:none;
    margin-top:10px;
}

/* ================= MOBILE ================= */
@media (max-width:768px){

    .container{
        margin-top:20px;
    }

    .product{
        display:flex;
        flex-direction:column;
        gap:20px;
    }

    .thumb{
        overflow-x:auto;
    }

    .thumb img{
        width:60px;
    }

    .big-price{
        font-size:26px;
    }

    .actions{
        flex-direction:column;
    }

    .actions .btn{
        width:100%;
    }

    .image-box:hover .main-img{
        transform:none;
    }

    .product-card{
        max-width:100%;
    }
}
@media(max-width:768px){
    .footer-box{
        text-align:center;
    }
}
/* ================= HOMEPAGE MOBILE FIX ================= */
@media (max-width:768px){

    .grid{
        grid-template-columns: repeat(2, 1fr);
        gap:12px;
    }

    .product-card img{
        height:140px;
    }

    .product-card h3{
        font-size:13px;
    }
}