/* ICTech shared UI — one button recipe, reused across WooCommerce / Blocksy / custom pages */

:root {
  --ictech-btn-radius: 999px;
  --ictech-btn-pad: 11px 22px;
  --ictech-btn-size: 14px;
  --ictech-btn-weight: 700;
  --ictech-btn-bg: var(--ictech-primary, #2937E9);
  --ictech-btn-bg-hover: #1f2bd0;
  --ictech-btn-shadow: 0 8px 20px rgba(41, 55, 233, .22);
  --ictech-btn-focus: 0 0 0 3px rgba(41, 55, 233, .28);
  --ictech-field-radius: 12px;

  --theme-button-border-radius: var(--ictech-btn-radius);
  --theme-button-padding: var(--ictech-btn-pad);
  --theme-button-min-height: 44px;
  --theme-button-font-size: var(--ictech-btn-size);
  --theme-button-font-weight: var(--ictech-btn-weight);
  --theme-button-background-initial-color: var(--ictech-btn-bg);
  --theme-button-background-hover-color: var(--ictech-btn-bg-hover);
  --theme-button-text-initial-color: #fff;
  --theme-button-text-hover-color: #fff;
  --theme-button-shadow: none;
  --theme-button-transform: none;
  --theme-form-field-border-radius: var(--ictech-field-radius);
  --theme-form-field-border-focus-color: var(--ictech-primary, #2937E9);
}

/* —— Button API —— */
.ictech-btn:not(.ictech-header__account-btn),
.ictech-btn--primary:not(.ictech-header__account-btn),
.ictech-btn--ghost:not(.ictech-header__account-btn),
.ictech-btn--ghost-on-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: 44px;
  padding: var(--ictech-btn-pad);
  border-radius: var(--ictech-btn-radius);
  font-size: var(--ictech-btn-size);
  font-weight: var(--ictech-btn-weight);
  line-height: 1.2;
  letter-spacing: .02em;
  text-decoration: none !important;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.ictech-btn:not(.ictech-header__account-btn),
.ictech-btn--primary:not(.ictech-header__account-btn) {
  border: 0;
  background: var(--ictech-btn-bg);
  color: #fff !important;
}
.ictech-btn:not(.ictech-header__account-btn):hover,
.ictech-btn--primary:not(.ictech-header__account-btn):hover {
  background: var(--ictech-btn-bg-hover);
  color: #fff !important;
  box-shadow: var(--ictech-btn-shadow);
}

.ictech-btn--ghost {
  background: #fff;
  color: var(--ictech-btn-bg) !important;
  border: 1.5px solid var(--ictech-btn-bg);
}
.ictech-btn--ghost:hover {
  background: var(--ictech-btn-bg);
  color: #fff !important;
  border-color: var(--ictech-btn-bg);
  box-shadow: var(--ictech-btn-shadow);
}

.ictech-btn--ghost-on-dark {
  background: transparent;
  color: #fff !important;
  border: 1.5px solid rgba(255, 255, 255, .35);
}
.ictech-btn--ghost-on-dark:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff !important;
  border-color: #fff;
  box-shadow: none;
}

/* WooCommerce / Blocksy / Gutenberg — same recipe, no generic [type=submit] */
:is(
  .button,
  .ct-button,
  .woocommerce-button,
  .woocommerce-Button,
  .wp-element-button,
  .wp-block-button__link,
  .checkout-button,
  .wc-block-components-button:not(.is-link):not(.text):not(.outlined):not(.is-style-outline),
  .ictech-btn--primary:not(.ictech-header__account-btn),
  .ictech-slider__cta,
  .ictech-card__cart:not(.ictech-card__cart--view),
  .ictech-page__btn--primary,
  .ab-cta__btn--primary
) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: 44px;
  padding: var(--ictech-btn-pad) !important;
  border: 0;
  border-radius: var(--ictech-btn-radius) !important;
  background: var(--ictech-btn-bg) !important;
  color: #fff !important;
  font-size: var(--ictech-btn-size) !important;
  font-weight: var(--ictech-btn-weight) !important;
  line-height: 1.2;
  letter-spacing: .02em;
  text-decoration: none !important;
  box-shadow: none;
  transform: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

:is(
  .button,
  .ct-button,
  .woocommerce-button,
  .woocommerce-Button,
  .wp-element-button,
  .wp-block-button__link,
  .checkout-button,
  .wc-block-components-button:not(.is-link):not(.text):not(.outlined):not(.is-style-outline),
  .ictech-btn--primary:not(.ictech-header__account-btn),
  .ictech-slider__cta,
  .ictech-card__cart:not(.ictech-card__cart--view),
  .ictech-page__btn--primary,
  .ab-cta__btn--primary
):hover {
  background: var(--ictech-btn-bg-hover) !important;
  color: #fff !important;
  box-shadow: var(--ictech-btn-shadow);
  transform: none;
  filter: none;
}

:is(
  .ictech-btn,
  .ictech-btn--primary,
  .ictech-btn--ghost,
  .ictech-btn--ghost-on-dark,
  .button,
  .ct-button,
  .woocommerce-button,
  .wp-element-button,
  .wp-block-button__link,
  .checkout-button,
  .wc-block-components-button:not(.is-link),
  .ictech-slider__cta,
  .ictech-card__cart,
  .ictech-section__more-btn,
  .ictech-header__account-btn
):focus-visible {
  outline: none;
  box-shadow: var(--ictech-btn-focus);
}

:is(
  .ictech-btn,
  .button,
  .ct-button,
  .woocommerce-button,
  .wp-element-button,
  .wc-block-components-button
):disabled,
:is(.button, .woocommerce button.button).disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Outlined / secondary */
:is(
  .ictech-btn--ghost,
  .ictech-section__more-btn,
  .ictech-header__account-btn:not(.ictech-header__account-btn--primary),
  .ct-button-ghost,
  .button.wc-backward,
  .return-to-shop .button,
  .coupon .button,
  .actions button[name="update_cart"],
  .woocommerce-cart-form button[name="update_cart"],
  .added_to_cart,
  .wp-block-button.is-style-outline .wp-block-button__link,
  .wp-block-button.is-style-outline .wp-element-button,
  .wc-block-components-button.outlined,
  .wc-block-components-button.is-style-outline
) {
  background: #fff !important;
  color: var(--ictech-btn-bg) !important;
  border: 1.5px solid var(--ictech-btn-bg) !important;
  box-shadow: none;
}

:is(
  .ictech-btn--ghost,
  .ictech-section__more-btn,
  .ictech-header__account-btn:not(.ictech-header__account-btn--primary),
  .ct-button-ghost,
  .button.wc-backward,
  .return-to-shop .button,
  .coupon .button,
  .actions button[name="update_cart"],
  .woocommerce-cart-form button[name="update_cart"],
  .added_to_cart,
  .wp-block-button.is-style-outline .wp-block-button__link,
  .wp-block-button.is-style-outline .wp-element-button,
  .wc-block-components-button.outlined,
  .wc-block-components-button.is-style-outline
):hover {
  background: var(--ictech-btn-bg) !important;
  color: #fff !important;
  border-color: var(--ictech-btn-bg) !important;
  box-shadow: var(--ictech-btn-shadow);
}

:is(
  .ictech-btn--ghost-on-dark,
  .ictech-page__btn--ghost,
  .ab-cta__btn--ghost
) {
  background: transparent !important;
  color: #fff !important;
  border: 1.5px solid rgba(255, 255, 255, .35) !important;
  box-shadow: none;
}
:is(
  .ictech-btn--ghost-on-dark,
  .ictech-page__btn--ghost,
  .ab-cta__btn--ghost
):hover {
  background: rgba(255, 255, 255, .08) !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none;
}

/* Shop cards: add-to-cart full width; "View cart" is outlined, not a second primary */
.woocommerce ul.products li.product .button,
.ct-woo-card-actions .button,
.ictech-card__cart {
  width: 100%;
}
.woocommerce ul.products li.product .added_to_cart,
.ct-woo-card-actions .added_to_cart {
  width: 100%;
  margin-top: 8px;
}

/* Checkout place-order: compact CTA, not a page-wide bar */
body .wc-block-components-checkout-place-order-button {
  width: 100%;
  max-width: 420px;
  min-height: 48px !important;
  margin-inline: auto;
}

/* Compact notice actions (must beat the !important padding above) */
:is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner)
:is(.button, .wp-element-button, .wc-block-components-button) {
  min-height: 36px !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
}

/* Utility / icon controls: full visual reset so they never inherit CTA chrome */
:is(
  .show-password-input,
  .woocommerce a.remove,
  .quantity .plus,
  .quantity .minus,
  .quantity button,
  .wc-block-components-quantity-selector button,
  .wc-block-components-quantity-selector__button,
  .wc-block-components-notice-banner__dismiss,
  button.reset_variations,
  .pswp button
) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: transparent !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  letter-spacing: normal;
  box-shadow: none !important;
  transform: none !important;
  filter: none;
}

.show-password-input {
  width: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
}

/* —— Forms (Woo / Blocksy fields only, not every select on the page) —— */
:is(
  .woocommerce select,
  .woocommerce textarea,
  .woocommerce form .form-row input.input-text,
  .woocommerce form .form-row textarea,
  .woocommerce form .form-row select,
  .woocommerce-Input,
  .woocommerce-Input--text,
  .woocommerce input.input-text,
  .select2-container--default .select2-selection--single
) {
  border-radius: var(--ictech-field-radius) !important;
}

:is(
  .woocommerce form .form-row input.input-text,
  .woocommerce form .form-row textarea,
  .woocommerce-Input,
  .woocommerce input.input-text,
  .woocommerce-ordering select
):focus {
  border-color: var(--ictech-primary, #2937E9);
  outline: none;
  box-shadow: var(--ictech-btn-focus);
}

.woocommerce-ordering select {
  border-radius: var(--ictech-btn-radius) !important;
  font-weight: 600;
}

/* —— Pagination —— */
:is(.woocommerce-pagination, .ct-pagination) .page-numbers {
  border-radius: var(--ictech-btn-radius) !important;
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
:is(.woocommerce-pagination, .ct-pagination) .page-numbers.current,
:is(.woocommerce-pagination, .ct-pagination) a.page-numbers:hover,
:is(.woocommerce-pagination, .ct-pagination) a.page-numbers:focus-visible {
  background: var(--ictech-btn-bg) !important;
  color: #fff !important;
}

/* —— Notices —— */
:is(
  .woocommerce-message,
  .woocommerce-info,
  .woocommerce-error,
  .woocommerce-noreviews,
  .wc-block-components-notice-banner
) {
  border-radius: var(--ictech-field-radius) !important;
}

/* —— Account navigation: rounded items, no clipped pills —— */
.ct-acount-nav {
  overflow: visible;
  border-radius: 14px;
}
.woocommerce-MyAccount-navigation ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  overflow: visible;
  border-radius: 0;
}
.woocommerce-MyAccount-navigation li:not(:last-child) a {
  border-bottom: 0;
}
.woocommerce-MyAccount-navigation a {
  border-radius: 10px;
  height: auto;
  min-height: 44px;
  padding: 10px 14px;
}
.woocommerce-MyAccount-navigation a:focus-visible {
  outline: none;
  box-shadow: var(--ictech-btn-focus);
}

/* Quantity field */
.quantity .qty,
.wc-block-components-quantity-selector input {
  border-radius: 10px !important;
}

/* Shared catalog / product breadcrumbs */
.ictech-catalog-crumbs {
  padding: 14px 0 0;
}
.ictech-catalog-crumbs__box {
  background: #fff;
  border: 1px solid #e8eef6;
  border-radius: 16px;
  padding: 10px 16px;
}
.ictech-catalog-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #64748b;
}
.ictech-catalog-crumbs li {
  display: flex;
  align-items: center;
  min-width: 0;
}
.ictech-catalog-crumbs li:last-child {
  max-width: 100%;
}
.ictech-catalog-crumbs__sep {
  display: grid;
  place-items: center;
  margin: 0 8px;
  color: #94a3b8;
}
.ictech-catalog-crumbs__sep svg {
  width: 12px;
  height: 12px;
  display: block;
  transform: rotate(-90deg);
}
.ictech-catalog-crumbs a {
  color: #0B1F3A;
  text-decoration: none;
  font-weight: 600;
}
.ictech-catalog-crumbs a:hover {
  color: var(--ictech-primary, #2937E9);
}
.ictech-catalog-crumbs [aria-current="page"] {
  color: #64748b;
  font-weight: 600;
  display: block;
  min-width: 0;
  max-width: min(100%, 52ch);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.single-product .ct-breadcrumbs {
  display: none !important;
}

/* Shared product cards (home + shop) */
.ictech-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eef0f3;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
  padding: 12px 12px 12px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-width: 0;
  transition: box-shadow .2s, transform .2s;
}
.ictech-card:hover {
  box-shadow: 0 10px 26px rgba(15, 23, 42, .1);
  transform: translateY(-2px);
}
.ictech-card.is-hidden { display: none; }
.ictech-card__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  min-height: 22px;
  margin-bottom: 6px;
}
.ictech-card__brand {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #1428a0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ictech-card__brand[data-brand="Apple"] { color: #111; }
.ictech-card__brand[data-brand="Samsung"] { color: #1428a0; }
.ictech-card__brand[data-brand="Xiaomi"] { color: #ff6900; }
.ictech-card__brand[data-brand="Huawei"] { color: #cf0a2c; }
.ictech-card__brand[data-brand="Google"] { color: #4285f4; }
.ictech-card__badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  white-space: nowrap;
}
.ictech-card--deal .ictech-card__badge {
  background: #eef0ff;
  color: var(--ictech-primary, #2937E9);
  border-color: #c7cdff;
}
.ictech-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  margin: 2px 0 10px;
  background: #f8fafc;
  border-radius: 8px;
  overflow: hidden;
}
.ictech-card__media img {
  max-height: 108px;
  max-width: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}
.ictech-card__title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: #111;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ictech-card__title a { color: inherit; text-decoration: none; }
.ictech-card__title a:hover { color: var(--ictech-cyan, #00A8E8); }
.ictech-card__price-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ictech-card__price {
  font-size: 13px;
  font-weight: 800;
  color: var(--ictech-navy, #0B1F3A);
}
.ictech-card__price del { opacity: .55; font-weight: 600; margin-right: 4px; }
.ictech-card__cart {
  width: 100%;
  font-size: 13px;
}
.ictech-card__oos {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #64748b;
}

/* Add-to-cart bottom toast */
.ictech-cart-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(120%);
  z-index: 100000;
  max-width: min(520px, calc(100vw - 32px));
  pointer-events: none;
  opacity: 0;
  transition: transform .28s ease, opacity .28s ease;
}
.ictech-cart-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.ictech-cart-toast__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #0B1F3A;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .35);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.ictech-cart-toast__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}
.ictech-cart-toast__msg {
  flex: 1;
  min-width: 0;
}
.ictech-cart-toast__cart {
  flex-shrink: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ictech-cart-toast__cart:hover { color: #bfdbfe; }
.ictech-cart-toast__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.75);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.ictech-cart-toast__close:hover { color: #fff; }

.ictech-card__cart.loading { opacity: .7; pointer-events: none; }

/* Hide top add-to-cart success banners (toast replaces them). Keep errors/info. */
body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-message {
  display: none !important;
}

/* Hide Woo's extra "View cart" link next to card ATC */
.ictech-card a.added_to_cart,
.ictech-card__price-row a.added_to_cart,
li.ictech-product-card a.added_to_cart,
li.product a.added_to_cart.wc-forward {
  display: none !important;
}

/* Shop / related / upsell product grid — same cards as homepage */
ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}
@media (max-width: 1100px) {
  ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
ul.products::before,
ul.products::after {
  display: none !important;
  content: none !important;
}
ul.products li.product,
ul.products li.ictech-product-card {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
}
ul.products li.product .ictech-card {
  flex: 1;
  height: 100%;
}
ul.products li.product > figure,
ul.products li.product > .ct-woo-card-actions,
ul.products li.product > .price:not(.ictech-card__price),
ul.products li.product > .button:not(.ictech-btn),
ul.products li.product > .woocommerce-loop-product__title {
  display: none !important;
}
