/* ==========================================================================
   WooCommerce cart + checkout (classic shortcode markup)

   Everything is scoped to #ta-shop (page-cart.php / page-checkout.php) so it
   wins over woocommerce.css, woocommerce-smallscreen.css and add-on plugin
   styles (e.g. WooLentor) without piling on !important. The cart table is laid
   out as CSS grid rows instead of a real table, which is what lets each row be
   a rounded card like the UI.
   ========================================================================== */

#ta-shop .woocommerce { font-size: .92rem; }
#ta-shop .woocommerce::before,
#ta-shop .woocommerce::after { display: none; }

/* ---------- Notices ---------- */
#ta-shop .woocommerce-notices-wrapper:empty { display: none; }
#ta-shop .woocommerce-message,
#ta-shop .woocommerce-info,
#ta-shop .woocommerce-error {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem;
  border: 1.5px solid var(--ta-purple); border-radius: 12px; background: #fff;
  padding: 1.1rem 1.5rem 1.1rem 4rem; margin: 0 0 1.75rem; position: relative;
  color: #000; font-size: .9rem; line-height: 1.4;
}
#ta-shop .woocommerce-message::after,
#ta-shop .woocommerce-info::after,
#ta-shop .woocommerce-error::after { display: none; }
#ta-shop .woocommerce-message::before,
#ta-shop .woocommerce-info::before,
#ta-shop .woocommerce-error::before {
  content: '\2713'; font-family: var(--ta-font);
  position: absolute; left: 1.4rem; top: 50%; transform: translateY(-50%);
  width: 1.6rem; height: 1.6rem; border: 1.5px solid var(--ta-purple); border-radius: 50%;
  color: var(--ta-purple); display: flex; align-items: center; justify-content: center; font-size: .85rem;
}
#ta-shop .woocommerce-info::before { content: 'i'; font-weight: 700; font-family: Georgia, serif; }
#ta-shop .woocommerce-error { border-color: #d9534f; display: block; }
#ta-shop .woocommerce-error::before { content: '!'; color: #d9534f; border-color: #d9534f; font-weight: 700; top: 1.1rem; transform: none; }
#ta-shop .woocommerce-error li { margin: .15rem 0; }
#ta-shop .woocommerce-message .button,
#ta-shop .woocommerce-info .button { order: 2; margin-left: auto; float: none; }
#ta-shop .woocommerce-info a:not(.button) { color: var(--ta-purple); }

/* ---------- Buttons ---------- */
#ta-shop .button,
#ta-shop #place_order {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ta-purple); color: #fff;
  border: 0; border-radius: 6px; padding: .7rem 1.6rem;
  font-family: var(--ta-font); font-size: .9rem; font-weight: 400; line-height: 1.2;
  text-decoration: none; text-shadow: none; box-shadow: none; white-space: nowrap;
  cursor: pointer; float: none; margin: 0;
}
#ta-shop .button:hover,
#ta-shop #place_order:hover { color: #fff; filter: brightness(1.15); }
#ta-shop .button:disabled,
#ta-shop .button.disabled,
#ta-shop .button[disabled] { opacity: .45; cursor: not-allowed; padding: .7rem 1.6rem; }
#ta-shop #place_order { background: var(--ta-purple); min-width: 220px; margin-top: 1rem; font-weight: 500; }

/* ---------- Inputs ---------- */
#ta-shop .input-text,
#ta-shop select,
#ta-shop textarea {
  border: 1.5px solid var(--ta-purple); border-radius: 8px; background: #fffefc;
  padding: .6rem .8rem; font-family: var(--ta-font); font-size: .9rem; line-height: 1.4; color: #000;
  box-shadow: none; width: 100%;
}
#ta-shop .input-text:focus,
#ta-shop select:focus,
#ta-shop textarea:focus { outline: none; border-color: var(--ta-purple); box-shadow: 0 0 0 3px rgba(106, 0, 236, .15); }

/* ==========================================================================
   CART
   ========================================================================== */
@media (min-width: 992px) {
  #ta-shop .woocommerce:has(> .woocommerce-cart-form) {
    display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 0 2rem; align-items: start;
  }
  #ta-shop .woocommerce:has(> .woocommerce-cart-form) > * { grid-column: 1 / -1; }
  #ta-shop .woocommerce:has(> .woocommerce-cart-form) > .woocommerce-cart-form { grid-column: 1; }
  #ta-shop .woocommerce:has(> .woocommerce-cart-form) > .cart-collaterals { grid-column: 2; }
}

/* table -> blocks; each row is a grid */
#ta-shop table.cart,
#ta-shop table.cart thead,
#ta-shop table.cart tbody { display: block; width: 100%; border: 0; margin: 0; border-radius: 0; background: none; }
#ta-shop table.cart tr { display: grid; align-items: center; gap: .5rem 1rem; }
#ta-shop table.cart th,
#ta-shop table.cart td { display: block; border: 0; padding: 0; background: none; text-align: left; }
#ta-shop table.cart td::before { display: none; }

#ta-shop table.cart thead tr,
#ta-shop table.cart tr.cart_item {
  grid-template-columns: 1.5rem 80px minmax(0, 1fr) 80px 90px 80px;
  grid-template-areas: "remove thumb name price qty subtotal";
  padding: 0 1rem;
}
#ta-shop table.cart thead tr { margin-bottom: .75rem; }
#ta-shop table.cart thead th { color: var(--ta-purple); font-weight: 400; font-size: .85rem; }
#ta-shop table.cart thead th.product-name { font-size: 1.1rem; }

#ta-shop table.cart tr.cart_item {
  border: 1.5px solid var(--ta-purple); border-radius: 12px; background: #fff;
  padding: .5rem 1rem .5rem .75rem; margin-bottom: 1rem;
}
#ta-shop table.cart .product-remove { grid-area: remove; }
#ta-shop table.cart .product-thumbnail { grid-area: thumb; }
#ta-shop table.cart .product-name { grid-area: name; }
#ta-shop table.cart .product-price { grid-area: price; }
#ta-shop table.cart .product-quantity { grid-area: qty; }
#ta-shop table.cart .product-subtotal { grid-area: subtotal; }

#ta-shop table.cart .product-thumbnail img {
  display: block; width: 80px; height: 70px; max-width: none; object-fit: cover; border-radius: 10px; box-shadow: none;
}
#ta-shop table.cart td.product-name,
#ta-shop table.cart td.product-name a { color: var(--ta-purple); font-size: 1.05rem; text-decoration: none; }
#ta-shop table.cart td.product-name a:hover { text-decoration: underline; }
#ta-shop table.cart a.remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  font-size: 1.2rem; line-height: 1; color: #999; background: transparent; text-decoration: none;
}
#ta-shop table.cart a.remove:hover { color: #fff; background: #d9534f; }
#ta-shop table.cart .quantity .qty { width: 4.25rem; padding: .35rem .4rem; text-align: center; }

/* coupon + update row */
#ta-shop table.cart tr:has(> td.actions) { display: block; }
#ta-shop table.cart td.actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  border: 1.5px solid var(--ta-purple); border-radius: 14px; padding: .45rem; text-align: left;
}
#ta-shop table.cart td.actions .coupon { display: flex; flex: 1 1 320px; min-width: 0; gap: .6rem; float: none; padding: 0; border: 0; }
#ta-shop table.cart td.actions .coupon label { display: none; }
#ta-shop table.cart td.actions .coupon .input-text { flex: 1; width: auto; min-width: 0; float: none; margin: 0; border: 1px solid var(--ta-purple); }
#ta-shop table.cart td.actions .button[name="update_cart"] { background: #ececec; color: #333; }

/* totals */
#ta-shop .cart-collaterals { width: 100%; }
#ta-shop .cart-collaterals .cart_totals {
  float: none; width: 100%;
  border: 1.5px solid var(--ta-purple); border-radius: 12px; padding: 1.25rem 1.1rem 1.5rem; background: #fff;
}
#ta-shop .cart_totals h2 { color: var(--ta-purple); font-weight: 400; font-size: 1.25rem; margin: 0 0 .5rem; }
#ta-shop .cart_totals table,
#ta-shop .cart_totals tbody { display: block; border: 0; margin: 0; width: 100%; border-radius: 0; }
#ta-shop .cart_totals tr { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .4rem 0; }
#ta-shop .cart_totals tr[style*="display:none"],
#ta-shop .cart_totals tr[style*="display: none"] { display: none; }
#ta-shop .cart_totals th,
#ta-shop .cart_totals td { display: block; border: 0; padding: 0; background: none; color: var(--ta-purple); font-weight: 400; font-size: .9rem; text-align: right; }
#ta-shop .cart_totals th { text-align: left; }
#ta-shop .cart_totals td::before { display: none; }
#ta-shop .cart_totals .order-total th,
#ta-shop .cart_totals .order-total td { font-weight: 700; color: #000; }
#ta-shop .cart_totals .woocommerce-shipping-totals td { text-align: right; }
#ta-shop .woocommerce-remove-coupon { font-size: .7rem; color: #000; }
#ta-shop .wc-proceed-to-checkout { padding: 1rem 0 0; text-align: center; }
#ta-shop .wc-proceed-to-checkout .checkout-button {
  display: flex; width: 100%; max-width: 240px; margin: 0 auto .5rem;
  font-size: .95rem; padding: .75rem 1rem;
}

/* cart on phones */
@media (max-width: 767.98px) {
  #ta-shop table.cart thead { display: none; }
  #ta-shop table.cart tr.cart_item {
    grid-template-columns: 80px minmax(0, 1fr) 1.5rem;
    grid-template-areas:
      "thumb name remove"
      "thumb price price"
      "thumb qty qty"
      "thumb subtotal subtotal";
    gap: .3rem .9rem; padding: .75rem;
  }
  #ta-shop table.cart .product-thumbnail { align-self: start; }
  #ta-shop table.cart td.product-price,
  #ta-shop table.cart td.product-quantity,
  #ta-shop table.cart td.product-subtotal { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; }
  #ta-shop table.cart td.product-price::before,
  #ta-shop table.cart td.product-quantity::before,
  #ta-shop table.cart td.product-subtotal::before {
    display: inline; content: attr(data-title); float: none; color: var(--ta-purple); font-weight: 400;
  }
  #ta-shop table.cart td.actions .coupon { flex-basis: 100%; }
  #ta-shop table.cart td.actions .coupon .button { padding-left: 1rem; padding-right: 1rem; }
  #ta-shop table.cart td.actions .button[name="update_cart"] { width: 100%; }
  #ta-shop .cart-collaterals { margin-top: 1rem; }
}

/* empty cart */
#ta-shop .wc-empty-cart-message .cart-empty { justify-content: center; padding-left: 4rem; }
#ta-shop .return-to-shop { text-align: center; margin-top: 1rem; }

/* ==========================================================================
   CHECKOUT
   ========================================================================== */
#ta-shop .woocommerce-form-coupon-toggle .woocommerce-info { justify-content: flex-start; }
#ta-shop form.checkout_coupon {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem;
  border: 1.5px solid var(--ta-purple); border-radius: 14px; padding: 1rem; margin: -1rem 0 1.75rem;
}
#ta-shop form.checkout_coupon[style*="display:none"],
#ta-shop form.checkout_coupon[style*="display: none"] { display: none; }
#ta-shop form.checkout_coupon p:first-child { width: 100%; margin: 0; }
#ta-shop form.checkout_coupon .form-row { float: none; width: auto; margin: 0; padding: 0; }
#ta-shop form.checkout_coupon .form-row-first { flex: 1 1 220px; }
#ta-shop form.checkout_coupon .clear { display: none; }

@media (min-width: 992px) {
  #ta-shop form.checkout {
    display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto 1fr;
    gap: 0 3rem; align-items: start;
  }
  #ta-shop form.checkout > * { grid-column: 1; }
  #ta-shop form.checkout > #customer_details { grid-column: 1; grid-row: 1 / span 2; }
  #ta-shop form.checkout > #order_review_heading { grid-column: 2; grid-row: 1; }
  /* not sticky: with card fields + reCAPTCHA it is taller than the screen, which would hide "Place order" */
  #ta-shop form.checkout > #order_review { grid-column: 2; grid-row: 2; }
}
#ta-shop form.checkout::before,
#ta-shop form.checkout::after,
#ta-shop #customer_details::before,
#ta-shop #customer_details::after { display: none; }

#ta-shop #customer_details { display: block; width: 100%; margin: 0; }
#ta-shop #customer_details .col-1,
#ta-shop #customer_details .col-2 { width: 100%; max-width: none; float: none; padding: 0; flex: none; }
#ta-shop .woocommerce-billing-fields h3,
#ta-shop .woocommerce-shipping-fields h3,
#ta-shop .woocommerce-additional-fields h3,
#ta-shop #order_review_heading { color: var(--ta-purple); font-weight: 400; font-size: 1.25rem; margin: 0 0 1rem; }

/* billing fields: two columns */
#ta-shop .woocommerce-billing-fields__field-wrapper,
#ta-shop .woocommerce-shipping-fields__field-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
#ta-shop .woocommerce-billing-fields__field-wrapper > *,
#ta-shop .woocommerce-shipping-fields__field-wrapper > * { grid-column: 1 / -1; }
#ta-shop .woocommerce-billing-fields__field-wrapper > .form-row-first,
#ta-shop .woocommerce-shipping-fields__field-wrapper > .form-row-first { grid-column: 1; }
#ta-shop .woocommerce-billing-fields__field-wrapper > .form-row-last,
#ta-shop .woocommerce-shipping-fields__field-wrapper > .form-row-last { grid-column: 2; }
@media (max-width: 575.98px) {
  #ta-shop .woocommerce-billing-fields__field-wrapper,
  #ta-shop .woocommerce-shipping-fields__field-wrapper { grid-template-columns: 1fr; }
  #ta-shop .woocommerce-billing-fields__field-wrapper > .form-row-first,
  #ta-shop .woocommerce-billing-fields__field-wrapper > .form-row-last { grid-column: 1; }
}

#ta-shop .form-row { float: none; width: auto; margin: 0 0 .85rem; padding: 0; }
#ta-shop .form-row label { display: block; font-size: .85rem; color: #444; margin-bottom: .25rem; line-height: 1.3; }
#ta-shop .form-row .required { color: #e5212b; text-decoration: none; border: 0; }
#ta-shop .form-row .woocommerce-input-wrapper { display: block; }
#ta-shop .form-row label.checkbox,
#ta-shop .form-row label.woocommerce-form__label-for-checkbox { display: flex; align-items: center; gap: .5rem; }
#ta-shop .form-row input[type="checkbox"] { width: 1.05rem; height: 1.05rem; accent-color: var(--ta-purple); margin: 0; }

/* select2 country / county */
#ta-shop .select2-container { width: 100% !important; }
#ta-shop .select2-container .select2-selection--single {
  height: auto; min-height: 2.75rem; border: 1.5px solid var(--ta-purple); border-radius: 8px; background: #fffefc;
  display: flex; align-items: center;
}
#ta-shop .select2-container .select2-selection--single .select2-selection__rendered { padding: .55rem 2rem .55rem .8rem; line-height: 1.4; color: #000; }
#ta-shop .select2-container .select2-selection--single .select2-selection__arrow { height: 100%; top: 0; right: .4rem; }

/* order review card */
#ta-shop #order_review {
  border: 1.5px solid var(--ta-purple); border-radius: 12px; background: #fff; padding: 1.25rem 1.1rem 1.5rem;
}
#ta-shop table.woocommerce-checkout-review-order-table {
  width: 100%; border: 0; border-collapse: collapse; margin: 0 0 .5rem; border-radius: 0;
}
#ta-shop .woocommerce-checkout-review-order-table th,
#ta-shop .woocommerce-checkout-review-order-table td {
  border: 0; border-top: 1px solid #eee; padding: .55rem .15rem; font-size: .88rem; background: none; vertical-align: top;
}
#ta-shop .woocommerce-checkout-review-order-table thead th { border-top: 0; color: var(--ta-purple); font-weight: 400; }
#ta-shop .woocommerce-checkout-review-order-table td.product-name { color: #000; }
#ta-shop .woocommerce-checkout-review-order-table .product-quantity { font-weight: 400; color: var(--ta-muted); }
#ta-shop .woocommerce-checkout-review-order-table th:last-child,
#ta-shop .woocommerce-checkout-review-order-table td:last-child { text-align: right; }
#ta-shop .woocommerce-checkout-review-order-table tfoot th { color: #000; font-weight: 400; text-align: left; }
#ta-shop .woocommerce-checkout-review-order-table .order-total th,
#ta-shop .woocommerce-checkout-review-order-table .order-total td { font-weight: 700; font-size: .95rem; }

/* payment methods */
#ta-shop #payment { background: transparent; border-radius: 0; margin: .75rem 0 0; }
#ta-shop #payment ul.payment_methods {
  list-style: none; padding: 0; margin: 0 0 1rem; border: 1px solid #e3e3e3; border-radius: 10px; overflow: hidden;
}
#ta-shop #payment ul.payment_methods::before,
#ta-shop #payment ul.payment_methods::after { display: none; }
#ta-shop #payment ul.payment_methods li { padding: .8rem .9rem; border-bottom: 1px solid #e3e3e3; font-size: .85rem; line-height: 1.4; margin: 0; }
#ta-shop #payment ul.payment_methods li:last-child { border-bottom: 0; }
#ta-shop #payment ul.payment_methods li > input[type="radio"] { margin: 0 .45rem 0 0; accent-color: var(--ta-purple); vertical-align: middle; }
#ta-shop #payment ul.payment_methods li label { display: inline; font-weight: 500; cursor: pointer; }
#ta-shop #payment ul.payment_methods li img { max-height: 22px; width: auto; margin: 0 0 0 .35rem; vertical-align: middle; float: none; display: inline-block; }
#ta-shop #payment div.payment_box {
  background: #f7f7f7; color: #333; border-radius: 8px; padding: .8rem; margin: .65rem 0 0; font-size: .82rem;
}
#ta-shop #payment div.payment_box::before { display: none; }
#ta-shop #payment div.payment_box fieldset { padding: 0; margin: 0; border: 0; }
#ta-shop #payment .place-order { padding: 0; margin: 0; background: none; }
#ta-shop .woocommerce-privacy-policy-text { font-size: .78rem; color: #18355c; }
#ta-shop .woocommerce-privacy-policy-text a,
#ta-shop .woocommerce-terms-and-conditions-link { color: #2a9bd9; }
#ta-shop .woocommerce-terms-and-conditions-wrapper .form-row { margin-top: .75rem; }
#ta-shop #place_order { width: 100%; }

/* order received */
#ta-shop ul.woocommerce-order-overview {
  list-style: none; display: flex; flex-wrap: wrap; gap: 1rem 2rem;
  border: 1.5px solid var(--ta-purple); border-radius: 12px; padding: 1.25rem 1.5rem; margin: 0 0 2rem;
}
#ta-shop ul.woocommerce-order-overview::before,
#ta-shop ul.woocommerce-order-overview::after { display: none; }
#ta-shop ul.woocommerce-order-overview li {
  font-size: .75rem; text-transform: uppercase; color: var(--ta-muted);
  border: 0; margin: 0; padding: 0; float: none;
}
#ta-shop ul.woocommerce-order-overview li strong { display: block; text-transform: none; color: #000; font-size: .95rem; }
#ta-shop .woocommerce-order-details,
#ta-shop .woocommerce-customer-details { margin-bottom: 2rem; }
#ta-shop .woocommerce-order-details table.shop_table { width: 100%; border: 1.5px solid var(--ta-purple); border-radius: 14px; border-collapse: separate; overflow: hidden; }
#ta-shop .woocommerce-order-details table.shop_table th,
#ta-shop .woocommerce-order-details table.shop_table td { padding: .65rem .9rem; border-top: 1px solid #eee; }
#ta-shop .woocommerce-order-details__title,
#ta-shop .woocommerce-column__title { color: var(--ta-purple); font-weight: 400; font-size: 1.25rem; }
#ta-shop .woocommerce-customer-details address { border: 1.5px solid var(--ta-purple); border-radius: 14px; padding: 1rem 1.25rem; font-style: normal; }
