/* ==========================================================================
   ROYAL-ONE — LIGHT & CLEAN CART PAGE STYLES (TSG Brands LLC)
   ========================================================================== */

.woocommerce-cart .woocommerce {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px var(--gutter) 40px !important;
  box-sizing: border-box;
}

/* 2-Column Desktop Grid */
.woocommerce-cart .woocommerce {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
}

.woocommerce-cart .woocommerce-cart-form {
  flex: 1 1 60%;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.woocommerce-cart .cart-collaterals {
  flex: 1 1 34%;
  min-width: 320px;
}

@media (max-width: 900px) {
  .woocommerce-cart .woocommerce-cart-form,
  .woocommerce-cart .cart-collaterals {
    flex: 1 1 100%;
    min-width: 0;
  }
}

/* Cart Table */
.woocommerce-cart table.shop_table {
  width: 100%;
  border-collapse: collapse;
  border: none;
}
.woocommerce-cart table.shop_table th {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
}
.woocommerce-cart table.shop_table td {
  padding: 18px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

/* Product Thumbnail & Title */
.woocommerce-cart .product-thumbnail img {
  width: 64px !important;
  height: 64px !important;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  object-fit: contain;
  background: var(--bg);
}
.woocommerce-cart .product-name a {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
}
.woocommerce-cart .product-name a:hover {
  color: var(--accent);
}
.woocommerce-cart .product-price,
.woocommerce-cart .product-subtotal {
  font-weight: 800;
  color: var(--text);
  font-size: 15px;
}
.woocommerce-cart .product-remove a.remove {
  color: #DC2626 !important;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
}

/* Quantity Input */
.woocommerce-cart .quantity input.qty {
  width: 60px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
}

/* Coupon & Actions Bar */
.woocommerce-cart .actions {
  padding-top: 20px !important;
}
.woocommerce-cart .coupon {
  display: flex;
  gap: 8px;
  align-items: center;
}
.woocommerce-cart .coupon input.input-text {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 13px;
  background: var(--bg);
  min-width: 160px;
}
.woocommerce-cart .coupon button.button,
.woocommerce-cart .actions button.button {
  height: 42px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}
.woocommerce-cart .coupon button.button:hover,
.woocommerce-cart .actions button.button:hover {
  background: var(--text);
  color: #FFFFFF;
}

/* Cart Totals Summary Box */
.woocommerce-cart .cart_totals {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.woocommerce-cart .cart_totals h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 18px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.woocommerce-cart .cart_totals table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.woocommerce-cart .cart_totals th,
.woocommerce-cart .cart_totals td {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.woocommerce-cart .cart_totals th {
  font-weight: 600;
  color: var(--muted);
  text-align: left;
}
.woocommerce-cart .cart_totals td {
  font-weight: 700;
  color: var(--text);
  text-align: right;
}
.woocommerce-cart .order-total th,
.woocommerce-cart .order-total td {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

/* Checkout Button */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  height: 54px !important;
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-heading) !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3) !important;
  transition: all 0.2s ease !important;
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
  background: var(--accent-dark) !important;
  transform: translateY(-2px);
}

/* Empty Cart View */
.woocommerce-cart .cart-empty {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  padding: 40px 0 20px;
}
.woocommerce-cart .return-to-shop {
  text-align: center;
  margin-bottom: 60px;
}
.woocommerce-cart .return-to-shop a.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

/* Coupon notices are hidden sitewide by header-footer.css — restore them here
   so cart messaging ("Coupon applied", shipping info) stays visible. */
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info {
  display: block !important;
  background: var(--surface-2);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text);
  list-style: none;
}

/* Small screens: let the table breathe */
@media (max-width: 600px) {
  .woocommerce-cart .woocommerce {
    padding: 16px 14px 32px !important;
    gap: 24px;
  }
  .woocommerce-cart .woocommerce-cart-form,
  .woocommerce-cart .cart_totals {
    padding: 16px;
  }
  .woocommerce-cart table.shop_table th,
  .woocommerce-cart table.shop_table td {
    padding: 12px 8px;
    font-size: 13px;
  }
  .woocommerce-cart .product-thumbnail img {
    width: 48px !important;
    height: 48px !important;
  }
  .woocommerce-cart .coupon {
    flex-wrap: wrap;
  }
  .woocommerce-cart .coupon input.input-text {
    flex: 1 1 100%;
    min-width: 0;
  }
}

/* ==========================================================================
   WooCommerce Gutenberg Blocks Cart Styling
   ========================================================================== */
/* .wc-block-cart sits inside .us-section-container, which already supplies
   the page gutter — adding a second max-width/padding here made the cart
   narrower than every other page and wasted space on mobile. */
.wc-block-cart {
  width: 100%;
  box-sizing: border-box;
  gap: 28px; /* space between the items card and the totals card; safe in
                both the mobile (column) and desktop (row) flex direction */
}

.wc-block-cart,
.wp-block-woocommerce-cart {
  --wc-separator-color: var(--line); /* brand-match every WC divider line */
}

.wc-block-cart__main,
.wc-block-cart__sidebar {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  padding: 28px !important;
  box-shadow: var(--shadow-sm) !important;
  box-sizing: border-box !important;
}
/* The uniform card padding above replaces WooCommerce's own percentage
   column padding (its built-in gutter mechanism), so on desktop the two
   cards need their width trimmed to make room for the `gap` instead —
   otherwise they'd touch with zero space between them. */
@container (min-width: 700px) {
  .wc-block-cart__main {
    width: calc(65% - 14px) !important;
  }
  .wc-block-cart__sidebar {
    width: calc(35% - 14px) !important;
  }
}

.wc-block-cart__title {
  font-family: var(--font-heading) !important;
  font-weight: 800 !important;
  font-size: 28px !important;
  color: var(--text) !important;
  margin-bottom: 24px !important;
}

/* Proceed to Checkout stays the one loud, accent-filled call to action */
.wc-block-cart__submit-button {
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-heading) !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3) !important;
  transition: all 0.2s ease !important;
}
.wc-block-cart__submit-button:hover {
  background: var(--accent-dark) !important;
  transform: translateY(-2px) !important;
}

/* Sticky mobile checkout bar — WooCommerce shows this automatically once
   the real button scrolls out of view on screens <= 782px */
.wc-block-cart__submit-container--sticky {
  background: var(--surface) !important;
  border-top: 1px solid var(--line);
  padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
}

/* "Apply" on the coupon field — kept secondary so it never competes with
   the checkout button for attention */
.wc-block-components-totals-coupon__button {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  text-transform: none !important;
  box-shadow: none !important;
  height: auto !important;
  min-height: 44px !important;
  transition: all 0.2s ease !important;
}
.wc-block-components-totals-coupon__button:hover {
  background: var(--text) !important;
  color: #FFFFFF !important;
  border-color: var(--text) !important;
}
.wc-block-components-panel__button {
  color: var(--text) !important;
  font-weight: 700 !important;
}
.wc-block-components-text-input__wrapper input {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--bg) !important;
}
.wc-block-components-text-input__wrapper input:focus {
  border-color: var(--accent) !important;
}

.wc-block-cart-items,
.wc-block-cart-items th {
  border-color: var(--line) !important;
}
.wc-block-cart-items__header th {
  color: var(--muted) !important;
}

/* Product thumbnail */
.wc-block-cart-item__image a {
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}

/* Product name & pricing */
.wc-block-cart-items .wc-block-components-product-name {
  color: var(--text) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}
.wc-block-cart-items .wc-block-components-product-name:hover {
  color: var(--accent) !important;
}
/* WooCommerce prints both a per-unit price under the product name and a
   line total in its own column — showing the same charge twice. Keeping
   the unit price (with its "was $X" strikethrough) and hiding the line
   total column per request. */
.wc-block-cart-item__prices {
  color: var(--text) !important;
  font-weight: 800 !important;
}
.wc-block-cart-item__total {
  display: none !important;
}
.wc-block-components-product-sale-badge {
  background: var(--save-bg) !important;
  border-color: var(--save-border) !important;
  color: var(--save) !important;
}

/* Quantity stepper */
.wc-block-components-quantity-selector {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--bg) !important;
  min-height: 44px;
}
.wc-block-components-quantity-selector__input {
  color: var(--text) !important;
  font-weight: 700 !important;
}
.wc-block-components-quantity-selector__button {
  color: var(--muted) !important;
}
.wc-block-components-quantity-selector__button:hover {
  background: var(--surface-hover) !important;
  color: var(--text) !important;
}

/* Keep the "remove item" link readable rather than accent-filled, with a
   comfortable tap target on touch screens */
.wc-block-cart-item__remove-link {
  background: none !important;
  color: var(--muted) !important;
  height: auto !important;
  min-height: 32px !important;
  box-shadow: none !important;
  text-transform: none !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
}
.wc-block-cart-item__remove-link:hover {
  color: #DC2626 !important;
  transform: none !important;
}

/* Order summary totals */
.wc-block-components-totals-item__label,
.wc-block-components-totals-item__value {
  color: var(--text) !important;
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  font-weight: 800 !important;
}

/* "You may be interested in…" cross-sell cards, shown inside the items card */
.wc-block-cart .wp-block-woocommerce-product-collection {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.wc-block-cart .wp-block-woocommerce-product-collection .wp-block-heading {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.wc-block-cart .wc-block-product-template .wc-block-product {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.wc-block-cart .wc-block-product-template .wc-block-product:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-loud);
}
.wc-block-cart .wc-block-product-template .wc-block-components-product-title,
.wc-block-cart .wc-block-product-template .wc-block-components-product-title a {
  color: var(--text) !important;
  font-size: 14px !important;
}
.wc-block-cart .wc-block-product-template .wc-block-components-product-price {
  color: var(--accent-dark) !important;
  font-weight: 800 !important;
}
.wc-block-cart .wc-block-product-template .wc-block-components-product-button__button {
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  font-size: 12px !important;
  min-height: 40px !important;
}
.wc-block-cart .wc-block-product-template .wc-block-components-product-button__button:hover {
  background: var(--accent-dark) !important;
}

@media (max-width: 600px) {
  .wc-block-cart__main,
  .wc-block-cart__sidebar {
    padding: 16px !important;
  }
  .wc-block-cart__title {
    font-size: 22px !important;
    margin-bottom: 16px !important;
  }
  .wc-block-cart .wp-block-woocommerce-product-collection {
    margin-top: 20px;
    padding-top: 20px;
  }
}

/* --- Empty Cart Luxury DTC Styling --- */
.wc-block-cart__empty-cart-wrapper {
  text-align: center !important;
  padding: 60px 20px !important;
  max-width: 800px !important;
  margin: 0 auto !important;
}

/* Hide default sad face emoji */
.wc-block-cart__empty-cart-wrapper .wc-block-components-image {
  display: none !important;
}

.wc-block-cart__empty-cart-title {
  font-family: var(--font-heading) !important;
  font-size: clamp(24px, 3.5vw, 32px) !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  margin: 0 0 16px !important;
}

/* Empty Cart "Browse / New in Store" Section */
.wc-block-cart__empty-cart-wrapper .wp-block-heading {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  margin: 40px 0 20px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.wc-block-cart__empty-cart-wrapper .wc-block-grid__products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 auto 30px !important;
}

@media (max-width: 768px) {
  .wc-block-cart__empty-cart-wrapper .wc-block-grid__products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
}

.wc-block-cart__empty-cart-wrapper .wc-block-grid__product {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  padding: 16px 12px !important;
  box-shadow: var(--shadow-sm) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  transition: all 0.2s ease !important;
}
.wc-block-cart__empty-cart-wrapper .wc-block-grid__product:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--shadow-md) !important;
  border-color: var(--line-loud) !important;
}

.wc-block-cart__empty-cart-wrapper .wc-block-grid__product-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin-bottom: 8px !important;
  text-decoration: none !important;
}

.wc-block-cart__empty-cart-wrapper .wc-block-grid__product-price {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--accent-dark) !important;
  margin-bottom: 12px !important;
}

.wc-block-cart__empty-cart-wrapper .wc-block-grid__product-add-to-cart a {
  display: block !important;
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  transition: background 0.2s ease !important;
}
.wc-block-cart__empty-cart-wrapper .wc-block-grid__product-add-to-cart a:hover {
  background: var(--accent-dark) !important;
}

/* Product image inside the suggestion cards (the .wc-block-components-image
   rule above only hides the standalone empty-cart illustration) */
.wc-block-cart__empty-cart-wrapper .wc-block-grid__product-image {
  display: block !important;
  margin-bottom: 10px !important;
}
.wc-block-cart__empty-cart-wrapper .wc-block-grid__product-image img {
  max-width: 100% !important;
  height: auto !important;
  max-height: 130px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}

@media (max-width: 600px) {
  .wc-block-cart__empty-cart-wrapper {
    padding: 40px 14px !important;
  }
  .wc-block-cart__empty-cart-title::before {
    font-size: 40px !important;
  }
}


/* --- Trust strip under the cart --- */
.us-cart-trust-strip {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 30px;
  text-align: center;
}
@media (max-width: 768px) {
  .us-cart-trust-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
.us-cart-trust-pill-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.us-cart-trust-pill-box.is-shipping {
  background: var(--save-bg);
  border-color: var(--save-border);
  color: var(--save);
}
