/* Glo Little Luxury — Bag, built in the theme (1.9.3).
 *
 * Markup: woocommerce/cart/cart.php, cart-totals.php, cart-empty.php.
 * Follows the Framer /bag page:
 *
 *   ┌────────────────────────────────────────┐ ┌───────────────────┐
 *   │ [img] Brand / Name / ৳999 ৳1,150 −13%  │ │ Order summary     │
 *   │                     [− 1 +]  ৳999      │ │ Subtotal, Delivery│
 *   │                              Remove    │ │ Total             │
 *   ├────────────────────────────────────────┤ │ [Continue to …]   │
 *   │ …                                      │ └───────────────────┘
 *   └────────────────────────────────────────┘   trust list
 *   Continue shopping      Have a coupon? …
 *
 * Below 1100px the summary drops under the items. */

.glo-bag {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 32px;
  align-items: start;
}
.glo-bag__main,
.glo-bag__side { min-width: 0; }

/* ---------- Items ---------- */
.glo-bag__card {
  background: var(--glo-surface);
  border: 1px solid var(--glo-border);
  border-radius: 16px;
  padding: 4px 28px;
}
.glo-bag__items { display: block; width: 100%; margin: 0; border: 0; background: transparent; }

.glo-bag__item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--glo-border);
}
.glo-bag__item:first-child { border-top: 0; }

.glo-bag__thumb {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  background: var(--glo-cream);
  overflow: hidden;
}
.glo-bag__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }

.glo-bag__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.glo-bag__brand {
  font-family: var(--glo-font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--glo-teal-ink);
}
.glo-bag__name {
  font-family: var(--glo-font-body);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--glo-ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.glo-bag__name:hover { color: var(--glo-teal-ink); }
.glo-bag__info dl.variation { margin: 0; font-size: 12.5px; color: var(--glo-stone); }
.glo-bag__info .backorder_notification { margin: 0; font-size: 12.5px; color: var(--glo-stone); }

.glo-bag__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin-top: 4px;
}
.glo-bag__now {
  font-family: var(--glo-font-body);
  font-size: 17px;
  font-weight: 700;
  color: var(--glo-ink);
  font-variant-numeric: tabular-nums;
}
.glo-bag__now.is-sale,
.glo-bag__total.is-sale { color: var(--glo-coral); }
.glo-bag__was {
  font-family: var(--glo-font-body);
  font-size: 14px;
  color: var(--glo-stone);
  font-variant-numeric: tabular-nums;
}
.glo-bag__price .glo-save { align-self: center; }

.glo-bag__controls { display: flex; align-items: center; gap: 28px; }

/* Stepper */
.glo-qty {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 4px;
  border: 1px solid var(--glo-border);
  border-radius: 999px;
  background: var(--glo-bg);
}
.glo-qty__btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--glo-ink);
  font-family: var(--glo-font-body);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.glo-qty__btn:hover { background: var(--glo-teal-50); color: var(--glo-teal-ink); }
.glo-qty .quantity { margin: 0; }
.glo-qty input.qty {
  width: 32px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  font-family: var(--glo-font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--glo-teal-ink);
  -moz-appearance: textfield;
  appearance: textfield;
  box-shadow: none;
}
.glo-qty input.qty::-webkit-outer-spin-button,
.glo-qty input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.glo-bag__one { font-size: 14px; font-weight: 600; color: var(--glo-ink-mid); }

.glo-bag__line {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  min-width: 72px;
}
.glo-bag__total {
  font-family: var(--glo-font-body);
  font-size: 17px;
  font-weight: 700;
  color: var(--glo-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* WooCommerce's own `.woocommerce a.remove` draws a red circle with ×. */
.woocommerce .glo-bag a.remove.glo-bag__remove,
.glo-bag a.glo-bag__remove {
  display: inline-flex;
  align-items: center;
  width: auto;
  height: auto;
  min-height: 36px;
  border-radius: 0;
  background: none !important;
  font-family: var(--glo-font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--glo-stone) !important;
  text-decoration: none;
}
.woocommerce .glo-bag a.remove.glo-bag__remove:hover { color: var(--glo-coral) !important; text-decoration: underline; text-underline-offset: 3px; }

/* The Update button is pressed by glo-cart.js. Kept in the page, and shown
   again the moment a keyboard user reaches it. */
.glo-bag__actions { position: relative; padding: 0; border: 0; }
.woocommerce-cart .glo-bag .glo-bag__update:not(:focus) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.woocommerce-cart .glo-bag .glo-bag__update:focus { margin: 0 0 16px; }

.glo-bag__below {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 20px;
  padding: 10px 4px 0;
}
.glo-bag__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--glo-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--glo-teal-ink);
  text-decoration: none;
}
.glo-bag__back:hover { text-decoration: underline; text-underline-offset: 3px; }
.glo-bag__coupon-note { margin: 0; font-family: var(--glo-font-body); font-size: 13px; font-weight: 500; color: var(--glo-stone); }

/* ---------- Summary ---------- */
.glo-bag__summary {
  width: 100% !important;
  float: none !important;
  background: var(--glo-surface);
  border: 1px solid var(--glo-border);
  border-radius: 16px;
  padding: 26px;
}
.glo-bag .cart-collaterals { width: 100%; }
.glo-bag__title {
  font-family: var(--glo-font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--glo-ink);
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}
.glo-bag table.glo-bag__totals {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  background: transparent;
}
.glo-bag .glo-bag__totals th,
.glo-bag .glo-bag__totals td {
  display: table-cell !important;
  border: 0 !important;
  padding: 8px 0 !important;
  background: transparent !important;
  font-family: var(--glo-font-body);
  font-size: 14px;
  vertical-align: top;
}
.glo-bag .glo-bag__totals td::before { display: none !important; }
.glo-bag .glo-bag__totals tr { display: table-row !important; border: 0 !important; padding: 0 !important; }
.glo-bag .glo-bag__totals th { text-align: left; font-weight: 400; color: var(--glo-ink-mid); }
.glo-bag .glo-bag__totals td {
  text-align: right;
  font-weight: 600;
  color: var(--glo-ink);
  font-variant-numeric: tabular-nums;
}
.glo-bag .glo-bag__totals .order-total > * {
  border-top: 1px solid var(--glo-border) !important;
  padding-top: 16px !important;
  vertical-align: baseline;
}
.glo-bag .glo-bag__totals .order-total th { color: var(--glo-ink); font-weight: 600; }
.glo-bag .glo-bag__totals .order-total .amount {
  font-family: var(--glo-font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
}
.glo-bag .glo-bag__totals #shipping_method {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.glo-bag .glo-bag__totals #shipping_method li { display: flex; align-items: center; gap: 6px; margin: 0; }
.glo-bag .glo-bag__totals #shipping_method input[type="radio"] { margin: 0; accent-color: var(--glo-teal-bright); }
.glo-bag .glo-bag__totals #shipping_method label { margin: 0; font-weight: 500; color: var(--glo-ink); }
.glo-bag .glo-bag__totals .woocommerce-shipping-destination {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--glo-stone);
}
.glo-bag .glo-bag__totals .woocommerce-remove-coupon { margin-left: 6px; font-size: 12.5px; font-weight: 500; color: var(--glo-teal-ink); }

.glo-bag__note {
  margin: 12px 0 0;
  font-family: var(--glo-font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--glo-stone);
}
.glo-bag__note .amount { color: var(--glo-ink-mid); font-weight: 600; }

.glo-bag .wc-proceed-to-checkout { margin: 18px 0 0; padding: 0; }
.woocommerce-cart .glo-bag a.glo-bag__continue {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin: 0 !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  text-decoration: none;
}

/* ---------- Reassurance under the summary ---------- */
.glo-bag__trust {
  list-style: none;
  margin: 20px 0 0;
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.glo-bag__trust li { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.glo-bag__trust-title { font-family: var(--glo-font-body); font-size: 14px; font-weight: 600; color: var(--glo-ink); }
.glo-bag__trust-body { font-family: var(--glo-font-body); font-size: 13px; font-weight: 500; line-height: 1.45; color: var(--glo-stone); }
.glo-bag__trust-link { text-decoration: none; align-self: flex-start; min-height: 24px; }
.glo-bag__trust-link:hover { color: var(--glo-teal-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Empty bag ---------- */
.glo-bag-empty {
  max-width: 560px;
  margin: 8px auto 24px;
  padding: 48px 28px;
  text-align: center;
  background: var(--glo-surface);
  border: 1px solid var(--glo-border);
  border-radius: 16px;
}
.glo-bag-empty__title {
  font-family: var(--glo-font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--glo-ink);
  margin: 0 0 8px;
}
.glo-bag-empty__body { margin: 0 auto 22px; max-width: 40ch; font-size: 14.5px; line-height: 1.55; color: var(--glo-ink-soft); }
@media (max-width: 600px) { .glo-bag-empty__body { font-size: 16px; } }

/* ---------- Notices above the bag ---------- */
.glo-cartwrap .rtsb-notice:empty,
.glo-cartwrap .woocommerce-notices-wrapper:empty { display: none; }
.glo-cartwrap .wc-block-components-notice-banner,
.glo-cartwrap .woocommerce-message,
.glo-cartwrap .woocommerce-info,
.glo-cartwrap .woocommerce-error {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: var(--glo-font-body);
  font-size: 14px;
  line-height: 1.45;
}
.glo-cartwrap .restore-item { color: var(--glo-teal-ink); font-weight: 600; margin-left: 6px; }

/* Keyboard focus */
.glo-bag a:focus-visible,
.glo-bag button:focus-visible,
.glo-bag input:focus-visible {
  outline: 2px solid var(--glo-teal-bright);
  outline-offset: 2px;
}

/* ---------- Tablet and phone ---------- */
@media (max-width: 1100px) {
  .glo-bag { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

@media (max-width: 600px) {
  .glo-bag__card { padding: 0 16px; border-radius: 14px; }
  .glo-bag__item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px 14px;
    align-items: start;
    padding: 18px 0;
  }
  .glo-bag__thumb { width: 72px; height: 72px; border-radius: 10px; }
  .glo-bag__controls {
    grid-column: 2;
    justify-content: space-between;
    gap: 12px;
  }
  .glo-bag__line { flex-direction: row-reverse; align-items: center; gap: 12px; min-width: 0; }
  .glo-bag__now,
  .glo-bag__total { font-size: 16px; }
  .glo-bag__summary { padding: 22px 18px; border-radius: 14px; }
  .glo-bag .glo-bag__totals .order-total .amount { font-size: 24px; }
  .glo-bag__below { padding-top: 6px; }
  .glo-bag-empty { padding: 36px 20px; }
}

/* Touch targets: short names were a 20px-tall link, the WhatsApp line 28px.
   Padding grows the hit area; the negative margin keeps the text where it was. */
a.glo-bag__name { padding: 12px 0; margin: -12px 0; }
.glo-bag__trust-link { display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0; }
