.cart-page {
  padding: 30px;
  background: #f5f6fa;
  min-height: 100vh;
}

.page-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.cart-container {
  display: grid;
  grid-template-columns: 2fr 420px;
  gap: 30px;
  align-items: start;
}

/* LEFT SIDE */

.cart-left {
  background: #ffffff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.cart-left h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 22px;
  color: #111827;
}

/* TABLE */

.cart-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.cart-table th,
.cart-table td {
  padding: 18px 10px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
  text-align: left;
}

.cart-table thead th {
  font-size: 16px;
  font-weight: 600;
  color: #6b7280;
}

/* COLUMN WIDTHS */

.cart-table th:nth-child(1),
.cart-table td:nth-child(1) {
  width: 6%;
}

.cart-table th:nth-child(2),
.cart-table td:nth-child(2) {
  width: 56%;
}

.cart-table th:nth-child(3),
.cart-table td:nth-child(3) {
  width: 12%;
}

.cart-table th:nth-child(4),
.cart-table td:nth-child(4) {
  width: 14%;
}

.cart-table th:nth-child(5),
.cart-table td:nth-child(5) {
  width: 18%;
  padding-left: 20px;
}

/* REMOVE */

.remove-item a {
  color: #9ca3af;
  font-size: 22px;
  text-decoration: none;
  transition: 0.3s;
}

.remove-item a:hover {
  color: #ef4444;
}

/* PRODUCT */

.product-cell {
  overflow: hidden;
}

.cart-product {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-width: 0;
}

.cart-product img {
  width: 95px;
  height: 95px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
  background: #fff;
}

.product-name {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  line-height: 1.8;
  font-weight: 500;
  color: #111827;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.out-stock {
  display: block;
  margin-top: 8px;
  color: #ef4444;
  font-size: 13px;
}

/* PRICE */

.cart-price {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
}

/* QUANTITY */

.cart-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  transition: 0.2s;
}

.qty-btn:hover {
  background: #f3f4f6;
}

.qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cart-qty input {
  width: 42px;
  height: 36px;
  text-align: center;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-weight: 600;
  background: #ffffff;
}

/* SUBTOTAL */

.cart-subtotal {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  display: inline-block;
}

/* RIGHT SIDE */

.cart-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cart-card {
  background: #ffffff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.cart-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #111827;
}

/* TOTALS */

.cart-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0;
  font-size: 16px;
  color: #6b7280;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.cart-card hr {
  margin: 20px 0;
  border: none;
  border-top: 1px solid #d1d5db;
}

/* CHECKOUT BUTTON */

.checkout-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 16px;
  margin-top: 20px;
  background: #4a63e7;
  color: #ffffff;
  text-decoration: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  transition: 0.3s;
}

.checkout-btn:hover {
  background: #324fcf;
}

.checkout-btn.disabled {
  background: #d1d5db;
  pointer-events: none;
  color: #6b7280;
}

/* COUPON */

.cart-card input {
  width: 100%;
  padding: 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 15px;
}

.cart-card button {
  padding: 12px 20px;
  border: 1px solid #4a63e7;
  background: #ffffff;
  color: #4a63e7;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}

.cart-card button:hover {
  background: #f8faff;
}

/* DISABLED */

.disabled-product {
  opacity: 0.6;
}

/* EMPTY */

.empty-cart {
  text-align: center;
  padding: 60px;
  font-size: 18px;
  color: #6b7280;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}
.cart-table td:nth-child(5) {
  width: 18%;
  padding-left: 20px;
  vertical-align: middle;
  position: relative;
}
/* RESPONSIVE CART */

.cart-container{

  display:flex;

  gap:20px;

  align-items:flex-start;
}

/* LEFT SIDE */

.cart-left{

  flex:1;

  min-width:0;
}

/* RIGHT SIDE */

.cart-right{

  width:320px;

  flex-shrink:0;
}

/* TABLE WRAPPER */

.cart-table-wrapper{

  overflow-x:auto;
}

/* PRODUCT */

.cart-product{

  display:flex;

  align-items:center;

  gap:12px;
}

.cart-product img{

  width:70px;

  height:70px;

  object-fit:cover;

  border-radius:8px;
}

/* PRODUCT NAME */

.product-name{

  font-size:14px;

  line-height:1.4;

  word-break:break-word;
}

/* QUANTITY */

.cart-qty{

  display:flex;

  align-items:center;

  gap:8px;
}

/* BUTTONS */

.qty-btn{

  width:30px;

  height:30px;

  border:none;

  border-radius:6px;

  cursor:pointer;
}

/* INPUT */

.cart-qty input{

  width:45px;

  text-align:center;
}

/* CHECKOUT BUTTON */

.checkout-btn{

  display:flex;

  justify-content:center;

  align-items:center;

  width:100%;
}

/* MOBILE */

@media(max-width:768px){

  .cart-container{

    flex-direction:column;
  }

  .cart-right{

    width:100%;
  }

  .cart-table{

    min-width:700px;
  }

  .cart-table th,
  .cart-table td{

    font-size:13px;
  }

  .cart-product img{

    width:55px;

    height:55px;
  }

  .checkout-btn{

    width:100%;
  }
}
@media(max-width:768px){

  .cart-page{

    padding:10px;
  }

  .cart-left,
  .cart-right{

    width:100%;
  }
}
@media(max-width:768px){

  .cart-table{

    min-width:750px;
  }

  .cart-table th{

    font-size:13px;

    white-space:nowrap;
  }

  .cart-table td{

    padding:12px 10px;
  }
}
.product-name{

  max-width:180px;

  word-break:break-word;

  line-height:1.5;
}
@media(max-width:768px){

  .user-sidebar{

    width:100%;

    padding:15px;
  }
}
@media(max-width:768px){

  .checkout-btn{

    min-height:45px;

    font-size:14px;
  }

  .qty-btn{

    width:28px;

    height:28px;
  }
}
.cart-card{

  border-radius:14px;

  padding:18px;
}

.stock-warning {
  display: block;
  margin-top: 6px;
  color: #b45309;
  font-size: 12px;
  font-weight: 600;
}
