/* Palette and responsive polish only. WooCommerce markup/templates are not replaced. */
body.ssb-active .woocommerce,
body.ssb-active .woocommerce-page,
body.ssb-active .wc-block-cart,
body.ssb-active .wc-block-checkout {
  color: var(--ss-text);
}

body.ssb-active .woocommerce a.button,
body.ssb-active .woocommerce button.button,
body.ssb-active .woocommerce input.button,
body.ssb-active .woocommerce #respond input#submit,
body.ssb-active .wc-block-components-button:not(.is-link) {
  background: var(--ss-primary) !important;
  color: #fff !important;
  border: 1px solid var(--ss-primary) !important;
  border-radius: 12px !important;
  min-height: 46px;
  padding: 12px 20px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: none !important;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
body.ssb-active .woocommerce a.button:hover,
body.ssb-active .woocommerce button.button:hover,
body.ssb-active .woocommerce input.button:hover,
body.ssb-active .wc-block-components-button:not(.is-link):hover {
  background: var(--ss-primary-strong) !important;
  border-color: var(--ss-primary-strong) !important;
}
body.ssb-active .woocommerce button.button:disabled,
body.ssb-active .woocommerce button.button.disabled,
body.ssb-active .woocommerce input.button:disabled {
  background: #AAB2AC !important;
  border-color: #AAB2AC !important;
  opacity: 1 !important;
}

body.ssb-active .woocommerce-message,
body.ssb-active .woocommerce-info,
body.ssb-active .woocommerce-error,
body.ssb-active .wc-block-components-notice-banner {
  border-radius: 14px;
  border: 1px solid var(--ss-border) !important;
  box-shadow: none;
  padding: 16px 18px 16px 48px !important;
  background: var(--ss-surface) !important;
  color: var(--ss-text) !important;
}
body.ssb-active .woocommerce-message { border-left: 4px solid var(--ss-primary) !important; background: var(--ss-success-soft) !important; }
body.ssb-active .woocommerce-info { border-left: 4px solid var(--ss-accent) !important; background: var(--ss-accent-soft) !important; }
body.ssb-active .woocommerce-error { border-left: 4px solid var(--ss-danger) !important; background: var(--ss-danger-soft) !important; }

body.ssb-active .woocommerce table.shop_table,
body.ssb-active .woocommerce .cart_totals,
body.ssb-active .woocommerce-checkout-review-order,
body.ssb-active .woocommerce .woocommerce-MyAccount-content,
body.ssb-active .woocommerce form.login,
body.ssb-active .woocommerce form.register,
body.ssb-active .woocommerce form.checkout_coupon,
body.ssb-active .woocommerce form.lost_reset_password {
  border-color: var(--ss-border) !important;
}

body.ssb-active .woocommerce table.shop_table {
  border: 1px solid var(--ss-border) !important;
  border-radius: 16px !important;
  background: var(--ss-surface);
  overflow: hidden;
}
body.ssb-active .woocommerce table.shop_table th,
body.ssb-active .woocommerce table.shop_table td { border-color: var(--ss-border) !important; }
body.ssb-active .woocommerce table.shop_table th { color: var(--ss-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
body.ssb-active .woocommerce .quantity .qty { min-height: 44px; border: 1px solid var(--ss-border) !important; border-radius: 10px !important; background: var(--ss-surface) !important; }
body.ssb-active .woocommerce a.remove { color: var(--ss-muted) !important; background: transparent !important; border: 1px solid var(--ss-border); }
body.ssb-active .woocommerce a.remove:hover { color: var(--ss-danger) !important; border-color: var(--ss-danger); background: var(--ss-danger-soft) !important; }

/* Cart totals: keep Woo body structure but normalize alignment. */
body.ssb-active .woocommerce .cart-collaterals .cart_totals,
body.ssb-active .woocommerce-page .cart-collaterals .cart_totals {
  background: var(--ss-surface);
  border: 1px solid var(--ss-border);
  border-radius: 18px;
  padding: 24px;
  box-sizing: border-box;
}
body.ssb-active .woocommerce .cart_totals h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; color: var(--ss-text); }
body.ssb-active .woocommerce .cart_totals table { border: 0 !important; border-radius: 0 !important; }
body.ssb-active .woocommerce .cart_totals table th,
body.ssb-active .woocommerce .cart_totals table td { padding: 16px 8px !important; vertical-align: top; }
body.ssb-active .woocommerce .cart_totals .order-total strong { color: var(--ss-primary); }
body.ssb-active .woocommerce .wc-proceed-to-checkout a.checkout-button { width: 100%; text-align: center; padding: 16px 20px !important; }

/* Checkout.
 * Keep Woo/theme body structure flat. Do not turn #order_review, the order
 * table and #payment into nested cards. Razorpay may render its own small
 * payment_box; that is the only inner panel we retain.
 */
body.ssb-active .woocommerce-checkout #customer_details .col-1,
body.ssb-active .woocommerce-checkout #customer_details .col-2 {
  background: var(--ss-surface);
  border-radius: 18px;
  padding: 22px;
}

body.ssb-active .woocommerce-checkout #order_review,
body.ssb-active .woocommerce-checkout .woocommerce-checkout-review-order {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.ssb-active .woocommerce-checkout #order_review_heading {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.ssb-active .woocommerce-checkout #order_review table.shop_table {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  margin-bottom: 28px !important;
}
body.ssb-active .woocommerce-checkout #order_review table.shop_table th,
body.ssb-active .woocommerce-checkout #order_review table.shop_table td {
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--ss-border) !important;
  padding: 14px 0 !important;
}
body.ssb-active .woocommerce-checkout #order_review table.shop_table tr:last-child th,
body.ssb-active .woocommerce-checkout #order_review table.shop_table tr:last-child td {
  border-bottom: 0 !important;
}

body.ssb-active .woocommerce form .form-row label { color: var(--ss-text); font-size: 13px; font-weight: 600; }
body.ssb-active .woocommerce form .form-row .required { color: var(--ss-danger); }

body.ssb-active .woocommerce-checkout #payment {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
body.ssb-active .woocommerce-checkout #payment ul.payment_methods {
  border-bottom-color: var(--ss-border) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
body.ssb-active .woocommerce-checkout #payment .form-row.place-order {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-bottom: 0 !important;
}
body.ssb-active .woocommerce-checkout #payment div.payment_box {
  background: #F3F0E8 !important;
  color: var(--ss-text) !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
body.ssb-active .woocommerce-checkout #payment div.payment_box::before {
  border-bottom-color: #F3F0E8 !important;
}

/* My Account, including logged-out login/register and logged-in dashboard. */
body.ssb-active .woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 8px;
  background: var(--ss-surface);
  border: 1px solid var(--ss-border);
  border-radius: 16px;
}
body.ssb-active .woocommerce-account .woocommerce-MyAccount-navigation li { margin: 0; }
body.ssb-active .woocommerce-account .woocommerce-MyAccount-navigation a {
  display: block;
  padding: 11px 13px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ss-text);
  font-size: 14px;
  font-weight: 600;
}
body.ssb-active .woocommerce-account .woocommerce-MyAccount-navigation .is-active a,
body.ssb-active .woocommerce-account .woocommerce-MyAccount-navigation a:hover { background: var(--ss-primary); color: #fff; }
body.ssb-active .woocommerce-account .woocommerce-MyAccount-content {
  background: var(--ss-surface);
  border: 1px solid var(--ss-border);
  border-radius: 16px;
  padding: 24px;
}
body.ssb-active .woocommerce-account .addresses .title h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
body.ssb-active .woocommerce-account .woocommerce-Address { border: 1px solid var(--ss-border); border-radius: 14px; padding: 18px; background: #fff; }

body.ssb-active .woocommerce form.login,
body.ssb-active .woocommerce form.register,
body.ssb-active .woocommerce form.lost_reset_password {
  background: var(--ss-surface);
  border: 1px solid var(--ss-border) !important;
  border-radius: 18px !important;
  padding: 24px !important;
  box-shadow: none;
}
body.ssb-active .woocommerce-account #customer_login h2,
body.ssb-active .woocommerce-account .woocommerce h2,
body.ssb-active .woocommerce-cart .cart_totals h2,
body.ssb-active .woocommerce-checkout h3 {
  color: var(--ss-text);
}

/* Block Cart / Checkout palette. */
body.ssb-active .wc-block-components-sidebar,
body.ssb-active .wc-block-components-order-summary,
body.ssb-active .wc-block-cart-items,
body.ssb-active .wc-block-components-totals-wrapper {
  border-color: var(--ss-border) !important;
}
body.ssb-active .wc-block-components-text-input input,
body.ssb-active .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input {
  border-color: var(--ss-border) !important;
  border-radius: 10px !important;
  background: var(--ss-surface) !important;
}

/* Mobile repair pass for the classic Woo cart. This changes layout only; no data/markup is removed. */
@media (max-width: 767px) {
  body.ssb-active .woocommerce { font-size: 15px; }
  body.ssb-active .woocommerce-cart .woocommerce-cart-form table.shop_table,
  body.ssb-active .woocommerce-cart .woocommerce-cart-form table.shop_table tbody { display: block; width: 100%; }
  body.ssb-active .woocommerce-cart .woocommerce-cart-form table.shop_table thead { display: none; }
  body.ssb-active .woocommerce-cart .woocommerce-cart-form tr.woocommerce-cart-form__cart-item {
    display: grid !important;
    grid-template-columns: 76px minmax(0, 1fr) 34px;
    column-gap: 14px;
    row-gap: 8px;
    padding: 18px 14px;
    border-bottom: 1px solid var(--ss-border);
    position: relative;
  }
  body.ssb-active .woocommerce-cart .woocommerce-cart-form tr.woocommerce-cart-form__cart-item td {
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
    text-align: left !important;
  }
  body.ssb-active .woocommerce-cart .woocommerce-cart-form tr.woocommerce-cart-form__cart-item td::before { display: none !important; content: none !important; }
  body.ssb-active .woocommerce-cart td.product-thumbnail { grid-column: 1; grid-row: 1 / span 5; }
  body.ssb-active .woocommerce-cart td.product-thumbnail a { display: block; }
  body.ssb-active .woocommerce-cart td.product-thumbnail img { width: 76px !important; max-width: 76px !important; height: 76px !important; object-fit: cover; border-radius: 12px; margin: 0 !important; }
  body.ssb-active .woocommerce-cart td.product-remove { grid-column: 3; grid-row: 1; justify-self: end; }
  body.ssb-active .woocommerce-cart td.product-remove a.remove { display: grid !important; place-items: center; width: 30px; height: 30px; font-size: 20px; }
  body.ssb-active .woocommerce-cart td.product-name { grid-column: 2 / 3; grid-row: 1; padding-right: 2px !important; min-width: 0; }
  body.ssb-active .woocommerce-cart td.product-name > a { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 17px; line-height: 1.28; color: var(--ss-text) !important; text-decoration: none; overflow-wrap: anywhere; }
  body.ssb-active .woocommerce-cart td.product-name dl.variation { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--ss-muted); }
  body.ssb-active .woocommerce-cart td.product-name dl.variation dt,
  body.ssb-active .woocommerce-cart td.product-name dl.variation dd { float: none; display: inline; margin: 0; padding: 0; }
  body.ssb-active .woocommerce-cart td.product-name dl.variation p { display: inline; margin: 0; }
  body.ssb-active .woocommerce-cart td.product-price { grid-column: 2 / 4; grid-row: 2; color: var(--ss-muted); font-size: 14px; }
  body.ssb-active .woocommerce-cart td.product-quantity { grid-column: 2 / 4; grid-row: 3; display: flex !important; align-items: center; gap: 10px; }
  body.ssb-active .woocommerce-cart td.product-quantity::after { content: "Quantity"; order: -1; color: var(--ss-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
  body.ssb-active .woocommerce-cart td.product-subtotal { grid-column: 2 / 4; grid-row: 4; font-weight: 700; color: var(--ss-text); font-size: 16px; padding-top: 4px !important; }
  body.ssb-active .woocommerce-cart .woocommerce-cart-form tr:last-child td.actions { display: grid !important; grid-template-columns: 1fr; gap: 10px; padding: 16px 14px !important; }
  body.ssb-active .woocommerce-cart td.actions .coupon { display: grid !important; grid-template-columns: minmax(0,1fr) auto; gap: 8px; width: 100% !important; float: none !important; }
  body.ssb-active .woocommerce-cart td.actions .coupon .input-text { width: 100% !important; margin: 0 !important; min-width: 0; }
  body.ssb-active .woocommerce-cart td.actions > button.button { width: 100%; margin: 0 !important; }

  body.ssb-active .woocommerce .cart-collaterals .cart_totals,
  body.ssb-active .woocommerce-page .cart-collaterals .cart_totals { width: 100% !important; float: none !important; padding: 20px 14px; }
  body.ssb-active .woocommerce .cart_totals table tbody { display: table-row-group !important; }
  body.ssb-active .woocommerce .cart_totals table tr { display: grid !important; grid-template-columns: minmax(90px, .8fr) minmax(0, 1.2fr); gap: 14px; align-items: start; padding: 15px 0; border-bottom: 1px solid var(--ss-border); }
  body.ssb-active .woocommerce .cart_totals table tr:last-child { border-bottom: 0; }
  body.ssb-active .woocommerce .cart_totals table th,
  body.ssb-active .woocommerce .cart_totals table td { display: block !important; width: auto !important; padding: 0 !important; border: 0 !important; text-align: left !important; }
  body.ssb-active .woocommerce .cart_totals table td::before { display: none !important; }
  body.ssb-active .woocommerce .cart_totals .woocommerce-shipping-methods { margin: 0; }
  body.ssb-active .woocommerce .cart_totals .woocommerce-shipping-destination { margin: 8px 0 0; }
  body.ssb-active .woocommerce .cart_totals .shipping-calculator-button { display: inline-block; margin-top: 8px; }

  body.ssb-active .woocommerce-checkout #customer_details .col-1,
  body.ssb-active .woocommerce-checkout #customer_details .col-2 { padding: 16px; }
  body.ssb-active .woocommerce-checkout #order_review,
  body.ssb-active .woocommerce-checkout .woocommerce-checkout-review-order { padding: 0 !important; }
  body.ssb-active .woocommerce-checkout .form-row-first,
  body.ssb-active .woocommerce-checkout .form-row-last { width: 100% !important; float: none !important; }

  body.ssb-active .woocommerce-account .woocommerce-MyAccount-navigation,
  body.ssb-active .woocommerce-account .woocommerce-MyAccount-content { width: 100% !important; float: none !important; }
  body.ssb-active .woocommerce-account .woocommerce-MyAccount-navigation { margin-bottom: 18px; }
  body.ssb-active .woocommerce-account .woocommerce-MyAccount-navigation ul { display: flex; gap: 6px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  body.ssb-active .woocommerce-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar { display: none; }
  body.ssb-active .woocommerce-account .woocommerce-MyAccount-navigation li { flex: 0 0 auto; }
  body.ssb-active .woocommerce-account .woocommerce-MyAccount-content { padding: 18px; }
  body.ssb-active .woocommerce-account #customer_login .u-column1,
  body.ssb-active .woocommerce-account #customer_login .u-column2 { width: 100% !important; float: none !important; }
  body.ssb-active .woocommerce-account #customer_login .u-column2 { margin-top: 24px; }
  body.ssb-active .woocommerce-account .woocommerce-orders-table,
  body.ssb-active .woocommerce-account .woocommerce-table--order-details { font-size: 13px; }
}

@media (min-width: 768px) {
  body.ssb-active .woocommerce-account .woocommerce-MyAccount-navigation { width: 24%; }
  body.ssb-active .woocommerce-account .woocommerce-MyAccount-content { width: 72%; }
}
