/**
 * WooCommerce Cart (block + classic) on dark theme.
 */

.jtl-wc-commerce.jtl-wc-cart {
  color: #fff;
}

/* Hide duplicate block “Cart” title (theme header is used). */
.jtl-wc-cart .wp-block-woocommerce-cart > .alignwide.wp-block-heading:first-child,
.jtl-wc-cart .wc-block-cart > h1.alignwide:first-child {
  display: none;
}

/* —— Empty cart —— */
.jtl-wc-cart .wc-block-cart__empty-cart,
.jtl-wc-cart .wc-empty-cart-message {
  padding: 2.5rem 1rem 1rem;
  text-align: center;
}

.jtl-wc-cart .wc-block-cart__empty-cart__title,
.jtl-wc-cart .wc-block-cart__empty-cart h2 {
  margin: 0 0 1rem;
  font-size: 1.375rem;
  font-weight: 300;
  line-height: 1.4;
  color: #fff;
}

.jtl-wc-cart .wc-block-cart__empty-cart__title.with-empty-cart-icon::before {
  display: block;
  margin: 0 auto 1.25rem;
}

.jtl-wc-cart .wc-block-cart__empty-cart p,
.jtl-wc-cart .wc-empty-cart-message p {
  margin: 0 0 0.5rem;
  color: rgba(255, 255, 255, 0.65);
}

.jtl-wc-cart .wc-block-cart__empty-cart a,
.jtl-wc-cart .wc-empty-cart-message a {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffc15e !important;
}

/* “New in store” / cross-sells heading */
.jtl-wc-cart .wc-block-cart .wp-block-heading.has-text-align-center,
.jtl-wc-cart .wc-block-cart h2.has-text-align-center:not(.wc-block-cart__empty-cart__title) {
  margin: 3rem 0 2.75rem;
  padding-top: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffc15e;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Space between “New in store” and product grid */
.jtl-wc-cart .wc-block-cart .wp-block-heading.has-text-align-center + *,
.jtl-wc-cart .wc-block-cart h2.has-text-align-center:not(.wc-block-cart__empty-cart__title) + * {
  margin-top: 0.5rem;
}

.jtl-wc-cart .wc-block-cart .wp-block-woocommerce-product-new,
.jtl-wc-cart .wc-block-cart .wp-block-woocommerce-product-collection,
.jtl-wc-cart .wc-block-cart .wc-block-product-new {
  margin-top: 0.25rem;
}

/* Product grid (newest / cross-sells) */
.jtl-wc-cart .wc-block-grid__products,
.jtl-wc-cart ul.wc-block-product-template,
.jtl-wc-cart .wc-block-product-template__responsive {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 1.25rem 1.5rem;
  list-style: none;
  margin: 1.5rem 0 2rem !important;
  padding: 0 !important;
}

@media (min-width: 640px) {
  .jtl-wc-cart .wc-block-grid__products,
  .jtl-wc-cart ul.wc-block-product-template {
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 1.5rem 2rem;
  }
}

.jtl-wc-cart .wc-block-grid__product,
.jtl-wc-cart .wc-block-product,
.jtl-wc-cart li.wc-block-grid__product {
  display: flex !important;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0 !important;
  padding: 1rem !important;
  width: auto !important;
  max-width: none !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
}

.jtl-wc-cart .wc-block-components-product-image {
  margin: 0;
}

.jtl-wc-cart .wc-block-components-product-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.65rem;
  object-fit: cover;
}

.jtl-wc-cart .wc-block-components-product-title,
.jtl-wc-cart .wc-block-components-product-name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
}

.jtl-wc-cart .wc-block-components-product-title a,
.jtl-wc-cart .wc-block-components-product-name a {
  color: #fff !important;
  text-decoration: none;
}

.jtl-wc-cart .wc-block-components-product-title a:hover,
.jtl-wc-cart .wc-block-components-product-name a:hover {
  color: #ffc15e !important;
  opacity: 1;
}

.jtl-wc-cart .wc-block-components-product-price,
.jtl-wc-cart .wc-block-components-product-price .wc-block-formatted-money-amount {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffc15e !important;
}

.jtl-wc-cart .wc-block-components-product-button,
.jtl-wc-cart .wp-block-button.wc-block-components-product-button {
  margin-top: auto;
  width: 100%;
}

.jtl-wc-cart .wc-block-components-product-button .wc-block-components-button,
.jtl-wc-cart .wc-block-components-product-button .wp-block-button__link {
  display: flex !important;
  width: 100%;
  justify-content: center;
  padding: 0.55rem 0.75rem !important;
  border: 1px solid rgba(255, 193, 94, 0.5) !important;
  border-radius: 9999px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
  font-size: 0.625rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.jtl-wc-cart .wc-block-components-product-button .wc-block-components-button:hover,
.jtl-wc-cart .wc-block-components-product-button .wp-block-button__link:hover {
  background: #ffc15e !important;
  color: #000 !important;
  border-color: #ffc15e !important;
}

/* —— Filled cart (block) —— */
.jtl-wc-cart .wc-block-cart-items,
.jtl-wc-cart .wc-block-components-sidebar-layout {
  gap: 2rem;
}

/* Space above “New in store” when cart has line items */
.jtl-wc-cart .wc-block-cart-items ~ .wp-block-heading.has-text-align-center,
.jtl-wc-cart .wc-block-cart__main ~ .wp-block-heading,
.jtl-wc-cart .wc-block-components-main ~ h2.has-text-align-center {
  margin-top: 3.5rem !important;
}

.jtl-wc-cart .wc-block-cart-items__header,
.jtl-wc-cart .wc-block-cart-items__row {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
}

.jtl-wc-cart .wc-block-components-totals-item,
.jtl-wc-cart .wc-block-components-totals-footer-item {
  color: #fff;
}

.jtl-wc-cart .wc-block-cart__submit-button,
.jtl-wc-cart .wc-block-components-checkout-button {
  background: #ffc15e !important;
  color: #000 !important;
  border-radius: 9999px !important;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* —— Classic shortcode cart —— */
.jtl-wc-cart table.shop_table.cart {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  overflow: hidden;
}

.jtl-wc-cart table.shop_table.cart th,
.jtl-wc-cart table.shop_table.cart td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  vertical-align: middle;
}

.jtl-wc-cart table.shop_table.cart thead th {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

.jtl-wc-cart table.shop_table.cart .product-name a {
  color: #fff;
}

.jtl-wc-cart table.shop_table.cart .product-price,
.jtl-wc-cart table.shop_table.cart .product-subtotal {
  color: #ffc15e;
}

.jtl-wc-cart .cart-collaterals {
  margin-top: 2rem;
}

.jtl-wc-cart .cart_totals {
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
}

.jtl-wc-cart .cart_totals h2 {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  color: #ffc15e;
}

.jtl-wc-cart .wc-proceed-to-checkout a.checkout-button {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.5rem;
  border-radius: 9999px;
  background: #ffc15e;
  color: #000 !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
