/**
 * Store pages: cart, checkout (blocks), order received, my account
 * Loaded only on those pages.
 *
 * @package BaitAlKaram
 */

.store-page-content {
  flex: 1;
  padding: clamp(28px, 4vw, 56px) 0 clamp(32px, 5vw, 72px);
}
.store-heading { margin-bottom: 26px; }
.store-heading h1 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 700;
  line-height: 1.15;
}
.store-page-content .entry-content > .wp-block-woocommerce-cart,
.store-page-content .entry-content > .wp-block-woocommerce-checkout { max-width: none; }

/* ---------- Shared: buttons & inputs (WooCommerce Blocks + classic) ---------- */
.store-page .wc-block-components-button,
.store-page .wc-block-components-button.wp-element-button,
.store-page .woocommerce .button,
.store-page button.button,
.store-page .woocommerce-button,
.store-page .woocommerce-Button {
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: #fff !important;
  background: linear-gradient(115deg, var(--red), #d33a42 52%, var(--red-deep)) !important;
  background-size: 180% 180% !important;
  box-shadow: none;
  cursor: pointer;
  transition: background-position 0.4s ease, transform 0.3s ease;
}
.store-page .wc-block-components-button:hover,
.store-page .woocommerce .button:hover,
.store-page button.button:hover {
  background-position: 100% 50% !important;
  transform: translateY(-2px);
  color: #fff !important;
}
.store-page .wc-block-components-button:disabled,
.store-page .wc-block-components-button[aria-disabled="true"] {
  opacity: 0.55;
  transform: none;
}
.store-page .wc-block-components-button.outlined,
.store-page .wc-block-components-button.is-secondary {
  background: transparent !important;
  color: var(--ink) !important;
  border: 1.5px solid var(--ink);
}

.store-page .wc-block-components-text-input input[type="text"],
.store-page .wc-block-components-text-input input[type="email"],
.store-page .wc-block-components-text-input input[type="tel"],
.store-page .wc-block-components-text-input input[type="number"],
.store-page .wc-block-components-textarea textarea,
.store-page .wc-block-components-combobox .wc-block-components-combobox-control input,
.store-page .wc-block-components-form .wc-block-components-select .components-custom-select-control__button,
.store-page .woocommerce-Input,
.store-page .woocommerce-form-row input.input-text,
.store-page .woocommerce-form-row select {
  border: 1.5px solid var(--line) !important;
  border-radius: 8px;
  background: var(--paper);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  min-height: 50px;
  box-shadow: none;
}
.store-page .wc-block-components-text-input input:focus,
.store-page .wc-block-components-textarea textarea:focus,
.store-page .woocommerce-Input:focus {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(186, 32, 41, 0.12) !important;
  outline: none;
}
.store-page .wc-block-components-text-input label,
.store-page .wc-block-components-combobox label,
.store-page .wc-block-components-textarea label { color: var(--ink-light); }
.store-page .wc-block-components-text-input.is-active label,
.store-page .wc-block-components-combobox.is-active label { color: var(--red); }
.store-page .wc-block-components-checkbox .wc-block-components-checkbox__input:checked { background: var(--red); border-color: var(--red); }
.store-page .wc-block-components-radio-control__input:checked { border-color: var(--red); }
.store-page .wc-block-components-radio-control__input:checked::before { background: var(--red); }

/* Notices */
.store-page .wc-block-components-notice-banner,
.store-page .woocommerce-message,
.store-page .woocommerce-error,
.store-page .woocommerce-info {
  border-radius: 10px;
  font-size: 14px;
  list-style: none;
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.store-page .woocommerce-error { border-color: #f3b9bd; background: #fdecec; color: #94161e; }
.store-page .woocommerce-message { border-color: #b9e6c8; background: #eaf8ef; color: #17603a; }

/* ---------- Cart (blocks) ---------- */
.store-page .wc-block-cart.is-large .wc-block-components-main { width: 63%; margin-inline-end: 2%; padding: 0; }
.store-page .wc-block-cart.is-large .wc-block-components-sidebar { width: 35%; }
.store-page .wc-block-cart-items,
.store-page .wc-block-components-sidebar .wc-block-components-totals-wrapper,
.store-page .wc-block-cart__sidebar,
.store-page .wc-block-components-sidebar {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.store-page .wc-block-cart-items { padding: 6px 18px; }
.store-page .wc-block-cart-items th { font-size: 13px; color: var(--ink-light); font-weight: 600; border-bottom: 1px solid var(--line); }
.store-page .wc-block-cart-items .wc-block-cart-items__row { border-bottom: 1px solid var(--line); }
.store-page .wc-block-cart-items .wc-block-cart-items__row:last-child { border-bottom: 0; }
.store-page .wc-block-cart-item__image img {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
}
.store-page .wc-block-components-product-name { font-weight: 700; color: var(--ink); font-size: 15px; }
.store-page .wc-block-components-product-name:hover { color: var(--red); }
.store-page .wc-block-components-product-metadata,
.store-page .wc-block-components-product-details { font-size: 12.5px; color: var(--ink-light); }
.store-page .wc-block-cart-item__prices,
.store-page .wc-block-cart-item__total .wc-block-components-product-price { font-weight: 700; }
.store-page .wc-block-components-product-price__value.is-discounted,
.store-page .wc-block-components-sale-badge { color: var(--red); }
.store-page .wc-block-components-quantity-selector {
  border-radius: 8px;
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.store-page .wc-block-components-quantity-selector::after { display: none; }
.store-page .wc-block-cart-item__remove-link { color: var(--ink-light); font-size: 12.5px; }
.store-page .wc-block-cart-item__remove-link:hover { color: var(--red); }

.store-page .wc-block-components-sidebar { padding: 8px 4px; }
.store-page .wc-block-components-sidebar .wc-block-components-totals-wrapper { border: 0; border-radius: 0; background: transparent; }
.store-page .wc-block-components-totals-wrapper { border-top: 1px solid var(--line) !important; }
.store-page .wc-block-cart__totals-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-transform: none;
  border: 0;
  padding: 16px 16px 4px;
  text-align: start;
}
.store-page .wc-block-components-totals-item { font-size: 14.5px; }
.store-page .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { color: var(--red); font-size: 20px; }
.store-page .wc-block-components-totals-item__description { font-size: 12px; color: var(--ink-light); }
.store-page .wc-block-cart__submit { padding: 0 16px 16px; }
.store-page .wc-block-cart__submit-button { width: 100%; }
.store-page .wc-block-components-totals-coupon__button { min-height: 50px; }
.store-page .wc-block-components-totals-coupon-link,
.store-page .wc-block-components-panel__button { color: var(--ink); font-weight: 600; }

/* Empty cart */
.store-page .wp-block-woocommerce-empty-cart-block {
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(28px, 5vw, 64px) 20px;
}
.store-page .wp-block-woocommerce-empty-cart-block > .wp-block-image,
.store-page .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__image { opacity: 0.5; }
.store-page .wp-block-woocommerce-empty-cart-block h2 { font-size: 22px; font-weight: 700; margin: 12px 0 18px; }
.store-page .wp-block-woocommerce-empty-cart-block .wp-block-separator,
.store-page .wp-block-woocommerce-empty-cart-block h2 ~ .wp-block-heading,
.store-page .wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-new,
.store-page .wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-collection,
.store-page .wp-block-woocommerce-empty-cart-block .wc-block-grid,
.store-page .wp-block-woocommerce-empty-cart-block .wp-block-button { display: none; }
.store-empty-cta p { margin: 0 0 16px; color: var(--ink-light); font-size: 15px; }
.store-page .store-empty-btn,
.store-page-content .entry-content a.store-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 28px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
  background: var(--red);
  transition: background 0.2s ease;
}
.store-page .store-empty-btn:hover,
.store-page-content .entry-content a.store-empty-btn:hover {
  background: var(--red-deep);
  color: #fff !important;
}

/* ---------- Checkout (blocks) ---------- */
.store-page .wc-block-checkout__form { gap: 18px; }
.store-page .wc-block-components-checkout-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 22px 22px;
  margin: 0 0 14px;
}
.store-page .wc-block-components-checkout-step::before,
.store-page .wc-block-components-checkout-step::after { display: none !important; }
.store-page .wc-block-components-checkout-step__container { padding: 0; }
.store-page .wc-block-components-checkout-step__heading { margin: 0 0 6px; }
.store-page .wc-block-components-checkout-step__title { font-size: 17px; font-weight: 700; margin: 0; }
.store-page .wc-block-components-checkout-step__description { color: var(--ink-light); font-size: 13.5px; margin-bottom: 14px; }
.store-page .wc-block-components-checkout-step .wc-block-components-checkout-step__heading-content a { color: var(--red); font-weight: 600; }

.store-page .wc-block-components-radio-control-accordion-option,
.store-page .wc-block-components-radio-control--highlight-checked {
  border-radius: 12px !important;
  overflow: hidden;
}
.store-page .wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.store-page .wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted {
  box-shadow: inset 0 0 0 2px var(--red) !important;
  background: rgba(186, 32, 41, 0.03);
}
.store-page .wc-block-components-radio-control__label { font-weight: 600; }
.store-page .wc-block-components-radio-control__secondary-label { color: var(--red); font-weight: 700; }
.store-page .wc-block-components-payment-method-label { font-weight: 700; }
.store-page .wc-block-components-radio-control-accordion-content { color: var(--ink-light); font-size: 14px; line-height: 1.8; }

.store-page .wc-block-checkout__sidebar .wc-block-components-order-summary,
.store-page .wc-block-checkout__sidebar .wc-block-components-totals-wrapper { border-color: var(--line); }
.store-page .wc-block-checkout__sidebar {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px 6px;
  position: sticky;
  top: 96px;
}
.store-page .wc-block-components-order-summary-item__image img { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 4px; }
.store-page .wc-block-components-order-summary-item__description .wc-block-components-product-name { font-size: 14px; }
.store-page .wc-block-components-checkout-place-order-button { width: 100%; min-height: 54px; font-size: 15.5px; }
.store-page .wc-block-checkout__actions_row { justify-content: stretch; }
.store-page .wc-block-components-checkout-return-to-cart-button { color: var(--ink-light); font-weight: 600; }
.store-page .wc-block-components-checkout-return-to-cart-button:hover { color: var(--red); }
.store-page .wc-block-checkout__terms { font-size: 13px; color: var(--ink-light); }
.store-page .wc-block-checkout__terms a { color: var(--red); }

/* ---------- Order received (thank you) ---------- */
.store-page .woocommerce-order { max-width: 860px; }
.store-page .woocommerce-notice--success,
.store-page .woocommerce-thankyou-order-received {
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  line-height: 1.7;
  padding: 22px 26px;
  border-radius: 16px;
  background: #eaf8ef;
  border: 1px solid #b9e6c8;
  color: #17603a;
  margin: 0 0 18px;
}
.store-thankyou-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
}
.store-thankyou-actions .pdp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 6px;
  font-size: 14.5px;
  font-weight: 700;
  border: 1.5px solid transparent;
  transition: transform 0.28s ease, background-position 0.4s ease, border-color 0.25s ease, color 0.25s ease;
}
.store-thankyou-actions .pdp-btn:hover { transform: translateY(-2px); }
.store-thankyou-actions .pdp-btn--wa {
  color: #fff;
  background: linear-gradient(115deg, #1fa855, #25d366 55%, #128c7e);
  background-size: 180% 180%;
}
.store-thankyou-actions .pdp-btn--wa:hover { background-position: 100% 50%; color: #fff; }
.store-thankyou-actions .pdp-btn--call { color: var(--ink); border-color: var(--ink); }
.store-thankyou-actions .pdp-btn--call:hover { color: var(--red); border-color: var(--red); }
.store-page .woocommerce-order-overview {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.store-page .woocommerce-order-overview li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--ink-light);
  margin: 0;
  border-inline-end: 1px solid var(--line) !important;
  float: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.store-page .woocommerce-order-overview li strong { font-size: 15px; font-weight: 700; color: var(--ink); display: block; }
.store-page .woocommerce-order-details,
.store-page .woocommerce-customer-details,
.store-page .woocommerce-bacs-bank-details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
}
.store-page .woocommerce-order-details__title,
.store-page .woocommerce-column__title,
.store-page .woocommerce-bacs-bank-details h2 { font-size: 17px; font-weight: 700; margin: 0 0 14px; }
.store-page .woocommerce-order-details .woocommerce-order-details__title:not(:first-child) { margin-top: 20px; }
.store-page table.shop_table {
  width: 100%;
  border-collapse: collapse;
  border: 0;
  font-size: 14.5px;
}
.store-page table.shop_table th,
.store-page table.shop_table td {
  text-align: start;
  padding: 12px 6px;
  border: 0;
  border-bottom: 1px dashed var(--line);
  vertical-align: top;
}
.store-page table.shop_table thead th { font-size: 13px; color: var(--ink-light); font-weight: 600; }
.store-page table.shop_table tfoot th { color: var(--ink-light); font-weight: 600; }
.store-page table.shop_table tfoot tr:last-child th,
.store-page table.shop_table tfoot tr:last-child td { border-bottom: 0; font-size: 16px; font-weight: 700; color: var(--red); }
.store-page table.shop_table .product-quantity { color: var(--ink-light); font-weight: 400; }
.store-page .woocommerce-customer-details address {
  font-style: normal;
  line-height: 1.9;
  border: 0;
  padding: 0;
  color: var(--ink-light);
}
.store-page .woocommerce-customer-details .woocommerce-customer-details--phone,
.store-page .woocommerce-customer-details .woocommerce-customer-details--email { direction: ltr; text-align: end; }

/* ---------- My account ---------- */
.store-page .woocommerce-MyAccount-navigation,
.store-page .woocommerce-MyAccount-content,
.store-page .woocommerce-form-login,
.store-page .woocommerce-form-register,
.store-page .woocommerce-ResetPassword,
.store-page .woocommerce-EditAccountForm,
.store-page .woocommerce-address-fields,
.store-page .woocommerce-Addresses .woocommerce-Address,
.store-page .woocommerce-orders-table {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.store-page .u-columns.col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.store-page .u-columns.col2-set > div { width: auto; float: none; }
.store-page .woocommerce-MyAccount-navigation { padding: 10px; }
.store-page .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.store-page .woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 11px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink-light);
  transition: background 0.25s ease, color 0.25s ease;
}
.store-page .woocommerce-MyAccount-navigation li a:hover { background: var(--bg-page); color: var(--ink); }
.store-page .woocommerce-MyAccount-navigation li.is-active a { background: rgba(186, 32, 41, 0.08); color: var(--red); }
.store-page .woocommerce-MyAccount-content { line-height: 1.9; }
.store-page .woocommerce-MyAccount-content p { margin: 0 0 12px; }
.store-page .woocommerce-MyAccount-content a:not(.button) { color: var(--red); font-weight: 600; }
.store-page .woocommerce-form-row { margin-bottom: 14px; }
.store-page .woocommerce-form-row label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink-light); }
.store-page .woocommerce-form-row input.input-text { width: 100%; padding: 0 14px; }
.store-page .woocommerce-form-login__rememberme { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 12px; }
.store-page .woocommerce-LostPassword a { color: var(--ink-light); font-size: 13.5px; }
.store-page .show-password-input { display: none; }
.store-page .woocommerce-orders-table { padding: 8px 14px; }
.store-page .woocommerce-orders-table .woocommerce-button { min-height: 38px; padding: 0 14px; font-size: 13px; }
.store-page .woocommerce-Addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.store-page .woocommerce-Address-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.store-page .woocommerce-Address-title h2, .store-page .woocommerce-Address-title h3 { margin: 0; font-size: 16px; }
.store-page .woocommerce-Address address { font-style: normal; color: var(--ink-light); line-height: 1.9; }

/* Layout: classic my-account is two columns */
.store-page .woocommerce:has(.woocommerce-MyAccount-navigation) {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.store-page .woocommerce:has(.woocommerce-MyAccount-navigation) > .woocommerce-notices-wrapper { grid-column: 1 / -1; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .store-page .wc-block-checkout__sidebar { position: static; }
  .store-page .woocommerce:has(.woocommerce-MyAccount-navigation) { grid-template-columns: 1fr; }
  .store-page .woocommerce-MyAccount-navigation ul { grid-template-columns: repeat(2, 1fr); }
  .store-page .u-columns.col2-set,
  .store-page .woocommerce-Addresses { grid-template-columns: 1fr; }
}
.store-page .woocommerce-form-coupon,
.store-page .woocommerce-form-login { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.store-page .select2-container .select2-selection--single { min-height: 48px; border-radius: 10px; }
.store-page .woocommerce-password-strength { margin-top: 8px; font-size: 12px; }
.store-page nav.woocommerce-pagination { margin: 24px 0; }
.store-page nav.woocommerce-pagination ul { display: flex; gap: 8px; list-style: none; padding: 0; justify-content: center; }
.store-page nav.woocommerce-pagination a,
.store-page nav.woocommerce-pagination span { display: inline-flex; min-width: 40px; min-height: 40px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; }

@media (max-width: 700px) {
  .store-heading h1 { font-size: 26px; }
  .store-page .wc-block-cart-items { padding: 4px 12px; }
  .store-page .wc-block-components-checkout-step { padding: 16px; }
  .store-page .woocommerce-MyAccount-navigation ul { grid-template-columns: 1fr 1fr; }
  .store-page .woocommerce-orders-table { display: block; overflow-x: auto; }
  .store-thankyou-actions .pdp-btn { flex: 1 1 100%; }
}
