/* =========================================================
   QRKavach — WooCommerce Cart Page
   ========================================================= */

/* ── Page shell ─────────────────────────────────────────── */
body.woocommerce-cart {
  background: #F9F9FC;
}
.qk-cart-main {
  min-height: 60vh;
}
.qk-cart-wrap {
  max-width: 1248px;
  margin: 0 auto;
  padding: 0px 24px 120px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* ── Header ─────────────────────────────────────────────── */
.qk-cart-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qk-cart-header__title {
  font-family: 'Manrope', sans-serif;
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  color: #1A1C1E;
  margin: 0;
}
.qk-cart-header__sub {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #434655;
  margin: 0;
}

/* ── Two-column layout ──────────────────────────────────── */
.qk-cart-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}
.qk-cart-left {
  flex: 1;
  min-width: 0;
}
.qk-cart-right {
  width: 400px;
  flex-shrink: 0;
}

/* ── Cart table card ────────────────────────────────────── */
.qk-cart-table-wrap {
  background: #F3F3F6;
  box-shadow: 0px 20px 40px -15px rgba(76,65,224,0.10);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(195,198,215,0.20);
}
.qk-cart-table {
  width: 100%;
  border-collapse: collapse;
}

/* Table header */
.qk-cart-table thead {
  background: rgba(195,198,215,0.25);
}
.qk-cart-table thead .qk-ct-col {
  padding: 20px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #434655;
  text-align: left;
  white-space: nowrap;
}
.qk-ct-col--product { width: 42%; }
.qk-ct-col--price   { width: 13%; }
.qk-ct-col--qty     { width: 20%; }
.qk-ct-col--subtotal{ width: 14%; }
.qk-ct-col--remove  { width: 11%; }

/* Table rows */
.qk-cart-table tbody tr {
  border-top: 1px solid #EEEEF0;
}
.qk-cart-table tbody tr:first-child {
  border-top: none;
}
.qk-ct-cell {
  padding: 20px 24px;
  vertical-align: middle;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #1A1C1E;
}

/* Product cell */
.qk-ct-product {
  display: flex;
  align-items: center;
  gap: 24px;
}
.qk-ct-thumb {
  width: 80px;
  height: 80px;
  background: #EEEEF0;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.qk-ct-thumb img,
.qk-ct-thumb a {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.qk-ct-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.qk-ct-name {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 28px;
  color: #1A1C1E;
}
.qk-ct-name a {
  color: inherit;
  text-decoration: none;
}
.qk-ct-name a:hover { color: #004AC6; }
.qk-ct-cat {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #4C41E0;
  line-height: 16px;
}

/* Price cell */
.qk-ct-cell--price {
  font-weight: 600;
  color: #1A1C1E;
}
.qk-ct-cell--price .woocommerce-Price-amount { font-weight: 600; }

/* Quantity stepper */
.qk-qty-stepper {
  display: inline-flex;
  align-items: center;
  background: #E2E2E5;
  border: 1.5px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .15s, background .15s;
}
.qk-qty-stepper:focus-within {
  background: #fff;
  border-color: #004AC6;
}
.qk-qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  padding: 14px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 0;
  transition: background .15s;
  flex-shrink: 0;
}
.qk-qty-btn:hover { background: rgba(0,0,0,.07); }
.qk-qty-input {
  width: 44px;
  padding: 14px 0;
  background: #FFFFFF;
  border: none;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #1A1C1E;
  line-height: 20px;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qk-qty-input::-webkit-inner-spin-button,
.qk-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qk-qty-input:focus { outline: none; }

/* Subtotal cell */
.qk-ct-cell--subtotal {
  font-weight: 700;
  color: #004AC6 !important;
}
.qk-ct-cell--subtotal .woocommerce-Price-amount { color: #004AC6; font-weight: 700; }

/* Remove button */
.qk-ct-cell--remove { text-align: right; }
.qk-ct-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  text-decoration: none;
  transition: background .15s;
}
.qk-ct-remove:hover { background: #EEEEF0; }

/* ── Actions row ────────────────────────────────────────── */
.qk-cart-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 32px;
  background: rgba(195,198,215,0.10);
  border-top: 1px solid rgba(195,198,215,0.30);
  flex-wrap: wrap;
}
.qk-cart-coupon {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qk-cart-coupon__input {
  width: 220px;
  padding: 18px 16px;
  background: #FFF;
  border: var(--wc-form-border-width) solid var(--wc-form-border-color);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #000;
  outline: none;
  appearance: none;
  transition: border-color .15s, background .15s;
  box-sizing: border-box;
}
.qk-cart-coupon__input::placeholder { color: #9B9EB2; }
.qk-cart-coupon__input:focus {
  background: #fff;
  border-color: #004AC6;
}
.qk-cart-coupon__btn {
  padding: 18px 24px;
  background: #fff;
  border: 1.5px solid rgba(195,198,215,.60);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #004AC6;
  cursor: pointer;
  transition: background .15s;
}
.qk-cart-coupon__btn:hover { background: #F0F5FF; }
.qk-cart-update {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 24px;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #434655;
  cursor: pointer;
  transition: background .15s;
}
.qk-cart-update:hover { background: rgba(67,70,85,.08); }

/* ── Cart totals panel ──────────────────────────────────── */
.qk-cart-totals {
  background: #F3F3F6;
  border-radius: 8px;
  border: 1px solid rgba(195,198,215,0.20);
  box-shadow: 0px 20px 40px -15px rgba(76,65,224,0.10);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.qk-ct-totals-title {
  font-family: 'Manrope', sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 32px;
  color: #1A1C1E;
  margin: 0;
}
.qk-ct-totals-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.qk-ct-totals-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid #E2E2E5;
  margin-bottom: 24px;
}
.qk-ct-totals-row--total {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 8px;
  align-items: center;
}
.qk-ct-totals-row--shipping {
  flex-direction: column;
  gap: 16px;
}
.qk-ct-totals-label {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #434655;
}
.qk-ct-totals-label--total {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 28px;
  color: #1A1C1E;
}
.qk-ct-totals-value {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1A1C1E;
  text-align: right;
}
.qk-ct-totals-value--discount { color: #059669; }
.qk-ct-totals-value--total {
  font-family: 'Manrope', sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 36px;
  color: #004AC6;
}
.qk-ct-totals-value--total .woocommerce-Price-amount { color: #004AC6; }

/* WC shipping output — inside the panel */
.qk-ct-totals-shipping .woocommerce-shipping-methods {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qk-ct-totals-shipping .woocommerce-shipping-methods li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #1A1C1E;
}
.qk-ct-totals-shipping .woocommerce-shipping-methods input[type="radio"] {
  width: 20px;
  height: 20px;
  border: 1.5px solid #C3C6D7;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  background: #fff;
  transition: border-color .15s;
}
.qk-ct-totals-shipping .woocommerce-shipping-methods input[type="radio"]:checked {
  border-color: #004AC6;
  background: #004AC6;
}
.qk-ct-totals-shipping .woocommerce-shipping-methods input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: #fff;
  border-radius: 50%;
}

/* Free shipping progress bar */
.qk-ct-shipping-status {
  background: rgba(37,99,235,.10);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qk-ct-shipping-status__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #004AC6;
}
.qk-ct-shipping-status__text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #1E3A8A;
  margin: 0;
  line-height: 1.55;
}
.qk-ct-shipping-status__text strong { font-weight: 600; }
.qk-ct-shipping-bar {
  height: 8px;
  background: #E2E2E5;
  border-radius: 12px;
  overflow: hidden;
}
.qk-ct-shipping-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #004AC6 0%, #7C04D3 100%);
  border-radius: 12px;
  transition: width .4s ease;
}

/* ── Checkout button ────────────────────────────────────── */
.qk-ct-checkout .checkout-button,
.qk-ct-checkout a.checkout-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 20px;
  background: linear-gradient(178deg, #004AC6 0%, #7C04D3 100%);
  border: none;
  border-radius: 12px;
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: opacity .2s ease;
}
.qk-ct-checkout .checkout-button:hover,
.qk-ct-checkout a.checkout-button:hover { opacity: .88; }
.qk-ct-checkout .checkout-button::after {
  content: '→';
  font-size: 18px;
}

/* ── Payment icons ──────────────────────────────────────── */
.qk-ct-payment-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: -8px;
}

/* ── Empty cart ─────────────────────────────────────────── */
.qk-empty-cart {
  background: #F3F3F6;
  border: 1px solid rgba(195,198,215,0.20);
  box-shadow: 0px 20px 40px -15px rgba(76,65,224,0.10);
  border-radius: 16px;
  padding: 72px 40px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.qk-empty-cart__icon {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #EEEEF5;
  border-radius: 50%;
  flex-shrink: 0;
}
.qk-empty-cart__icon svg {
  width: 64px;
  height: 64px;
}

.qk-empty-cart__heading {
  font-family: 'Manrope', sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  color: #1A1C1E;
  margin: 0;
}

.qk-empty-cart__message {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  color: #434655;
  max-width: 440px;
  margin: 0;
}

/* WC notice sits between message and CTA */
.qk-empty-cart .woocommerce-info,
.qk-empty-cart .woocommerce-message,
.qk-empty-cart .woocommerce-error {
  width: 100%;
  max-width: 480px;
  border-radius: 8px;
  margin: 0;
}

.qk-empty-cart__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.qk-empty-cart__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 12px;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none !important;
  transition: opacity .2s ease, background .2s ease;
  cursor: pointer;
}
.qk-empty-cart__btn--primary {
  background: linear-gradient(178deg, #004AC6 0%, #7C04D3 100%);
  color: #fff !important;
}
.qk-empty-cart__btn--primary:hover { opacity: .88; }
.qk-empty-cart__btn--secondary {
  background: #fff;
  border: 1.5px solid rgba(195,198,215,.70);
  color: #1A1C1E !important;
}
.qk-empty-cart__btn--secondary:hover { background: #F0F0F5; }

/* Trust row */
.qk-empty-cart__trust {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.qk-empty-cart__trust li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #737686;
}
.qk-empty-cart__trust svg {
  flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .qk-cart-layout { flex-direction: column; }
  .qk-cart-right  { width: 100%; }
  .qk-cart-header__title { font-size: 36px; }
}
@media (max-width: 640px) {
  .qk-cart-wrap   { padding: 48px 16px 80px; gap: 32px; }
  .qk-cart-header__title { font-size: 28px; }
  .qk-ct-cell     { padding: 16px; }
  .qk-cart-actions { flex-direction: column; align-items: flex-start; padding: 20px 16px; }
  .qk-cart-table thead .qk-ct-col--price,
  .qk-cart-table thead .qk-ct-col--qty,
  .qk-cart-table thead .qk-ct-col--subtotal { display: none; }
  .qk-ct-cell--price,
  .qk-ct-cell--qty,
  .qk-ct-cell--subtotal { display: flex; gap: 8px; }
  .qk-ct-cell--price::before    { content: attr(data-title) ': '; font-weight: 600; color: #737686; }
  .qk-ct-cell--qty::before      { content: attr(data-title) ': '; font-weight: 600; color: #737686; }
  .qk-ct-cell--subtotal::before { content: attr(data-title) ': '; font-weight: 600; color: #737686; }
}
