#mycart {
  padding-top: 150px;
  max-width: 1200px;
  margin: auto;
}
/* اخفاء رأس الجدول */
.woocommerce-cart-form table thead {
  display: none;
}
/* تحويل كل صف إلى بطاقة */
.woocommerce-cart-form__cart-item {
  display: grid !important;
  grid-template-columns: 80px 1fr auto;
  grid-template-areas:
    "thumb name remove"
    "thumb quantity price"
    "thumb subtotal subtotal";
  gap: 12px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
  align-items: center;
}

/* الصورة */
.woocommerce-cart-form__cart-item .product-thumbnail {
  grid-area: thumb;
  margin: 0;
}
.woocommerce-cart-form__cart-item .product-thumbnail img {
  width: 80px !important;
  height: auto;
  border-radius: 10px;
}
/* اسم المنتج */
.woocommerce-cart-form__cart-item .product-name {
  grid-area: name;
  font-size: 16px;
  font-weight: 600;
}
/* زر الحذف */
.woocommerce-cart-form__cart-item .product-remove {
  grid-area: remove;
  text-align: right;
}

.woocommerce-cart-form__cart-item .product-remove .remove {
  font-size: 22px;
}

/* الكمية */
.woocommerce-cart-form__cart-item .product-quantity {
  grid-area: quantity;
}

/* السعر */
.woocommerce-cart-form__cart-item .product-price {
  grid-area: price;
  text-align: right;
  font-weight: bold;
}

/* المجموع */
.woocommerce-cart-form__cart-item .product-subtotal {
  grid-area: subtotal;
  font-size: 15px;
  font-weight: 600;
  text-align: right;
  padding-top: 5px;
  border-top: 1px solid #eee;
}

/* اخفاء حدود الجدول الأصلية */
.woocommerce-cart-form table.shop_table {
  border: none !important;
}

.woocommerce-cart-form table.shop_table tr,
.woocommerce-cart-form table.shop_table td {
  border: none !important;
  background: var(--color-cart-1);
}
#mycart .woocommerce {
  margin: 0px 20px;
}
.woocommerce-cart-form table.shop_table tr,
.woocommerce-cart-form table.shop_table td {
  position: relative;
}
.product-remove {
  margin: 0;
  position: absolute !important;
  top: 0 !important;
  right: 10px;
  padding: 5px !important;
  z-index: 50;
}

.custom-cart-wrapper {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Card Container */
.cart-card {
  position: relative;
  display: flex;
  background: var(--color-cart-1);
  border-radius: 16px;
  padding: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  gap: 15px;
  align-items: center;
}

/* Remove */
.cart-remove {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 22px;
  font-weight: bold;
  text-decoration: none;
  color: var(--color-box-3);
  border: 1px solid;
  width: 28px;
  text-align: center;
  height: 28px;
  padding: 0;
  border-radius: 100%;
  line-height: 22px;
  z-index: 500;
  background: #ffffff52;
}

.cart-remove:hover {
  color: #000;
}

/* Image */
.cart-card-left img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: contain;
  background: #cecccc;
}

/* Content */
.cart-card-content {
  flex: 1;
}

.cart-product-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.cart-price {
  margin-top: 5px;
  font-weight: bold;
  color: var(--color-box-3);
}

/* Quantity */
.cart-qty {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 
.cart-qty button {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #eee;
    font-size: 18px;
    cursor: pointer;
} */

.cart-qty input.qty {
  width: 50px !important;
  text-align: center;
  font-family: var(--font-family-02);
}
/* Totals */
.custom-cart-totals {
  margin-top: 0;
  padding: 20px;
  background: var(--color-cart-1);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
/* Button */
.update-cart-btn {
  width: 100%;
  margin-top: 15px;
}
.quantity {
  display: flex;
  align-items: center;
  padding: 0;
  background: var(--contrast);
  border-radius: 20px;
}
.quantity .input-text {
  background: var(--contrast) !important;
  color: #fff;
  border: none !important;
}
.jrms {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-family-02);
}
.cart-product-title a {
  color: var(--color-02);
  font-family: var(--font-family-02);
}
.quantity input::-webkit-outer-spin-button,
.quantity input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.quantity input[type="number"] {
  -moz-appearance: textfield;
}
td,
th {
  border: none !important;
}
.woocommerce .quantity .qty {
  padding: 0px;
}
.cartTitle {
  font-family: var(--font-family-01);
  font-size: var(--font-size-h2);
  font-weight: 400;
  margin-bottom: 0;
}
.woocommerce table.shop_table {
  border: none !important;
}
.wc-proceed-to-checkout a.checkout-button {
  padding: 12px !important;
  font-size: var(--font-size-h5) !important;
  border-radius: 20px;
  font-family: var(--font-family-01);
  font-weight: 500;
  background: var(--color-box-3) !important;
  color: #000000e5 !important;
}
.cart-subtotal,
.order-total {
  font-family: var(--font-family-02);
}
.cart-subtotal th {
  font-weight: 400;
}
/* .cart-subtotal td{} */
.cateCart {
  font-family: var(--font-family-02);
  color: var(--color-grbl);
  font-size: var(--font-size-h6-mobile);
}
.update-cart-btn {
  margin-top: 20px !important;
  border-radius: 20px !important;
  font-family: var(--font-family-02);
  font-weight: 500 !important;
  font-size: var(--font-size-base) !important;
}
.woocommerce-cart-form {
  margin-bottom: 50px;
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 40px;
  align-items: start;
}
.custom-cart-wrapper {
  width: 60%;
}
.dfy34 {
  width: 40%;
  font-family: var(--font-family-02);
}
.cart_totals h2 {
  font-family: var(--font-family-02);
  font-size: var(--font-size-h3-mobile);
  font-weight: 500;
}
.woocommerce table.shop_table td {
  text-align: left;
}
#jrng {
  padding: 0px 30px 0px 0px;
} /* Mini Cart Styles */
.custom-cart-container {
  position: relative;
  display: inline-block;
}

.custom-cart-icon:lang(ar) {
  margin: 0px 12px;
}
.custom-cart-icon {
  cursor: pointer;
  position: relative;
  display: inline-block;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.custom-cart-icon:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.custom-cart-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.cart-count {
  position: absolute;
  top: 0px;
  right: 0px;
  background: var(--color-box-3, #d4af37);
  color: #000;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  font-family: var(--font-family-02);
}
.mini-cart-dropdown:lang(ar) {
  position: absolute;
  top: 100%;
  /* right: auto;
  left: 0; */
}
.mini-cart-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  max-height: 400px;
  background: var(--bg-secondary, #fff);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  /* border: 1px solid var(--color-golden-05, #eee); */
  margin-top: 8px;
}

.mini-cart-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mini-cart-content {
  padding: 0;
  max-height: 350px;
  overflow-y: auto;
}

.mini-cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  /* border-bottom: 1px solid var(--color-golden-05, #f0f0f0); */
  transition: background-color 0.2s ease;
}

.mini-cart-item:last-child {
  border-bottom: none;
}

.mini-cart-item:hover {
  background-color: var(--color-cart-1, #f9f9f9);
}

.mini-cart-item-image {
  flex-shrink: 0;
}

.mini-cart-item-image img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  /* border: 1px solid var(--color-golden-05, #eee); */
}

.mini-cart-item-details {
  flex: 1;
  min-width: 0;
}

.mini-cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-02, #333);
  margin-bottom: 4px;
  line-height: 1.3;
  font-family: var(--font-family-02);
}

.mini-cart-item-name a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.mini-cart-item-name a:hover {
  color: var(--color-box-3, #d4af37);
}

.mini-cart-item-category {
  font-size: 12px;
  color: var(--color-grbl, #666);
  font-family: var(--font-family-02);
  font-weight: 400;
}

.mini-cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-grbl, #666);
  font-family: var(--font-family-02);
  font-size: 14px;
}

.mini-cart-buttons {
  display: flex;
  gap: 10px;
  padding: 15px;
  /* border-top: 1px solid var(--color-golden-05, #eee); */
  background: var(--bg-secondary, #fafafa);
  border-radius: 0 0 12px 12px;
}

.mini-cart-view-cart,
.mini-cart-checkout {
  flex: 1;
  text-align: center;
  padding: 10px 15px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-family-02);
  transition: all 0.2s ease;
}

.mini-cart-view-cart {
  background: var(--bg-secondary, #f5f5f5);
  color: var(--color-02, #333);
  border: 1px solid var(--color-golden-05, #ddd);
}

.mini-cart-view-cart:hover {
  background: var(--color-golden-05, #eee);
}

.mini-cart-checkout {
  background: var(--color-box-3, #d4af37);
  color: #000;
  border-radius: 30px;
  border: 1px solid var(--color-box-3, #d4af37);
}

.mini-cart-checkout:hover {
  background: var(--color-box-4, #c4a030);
  border-color: var(--color-box-4, #c4a030);
}

/* Mini Cart Remove Button */
.mini-cart-item-remove {
  flex-shrink: 0;
  margin-left: auto;
}

.remove-from-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  color: #999;
  transition: all 0.2s ease;
  padding: 0;
}

.remove-from-cart:hover {
  background-color: rgba(255, 0, 0, 0.1);
  color: #ff4444;
  transform: scale(1.1);
}

.remove-from-cart:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.remove-from-cart svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
}

@media (max-width: 767px) {
  #mycart {
    padding-top: 115px;
  }
  /* #jrng{padding: 0px;} */
}
@media (max-width: 676px) {
  .custom-cart-wrapper,
  .dfy34 {
    width: 100%;
  }
  .woocommerce-cart-form {
    flex-direction: column;
  }
}
@media (max-width: 480px) {
  .custom-cart-wrapper,
  .dfy34 {
    width: 100%;
  }
  .woocommerce table.shop_table {
    margin-bottom: 10px;
  }
  .wc-proceed-to-checkout {
    padding: 0;
  }
  .update-cart-btn {
    font-size: var(--font-size-base);
  }
  .woocommerce-cart-form {
    display: flex;
    flex-direction: column;
    padding-bottom: 80px;
  }
  .custom-cart-wrapper {
    order: 1;
  }
  .dfy34 {
    order: 3;
    padding: 5px !important;
  }
  .update-cart-btn {
    order: 2;
  }
  .cateCart {
    font-size: 13px;
  }
  .cart-subtotal th,
  .order-total th {
    font-size: var(--font-size-base);
  }
  .cart-subtotal td {
    font-size: var(--font-size-base);
  }
  .woocommerce-cart .wc-proceed-to-checkout {
    padding: 5px 12px !important;
  }
  .wc-proceed-to-checkout a.checkout-button {
    font-weight: 500;
    font-size: var(--font-size-h5-mobile) !important;
  }
  .cart-subtotal > th,
  .order-total > th {
    display: block !important;
  }
  .cart-subtotal,
  .order-total {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
  }
  .cart_totals h2 {
    display: none;
  }
  /* #cartTitle h3{font-family: var(--font-family-01);font-size: var(--font-size-h1-mobile);font-weight: 400;margin-bottom: 0;margin-left: -60px;}
    #cartTitle{font-size: var(--font-size-h2);} */
  .cart-card-left a {
    width: 80px;
    display: block;
  }
  .cart-card-left img {
    width: 90px;
    height: 90px;
    object-fit: contain;
  }
  .cart-price bdi {
    font-size: var(--font-size-h6);
    font-weight: 500;
  }
  .jrms {
    margin-top: 18px;
  }
  .cart-product-title a {
    font-size: var(--font-size-small);
  }
  .qty-minus {
    padding: 0px;
    font-weight: 600;
    width: 30px;
    border-radius: 100%;
    height: 30px;
    font-size: var(--font-size-h4-mobile);
    line-height: 7px;
    background: var(--contrast) !important;
  }
  .qty-plus {
    background: var(--contrast-2);
    padding: 0px;
    font-weight: 600;
    width: 30px;
    border-radius: 100%;
    height: 30px;
    font-size: var(--font-size-h4-mobile);
    line-height: 7px;
  }
  .cart-qty input.qty {
    width: 50px !important;
  }
  .woocommerce-cart-form__cart-item .product-quantity {
    grid-area: name-end;
  }
  .woocommerce-cart-form__cart-item .product-subtotal {
    grid-area: inherit;
  }
  .product-price {
    display: none !important;
  }
  .woocommerce table.shop_table_responsive tr td::before,
  .woocommerce-page table.shop_table_responsive tr td::before {
    display: none !important;
  }
  .product-thumbnail {
    display: block !important;
  }
  #jrng {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
  }
  #cartTitle {
    width: 75%;
    text-align: center;
  }
  #mycart {
    padding-top: 100px;
  }

  .mini-cart-dropdown {
    width: 280px;
    right: -10px;
  }

  .mini-cart-item {
    padding: 12px;
    gap: 10px;
  }

  .mini-cart-item-image img {
    width: 50px;
    height: 50px;
  }

  .mini-cart-item-name {
    font-size: 13px;
  }

  .mini-cart-item-category {
    font-size: 11px;
  }

  .mini-cart-buttons {
    padding: 12px;
    flex-direction: column;
    gap: 8px;
  }

  .mini-cart-view-cart,
  .mini-cart-checkout {
    padding: 12px 15px;
    font-size: 14px;
  }
}
