/* Sepahan 2.3.0 final frontend hardening. Version intentionally remains 2.3.0. */

/* Pro Elementor widgets: never leak theme/plugin notices into visual widgets. */
.elementor-widget[class*="elementor-widget-sepahan"] .woocommerce-message,
.elementor-widget[class*="elementor-widget-sepahan"] .woocommerce-info,
.elementor-widget[class*="elementor-widget-sepahan"] .woocommerce-error,
.elementor-widget[class*="elementor-widget-sepahan"] .elementor-alert,
.elementor-widget[class*="elementor-widget-sepahan"] .notice,
.elementor-widget[class*="elementor-widget-sepahan"] .warning,
.elementor-widget[class*="elementor-widget-sepahan"] .sepahan-notice,
.elementor-widget[class*="elementor-widget-sepahan"] .sepahan-warning,
.elementor-widget-sepahan_about_pro .woocommerce-message,
.elementor-widget-sepahan_about_pro .woocommerce-info,
.elementor-widget-sepahan_about_pro .woocommerce-error{display:none!important}

/* Related products — keep price and rating in normal flow instead of absolute
   positioning inherited from older mobile patches. */
body.single-product .sepahan-nikan-related ul.products{min-width:0!important}
body.single-product .sepahan-nikan-related li.product{min-width:0!important;box-sizing:border-box!important}
body.single-product .sepahan-nikan-related .sepahan-product-body{min-width:0!important;overflow:visible!important}
@media(max-width:767px){
  html body.single-product .sepahan-nikan-related ul.products{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  html body.single-product .sepahan-nikan-related ul.products>li.product{width:auto!important;max-width:none!important;margin:0!important;min-width:0!important}
  html body.single-product .sepahan-nikan-related li.product .sepahan-product-meta-row{position:static!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:"price rating"!important;align-items:end!important;gap:7px!important;width:100%!important;min-height:48px!important;padding:0!important;overflow:visible!important;direction:ltr!important}
  html body.single-product .sepahan-nikan-related li.product .sepahan-product-price,
  html body.single-product .sepahan-nikan-related li.product .sepahan-price-normalized,
  html body.single-product .sepahan-nikan-related li.product .sepahan-product-price-single{grid-area:price!important;position:static!important;inset:auto!important;transform:none!important;width:auto!important;max-width:100%!important;min-width:0!important;margin:0!important;align-self:end!important;justify-self:start!important;overflow-wrap:anywhere!important}
  html body.single-product .sepahan-nikan-related li.product .sepahan-product-rating{grid-area:rating!important;position:static!important;inset:auto!important;transform:none!important;margin:0!important;justify-self:end!important;align-self:end!important;min-width:0!important;max-width:100%!important;white-space:nowrap!important}
  html body.single-product .sepahan-nikan-related li.product .star-rating{font-size:11px!important;line-height:1!important;max-width:76px!important}
}
@media(max-width:340px){html body.single-product .sepahan-nikan-related ul.products{grid-template-columns:1fr!important}}

/* Reviews/comments: restrained editorial cards + structured form. */
body.single-product .sepahan-nikan-tabs{margin-top:28px!important}
body.single-product .sepahan-nikan-tabs .woocommerce-tabs{border:1px solid #e5e7eb!important;border-radius:14px!important;background:#fff!important;box-shadow:0 3px 16px rgba(15,23,42,.045)!important;overflow:hidden!important}
body.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs{display:flex!important;gap:4px!important;margin:0!important;padding:8px!important;background:#f7f8fa!important;border-bottom:1px solid #e5e7eb!important;overflow-x:auto!important;scrollbar-width:none}
body.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs::-webkit-scrollbar{display:none}
body.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs:before{display:none!important}
body.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs li{flex:0 0 auto!important;margin:0!important;padding:0!important;border:0!important;border-radius:8px!important;background:transparent!important;box-shadow:none!important}
body.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs li:before,
body.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs li:after{display:none!important}
body.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs li a{display:block!important;padding:8px 13px!important;color:#5b6472!important;font-size:13px!important;font-weight:700!important;text-decoration:none!important}
body.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs li.active{background:#fff!important;box-shadow:0 1px 4px rgba(15,23,42,.08)!important}
body.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs li.active a{color:#111827!important}
body.single-product .sepahan-nikan-tabs .woocommerce-Tabs-panel{padding:22px!important;margin:0!important}
body.single-product .sepahan-nikan-tabs #reviews{display:grid!important;grid-template-columns:minmax(0,1.18fr) minmax(300px,.82fr)!important;gap:22px!important;align-items:start!important}
body.single-product .sepahan-nikan-tabs #comments,body.single-product .sepahan-nikan-tabs #review_form_wrapper{min-width:0!important}
body.single-product .sepahan-nikan-tabs #comments h2,body.single-product .sepahan-nikan-tabs #reply-title{font-size:17px!important;font-weight:800!important;color:#111827!important;margin:0 0 14px!important}
body.single-product .sepahan-nikan-tabs #reviews ol.commentlist{margin:0!important;padding:0!important;display:grid!important;gap:9px!important}
body.single-product .sepahan-nikan-tabs #reviews ol.commentlist li{margin:0!important;padding:0!important;border:0!important}
body.single-product .sepahan-nikan-tabs #reviews ol.commentlist li .comment_container{display:grid!important;grid-template-columns:46px minmax(0,1fr)!important;gap:11px!important;padding:13px!important;border:1px solid #e5e7eb!important;border-right:3px solid #3858e9!important;border-radius:10px!important;background:#fff!important;box-shadow:none!important}
body.single-product .sepahan-nikan-tabs #reviews ol.commentlist li img.avatar{position:static!important;float:none!important;width:42px!important;height:42px!important;margin:0!important;border-radius:50%!important;border:1px solid #e5e7eb!important;padding:2px!important}
body.single-product .sepahan-nikan-tabs #reviews ol.commentlist li .comment-text{margin:0!important;padding:0!important;border:0!important;min-width:0!important}
body.single-product .sepahan-nikan-tabs #reviews .meta{font-size:11px!important;color:#7c8798!important;margin-bottom:6px!important}
body.single-product .sepahan-nikan-tabs #reviews .description{font-size:13px!important;line-height:2!important;color:#374151!important}
body.single-product .sepahan-nikan-tabs #review_form_wrapper{padding:16px!important;border:1px solid #e5e7eb!important;border-radius:11px!important;background:#f8fafc!important}
body.single-product .sepahan-nikan-tabs #review_form_wrapper form{display:grid!important;gap:10px!important}
body.single-product .sepahan-nikan-tabs #review_form_wrapper p{margin:0!important}
body.single-product .sepahan-nikan-tabs #review_form_wrapper input[type=text],body.single-product .sepahan-nikan-tabs #review_form_wrapper input[type=email],body.single-product .sepahan-nikan-tabs #review_form_wrapper textarea{width:100%!important;border:1px solid #d1d5db!important;border-radius:8px!important;background:#fff!important;color:#111827!important;box-shadow:none!important;padding:9px 11px!important}
body.single-product .sepahan-nikan-tabs #review_form_wrapper textarea{min-height:120px!important;resize:vertical!important}
body.single-product .sepahan-nikan-tabs #review_form_wrapper .submit{border-radius:8px!important;min-height:40px!important;padding:8px 18px!important;box-shadow:none!important}
@media(max-width:820px){body.single-product .sepahan-nikan-tabs #reviews{grid-template-columns:1fr!important}body.single-product .sepahan-nikan-tabs .woocommerce-Tabs-panel{padding:14px!important}}

/* Dark-mode compatibility bridge for common plugin-generated surfaces. */
html.dark body .select2-container--default .select2-selection--single,
html.dark body .select2-container--default .select2-selection--multiple,
body.dark .select2-container--default .select2-selection--single,
body.dark .select2-container--default .select2-selection--multiple,
html.dark body .select2-dropdown,
body.dark .select2-dropdown,
html.dark body .wpcf7,
html.dark body .wpforms-container,
html.dark body .forminator-ui,
html.dark body .fluentform,
html.dark body .gform_wrapper,
html.dark body .dokan-dashboard-wrap,
html.dark body .dokan-store-wrap,
html.dark body .yith-wcwl-form,
html.dark body .tinv-wishlist,
html.dark body .wc-block-components-sidebar,
html.dark body .wc-block-components-order-summary,
html.dark body .wc-block-components-totals-wrapper,
body.dark .wpcf7,body.dark .wpforms-container,body.dark .forminator-ui,body.dark .fluentform,body.dark .gform_wrapper{background-color:#0f172a!important;color:#e5e7eb!important;border-color:#263449!important}
html.dark body :is(.wpcf7,.wpforms-container,.forminator-ui,.fluentform,.gform_wrapper,.dokan-dashboard-wrap,.dokan-store-wrap,.yith-wcwl-form,.tinv-wishlist,.woocommerce-checkout,.woocommerce-account) :is(input:not([type=submit]):not([type=button]),textarea,select),
body.dark :is(.wpcf7,.wpforms-container,.forminator-ui,.fluentform,.gform_wrapper,.dokan-dashboard-wrap,.dokan-store-wrap,.yith-wcwl-form,.tinv-wishlist,.woocommerce-checkout,.woocommerce-account) :is(input:not([type=submit]):not([type=button]),textarea,select),
html.dark body .select2-search__field{background:#111827!important;color:#f8fafc!important;border-color:#334155!important}
html.dark body .select2-container--default .select2-selection__rendered,html.dark body .select2-results__option,body.dark .select2-container--default .select2-selection__rendered,body.dark .select2-results__option{color:#e5e7eb!important}
html.dark body .select2-results__option--highlighted[aria-selected],body.dark .select2-results__option--highlighted[aria-selected]{background:#334155!important;color:#fff!important}
html.dark body :is(.wpcf7,.wpforms-container,.forminator-ui,.fluentform,.gform_wrapper,.dokan-dashboard-wrap,.dokan-store-wrap,.yith-wcwl-form,.tinv-wishlist,.woocommerce-checkout,.woocommerce-account) :is(label,legend,p,span:not(.button):not(.woocommerce-Price-currencySymbol),th,td),
body.dark :is(.wpcf7,.wpforms-container,.forminator-ui,.fluentform,.gform_wrapper,.dokan-dashboard-wrap,.dokan-store-wrap,.yith-wcwl-form,.tinv-wishlist,.woocommerce-checkout,.woocommerce-account) :is(label,legend,p,span:not(.button):not(.woocommerce-Price-currencySymbol),th,td){border-color:#263449;color:inherit}

/* Match redesigned reviews to dark mode too. */
html.dark body.single-product .sepahan-nikan-tabs .woocommerce-tabs,body.dark.single-product .sepahan-nikan-tabs .woocommerce-tabs,
html.dark body.single-product .sepahan-nikan-tabs #reviews ol.commentlist li .comment_container,body.dark.single-product .sepahan-nikan-tabs #reviews ol.commentlist li .comment_container{background:#0f172a!important;border-color:#263449!important;color:#e5e7eb!important}
html.dark body.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs,body.dark.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs{background:#111827!important;border-color:#263449!important}
html.dark body.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs li.active,body.dark.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs li.active{background:#1e293b!important}
html.dark body.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs li a,body.dark.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs li a{color:#aeb8c8!important}
html.dark body.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs li.active a,body.dark.single-product .sepahan-nikan-tabs .woocommerce-tabs ul.tabs li.active a,
html.dark body.single-product .sepahan-nikan-tabs #comments h2,html.dark body.single-product .sepahan-nikan-tabs #reply-title,body.dark.single-product .sepahan-nikan-tabs #comments h2,body.dark.single-product .sepahan-nikan-tabs #reply-title{color:#f8fafc!important}
html.dark body.single-product .sepahan-nikan-tabs #reviews .description,body.dark.single-product .sepahan-nikan-tabs #reviews .description{color:#cbd5e1!important}
html.dark body.single-product .sepahan-nikan-tabs #review_form_wrapper,body.dark.single-product .sepahan-nikan-tabs #review_form_wrapper{background:#111827!important;border-color:#263449!important}
html.dark body.single-product .sepahan-nikan-tabs #review_form_wrapper :is(input[type=text],input[type=email],textarea),body.dark.single-product .sepahan-nikan-tabs #review_form_wrapper :is(input[type=text],input[type=email],textarea){background:#0b1220!important;color:#f8fafc!important;border-color:#334155!important}

/* Mobile scroll-cost containment. */
@media(max-width:767px){
  html{scroll-behavior:auto!important}
  body.home .swiper,body.home .swiper-wrapper{backface-visibility:hidden}
  body.home [style*="background-attachment: fixed"],body.home .elementor-background-slideshow{background-attachment:scroll!important}
  body.home .elementor-motion-effects-container{overflow:hidden}
  body.home .sepahan-product-card,body.home .woocommerce ul.products li.product{content-visibility:visible!important;contain-intrinsic-size:auto!important}
}
