* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.cart-wrapper {
    max-width: 1530px;
    margin: 0 auto;
    padding: 20px;
}

.cart-title {
    text-align: center; 
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 30px;
    color: #000;
}
.cart-containers {
    display: grid;
    grid-template-columns: 1fr 380px; 
    gap: 5px;
    align-items: start;
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}
.cart-summary {
    grid-column: 2; 
    grid-row: 1 / span 20; 
    background: #fff;
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    position: sticky;
    top: 20px; 
}

.coupon-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #d1d1d1;
    border-radius: 50px; 
    padding: 5px 5px 5px 20px;
    margin-bottom: 25px;
}
.coupon-box input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 17px;
    color: black;
    background: transparent;
    min-width: 0; /* prevents overflow in flex on small screens */
}

.coupon-btn {
    background-color: #00aeef;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.col-desc{
    text-align: center;
}

.coupon-btn:hover {
    background-color: #0088cc;
}
.summary-title {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #000;
}

.cart-header {
    grid-column: 1; 
    display: grid;
    grid-template-columns: 200px 1fr 150px 100px 40px;
    padding: 10px 25px;
    color: black;
    font-weight: 1000;
    text-transform: uppercase;
    font-size: 13px;
}

.cart-footer {
    grid-column: 2; 
}

.cart-item {
    background: #f9fcff;
    border-radius: 30px;
    padding: 11px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border: 1px solid #f5f5f5;
    gap: 29px;
}

.item-detail {
    display: flex;
    align-items: center;
}

.item-detail img {
    width: 110px;
    height: 110px;
    border-radius: 20px;
    padding: 12px;
    object-fit: contain;
}

.product-name {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    max-width: 190px;
    display: -webkit-box;          
    -webkit-line-clamp: 3;         
    -webkit-box-orient: vertical;  
    overflow: hidden;             
    text-overflow: ellipsis;      
}
.col-qty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.qty-control {
    flex-direction: row;
    align-items: center;
    border: none;
}

.qty-btn {
    width: 30px;
    height: 30px ;
    border-radius: 50% ;
    background: #4dbff2;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.qty-control input {
    width: 40px;
    text-align: center;
    border: 1px solid #eee;
    border-radius: 4px;
    margin: 2px 0;
    font-weight: bold;
    height:40px ;
}


.col-price {
    flex: 1;
    text-align: center;
    font-size: 19px;
    font-weight: 400;
    color: #000;
}


.col-remove{
    margin-left: 100px;
}

.remove-btn {
    background-color: #4dbff2; 
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.3s ease;
}

.remove-btn:hover {
    background-color: #00aeef; 
}
.remove-btn i {
    pointer-events: none;
}
.cart-summary::before {
    display: block;
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 25px;
    background:#f9fcff;
    border-radius:30px;
    padding:30px;
    box-shadow:0 15px 40px rgba(0,0,0,0.08);
}



.summary-box, .summarys-box {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 16px;
    color: #444;
}

.summary-box span, .summarys-box span {
    font-weight: 700;
    color: #000;
}

.summary-box.total {
    border-top: 1.5px solid #eee;
    margin-top: 20px;
    padding-top: 20px;
    font-size: 18px;
    text-align: center;
}

#total {
    font-size: 20px ;
    color: #000 ;
}
.btn-checkout {
    width: 98%;
    background: #6bc9f5 ;
    color: white ;
    border-radius: 20px ;
    padding: 18px ;
    font-size: 20px ;
    font-weight: 400 ;
    border: none ;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(107, 201, 245, 0.3);
    transition: 0.3s;
    margin-left: 2%;
}

.btn-checkout:hover {
    background: #4dbff2;
    transform: translateY(-2px);
}

.cart-right{
    display:flex;
    flex-direction:column;
}


.arrow{
  width:28px;
  height:28px;
  border:1px solid #ccc;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
}
.main {
  background:ghostwhite;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:650px; 
  overflow:hidden;
}
.main img {
  height:100%;      
  width:100%;
  object-fit:contain;
  transition: opacity 0.4s ease, transform 0.3s ease; 
  opacity: 1;
}
.main img.fade-out {
  opacity: 0;       
  transform: scale(0.95); 
}
.recommend-list {
  display:flex;
  overflow-x:auto;
  scroll-behavior:smooth;
  gap:32px;
}
.recommend-list::-webkit-scrollbar {
  display:none; 
}
.brand{
  font-size:12px;
  letter-spacing:1px;
  color:#7a7a7a;
}
.title{
  font-size:21px;
  font-weight:500;
  margin:8px 0 16px;
}
.price-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:18px;
}
.price-row .price{
  font-size:24px;
  font-weight:500;
}
.old{
  font-size:14px;
  text-decoration:line-through;
  color:red;
}
.discount{
  font-size:12px;
  background:#e6efd0;
  padding:2px 8px;
  border-radius:12px;
}
.acc-item {
  border-bottom: 1px solid #e5e5e5;
}
.acc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 32px;
  padding: 12px 0;
}
.acc-header .icon {
  font-size: 18px;
  color: #555;
  font-family: Arial, sans-serif; 
  transition: transform 0.3s;
}
.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  font-size: 14px;
  line-height: 1.7;
  color: #666;
  padding: 0;
  display: block;
  width: 100%;
  box-sizing: border-box; 
}
.recommend{
  max-width:1200px;
  margin:80px auto 100px;
  padding-left:28px;
}
.recommend-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:40px;
}
.recommend-head h2{
  font-size:36px;
  font-weight:400;
}
.nav-arrows span{
  width:36px;
  height:36px;
  border:1px solid #ccc;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:8px;
  cursor:pointer;
}
.recommend-list {
  display: flex;        
  overflow-x: auto;    
  scroll-behavior: smooth;
  gap: 10px;
  padding: 10px 0;
}
.card {
  width: 300px; 
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  width: calc((1200px - (32px * 3)) / 4);
  cursor: pointer;
  flex-shrink: 0;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  font-family: 'Inter', sans-serif;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.card-img {
  width: 100%;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.card-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;   
}


.card-info h4 {
  font-size: 18px;
  color: #000;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-info small {
  font-size: 14px;
  color: #707070;
  margin-top: 2px;
}
.clickable-product{
    cursor: pointer;
}
.offer{
    color: black;
    text-align: center;
    align-items: center;
     border: 0.5px solid black; 
    border-radius: 11px;
    margin-bottom: 20px;
    width: 95%;
    height: 100%;
    font-weight: 200px;
    font-size: 20px;
    margin-left: 2%;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */

/* ---------- TABLET / SMALL LAPTOP (<= 991px) ---------- */
@media (max-width: 991px) {
    .cart-wrapper {
        padding: 15px;
    }

    .cart-title {
        font-size: 26px;
        margin-bottom: 20px;
    }

    /* Stack cart items above the summary */
    .cart-containers {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 20px;
    }

    .cart-summary {
        grid-column: 1;
        grid-row: auto;
        position: static;   /* stop being sticky on small screens */
        width: 100%;
        padding: 25px;
    }

    .cart-header {
        grid-column: 1;
        grid-template-columns: 150px 1fr 110px 80px 40px;
        font-size: 12px;
        padding: 8px 15px;
    }

    .cart-footer {
        grid-column: 1;
    }

    .item-detail img {
        width: 90px;
        height: 90px;
        padding: 8px;
    }

    .product-name {
        font-size: 14px;
        max-width: 160px;
    }

    .col-remove {
        margin-left: auto;  /* push to end instead of fixed offset */
    }

    .main {
        height: 480px;
    }

    .recommend {
        margin: 50px auto 60px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .recommend-head h2 {
        font-size: 28px;
    }

    .card {
        width: 240px;
    }
}

/* ---------- MOBILE (<= 640px) ---------- */
@media (max-width: 640px) {
    .cart-wrapper {
        padding: 10px;
    }

    .cart-title {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .cart-containers {
        padding: 5px;
        gap: 15px;
    }

    /* Hide the column-header row — labels don't fit on mobile */
    .cart-header {
        display: none;
    }

    /* Stack each cart item vertically */
    .cart-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 15px;
        border-radius: 20px;
    }

    .item-detail {
        gap: 12px;
        width: 100%;
    }

    .item-detail img {
        width: 80px;
        height: 80px;
        padding: 6px;
        border-radius: 14px;
    }

    .product-name {
        font-size: 14px;
        max-width: 100%;
        -webkit-line-clamp: 2;
    }

    /* Row of qty + price + remove under the product info */
    .col-qty,
    .col-price,
    .col-remove {
        width: auto;
        flex: 1;
        margin: 0;
    }

    .col-qty {
        flex-direction: row;
        justify-content: flex-start;
    }

    .qty-control input {
        width: 36px;
        height: 36px;
    }

    .qty-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .col-price {
        font-size: 17px;
        text-align: right;
    }

    .col-remove {
        margin-left: 0;
        display: flex;
        justify-content: flex-end;
    }

    /* Summary panel */
    .cart-summary {
        padding: 20px;
        border-radius: 20px;
    }

    .summary-title {
        font-size: 18px;
    }

    .coupon-box {
        padding: 4px 4px 4px 15px;
    }

    .coupon-box input {
        font-size: 14px;
    }

    .summary-box,
    .summarys-box {
        font-size: 14px;
        padding: 10px 0;
    }

    #total {
        font-size: 18px;
    }

    .btn-checkout {
        padding: 14px;
        font-size: 17px;
        border-radius: 16px;
    }

    /* Product gallery / main image */
    .main {
        height: 340px;
    }

    /* Recommendations */
    .recommend {
        margin: 40px auto 50px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .recommend-head {
        margin-bottom: 25px;
    }

    .recommend-head h2 {
        font-size: 22px;
    }

    .nav-arrows span {
        width: 30px;
        height: 30px;
    }

    .card {
        width: 200px;
        padding: 15px;
    }

    .card-img {
        height: 180px;
        margin-bottom: 12px;
    }

    .card-info h4 {
        font-size: 15px;
    }

    .card-info small {
        font-size: 12px;
    }

    /* Accordion */
    .acc-header {
        font-size: 22px;
    }

    .offer {
        font-size: 15px;
        padding: 8px;
    }

    .title {
        font-size: 18px;
    }

    .price-row .price {
        font-size: 20px;
    }
}

/* ---------- EXTRA SMALL (<= 380px) ---------- */
@media (max-width: 380px) {
    .cart-title {
        font-size: 19px;
    }

    .item-detail img {
        width: 70px;
        height: 70px;
    }

    .product-name {
        font-size: 13px;
    }

    .col-price {
        font-size: 15px;
    }

    .btn-checkout {
        font-size: 15px;
        padding: 12px;
    }

    .main {
        height: 280px;
    }

    .card {
        width: 170px;
    }

    .card-img {
        height: 150px;
    }
}