@font-face {
  font-family: "BSP Vazirmatn";
  src: url("assets/fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "BSP Vazirmatn";
  src: url("assets/fonts/Vazirmatn-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "BSP Vazirmatn";
  src: url("assets/fonts/Vazirmatn-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "BSP Vazirmatn";
  src: url("assets/fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --bsp-font: "BSP Vazirmatn", "Vazirmatn", Tahoma, Arial, sans-serif;
  --bsp-section-space: 34px;
  --bsp-section-space-tight: 18px;
  --bsp-content-gap: 16px;
  --bsp-radius: 11px;
}

html,
body,
body :where(button, input, select, textarea, .elementor-widget, .woocommerce) {
  font-family: var(--bsp-font) !important;
}

body {
  font-size: 15px;
  line-height: 1.75;
}

body :where(h1, h2, h3, h4, h5, h6, .elementor-heading-title) {
  font-family: var(--bsp-font) !important;
  font-weight: 700 !important;
  line-height: 1.48 !important;
  letter-spacing: -.018em !important;
  text-wrap: balance;
}

.bsp-section .elementor-widget-heading h1,
body .elementor-widget-heading h1 {
  font-size: clamp(29px, 3.2vw, 44px) !important;
}

.bsp-section .elementor-widget-heading h2,
body .elementor-widget-heading h2 {
  font-size: clamp(23px, 2.2vw, 31px) !important;
}

.bsp-section .elementor-widget-heading h3,
body .elementor-widget-heading h3 {
  font-size: clamp(18px, 1.55vw, 22px) !important;
}

.bsp-hero-title h1 {
  max-width: 760px;
  font-size: clamp(32px, 3.7vw, 46px) !important;
  line-height: 1.5 !important;
}

.bsp-page-hero .bsp-page-title h1,
.bsp-page-hero > .elementor-widget-heading h1 {
  font-size: clamp(28px, 2.8vw, 39px) !important;
}

.bsp-form-heading h2 {
  font-size: clamp(23px, 2.3vw, 31px) !important;
}

.bsp-section,
.e-con.bsp-section,
.bsp-section.e-con {
  padding-block: var(--bsp-section-space) !important;
}

.bsp-section-tight,
.e-con.bsp-section-tight {
  padding-block: var(--bsp-section-space-tight) !important;
}

.bsp-card > .elementor-widget-container {
  padding: 17px 16px !important;
}

.bsp-card .elementor-icon-box-title,
.bsp-service-card .elementor-image-box-title,
.bsp-shopi-row :where(.title, h2, h3, .woocommerce-loop-product__title),
.bsp-shop-archive :where(.title, h2, h3, .woocommerce-loop-product__title),
body .woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 16px !important;
  line-height: 1.7 !important;
}

.bsp-lead,
.bsp-lead p {
  font-size: clamp(15px, 1.25vw, 17px) !important;
  line-height: 1.9 !important;
}

.bsp-project-form-wrap {
  max-width: 1000px;
  padding: clamp(20px, 3vw, 34px) !important;
  box-shadow: 0 18px 55px rgba(24, 57, 54, .07) !important;
}

.bsp-form-grid {
  gap: 15px !important;
}

.bsp-form-grid label > span {
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 600;
}

.bsp-form-grid :where(input:not([type="checkbox"]):not([type="file"]), select, textarea),
.woocommerce :where(input.input-text, textarea, select) {
  min-height: 45px;
  border: 1px solid #dce7e5 !important;
  border-radius: 9px !important;
  background: #fff !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

.bsp-form-grid :where(input, select, textarea):focus,
.woocommerce :where(input.input-text, textarea, select):focus {
  border-color: var(--bsp-primary) !important;
  box-shadow: 0 0 0 3px rgba(0, 166, 147, .12) !important;
}

.bsp-upload-field {
  padding: 16px !important;
  border: 1px dashed #b9d8d3 !important;
  border-radius: 11px !important;
  background: #f8fbfa !important;
}

.bsp-upload-field input[type="file"] {
  width: 100%;
  padding: 9px;
  border: 1px solid #dce7e5;
  border-radius: 8px;
  background: #fff;
}

.bsp-upload-field input[type="file"].bsp-file-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.bsp-file-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--bsp-primary) !important;
  border-radius: 8px !important;
  color: var(--bsp-primary-dark) !important;
  background: #fff !important;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.bsp-file-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.bsp-file-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  min-height: 72px;
  overflow: hidden;
  border: 1px solid var(--bsp-border);
  border-radius: 9px;
  background: #fff;
}

.bsp-file-card img,
.bsp-file-type {
  width: 58px;
  height: 72px;
  object-fit: cover;
  background: var(--bsp-soft);
}

.bsp-file-type {
  display: grid;
  place-items: center;
  color: var(--bsp-primary-dark);
  font-size: 11px;
  font-weight: 700;
}

.bsp-file-meta {
  min-width: 0;
  padding: 8px;
}

.bsp-file-meta strong,
.bsp-file-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bsp-file-meta strong { font-size: 11px; }
.bsp-file-meta small { color: #7a8785; font-size: 10px; }

.bsp-file-remove {
  position: absolute;
  inset: 4px auto auto 4px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #a93838;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.bsp-file-list.has-error { color: #a52f2f !important; }

.bsp-modal[hidden] { display: none !important; }

.bsp-modal {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.bsp-modal.is-open { opacity: 1; visibility: visible; }

.bsp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 31, 29, .66);
  backdrop-filter: blur(5px);
}

.bsp-modal-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 860px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .24);
  transform: translateY(14px) scale(.985);
  transition: transform .25s ease;
}

.bsp-modal.is-open .bsp-modal-dialog { transform: translateY(0) scale(1); }
.bsp-modal-open { overflow: hidden; }

.bsp-modal-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--bsp-border);
  border-radius: 50%;
  color: var(--bsp-ink);
  background: #fff;
  font-size: 25px;
  cursor: pointer;
}

.bsp-question-form { margin-top: 20px; }

.bsp-page-loader {
  position: fixed;
  z-index: 1000000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(247, 251, 250, .96);
  opacity: 1;
  visibility: visible;
  transition: opacity .38s ease, visibility .38s ease;
  animation: bsp-loader-safety .35s ease 8s forwards;
}

.bsp-page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.bsp-loader-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--bsp-ink);
}

.bsp-loader-card strong { font-size: 16px; }
.bsp-loader-card small { color: #75807f; font-size: 11px; }

.bsp-loader-ring {
  width: 52px;
  height: 52px;
  border: 4px solid rgba(0, 166, 147, .16);
  border-top-color: var(--bsp-primary);
  border-radius: 50%;
  animation: bsp-loader-spin .8s linear infinite;
}

@keyframes bsp-loader-spin { to { transform: rotate(360deg); } }
@keyframes bsp-loader-safety { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.woocommerce-cart-form button[name="update_cart"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 12px !important;
  padding: 9px 16px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.woocommerce-cart-form {
  align-items: flex-start !important;
}

.woocommerce-cart-form > .grow {
  align-self: flex-start !important;
  width: 100%;
  height: fit-content !important;
  min-height: 0 !important;
}

.woocommerce-cart-form .product-price,
.woocommerce-cart-form .product-subtotal,
.woocommerce-cart-form .product-price :where(.amount, bdi) {
  font-size: clamp(18px, 2vw, 23px) !important;
  line-height: 1.4 !important;
}

.woocommerce-cart-form :where(.minus, .decrease-quantity) {
  color: var(--bsp-primary-dark) !important;
  background: var(--bsp-soft) !important;
  opacity: 1 !important;
  filter: none !important;
}

.woocommerce-cart-form :where(.minus, .decrease-quantity) svg {
  fill: var(--bsp-primary-dark) !important;
  opacity: 1 !important;
}

.woocommerce-cart-form .cart_item.is-updating {
  opacity: .58;
  pointer-events: none;
}

.bsp-cart-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  margin: 18px 0 2px;
}

.bsp-cart-actions .button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 46px;
  border-radius: 9px !important;
  font-size: 14px !important;
}

.bsp-cart-continue {
  border: 1px solid var(--bsp-primary) !important;
  color: var(--bsp-primary-dark) !important;
  background: #fff !important;
}

.bsp-cart-checkout {
  color: #fff !important;
  background: var(--bsp-primary) !important;
}

.cart_totals {
  scroll-margin-top: 120px;
}

.woocommerce-shipping-calculator .shipping-calculator-form {
  gap: 10px;
  padding-top: 12px;
}

.woocommerce-shipping-calculator .form-row { margin: 0 0 10px !important; }

.woocommerce-shipping-calculator label:not(.screen-reader-text) {
  display: block;
  margin-bottom: 5px;
  color: var(--bsp-ink);
  font-size: 12px;
  font-weight: 600;
}

.woocommerce-shipping-calculator :where(input, select, .select2-container) {
  width: 100% !important;
}

.woocommerce .select2-container .select2-selection--single {
  min-height: 45px;
  border: 1px solid #dce7e5;
  border-radius: 9px;
}

.woocommerce .select2-container .select2-selection--single .select2-selection__rendered {
  padding: 7px 12px;
  line-height: 29px;
}

.woocommerce .select2-container .select2-selection--single .select2-selection__arrow { height: 43px; }

.woocommerce form .form-row.validate-required label .required,
.woocommerce form .form-row label .required,
.woocommerce-checkout .required {
  display: inline !important;
  color: #c23434 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  visibility: visible !important;
}

.bsp-live-price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid #cce7e3;
  border-radius: 10px;
  background: linear-gradient(135deg, #f4fbfa, #fff);
}

.bsp-live-price-box span { color: #667371; font-size: 12px; }
.bsp-live-price-box strong { color: var(--bsp-primary-dark); font-size: 18px; }

.bsp-error-page,
.bsp-error-page > .e-con-inner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: clamp(430px, 62vh, 680px);
  text-align: center !important;
}

.bsp-error-page :where(.elementor-widget, .elementor-widget-container, .elementor-heading-title, p, .bsp-actions) {
  align-self: center !important;
  width: 100%;
  text-align: center !important;
  justify-content: center !important;
}

.bsp-error-page .bsp-error-code {
  font-size: clamp(68px, 11vw, 118px) !important;
  line-height: 1 !important;
}

@media (max-width: 767px) {
  :root { --bsp-section-space: 24px; --bsp-section-space-tight: 14px; }
  .bsp-section .elementor-widget-heading h1,
  body .elementor-widget-heading h1 { font-size: clamp(27px, 8vw, 35px) !important; }
  .bsp-section .elementor-widget-heading h2,
  body .elementor-widget-heading h2 { font-size: 23px !important; }
  .bsp-hero-title h1 { font-size: clamp(29px, 8.5vw, 36px) !important; }
  .bsp-file-preview { grid-template-columns: 1fr; }
  .bsp-cart-actions { flex-direction: column; padding-inline: 14px; }
  .bsp-cart-actions .button { width: 100%; }
  .bsp-live-price-box { align-items: flex-start; flex-direction: column; gap: 4px; }
  .bsp-modal { padding: 10px; }
  .bsp-modal-dialog { max-height: 94vh; padding: 20px 15px; border-radius: 13px; }
  .woocommerce-cart-form .product-price,
  .woocommerce-cart-form .product-subtotal { font-size: 18px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .bsp-loader-ring { animation-duration: 1.5s; }
  .bsp-page-loader,
  .bsp-modal,
  .bsp-modal-dialog { transition-duration: .01ms !important; }
}

/* Stable global commerce state and full-screen navigation panels. */
body.bsp-panel-open { overflow: hidden !important; }

.count-items-cart.bsp-cart-count,
.bsp-header-cart .count-items-cart,
.bsp-mobile-cart .count-items-cart {
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 auto !important;
  min-width: 22px !important;
  width: auto !important;
  height: 22px !important;
  padding: 0 6px !important;
  border-radius: 7px !important;
  color: #fff !important;
  background: var(--bsp-primary) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

.item-product:not(.mini_cart_item) .quantity-card {
  opacity: 0;
  visibility: hidden;
}

.item-product:not(.mini_cart_item).active .quantity-card,
.item-product:not(.mini_cart_item) .quantity-card.active {
  bottom: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.bsp-header-cart .box-mini-cart { display: none !important; }

#mini-cart-mobile,
#menu-mobile {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10050 !important;
  display: none !important;
  flex-direction: column !important;
  width: 100vw !important;
  min-width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(12px) !important;
  background: #fff !important;
  box-shadow: none !important;
  transition: opacity .2s ease, transform .2s ease !important;
}

#mini-cart-mobile.active,
#menu-mobile.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

#mini-cart-mobile .action-close-min-cart,
#menu-mobile .action-close-menu-mobile {
  flex: 0 0 auto;
  min-height: 72px;
  padding: 18px max(20px, calc((100vw - 920px) / 2)) !important;
  border-bottom: 1px solid #e3ecea !important;
  background: #fff;
}

#mini-cart-mobile .action-close-min-cart > span,
#menu-mobile .action-close-menu-mobile > span {
  color: var(--bsp-ink) !important;
  font-size: 19px !important;
}

#mini-cart-mobile .action-close-min-cart i,
#menu-mobile .action-close-menu-mobile i {
  width: 34px !important;
  height: 34px !important;
  border-radius: 9px !important;
  font-size: 15px !important;
}

#menu-mobile .main-mobile {
  flex: 1 1 auto;
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 22px 0 40px;
  overflow: auto;
  overscroll-behavior: contain;
}

#menu-mobile .mobile_menu_ul_main {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#menu-mobile .mobile_menu_ul_main > li {
  margin: 0 !important;
  border: 1px solid #e0ebe9 !important;
  border-radius: 11px !important;
  background: #f8fbfa !important;
}

#menu-mobile .mobile_menu_ul_main > li > a {
  display: flex !important;
  align-items: center;
  min-height: 54px;
  padding: 12px 15px !important;
  color: var(--bsp-ink) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

#mini-cart-mobile > .append-mini-cart {
  flex: 1 1 auto !important;
  width: min(100% - 32px, 920px) !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 22px 0 34px !important;
  overflow: auto !important;
  overscroll-behavior: contain;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
}

#mini-cart-mobile .woocommerce-mini-cart {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content !important;
  align-content: start !important;
  align-items: start !important;
  gap: 12px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#mini-cart-mobile li.mini_cart_item {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 86px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  align-self: start !important;
  width: 100% !important;
  height: auto !important;
  min-height: 132px !important;
  max-height: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 16px !important;
  border: 1px solid #e0ebe9 !important;
  border-radius: 13px !important;
  color: var(--bsp-ink) !important;
  background: #fff !important;
}

#mini-cart-mobile li.mini_cart_item > a:not(.remove) { min-width: 0; }
#mini-cart-mobile .bsp-mini-info { display: grid; gap: 12px; min-width: 0; }
#mini-cart-mobile .bsp-mini-title {
  display: block;
  overflow: hidden;
  color: var(--bsp-ink) !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.75;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#mini-cart-mobile .bsp-mini-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#mini-cart-mobile .bsp-mini-price { color: var(--bsp-primary-dark); font-size: 13px; font-weight: 700; }
#mini-cart-mobile li.mini_cart_item img {
  display: block !important;
  width: 86px !important;
  height: 76px !important;
  object-fit: contain !important;
  border-radius: 9px;
  background: #f7faf9;
}

#mini-cart-mobile li.mini_cart_item .remove {
  top: 8px !important;
  right: 8px !important;
  left: auto !important;
  z-index: 3;
  width: 24px !important;
  height: 24px !important;
  color: #fff !important;
  line-height: 24px !important;
}

#mini-cart-mobile .quantity-card {
  display: flex !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid #dce7e5 !important;
  border-radius: 9px !important;
  background: #f8fbfa !important;
}

#mini-cart-mobile .quantity-card button { min-width: 38px; padding: 0 10px !important; }
#mini-cart-mobile .quantity-card input { min-width: 34px !important; max-width: 48px !important; background: transparent !important; }

#mini-cart-mobile .box-calc-mini-cart {
  position: sticky;
  bottom: -34px;
  display: flex !important;
  gap: 18px;
  margin-top: 18px;
  padding: 18px !important;
  border: 1px solid #dce8e6 !important;
  border-radius: 12px;
  background: rgba(255, 255, 255, .97) !important;
  box-shadow: 0 -8px 25px rgba(27, 55, 51, .06);
}

#mini-cart-mobile .bsp-mini-cart-summary > div { display: grid; gap: 5px; }
#mini-cart-mobile .bsp-mini-cart-summary > div > span { color: #6d7976; font-size: 12px; }
#mini-cart-mobile .bsp-mini-cart-summary > div > strong { color: var(--bsp-ink); font-size: 16px; }
#mini-cart-mobile .bsp-mini-cart-summary nav { display: flex; gap: 8px; }
#mini-cart-mobile .bsp-mini-cart-summary nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 9px 15px;
  border: 1px solid var(--bsp-primary);
  border-radius: 9px;
  color: var(--bsp-primary-dark) !important;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}
#mini-cart-mobile .bsp-mini-cart-summary nav .bsp-mini-checkout { color: #fff !important; background: var(--bsp-primary); }

#mini-cart-mobile .woocommerce-mini-cart__empty-message {
  display: grid !important;
  place-items: center;
  min-height: 45vh;
  margin: 0 !important;
  padding: 30px !important;
  color: #687572 !important;
  font-size: 16px !important;
}

/* Search overlay: the page fades while a clean, text-first AJAX result list remains available. */
.bsp-header-search .box-result-search-ajax,
.bsp-mobile-search .box-result-search-ajax,
#search-mobile { display: none !important; }

.bsp-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 10070;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.bsp-search-overlay.is-open { opacity: 1; visibility: visible; }
.bsp-search-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(17, 28, 27, .66);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.bsp-search-dialog {
  position: relative;
  width: min(calc(100% - 32px), 920px);
  max-height: calc(100dvh - 34px);
  margin: 17px auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 28, 25, .25);
  transform: translateY(-10px);
  transition: transform .22s ease;
}

.bsp-search-overlay.is-open .bsp-search-dialog { transform: none; }
.bsp-search-bar {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 8px 12px 8px 17px;
  border-bottom: 1px solid #dce8e6;
  background: #fff;
}

.bsp-search-bar > svg { width: 22px; fill: none; stroke: var(--bsp-primary); stroke-width: 1.8; }
.bsp-search-bar input {
  width: 100%;
  height: 46px;
  padding: 0 4px;
  border: 0 !important;
  outline: 0 !important;
  color: var(--bsp-ink);
  background: transparent !important;
  box-shadow: none !important;
  font-size: 15px;
}

.bsp-search-bar button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--bsp-primary);
  font-size: 24px;
  line-height: 1;
}

.bsp-search-content { max-height: calc(100dvh - 116px); padding: 20px; overflow: auto; }
.bsp-popular-searches { display: grid; gap: 11px; margin-bottom: 18px; }
.bsp-popular-searches > strong { color: #5e6b68; font-size: 13px; }
.bsp-popular-searches > div { display: flex; flex-wrap: wrap; gap: 8px; }
.bsp-popular-searches button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #d9e6e3;
  border-radius: 9px;
  color: #41514e;
  background: #f7fbfa;
  font-size: 12px;
  font-weight: 600;
}

.bsp-popular-searches button:hover { color: var(--bsp-primary-dark); border-color: #9fd8d0; background: #eef9f7; }
.bsp-search-status { padding: 18px; border-radius: 10px; color: #6a7774; background: #f7faf9; text-align: center; font-size: 13px; }
.bsp-search-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.bsp-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  min-height: 70px;
  padding: 13px 15px;
  border: 1px solid #e0e9e7;
  border-radius: 10px;
  color: var(--bsp-ink) !important;
  background: #fff;
  text-decoration: none !important;
}

.bsp-search-result:hover { border-color: #9cd5cd; background: #f5fbfa; }
.bsp-search-result > span { display: grid; gap: 4px; min-width: 0; }
.bsp-search-result strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.bsp-search-result small { color: #7b8885; font-size: 10px; }
.bsp-search-result > b { flex: 0 0 auto; color: var(--bsp-primary-dark); font-size: 12px; }

/* Header geometry stays deterministic on every archive and WooCommerce template. */
@media (min-width: 1181px) {
  body .elementor-location-header,
  body .bsp-elementor-header,
  body .bsp-header-shell { width: 100% !important; max-width: none !important; inset-inline: auto !important; transform: none !important; }
  body .bsp-header-desktop {
    display: block !important;
    width: min(calc(100% - 40px), var(--bsp-container)) !important;
    max-width: var(--bsp-container) !important;
    margin-inline: auto !important;
    inset-inline: auto !important;
    transform: none !important;
  }
  body .bsp-header-desktop > .e-con-inner {
    display: grid !important;
    grid-template-columns: minmax(120px,132px) minmax(126px,144px) 44px minmax(230px,360px) minmax(205px,1fr) !important;
    grid-template-areas: "cta cart account search logo" "nav nav nav nav nav" !important;
    align-items: center !important;
    justify-content: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  body .bsp-header-desktop > .e-con-inner > .elementor-element {
    position: relative !important;
    inset: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    transform: none !important;
  }
}

/* One technical article per home slide; regular knowledge archives stack correctly on phones. */
body.home .bsp-knowledge-slider {
  position: relative;
  display: block !important;
  grid-template-columns: none !important;
  width: 100%;
  padding: 0 0 34px;
  overflow: hidden;
}

body.home .bsp-knowledge-slider > .swiper-wrapper { display: flex !important; align-items: stretch; }
body.home .bsp-knowledge-slider article.swiper-slide {
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  height: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 20px !important;
  border: 1px solid #dfe9e7;
  border-radius: 14px;
  background: #fff;
}

body.home .bsp-knowledge-slider article .box-img-post { height: clamp(230px, 35vw, 390px) !important; margin-bottom: 18px !important; border-radius: 11px !important; }
.bsp-knowledge-prev,
.bsp-knowledge-next {
  position: absolute;
  top: calc(50% - 36px);
  z-index: 5;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #cfe2df;
  border-radius: 10px;
  color: var(--bsp-primary-dark);
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 61, 55, .08);
  font-size: 25px;
}
.bsp-knowledge-prev { right: 10px; }
.bsp-knowledge-next { left: 10px; }
.bsp-knowledge-pagination { position: relative !important; bottom: auto !important; margin-top: 16px; }
.bsp-knowledge-pagination .swiper-pagination-bullet-active { background: var(--bsp-primary) !important; }

/* Consistent internal spacing for card-like content. */
.bsp-page-hero > .e-con-inner { padding-inline: 24px !important; }
.bsp-shop-category-grid > a { padding: 22px !important; }
.bsp-card > .e-con-inner,
.bsp-service-card .elementor-image-box-content,
.bsp-project-card .elementor-widget-container { padding-inline: 18px !important; }
body:not(.home) .bsp-post-list article.item-blog-index {
  min-width: 0;
  padding: 16px !important;
  border: 1px solid #e0e9e7;
  border-radius: 13px;
  background: #fff;
}
body:not(.home) .bsp-post-list article.item-blog-index .box-img-post { margin-bottom: 17px !important; border-radius: 10px !important; }

/* Checkout fields and payment choices remain full-width and selectable after AJAX refreshes. */
.woocommerce-checkout #billing_state_field,
.woocommerce-checkout #billing_city_field,
.woocommerce-checkout .bsp-checkout-wide-field {
  display: block !important;
  float: none !important;
  clear: both !important;
  flex: 0 0 100% !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

.woocommerce-checkout #billing_state_field > label,
.woocommerce-checkout #billing_city_field > label {
  display: block !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 0 6px !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  color: #4e5c59 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.woocommerce-checkout #billing_state_field .woocommerce-input-wrapper,
.woocommerce-checkout #billing_city_field .woocommerce-input-wrapper,
.woocommerce-checkout #billing_state,
.woocommerce-checkout #billing_city,
.woocommerce-checkout #billing_state_field .select2-container,
.woocommerce-checkout #billing_city_field .select2-container {
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
}

.woocommerce-checkout #payment {
  display: block !important;
  min-height: 120px;
  opacity: 1 !important;
  visibility: visible !important;
}

.woocommerce-checkout #payment .wc_payment_methods {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.woocommerce-checkout #payment .wc_payment_method {
  position: relative !important;
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.woocommerce-checkout #payment .wc_payment_method > input.input-radio {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 2;
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  opacity: 0 !important;
}

.woocommerce-checkout #payment .wc_payment_method > label {
  display: flex !important;
  min-height: 142px;
  padding: 18px 14px !important;
  border: 1px solid #dfe8e6 !important;
  border-radius: 12px !important;
  background: #fff !important;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.woocommerce-checkout #payment .wc_payment_method > input:checked + label,
.woocommerce-checkout #payment .wc_payment_method.bsp-selected-gateway > label {
  border-color: var(--bsp-primary) !important;
  background: #f1faf8 !important;
  box-shadow: 0 0 0 3px rgba(0, 166, 147, .09) !important;
}

.woocommerce-checkout #payment .payment_box { width: 100% !important; padding: 12px !important; }
.woocommerce-checkout #payment .wc_payment_method > input:not(:checked) ~ .payment_box { display: none !important; }

/* Remove the theme's artificial mobile bottom gap; header actions now own those functions. */
.bsp-elementor-footer,
.bsp-elementor-footer > footer,
.bsp-footer-main,
.bsp-footer-bottom { margin-bottom: 0 !important; }

@media (max-width: 767px) {
  body { min-height: 100dvh; padding-bottom: 0 !important; }
  .access-mobile { display: none !important; }
  .bsp-elementor-footer { padding-bottom: 0 !important; }
  .bsp-footer-main { padding-bottom: 22px !important; }
  .bsp-footer-bottom { padding-bottom: calc(13px + env(safe-area-inset-bottom)) !important; }
  #menu-mobile .mobile_menu_ul_main { grid-template-columns: 1fr; }
  #mini-cart-mobile .action-close-min-cart,
  #menu-mobile .action-close-menu-mobile { min-height: 62px; padding: 14px 16px !important; }
  #mini-cart-mobile > .append-mini-cart,
  #menu-mobile .main-mobile { width: calc(100% - 28px) !important; padding-top: 15px !important; }
  #mini-cart-mobile .woocommerce-mini-cart { grid-template-columns: 1fr !important; }
  #mini-cart-mobile li.mini_cart_item { grid-template-columns: 72px minmax(0, 1fr) !important; padding: 13px !important; }
  #mini-cart-mobile li.mini_cart_item img { width: 72px !important; height: 68px !important; }
  #mini-cart-mobile .box-calc-mini-cart { bottom: -34px; flex-direction: column; align-items: stretch !important; }
  #mini-cart-mobile .bsp-mini-cart-summary nav { flex-direction: column; }
  #mini-cart-mobile .bsp-mini-cart-summary nav a { width: 100%; text-align: center; }
  .bsp-search-dialog { width: 100%; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .bsp-search-content { max-height: calc(100dvh - 62px); padding: 15px; }
  .bsp-search-results { grid-template-columns: 1fr; }
  .bsp-search-result { min-height: 66px; padding: 11px 12px; }
  body.home .bsp-knowledge-slider { padding: 0 0 32px !important; }
  body.home .bsp-knowledge-slider article.swiper-slide { padding: 14px !important; }
  body.home .bsp-knowledge-slider article .box-img-post { height: 220px !important; }
  .bsp-knowledge-prev,
  .bsp-knowledge-next { display: none; }
  body:not(.home) .bsp-post-list .list-post {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    width: 100% !important;
  }
  body:not(.home) .bsp-post-list article.item-blog-index { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 14px !important; }
  .bsp-page-hero > .e-con-inner { padding-inline: 17px !important; }
  .bsp-shop-category-grid > a { padding: 17px !important; }
}

/* 3.1.5 — deterministic page spacing and conflict-proof WooCommerce controls. */

body.home .bsp-post-list .pagination-wrap.woocommerce-pagination {
  display: none !important;
}

body.woocommerce-cart .woocommerce-cart-form .bsp-cart-actions {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 18px 0 0 !important;
  padding: 0 !important;
}

body.woocommerce-cart .bsp-cart-actions .bsp-cart-continue {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 48px !important;
  margin: 0 !important;
}

body.woocommerce-cart .bsp-cart-actions .bsp-cart-checkout {
  display: none !important;
}

body .bsp-footer-cta.e-con,
body .bsp-footer-cta {
  box-sizing: border-box !important;
  min-width: 0 !important;
  padding: 20px !important;
  overflow: hidden;
}

body .bsp-footer-cta :where(h2, h3, h4, p, a, .elementor-widget-container) {
  max-width: 100%;
  overflow-wrap: anywhere;
}

body .bsp-footer-bottom.e-con,
body .bsp-footer-bottom {
  box-sizing: border-box !important;
  padding-block: 13px !important;
  padding-inline: max(20px, calc((100% - var(--bsp-container)) / 2)) !important;
}

body :where(.bsp-card, .bsp-service-card, .bsp-project-card, .bsp-shop-category-grid > a, .item-blog-index, .item-product-archive) {
  box-sizing: border-box !important;
  min-width: 0 !important;
}

/* State and city use one visual box, rather than a styled outer box plus an overflowing Select2. */
body.woocommerce-checkout #billing_state_field,
body.woocommerce-checkout #billing_city_field {
  position: relative !important;
  display: block !important;
  align-self: start !important;
  box-sizing: border-box !important;
  grid-column: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.woocommerce-checkout #billing_state_field > label,
body.woocommerce-checkout #billing_city_field > label {
  display: none !important;
}

body.woocommerce-checkout #billing_state_field .woocommerce-input-wrapper,
body.woocommerce-checkout #billing_city_field .woocommerce-input-wrapper,
body.woocommerce-checkout #billing_state_field .select2-container,
body.woocommerce-checkout #billing_city_field .select2-container,
body.woocommerce-checkout #billing_state_field .selection,
body.woocommerce-checkout #billing_city_field .selection {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 50px !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.woocommerce-checkout #billing_state_field .select2-selection--single,
body.woocommerce-checkout #billing_city_field .select2-selection--single,
body.woocommerce-checkout #billing_state,
body.woocommerce-checkout #billing_city {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 50px !important;
  min-height: 50px !important;
  margin: 0 !important;
  border: 1px solid #dce7e5 !important;
  border-radius: 9px !important;
  color: #273039 !important;
  background: #fff !important;
  box-shadow: 0 1px 0 #e8ebf1 !important;
}

body.woocommerce-checkout #billing_state,
body.woocommerce-checkout #billing_city {
  padding: 0 14px !important;
}

body.woocommerce-checkout #billing_state_field .select2-selection__rendered,
body.woocommerce-checkout #billing_city_field .select2-selection__rendered {
  height: 48px !important;
  padding-inline: 14px 40px !important;
  color: #273039 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 48px !important;
  text-align: right !important;
}

body.woocommerce-checkout #billing_state_field .select2-selection__arrow,
body.woocommerce-checkout #billing_city_field .select2-selection__arrow {
  top: 0 !important;
  height: 48px !important;
}

@media (max-width: 1180px) {
  body .elementor-location-header .bsp-header-mobile.e-con,
  body .bsp-elementor-header .bsp-header-mobile.e-con {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 8px 16px 10px !important;
    --padding-top: 8px;
    --padding-right: 16px;
    --padding-bottom: 10px;
    --padding-left: 16px;
    --padding-inline-start: 16px;
    --padding-inline-end: 16px;
  }

  body .elementor-location-header .bsp-mobile-top.e-con,
  body .bsp-elementor-header .bsp-mobile-top.e-con {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    --padding-top: 0;
    --padding-right: 0;
    --padding-bottom: 0;
    --padding-left: 0;
  }

  body .bsp-mobile-top > :where(.bsp-mobile-menu-button, .bsp-mobile-cart, .bsp-mobile-logo),
  body :where(.bsp-mobile-menu-button, .bsp-mobile-cart) {
    position: relative !important;
    inset: auto !important;
    min-width: 0 !important;
    transform: none !important;
  }

  body .bsp-mobile-logo,
  body .bsp-mobile-logo .bsp-brand-lockup,
  body .bsp-mobile-logo .bsp-brand-lockup > span:last-child {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body .bsp-mobile-logo .bsp-brand-lockup b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 767px) {
  body .elementor-location-header .bsp-header-mobile.e-con,
  body .bsp-elementor-header .bsp-header-mobile.e-con {
    padding: 7px 14px 9px !important;
    --padding-top: 7px;
    --padding-right: 14px;
    --padding-bottom: 9px;
    --padding-left: 14px;
    --padding-inline-start: 14px;
    --padding-inline-end: 14px;
  }

  body .bsp-footer-cta.e-con,
  body .bsp-footer-cta { padding: 17px !important; }

  body .bsp-footer-bottom.e-con,
  body .bsp-footer-bottom {
    padding-top: 13px !important;
    padding-right: 20px !important;
    padding-bottom: calc(13px + env(safe-area-inset-bottom)) !important;
    padding-left: 20px !important;
  }

  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
  }

  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper > .form-row {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
}
