/* Cart page (cart.php): cleaner table, - n + quantity, totals box, stacked cards on phones.
   Overrides the theme rules of assets/css/module-css/shop.css (.cart-table, .cart-total). */

.cart-page { padding: 100px 0 110px; }

/* ---- table ---- */
.cart-page .table-responsive { overflow: visible; }
.cart-page .cart-table { min-width: 0 !important; width: 100%; table-layout: auto; }
.cart-table thead th { font-size: 16px; text-transform: uppercase; letter-spacing: .04em; color: var(--helpest-black); padding: 0 12px 16px !important; white-space: nowrap; }
.cart-table thead th:first-child { padding-left: 0 !important; }
.cart-table thead th:last-child, .cart-table tbody td:last-child { padding-right: 0 !important; }
.cart-table tbody td { padding: 22px 12px !important; font-size: 17px; }
.cart-table tbody td:first-child { padding-left: 0 !important; }
.cart-table .cart-col-price, .cart-table .cart-col-total { width: 110px; text-align: center; white-space: nowrap; }
.cart-table .cart-col-qty { width: 150px; text-align: center; }
.cart-table .cart-col-remove { width: 70px; text-align: right; }
.cart-table .cart-col-total, .cart-table .cart-line-total { color: var(--helpest-black); font-weight: 700; }

.cart-table .product-box { gap: 20px; }
.cart-table .product-box .img-box { flex: 0 0 90px; width: 90px; height: 90px; margin-right: 0; border-radius: 12px; }
.cart-table .product-box .img-box img { width: 90px; height: 90px; object-fit: cover; border-radius: 12px; }
.cart-table h3 { font-size: 18px; line-height: 1.35; }
.cart-table h3 small { display: block; margin-top: 6px; font-size: 14px !important; font-weight: 500 !important; line-height: 1.5; color: #6b7a86 !important; }

/* - n + quantity (replaces the theme's small stacked arrows) */
.cart-table .quantity-box { display: inline-flex; align-items: center; width: auto; height: auto; padding: 3px; border: 1px solid #dfe6ec; border-radius: 30px; background: #fff; }
.cart-table .quantity-box input { width: 46px; height: 36px; padding: 0; border: 0; border-radius: 0; text-align: center; font-size: 16px; color: var(--helpest-black); background: transparent; }
.cart-table .quantity-box input::-webkit-outer-spin-button, .cart-table .quantity-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-table .quantity-box button,
.cart-table .quantity-box button.sub { position: static; width: 34px; height: 34px; border: 0; border-radius: 50% !important; background: #f0f5f9; color: var(--helpest-black); font-size: 12px; cursor: pointer; transition: background .2s, color .2s; }
.cart-table .quantity-box button:hover { background: var(--helpest-base); color: #fff; }

.cart-table .cross-icon { display: inline-flex !important; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #f5f7f9 !important; transition: background .2s; }
.cart-table .cross-icon:hover { background: #fdecea !important; }
.cart-table .cross-icon:hover i:before { color: #b42318; }

.cart-page__actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; margin-top: 25px; }
.cart-page__continue { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--helpest-black); }
.cart-page__continue:hover { color: var(--helpest-base); }

/* ---- totals box ---- */
.cart-page__right { margin-left: 10px; }
.cart-page__sidebar { padding: 30px 28px; }
.cart-page__sidebar-title { font-size: 22px; margin-bottom: 20px; }
.cart-page .cart-total li { justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid rgba(var(--helpest-black-rgb), .08); font-size: 16px; }
.cart-page .cart-total li + li { margin-top: 0; }
.cart-page .cart-total li span:first-child { width: auto; margin-right: 0; text-align: left; font-size: 16px; }
.cart-page .cart-total li span:last-child { text-align: right; }
.cart-page .cart-total li:last-child { border-bottom: 0; padding-top: 16px; }
.cart-page .cart-total li:last-child span { font-size: 20px; }
.cart-page__buttons, .cart-page__buttons-2 { display: block; }
.cart-page__buttons-2 .thm-btn { display: flex; justify-content: center; width: 100%; padding: 14px 30px; }
.cart-page__note { margin: 15px 0 0; font-size: 14px; color: #6b7a86; text-align: center; }

/* ---- tablets: totals under the table ---- */
@media (max-width: 991px) {
  .cart-page__right { margin: 40px 0 0; }
}

/* ---- phones: each line becomes a card ---- */
@media (max-width: 767px) {
  .cart-page { padding: 60px 0 80px; }
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100% !important; }
  .cart-table tbody tr { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 18px 0; border-bottom: 1px solid rgba(var(--helpest-black-rgb), .10); }
  .cart-table tbody td { padding: 0 !important; border: 0 !important; text-align: left !important; }
  .cart-table tbody td.cart-col-item { grid-column: 1 / -1; padding-right: 46px !important; }
  .cart-table tbody td.cart-col-price { display: none; }
  .cart-table tbody td.cart-col-qty { grid-column: 1; }
  .cart-table tbody td.cart-col-total { grid-column: 2; font-size: 18px; }
  .cart-table tbody td.cart-col-remove { position: absolute; top: 18px; right: 0; width: auto !important; }
  .cart-table .product-box { align-items: flex-start; gap: 14px; }
  .cart-table .product-box .img-box, .cart-table .product-box .img-box img { flex-basis: 72px; width: 72px; height: 72px; }
  .cart-table h3 { font-size: 16px; }
  .cart-page__sidebar { padding: 24px 20px; }
}

/* =====================================================================
   Checkout page (checkout.php): details card + order summary card
   ===================================================================== */
.checkout-page { padding: 100px 0 110px; }
.checkout-card { background: #fff; border-radius: 20px; padding: 34px; box-shadow: 0 10px 60px rgba(0, 0, 0, .07); }
.checkout-card__title { font-size: 26px; margin: 0 0 6px; }
.checkout-card__text { color: #6b7a86; margin-bottom: 26px; }

/* fields */
.checkout-field { display: block; margin: 0; }
.checkout-field > span { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 700; color: var(--helpest-black); }
.checkout-field > span b { color: #e05a6b; font-weight: 700; }
.checkout-field > span i { font-style: normal; font-weight: 500; color: #8a97a3; }
.checkout-field input, .checkout-field textarea { display: block; width: 100%; height: 54px; padding: 0 18px; border: 1px solid #dfe6ec; border-radius: 12px; background: #f8fafc;
  font-size: 16px; color: var(--helpest-black); outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.checkout-field textarea { height: 120px; padding: 14px 18px; resize: vertical; }
.checkout-field input:focus, .checkout-field textarea:focus { border-color: var(--helpest-base); background: #fff; box-shadow: 0 0 0 4px rgba(var(--helpest-base-rgb), .12); }

/* order summary */
.checkout-summary { position: sticky; top: 110px; }
.checkout-summary__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.checkout-summary__edit { font-size: 14px; font-weight: 700; color: var(--helpest-base); white-space: nowrap; }
.checkout-summary__edit:hover { color: var(--helpest-black); }
.checkout-summary__list { margin: 0; }
.checkout-summary__item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(var(--helpest-black-rgb), .08); }
.checkout-summary__img { position: relative; flex: 0 0 60px; width: 60px; height: 60px; }
.checkout-summary__img img { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; border: 1px solid #e8eef3; }
.checkout-summary__qty { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--helpest-black);
  color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }
.checkout-summary__name { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 700; color: var(--helpest-black); line-height: 1.4; }
.checkout-summary__name small { display: block; margin-top: 3px; font-size: 13px; font-weight: 500; color: #6b7a86; }
.checkout-summary__price { flex: 0 0 auto; font-weight: 700; color: var(--helpest-black); }
.checkout-summary__total { display: flex; justify-content: space-between; align-items: center; padding: 18px 0 6px; font-size: 20px; font-weight: 700; color: var(--helpest-black); }
.checkout-summary__total span:last-child { color: var(--helpest-base); }
.checkout-summary__subtitle { font-size: 18px; margin: 24px 0 12px; }

/* payment options */
.checkout-pay { display: grid; gap: 10px; }
.checkout-pay__option { position: relative; display: flex; align-items: center; gap: 14px; margin: 0; padding: 14px 16px; border: 2px solid #e8eef3; border-radius: 14px; cursor: pointer;
  transition: border-color .2s, background .2s; }
.checkout-pay__option:hover { border-color: rgba(var(--helpest-base-rgb), .5); }
.checkout-pay__option.is-active { border-color: var(--helpest-base); background: rgba(var(--helpest-base-rgb), .05); }
.checkout-pay__option input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--helpest-base); cursor: pointer; }
.checkout-pay__icon { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #f0f5f9; color: var(--helpest-black); font-size: 17px; }
.checkout-pay__option.is-active .checkout-pay__icon { background: var(--helpest-base); color: #fff; }
.checkout-pay__text b { display: block; font-size: 15px; color: var(--helpest-black); }
.checkout-pay__text small { display: block; font-size: 13px; color: #6b7a86; line-height: 1.45; }

.checkout-summary__btn { display: flex; justify-content: center; width: 100%; margin-top: 22px; }
.checkout-summary__btn[disabled] { opacity: .7; cursor: wait; }
.checkout-summary__secure { margin: 12px 0 0; text-align: center; font-size: 13px; color: #6b7a86; }

@media (max-width: 991px) {
  .checkout-summary { position: static; }
}
@media (max-width: 575px) {
  .checkout-page { padding: 60px 0 80px; }
  .checkout-card { padding: 24px 18px; border-radius: 16px; }
  .checkout-card__title { font-size: 22px; }
}
