/*
 * MEROSI NEXT — staging design system for PrestaShop 1.6 / electron_ipresta
 * Version 0.9.0-preview
 * Keep Bootstrap 3 for legacy dependencies; Bootstrap 5.3.6 opt-in isolated in css/vendor.
 * Scope all rules to body.merosi-next-theme for safe rollback.
 */
body.merosi-next-theme {
  --mn-ink:#263d54;
  --mn-ink-light:#53677b;
  --mn-outline:#c9def1;
  --mn-surface:#f4f9ff;
  --mn-surface-soft:#f9fcff;
  --mn-green:#52745f;
  --mn-red:#8b242a;
  --mn-red-hover:#751d23;
  --mn-radius:16px;
  color:var(--mn-ink);
  background-color:#fff;
  font-family:IRANSans,IRANSansWeb,Tahoma,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
body.merosi-next-theme :where(button,input,select,textarea) { font-family:inherit; }
body.merosi-next-theme :where(a,button,input,select,textarea) { -webkit-tap-highlight-color:transparent; }
body.merosi-next-theme :where(a,button,input,select,textarea):focus-visible {
  outline:2px solid #6ca4d4;outline-offset:2px;
}
body.merosi-next-theme :where(img) { max-width:100%; }
body.merosi-next-theme :where(.page-heading,.page-subheading) {
  border-color:#e1ecf5;color:var(--mn-ink);font-weight:700;line-height:1.65;
}
body.merosi-next-theme .page-heading {font-size:24px;}
body.merosi-next-theme :where(.price,.our_price_display,#our_price_display) {color:var(--mn-green);}
body.merosi-next-theme :where(.button,.btn,.exclusive,.button-medium) {
  transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease;
}
body.merosi-next-theme .btn:focus {box-shadow:0 0 0 3px rgba(130,174,210,.18);}

/* Header + navigation: don't move or replace existing module hooks. */
body.merosi-next-theme #header { background:#fff; }
body.merosi-next-theme #header :where(.nav,.bar,.mobile-bar) { border-color:#e3edf5; }
body.merosi-next-theme #header .logo {max-height:90px;object-fit:contain;}
body.merosi-next-theme #header :where(input[type=search],input.search_query,input[name=search_query]) {
  border:1px solid var(--mn-outline);border-radius:13px;background:var(--mn-surface-soft);
  color:var(--mn-ink);height:45px;box-shadow:none;
}
body.merosi-next-theme #header :where(input[type=search],input.search_query,input[name=search_query]):focus {
  border-color:#85b4dc;box-shadow:0 0 0 3px rgba(124,179,223,.12);
}
body.merosi-next-theme :where(.breadcrumb,.breadcrumb a) {color:#67819a;}
body.merosi-next-theme .breadcrumb {border-bottom:1px solid #e4ecf4;padding-block:12px;}

/* Product cards – compatible with typical PS1.6 product_list markup. */
body.merosi-next-theme ul.product_list > li .product-container,
body.merosi-next-theme .product_list.grid > li .product-container {
  border:1px solid #e3ecf4;border-radius:16px;background:#fff;
  box-shadow:0 4px 17px rgba(45,78,106,.045);
  overflow:hidden;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
body.merosi-next-theme ul.product_list > li .product-container:hover {
  border-color:#cbdfee;box-shadow:0 7px 21px rgba(45,78,106,.08);transform:translateY(-1px);
}
body.merosi-next-theme ul.product_list > li .product-container .product-name {
  font-weight:700;color:var(--mn-ink);line-height:1.85;
}
body.merosi-next-theme ul.product_list > li .product-container .content_price,
body.merosi-next-theme ul.product_list > li .product-container .price {
  font-weight:700;color:var(--mn-green);
}
body.merosi-next-theme .product_list .product-image-container {background:#fff;}
body.merosi-next-theme .product_list img {object-fit:contain;}

/* Product detail – keep native attribute select + quantity/change events. */
body.merosi-next-theme#product .pb-center-column h1 {
  color:#243346;font-size:clamp(24px,2.4vw,31px);line-height:1.65;font-weight:800;
}
body.merosi-next-theme#product :where(#our_price_display,.our_price_display) {
  font-size:clamp(21px,1.8vw,25px);font-weight:800;color:var(--mn-green);
}
body.merosi-next-theme#product #attributes .attribute_fieldset {margin-block:0 15px;border:0;}
body.merosi-next-theme#product #attributes .attribute_label {
  display:block;float:none;color:var(--mn-ink);font-size:14px;font-weight:700;margin:0 0 7px;
}
body.merosi-next-theme#product #attributes select,
body.merosi-next-theme#product #attributes .attribute_select {
  min-height:48px;border:1px solid var(--mn-outline);border-radius:13px;
  background-color:var(--mn-surface);color:var(--mn-ink);
  font-size:15px;font-weight:700;box-shadow:none;
}
body.merosi-next-theme#product #attributes select:focus {border-color:#88b5df;}
body.merosi-next-theme#product #add_to_cart .exclusive,
body.merosi-next-theme#product #add_to_cart button {
  border-radius:12px;background:var(--mn-red);border-color:var(--mn-red);
  color:#fff;font-weight:700;text-shadow:none;
}
body.merosi-next-theme#product #add_to_cart .exclusive:hover,
body.merosi-next-theme#product #add_to_cart button:hover {
  background:var(--mn-red-hover);border-color:var(--mn-red-hover);
}
body.merosi-next-theme#product :where(#quantity_wanted,.quantity_wanted) {
  border:1px solid var(--mn-outline);border-radius:10px;color:var(--mn-ink);
  background:var(--mn-surface);text-align:center;
}
body.merosi-next-theme#product :where(.pb-left-column .image-block,.pb-left-column #image-block) img {border-radius:12px;}

/* Cart page: safe table restyling, no changes to product/customization DOM. */
body.merosi-next-theme #order-detail-content.table-responsive {overflow-x:auto;}
body.merosi-next-theme #cart_summary {
  border:1px solid #e0eaf2;border-collapse:separate;border-spacing:0;
  border-radius:14px;overflow:hidden;background:#fff;
}
body.merosi-next-theme #cart_summary th {
  background:var(--mn-surface);color:var(--mn-ink);font-weight:700;
  border-color:#e2edf5;padding:14px 10px;
}
body.merosi-next-theme #cart_summary td {
  border-color:#edf2f6;vertical-align:middle;padding:13px 10px;
}
body.merosi-next-theme #cart_summary .cart_product img {border-radius:9px;max-width:90px;}
body.merosi-next-theme #cart_summary .product-name {font-weight:700;color:var(--mn-ink);}
body.merosi-next-theme #cart_summary .cart_quantity_input {
  border:1px solid var(--mn-outline);background:var(--mn-surface);border-radius:9px;
  color:var(--mn-ink);min-height:37px;text-align:center;
}
body.merosi-next-theme #cart_summary .cart_quantity_button .btn {
  border:1px solid var(--mn-outline);background:#fff;border-radius:8px;
}
body.merosi-next-theme #cart_summary #total_price,
body.merosi-next-theme #cart_summary .cart_total_price #total_price {
  color:var(--mn-green);font-weight:800;
}
body.merosi-next-theme :where(#discount_name,#cart_voucher input[type=text],#cart_voucher input[type=search]) {
  box-sizing:border-box;min-width:180px;max-width:100%;height:45px;
  background:var(--mn-surface);border:1px solid var(--mn-outline);
  border-radius:10px;padding-inline:12px;color:var(--mn-ink);
}

/* Quick order / checkout steps. All radio inputs and module hooks stay native. */
body.merosi-next-theme #order-opc .page-heading,
body.merosi-next-theme #order-opc h2,
body.merosi-next-theme #order-opc h3 {color:var(--mn-ink);}
body.merosi-next-theme :where(#opc_new_account,#opc_account,#opc_delivery_methods,#HOOK_PAYMENT,#opc_payment_methods,
#address_delivery,#address_invoice,#carrier_area) {
  border-color:#dce9f3;
}
body.merosi-next-theme #order-opc .opc-main-block,
body.merosi-next-theme #order-opc .address,
body.merosi-next-theme #order-opc .delivery_option,
body.merosi-next-theme .delivery_options .delivery_option {
  border-radius:12px;border-color:#dce9f3;background-color:#fff;
}
body.merosi-next-theme #order-opc :where(input[type=text],input[type=email],input[type=tel],select,textarea),
body.merosi-next-theme :where(#address_delivery,#address_invoice) select {
  border:1px solid var(--mn-outline);border-radius:11px;max-width:100%;
  min-height:41px;color:var(--mn-ink);background:#fff;box-shadow:none;
}
body.merosi-next-theme #order-opc input[type=checkbox],
body.merosi-next-theme #order-opc input[type=radio] {accent-color:#357da5;}
body.merosi-next-theme .delivery_options table {width:100%;}
body.merosi-next-theme .delivery_options .delivery_option {margin-bottom:12px;}
body.merosi-next-theme .delivery_options td {
  border-color:#ecf1f6;vertical-align:middle;padding:12px;
}
body.merosi-next-theme .delivery_options .delivery_option_logo img {max-width:80px;height:auto;}
body.merosi-next-theme #HOOK_PAYMENT .payment_module {
  border:1px solid #dce9f3;border-radius:12px;overflow:hidden;margin:0 0 12px;
}
body.merosi-next-theme #HOOK_PAYMENT .payment_module > a,
body.merosi-next-theme #HOOK_PAYMENT .payment_module a.payment_module,
body.merosi-next-theme #HOOK_PAYMENT .payment_module > form {
  background:#f9fcff;border:0;border-radius:12px;color:var(--mn-ink);
}
body.merosi-next-theme #HOOK_PAYMENT .payment_module:hover {border-color:#bad8ef;}
body.merosi-next-theme #HOOK_PAYMENT img {object-fit:contain;max-height:70px;}
body.merosi-next-theme :where(.cart_navigation .button,.cart_navigation .button-medium) {
  border-radius:12px;
}

/* Shared small details. */
body.merosi-next-theme .pagination :where(a,span),
body.merosi-next-theme .pagination li > a {
  border-radius:9px;border-color:#d7e5f0;color:var(--mn-ink);
}
body.merosi-next-theme :where(.alert.alert-info,.alert.alert-warning,.alert.alert-success) {
  border-radius:12px;padding:12px 16px;line-height:1.8;
}
body.merosi-next-theme .alert-info {background:#edf6ff;border-color:#c7e1f5;color:#2b5a7d;}
body.merosi-next-theme .alert-warning {background:#fffaec;border-color:#f4e6bd;color:#76622e;}
body.merosi-next-theme .alert-success {background:#eef8f3;border-color:#cbe5d5;color:#3d7054;}
body.merosi-next-theme #footer {border-top:1px solid #e2ebf3;background:#f8fbff;}

@media (max-width:767px) {
  body.merosi-next-theme .page-heading {font-size:20px;}
  body.merosi-next-theme#product .pb-center-column h1 {font-size:23px;line-height:1.6;}
  body.merosi-next-theme#product :where(#our_price_display,.our_price_display) {font-size:21px;}
  body.merosi-next-theme ul.product_list > li .product-container {border-radius:12px;}
  body.merosi-next-theme #order-detail-content.table-responsive {max-width:100%;}
  body.merosi-next-theme #cart_summary {min-width:700px;}
  body.merosi-next-theme #order-opc :where(input[type=text],input[type=email],input[type=tel],select,textarea) {width:100%;}
  body.merosi-next-theme #HOOK_PAYMENT .payment_module {margin-bottom:10px;}
  body.merosi-next-theme #HOOK_PAYMENT img {max-width:70px;}
}
@media (prefers-reduced-motion: reduce) {
  body.merosi-next-theme ul.product_list > li .product-container,
  body.merosi-next-theme :where(.btn,.button,.exclusive) {transition:none;transform:none!important;}
}

/* MEROSI Next FontFix v1.1 — source: already-installed licensed fonts in electron_ipresta. */
@font-face {
  font-family: 'IRANSans';
  src: url('../../electron_ipresta/fonts/iransans/num/IRANSansWeb.woff2') format('woff2'),
       url('../../electron_ipresta/fonts/iransans/num/IRANSansWeb.woff') format('woff');
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSans';
  src: url('../../electron_ipresta/fonts/iransans/num/IRANSansWeb_Bold.woff2') format('woff2'),
       url('../../electron_ipresta/fonts/iransans/num/IRANSansWeb_Bold.woff') format('woff');
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSans';
  src: url('../../electron_ipresta/fonts/iransans/num/IRANSansWeb_Light.woff2') format('woff2'),
       url('../../electron_ipresta/fonts/iransans/num/IRANSansWeb_Light.woff') format('woff');
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}
body.merosi-next-theme, body.merosi-next-theme input, body.merosi-next-theme textarea,
body.merosi-next-theme select, body.merosi-next-theme button {
  font-family: 'IRANSans', Tahoma, sans-serif;
}
