
li {
  list-style: none;
}

a {
  text-decoration: none;
}


.carttitle h2 {
  font-size: 2em;
}

/* نوار ناوبری سبد */
.cart-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f2e9c3;
  border-radius: 25px;
  margin: 50px 10px;
  padding: 10px; 
}

.cart-nav img {
  width: 200px;
  height: 70px;
  background-color: #f2ecd2;
  border-radius: 25px;
}

/* خط‌کش پایینی (progress indicator) */
.cart-nav-bot {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.cart-nav-bot .item {
  position: relative;
  padding: 0 20px;
  font-size: xx-large;
  white-space: nowrap; /* جلوگیری از شکستن متن */
}

.cart-nav-bot .item::after {
  content: "";
  position: absolute;
  left: -15px; /* به جای درصد، از px برای کنترل دقیق‌تر استفاده شد */
  top: 50%;
  height: 2px;
  width: 30px;
  background-color: black;
  transform: translateY(-50%);
}

.cart-nav-bot .item:last-child::after {
  display: none; /* به جای content: none */
}

.cart-nav-bot .item:first-child {
  text-decoration: underline 2px #00ff11;
  text-underline-offset: 10px;
}

/* چیدمان اصلی سبد */
.cartcont {
  display: flex;
  gap: 20px; /* جایگزین margin برای فاصله بین ستون‌ها */
  padding: 0 20px;
  margin-bottom: 30px;
}

.cartproduct {
  flex: 3; /* گسترش بیشتر برای لیست محصولات */
}

/* کارت محصول */
.product-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #e7eef6;
  border: 1px solid #ccc;
  border-radius: 20px;
}

.cartright img {
  width: 105px;
  height: 105px;
  object-fit: cover; /* جلوگیری از تحریف تصویر */
}

.cartmid {
  flex: 1;
  margin: 0 20px;
}

.cartmid h3 {
  font-size: 1.7em;
  margin: 0;
}

/* دکمه‌ها */
.cartmid button {
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  font-size: 1.2em;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin: 1em 0;
}

.update-cart {
  background-color: #4CAF50;
  color: white;
}

.update-cart:hover {
  background-color: #45a049;
}

.delete_product {
  background-color: #f44336;
  color: white;
}

.delete_product:hover {
  background-color: #e53935;
}

/* سلکت سفارشی */
.select-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* فاصله بین label و select */
  margin: 1em 0;
}

.select-wrapper label {
  font-size: 1.5rem;
  font-weight: bold;
}

.custom-select-container {
  display: flex;
  align-items: center;
  position: relative;
  direction: ltr; /* فقط برای select، چون محتوای عددی است */
  justify-content: space-around;
}

.quantity-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 8px 24px 8px 10px;
  font-size: 1.2rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: white;
  cursor: pointer;
  min-width: 70px;
  text-align: end;
}

.select-arrow {
  position: absolute;
  pointer-events: none;
  left: 8px; /* در حالت ltr برای select */
  font-size: 1rem;
  color: #555;
}

/* ستون سمت چپ (جمع کل) */
.cartleft {
  flex: 1;
  text-align: left; /* چون direction: ltr داخل select است، اینجا هم راست‌چین منطقی‌تر است ولی شما left گذاشتید — حفظ شد */
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 15px;
  align-self: flex-start; /* فقط در بالا بچسبد */
}

.cartleft p {
  margin: 8px 0;
  font-size: 25px;
}

.cartleft p:first-child {
  color: #4CAF50;
  font-weight: bold;
}

.carttotal {
  margin: 75px 24px 24px;
  padding: 15px;
  
  border: 1px solid #c4c4c4;
  border-radius: 20px;
  width: fit-content;
  text-decoration: underline 2px #00ff11;
  text-underline-offset: 10px;
}
.carttotalbutt{
   
    list-style: none;
    margin: 20px;
    color: rgb(255, 255, 255);
    background: linear-gradient(170deg, #007bff, #138615); 
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(55, 192, 227, 0.4);
    border: 1px solid #eaeaea;
    font-size: 1.2rem;
    font-weight: bold;
}
.carttotalbutt a {
  color: rgba(248, 243, 243, 0.959);
  text-decoration: none;
  display: block;

  font-size: inherit;
  font-weight: inherit;
}
.hcontainer {
  transform: translateX(-15%);
  font-size: 1.5rem;
}

/* ========== Mobile Responsive (width ≤ 1023px) ========== */

@media screen and (max-width: 1023px) {
  body {
    font-size: 14px;

  }

 .cart-nav {
        flex-direction: column;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        padding: 0;
        margin: 8px 0;
    }

  .cart-nav img {
    width: 100px;
    height: 35px;
    margin: 5px 0;
  }

  .cart-nav-bot {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    margin: 15px 0;
  }

  .cart-nav-bot .item {
    font-size: 1rem;
    white-space: nowrap;
    padding: 0;
    margin: 0 4px;
  }

  /* خطوط جداکننده در موبایل حذف می‌شوند */
  .cart-nav-bot .item::after {
    display: none;
  }

  .cartcont {
    flex-direction: column;
    padding: 0 10px;
    gap: 15px; /* جایگزین margin برای فاصله بین بخش‌ها */
  }

  .cartproduct,
  .carttotal {
    margin: 10px 0;
  }

  .product-item {
    flex-direction: column;
    align-items: center;
    padding: 15px;
    text-align: center;
  }

  .cartright,
  .cartmid,
  .cartleft {
    width: 100%;
    margin: 10px 0;
    text-align: center;
  }

  .cartright img {
    width: 80px;
    height: 80px;
    margin-top: 0;
  }

  .cartmid h3 {
    font-size: 1.6em;
    margin: 10px 0;
  }

  /* سلکت موبایل */
  .select-wrapper {
    width: 100%;
    margin: 10px 0;
    display: flex;
    justify-content: center;
  }

  .quantity-select {
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
    padding: 8px;
    background: initial;
    border: 1px solid #ccc;
    direction: ltr;
    text-align: center;
  }



  .cartleft {
    margin: 0 auto;
    max-width: 300px;
  }

  .cartleft p {
    font-size: 18px;
    margin: 6px 0;
  }

  .cartmid button {
    padding: 8px 12px;
    font-size: 14px;
    margin: 5px;
    width: 100%;
    max-width: 150px;
  }

  .carttotal {
    margin: 20px auto;
    text-align: center;
    width: 90%;
    padding: 15px;
    font-size: 1.2rem;
  }

  .hcontainer {
    transform: none;
    font-size: 1.3rem;
    margin-top: 20px;
  }
  .custom-select-container {
width: 10%;
justify-content: center;
position: static !important;
}
.select-arrow{
  display: none;
}
.select-wrapper label {
    font-size: 1.2rem;
margin-left: 20px;
}
}