/*
 * GSM Notes Secure Core
 * Cart page specific stylesheet.
 */

.gnsc-cart-digital-only .woocommerce-shipping-totals,
.gnsc-cart-digital-only .cart_totals tr.shipping,
.gnsc-cart-digital-only tr.shipping,
.gnsc-cart-digital-only .woocommerce-shipping-fields,
.gnsc-cart-digital-only #ship-to-different-address,
.gnsc-cart-digital-only .shipping-calculator-button,
.gnsc-cart-digital-only .shipping-calculator-form {
  display: none !important;
}

.woocommerce-cart .woocommerce {
  display: grid;
  gap: 24px;
}
.woocommerce-cart table.shop_table {
  margin-bottom: 0;
}
.woocommerce-cart .cart-collaterals {
  margin-top: 0;
}
.woocommerce-cart .cart-collaterals .cart_totals {
  width: 100%;
  float: none;
}
.woocommerce-cart table.cart img {
  width: 92px;
  border-radius: 18px;
  background: rgba(255,255,255,.04);
}
.woocommerce-cart table.cart td.product-name a {
  color: var(--gnsc-primary);
  font-weight: 700;
}
.woocommerce-cart table.cart td.product-name dl.variation,
.woocommerce-cart table.cart td.product-name .wc-item-meta,
.woocommerce-cart table.cart td.product-name .product-description {
  color: var(--gnsc-text-soft);
}
.woocommerce-cart table.cart .product-thumbnail,
.woocommerce-cart table.cart .product-remove,
.woocommerce-cart table.cart .product-price,
.woocommerce-cart table.cart .product-subtotal,
.woocommerce-cart table.cart .product-quantity {
  vertical-align: middle;
}
.woocommerce-cart table.cart td.product-remove a.remove {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gnsc-primary) !important;
  background: rgba(248, 113, 113, 0.12);
}
.woocommerce-cart table.cart td.product-remove a.remove:hover {
  background: rgba(248, 113, 113, 0.22);
  color: #fff !important;
}
.woocommerce-cart .quantity {
  display: inline-flex;
  align-items: center;
}
.woocommerce-cart .quantity .qty {
  max-width: 86px;
  min-height: 44px;
}
.woocommerce-cart .cart_totals h2,
.woocommerce-cart .cross-sells h2 {
  margin-top: 0;
}
.woocommerce-cart .cart_totals table {
  margin: 0 0 18px;
}
.woocommerce-cart .cart_totals th,
.woocommerce-cart .cart_totals td {
  padding: 16px 0;
}
.woocommerce-cart .cart_totals tr.order-total th,
.woocommerce-cart .cart_totals tr.order-total td {
  font-size: 1.15rem;
  font-weight: 800;
}
.woocommerce-cart .coupon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.woocommerce-cart .coupon .input-text {
  width: 100% !important;
  margin: 0 !important;
}
@media (max-width: 1024px) {
  .woocommerce-cart .coupon {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .woocommerce-cart table.shop_table_responsive tr,
  .woocommerce-page table.shop_table_responsive tr {
    display: block;
    margin-bottom: 18px;
    border-radius: 20px;
    border: 1px solid var(--gnsc-border);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15,27,51,.92), rgba(11,18,32,.96));
  }
  .woocommerce-cart table.shop_table_responsive td,
  .woocommerce-page table.shop_table_responsive td {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    text-align: left !important;
    padding: 16px 18px !important;
  }
  .woocommerce-cart table.shop_table_responsive td::before,
  .woocommerce-page table.shop_table_responsive td::before {
    font-weight: 700;
    color: var(--gnsc-text-soft);
  }
  .woocommerce-cart table.shop_table_responsive td.product-name,
  .woocommerce-page table.shop_table_responsive td.product-name {
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
  }
  .woocommerce-cart table.shop_table_responsive td.product-name::before,
  .woocommerce-page table.shop_table_responsive td.product-name::before {
    display: none;
  }
  .woocommerce-cart table.shop_table_responsive td.product-thumbnail,
  .woocommerce-page table.shop_table_responsive td.product-thumbnail {
    display: none;
  }
  .woocommerce-cart table.shop_table_responsive td.product-name a,
  .woocommerce-page table.shop_table_responsive td.product-name a {
    font-size: 1.2rem;
  }
}

/* === Mobile-first final tuning: cart rows and quantity/readability === */
@media (max-width: 640px) {
  .woocommerce-cart table.shop_table_responsive td,
  .woocommerce-page table.shop_table_responsive td {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 14px !important;
  }

  .woocommerce-cart table.shop_table_responsive td.product-name,
  .woocommerce-page table.shop_table_responsive td.product-name {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .woocommerce-cart table.shop_table_responsive td.product-name a,
  .woocommerce-page table.shop_table_responsive td.product-name a {
    font-size: 1rem;
    line-height: 1.3;
  }

  .woocommerce-cart .quantity,
  .woocommerce-page .quantity {
    display: inline-grid;
    grid-auto-flow: row;
    gap: 8px;
    width: min(180px, 100%);
  }

  .woocommerce-cart .quantity .qty,
  .woocommerce-page .quantity .qty {
    max-width: none;
    width: 100%;
  }

  .woocommerce-cart .coupon {
    grid-template-columns: 1fr;
  }
}
