/* ============================================================
   ARIEL SIDDUR — WooCommerce (single product / cart / checkout / account)
   Layered on top of WooCommerce default styles. RTL.
   ============================================================ */

:root {
  --wc-navy:      var(--navy-dark, #16263c);
  --wc-navy-2:    var(--navy, #1b2d6b);
  --wc-gold:      var(--gold, #c79a3b);
  --wc-gold-dk:   var(--gold-dark, #b8921e);
  --wc-border:    #e8e0d2;
  --wc-bg-soft:   #faf6ee;
}

.ariel-wc { font-family: 'Assistant', sans-serif; }
.ariel-page .container,
.ariel-wc .container { padding-top: 40px; padding-bottom: 64px; }

.page-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--wc-navy);
  margin: 0 0 28px;
  text-align: center;
}

/* ── Buttons (global WC) ──────────────────────────────────── */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button {
  background: var(--wc-navy);
  color: #fff;
  border: 1.5px solid var(--wc-navy);
  border-radius: 10px;
  font-family: 'Assistant', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 24px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .button:hover {
  background: #0a1535;
  border-color: #0a1535;
  color: #fff;
}
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce .single_add_to_cart_button,
.woocommerce #place_order,
.woocommerce .checkout-button {
  background: var(--wc-gold-dk);
  border-color: var(--wc-gold-dk);
  color: #fff;
}
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce .single_add_to_cart_button:hover,
.woocommerce #place_order:hover,
.woocommerce .checkout-button:hover {
  background: var(--wc-gold);
  border-color: var(--wc-gold);
  color: #fff;
}

/* ── Notices ──────────────────────────────────────────────── */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews {
  border-top-color: var(--wc-gold);
  border-radius: 10px;
  font-family: 'Assistant', sans-serif;
}
.woocommerce-message::before { color: var(--wc-gold); }

/* ============================================================
   SINGLE PRODUCT
   ============================================================ */
.ariel-single-product .product {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}
.ariel-single-product .woocommerce-product-gallery {
  flex: 1 1 380px;
  max-width: 460px;
  margin: 0 !important;
}
.ariel-single-product .summary {
  flex: 1 1 380px;
  margin: 0 !important;
}
.ariel-single-product .product_title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--wc-navy);
  margin: 0 0 14px;
}
.ariel-single-product .woocommerce-product-gallery__image img { border-radius: 14px; }
.ariel-single-product .price {
  color: var(--wc-gold-dk) !important;
  font-weight: 800;
}
.ariel-single-product .price del { color: #9a9a9a !important; font-weight: 600; opacity: .8; }
.ariel-single-product .price ins { text-decoration: none; }
.ariel-single-product .woocommerce-product-details__short-description {
  color: #555;
  line-height: 1.7;
  margin-bottom: 8px;
}
.ariel-single-product .quantity .qty {
  width: 64px;
  padding: 10px;
  border: 1.5px solid var(--wc-border);
  border-radius: 8px;
  text-align: center;
  font-family: 'Assistant', sans-serif;
}
.ariel-single-product .single_add_to_cart_button { padding: 14px 30px; font-size: 16px; }
.ariel-single-product .product_meta { font-size: 13px; color: #888; margin-top: 18px; }

/* Tabs */
.ariel-single-product .woocommerce-tabs { width: 100%; margin-top: 24px; }
.ariel-single-product .woocommerce-tabs ul.tabs {
  padding: 0;
  border-bottom: 1px solid var(--wc-border);
}
.ariel-single-product .woocommerce-tabs ul.tabs::before { border-color: var(--wc-border); }
.ariel-single-product .woocommerce-tabs ul.tabs li {
  background: transparent;
  border: none;
  border-radius: 0;
  margin: 0 0 -1px;
}
.ariel-single-product .woocommerce-tabs ul.tabs li.active {
  border-bottom: 3px solid var(--wc-gold);
  background: transparent;
}
.ariel-single-product .woocommerce-tabs ul.tabs li a {
  color: var(--wc-navy);
  font-weight: 700;
}
.ariel-single-product .woocommerce-tabs ul.tabs li::before,
.ariel-single-product .woocommerce-tabs ul.tabs li::after { display: none; }

/* Related products → reuse card look */
.ariel-single-product .related.products > h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--wc-navy);
  margin-bottom: 24px;
}

/* ============================================================
   CART
   ============================================================ */
.woocommerce-cart .woocommerce { font-family: 'Assistant', sans-serif; }
.woocommerce table.shop_table {
  border-radius: 12px;
  border-color: var(--wc-border);
  overflow: hidden;
}
.woocommerce table.shop_table thead th {
  background: var(--wc-navy);
  color: #fff;
  font-weight: 700;
  padding: 14px;
}
.woocommerce table.shop_table td { padding: 16px 14px; border-color: #f0ece3; }
.woocommerce .cart_item img { width: 60px; border-radius: 8px; }
.woocommerce a.remove {
  color: #b23b3b !important;
  border: 1px solid #f0d6d6;
}
.woocommerce a.remove:hover { background: #b23b3b !important; color: #fff !important; }
.woocommerce .cart-collaterals .cart_totals {
  background: var(--wc-bg-soft);
  border: 1px solid var(--wc-border);
  border-radius: 14px;
  padding: 22px;
}
.woocommerce .cart_totals h2 { color: var(--wc-navy); font-weight: 800; }
.woocommerce .coupon .input-text {
  border: 1.5px solid var(--wc-border);
  border-radius: 8px;
  padding: 11px 14px;
}

/* Product title link in cart — navy, no underline */
.woocommerce table.cart td.product-name a,
.woocommerce-cart .product-name a {
  color: var(--wc-navy) !important;
  text-decoration: none !important;
  font-weight: 700;
}
.woocommerce table.cart td.product-name a:hover { color: var(--wc-gold-dk) !important; }

/* Product thumbnail */
.woocommerce table.cart td.product-thumbnail img {
  width: 64px;
  height: auto;
  border-radius: 8px;
}

/* Cart price sizing (18px) */
.woocommerce-cart td.product-price .woocommerce-Price-amount,
.woocommerce-cart td.product-subtotal .woocommerce-Price-amount,
.woocommerce-cart .cart_totals .woocommerce-Price-amount {
  font-size: 18px !important;
  font-weight: 700;
}

/* Quantity box */
.woocommerce table.cart td.product-quantity .qty {
  width: 60px;
  padding: 9px;
  border: 1.5px solid var(--wc-border);
  border-radius: 8px;
  text-align: center;
}

/* ── Cart actions row: coupon (right) + update cart (far left) one line ── */
.woocommerce-cart table.cart td.actions {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
}
.woocommerce-cart table.cart td.actions .coupon {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  float: none;
  flex: 0 0 auto;
}
/* Update cart: drop WC float, push to the far LEFT (end in RTL) */
.woocommerce-cart table.cart td.actions > .button,
.woocommerce-cart table.cart td.actions > button,
.woocommerce-cart table.cart td.actions input.button[name="update_cart"],
.woocommerce-cart table.cart td.actions button[name="update_cart"] {
  float: none !important;
  margin: 0 !important;
  margin-inline-start: auto !important;   /* pushes it to the left edge in RTL */
  flex: 0 0 auto;
  white-space: nowrap;                     /* no 3-line wrap */
  width: auto;
}

/* Coupon code input */
.woocommerce .cart .coupon .input-text {
  min-width: 210px;
  height: 46px;
  padding: 12px 16px;
  border: 1.5px solid var(--wc-border);
  border-radius: 8px;
  font-family: 'Assistant', sans-serif;
  font-size: 15px;
}
.woocommerce .cart .coupon .input-text:focus {
  border-color: var(--wc-gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(199,154,59,.15);
}

/* Shared button sizing in the actions row (target both <button> and <input>) */
.woocommerce .cart .actions .button,
.woocommerce .cart .actions input.button,
.woocommerce .cart .actions button.button {
  height: 46px;
  padding: 0 26px;
  border-radius: 8px;
  font-weight: 700;
}

/* Apply coupon = navy */
.woocommerce .cart button[name="apply_coupon"],
.woocommerce .cart input.button[name="apply_coupon"] {
  background: var(--wc-navy) !important;
  border: 1.5px solid var(--wc-navy) !important;
  color: #fff !important;
}
.woocommerce .cart button[name="apply_coupon"]:hover,
.woocommerce .cart input.button[name="apply_coupon"]:hover {
  background: #0a1535 !important;
}

/* Update cart = outline navy, readable even when disabled */
.woocommerce .cart button[name="update_cart"],
.woocommerce .cart input.button[name="update_cart"] {
  background: #fff !important;
  color: var(--wc-navy) !important;
  border: 1.5px solid var(--wc-navy) !important;
  opacity: 1 !important;
}
.woocommerce .cart button[name="update_cart"]:hover:not([disabled]):not(:disabled),
.woocommerce .cart input.button[name="update_cart"]:hover:not([disabled]):not(:disabled) {
  background: var(--wc-navy) !important;
  color: #fff !important;
}
.woocommerce .cart button[name="update_cart"][disabled],
.woocommerce .cart button[name="update_cart"]:disabled,
.woocommerce .cart input.button[name="update_cart"][disabled],
.woocommerce .cart input.button[name="update_cart"]:disabled {
  background: #fff !important;
  color: var(--wc-navy) !important;
  border-color: var(--wc-navy) !important;
  opacity: .55 !important;   /* still clearly a button, just dimmed until cart changes */
  cursor: default;
}

/* ── Fixed table layout, balanced % widths (desktop only) ─────────────
   On mobile WooCommerce stacks the cart (shop_table_responsive), so we keep
   these desktop-scoped to avoid breaking that. */
@media (min-width: 769px) {
  .woocommerce table.cart { table-layout: fixed; width: 100%; }
  .woocommerce table.cart th.product-remove,
  .woocommerce table.cart td.product-remove { width: 4%; text-align: center; padding-inline: 4px; }
  .woocommerce table.cart th.product-thumbnail,
  .woocommerce table.cart td.product-thumbnail { width: 10%; text-align: center; }
  .woocommerce table.cart th.product-name,
  .woocommerce table.cart td.product-name { width: 40%; }
  .woocommerce table.cart th.product-price,
  .woocommerce table.cart td.product-price { width: 15%; }
  .woocommerce table.cart th.product-quantity,
  .woocommerce table.cart td.product-quantity { width: 15%; }
  .woocommerce table.cart th.product-subtotal,
  .woocommerce table.cart td.product-subtotal { width: 16%; }
}
.woocommerce table.cart td.product-name a { white-space: normal; }
.woocommerce table.cart td.product-thumbnail img { width: 60px; height: auto; margin-inline: auto; }

/* Mobile cart: tidy stacked rows + full-width action buttons */
@media (max-width: 768px) {
  .woocommerce-cart table.cart td.actions { flex-wrap: wrap; }
  .woocommerce-cart table.cart td.actions .coupon { width: 100%; }
  .woocommerce-cart table.cart td.actions .coupon .input-text { flex: 1; min-width: 0; }
  .woocommerce-cart table.cart td.actions button[name="update_cart"] { width: 100%; margin-inline-start: 0 !important; }
  .woocommerce-cart .cart-collaterals .cart_totals { max-width: 100%; }
}

/* Totals box at the bottom, sensible width (right-aligned in RTL) */
.woocommerce-cart .cart-collaterals { width: 100%; float: none; }
.woocommerce-cart .cart-collaterals .cart_totals {
  float: none;
  width: 100%;
  max-width: 460px;
  margin: 28px 0 0;
}

/* Proceed to checkout = gold CTA */
.woocommerce .cart_totals .checkout-button.button.alt {
  background: var(--wc-gold-dk);
  border-color: var(--wc-gold-dk);
  color: #fff;
  width: 100%;
  padding: 15px;
  font-size: 16px;
}
.woocommerce .cart_totals .checkout-button.button.alt:hover {
  background: var(--wc-gold);
  border-color: var(--wc-gold);
}

/* ============================================================
   CHECKOUT
   ============================================================ */
.woocommerce-checkout h3 { color: var(--wc-navy); font-weight: 800; }
.woocommerce form .form-row label { font-weight: 600; color: var(--wc-navy); }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce-checkout select,
.select2-container .select2-selection {
  border: 1.5px solid var(--wc-border) !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
  font-family: 'Assistant', sans-serif;
  min-height: 46px;
}
.woocommerce-checkout #order_review,
.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 { }
.woocommerce-checkout #order_review {
  background: var(--wc-bg-soft);
  border: 1px solid var(--wc-border);
  border-radius: 14px;
  padding: 22px;
}
.woocommerce-checkout #payment {
  background: transparent;
  border-radius: 12px;
}
.woocommerce-checkout #payment ul.payment_methods {
  background: #fff;
  border: 1px solid var(--wc-border);
  border-radius: 10px;
}
.woocommerce #place_order { width: 100%; padding: 15px; font-size: 16px; }

/* Headings aligned to start (right in RTL) */
.woocommerce-checkout #customer_details h3,
.woocommerce-checkout #order_review_heading { text-align: start; }

/* ── Two-column checkout (custom form-checkout.php template) ──
   Billing on the right; additional info (notes) + order summary on the left.
   CSS grid follows the document direction, so column 1 = inline-start = right in RTL. */
.ariel-checkout-grid { display: block; }
.ariel-checkout-aside #order_review { margin-top: 16px; }

@media (min-width: 992px) {
  .ariel-checkout-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;  /* billing (right) | aside (left) */
    column-gap: 40px;
    align-items: start;
  }
  .ariel-checkout-aside #order_review { position: sticky; top: 24px; }
}

/* ============================================================
   MY ACCOUNT
   ============================================================ */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--wc-bg-soft);
  border: 1px solid var(--wc-border);
  border-radius: 12px;
  overflow: hidden;
}
.woocommerce-account .woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 13px 18px;
  color: var(--wc-navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid #f0ece3;
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
  background: var(--wc-navy);
  color: #fff;
}

/* ============================================================
   WOOCOMMERCE BLOCKS — Cart & Checkout (Gutenberg block versions)
   ============================================================ */
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout,
.wc-block-cart,
.wc-block-checkout { font-family: 'Assistant', sans-serif; }

/* Column headers ("מוצר", "סה"כ") */
.wc-block-cart-items__header,
.wc-block-cart-items__header th,
.wc-block-cart-items__header .wc-block-cart-items__header-product,
.wc-block-cart-items__header .wc-block-cart-items__header-total {
  color: var(--wc-navy);
  font-weight: 700;
  text-transform: none;
}

/* Product title link — navy, no underline */
.wc-block-components-product-name {
  color: var(--wc-navy) !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 16px;
}
.wc-block-components-product-name:hover { color: var(--wc-gold-dk) !important; }

/* Short description / metadata */
.wc-block-cart-item__product .wc-block-components-product-metadata,
.wc-block-components-product-metadata__description { color: #777; font-size: 13.5px; }

/* Prices */
.wc-block-components-product-price,
.wc-block-components-formatted-money-amount,
.wc-block-formatted-money-amount {
  color: var(--wc-navy);
  font-weight: 700;
}
.wc-block-cart-item__total-price-and-sale-badge-wrapper .wc-block-components-product-price__value { font-weight: 800; }

/* Product thumbnail */
.wc-block-cart-item__image img { border-radius: 10px; }

/* Quantity stepper */
.wc-block-components-quantity-selector {
  border: 1.5px solid var(--wc-border);
  border-radius: 8px;
}
.wc-block-components-quantity-selector__button { color: var(--wc-navy); }

/* Remove (trash) */
.wc-block-cart-item__remove-link { color: #b23b3b; }
.wc-block-cart-item__remove-link:hover { color: #8d2c2c; }

/* Totals panel */
.wc-block-cart__totals-title,
.wc-block-components-totals-item__label {
  color: var(--wc-navy);
  font-weight: 600;
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  color: var(--wc-navy);
  font-weight: 800;
  font-size: 18px;
}
.wc-block-components-panel__button,
.wc-block-components-totals-coupon__button { color: var(--wc-gold-dk); }

/* Primary buttons: proceed to checkout / place order */
.wc-block-cart__submit-button,
.wp-block-woocommerce-cart__submit-button,
.wc-block-components-button.contained,
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-container .wc-block-components-button {
  background: var(--wc-navy) !important;
  color: #fff !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  font-family: 'Assistant', sans-serif !important;
}
.wc-block-cart__submit-button:hover,
.wc-block-components-button.contained:hover,
.wc-block-components-checkout-place-order-button:hover {
  background: var(--wc-gold-dk) !important;
}

/* Checkout block fields */
.wc-block-components-text-input input,
.wc-block-components-select .wc-block-components-select__container,
.wc-block-components-address-form input {
  border-radius: 8px !important;
  border-color: var(--wc-border) !important;
  font-family: 'Assistant', sans-serif;
}
.wc-block-components-text-input.is-active label,
.wc-block-checkout__main h2,
.wc-block-components-checkout-step__title { color: var(--wc-navy) !important; }
.wc-block-components-checkout-step__heading-content { color: #777; }

/* Order summary card */
.wc-block-components-sidebar .wc-block-components-totals-wrapper,
.wc-block-checkout__sidebar .wc-block-components-panel {
  background: var(--wc-bg-soft);
  border: 1px solid var(--wc-border);
  border-radius: 14px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .ariel-single-product .product { gap: 28px; }
  .ariel-single-product .woocommerce-product-gallery,
  .ariel-single-product .summary { flex: 1 1 100%; max-width: 100%; }
}
