/* PanelShop — Elementor editor & preview compatibility */
.elementor-widget-panelshop_auth .panelshop-auth,
.elementor-widget-panelshop_checkout .panelshop-checkout,
.elementor-widget-panelshop_dashboard .panelshop-dashboard,
.elementor-widget-panelshop_dashboard .panelshop-elementor-inner,
.elementor-widget-panelshop_cart .panelshop-cart,
.elementor-widget-panelshop_thank_you .panelshop-thank-you,
.elementor-widget-panelshop_auth,
.elementor-widget-panelshop_checkout,
.elementor-widget-panelshop_dashboard,
.elementor-widget-panelshop_cart,
.elementor-widget-panelshop_thank_you {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.elementor-widget-panelshop_mini_cart .panelshop-mini-cart,
.elementor-widget-panelshop_mini_cart .panelshop-elementor-inner,
.elementor-widget-panelshop_mini_cart .panelshop-elementor-widget,
.elementor-widget-panelshop_mini_cart .elementor-widget-container,
.elementor-widget-panelshop_mini_cart,
.elementor-widget-panelshop_mini_account .panelshop-mini-account,
.elementor-widget-panelshop_mini_account .panelshop-elementor-inner,
.elementor-widget-panelshop_mini_account .panelshop-elementor-widget,
.elementor-widget-panelshop_mini_account .elementor-widget-container,
.elementor-widget-panelshop_mini_account,
.elementor-widget-panelshop_header_search .panelshop-header-search,
.elementor-widget-panelshop_header_search .panelshop-elementor-inner,
.elementor-widget-panelshop_header_search .panelshop-elementor-widget,
.elementor-widget-panelshop_header_search .elementor-widget-container,
.elementor-widget-panelshop_header_search {
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  min-height: 0 !important;
}

.elementor-widget-panelshop_mobile_search .panelshop-mobile-search,
.elementor-widget-panelshop_mobile_search .panelshop-elementor-inner,
.elementor-widget-panelshop_mobile_search .panelshop-elementor-widget,
.elementor-widget-panelshop_mobile_search .elementor-widget-container,
.elementor-widget-panelshop_mobile_search {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 1 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

/*
 * Compact loop widgets (price / colors)
 * Advanced → Layout width applies on {{WRAPPER}}; inner layers must fill that box.
 */
.elementor-widget-panelshop_product_price,
.elementor-widget-panelshop_product_colors {
  align-self: flex-start;
  flex-grow: 0;
  flex-shrink: 0;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Default = fit content until Advanced → Width is changed */
.elementor-widget-panelshop_product_price:not([class*="__width-"]),
.elementor-widget-panelshop_product_colors:not([class*="__width-"]) {
  width: fit-content;
}

/* BC: inner container fills widget when optimized markup is off */
.elementor-widget-panelshop_product_price .elementor-widget-container,
.elementor-widget-panelshop_product_colors .elementor-widget-container {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.elementor-widget-panelshop_product_price .panelshop-product-price-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.elementor-widget-panelshop_product_colors .panelshop-product-colors-wrap {
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.elementor-widget-panelshop_product_colors .ps-product-colors {
  width: auto;
  max-width: 100%;
}

.elementor-widget-panelshop_product_card_meta,
.elementor-widget-panelshop_product_card_meta .elementor-widget-container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}

.elementor-widget-panelshop_product_attributes {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-self: stretch;
  flex-grow: 1;
  box-sizing: border-box;
}

.elementor-widget-panelshop_product_attributes .elementor-widget-container {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.elementor-widget-panelshop_product_card_meta .elementor-widget-container {
  display: flex;
  direction: rtl;
}

.elementor-widget-panelshop_product_single_actions,
.elementor-widget-panelshop_product_card_wishlist {
  width: fit-content !important;
  max-width: 100% !important;
}

.elementor-widget-panelshop_product_single_actions .elementor-widget-container,
.elementor-widget-panelshop_product_card_wishlist .elementor-widget-container {
  width: fit-content !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

.elementor-widget-panelshop_product_single_actions .panelshop-product-single-actions-wrap,
.elementor-widget-panelshop_product_card_wishlist .panelshop-product-card-wishlist-wrap {
  width: fit-content;
  max-width: 100%;
}

@media (max-width: 768px) {
  .elementor-widget-panelshop_auth,
  .elementor-widget-panelshop_checkout,
  .elementor-widget-panelshop_dashboard,
  .elementor-widget-panelshop_cart,
  .elementor-widget-panelshop_thank_you,
  .elementor-widget-panelshop_dashboard .e-con,
  .elementor-widget-panelshop_dashboard .e-con-inner {
    overflow-x: clip;
    max-width: 100%;
  }
}

@media (max-width: 410px) {
  .elementor-widget-panelshop_dashboard .elementor-widget-container,
  .elementor-widget-panelshop_dashboard .elementor-element,
  .elementor-widget-panelshop_dashboard .e-con,
  .elementor-widget-panelshop_dashboard .e-con-inner,
  .elementor-widget-panelshop_dashboard .e-con > .e-con-inner {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: clip;
  }

  .elementor-widget-panelshop_dashboard .panelshop-dashboard,
  .elementor-widget-panelshop_dashboard .panelshop-elementor-inner {
    width: 100% !important;
    max-width: 100% !important;
  }
}

.elementor-widget-panelshop_dashboard .ps-dashboard-layout,
.elementor-widget-panelshop_dashboard .ps-dashboard-shell,
.elementor-widget-panelshop_dashboard .ps-dashboard-inner,
.elementor-widget-panelshop_dashboard .ps-dashboard-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.panelshop-elementor-inner {
  width: 100%;
  min-height: 40px;
}

.panelshop-elementor-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 200px;
  padding: 32px 24px;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  text-align: center;
  color: #64748b;
}

.panelshop-elementor-placeholder i {
  font-size: 40px;
  color: #2563eb;
}

.panelshop-elementor-placeholder strong {
  font-size: 16px;
  color: #1e293b;
}

.panelshop-elementor-placeholder span {
  font-size: 12px;
}

.panelshop-elementor-disabled {
  padding: 20px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  color: #92400e;
  text-align: center;
  font-size: 13px;
}

.elementor-editor-active .panelshop-checkout-step[style*="display:none"] {
  display: block !important;
  opacity: 0.45;
  pointer-events: none;
  margin-bottom: 12px;
}

.elementor-editor-active #ps-checkout-step-2,
.elementor-editor-active #ps-checkout-step-3 {
  display: block !important;
  opacity: 0.35;
}
