/* MoeinGift Public UI Foundation v5
   Final shared visual layer for public header, catalog, product, checkout and footer.
   Loaded after legacy public styles to remove cross-page inconsistencies without touching business logic. */

:root {
    --mg5-blue: #1769d5;
    --mg5-blue-2: #2f7de4;
    --mg5-blue-soft: #eef5ff;
    --mg5-navy: #102b50;
    --mg5-ink: #173556;
    --mg5-muted: #647892;
    --mg5-line: #dbe5f1;
    --mg5-line-strong: #c9d9eb;
    --mg5-bg: #f5f8fc;
    --mg5-card: #ffffff;
    --mg5-green: #13825f;
    --mg5-gold: #a96b05;
    --mg5-red: #a9343f;
    --mg5-shadow-sm: 0 8px 24px rgba(27, 67, 116, .07);
    --mg5-shadow-md: 0 18px 50px rgba(27, 67, 116, .10);
    --mg5-radius-sm: 12px;
    --mg5-radius: 16px;
    --mg5-radius-lg: 22px;
}

html {
    scroll-behavior: smooth;
    background: var(--mg5-bg);
}

html.mg-public-menu-open,
html.mg-public-menu-open body {
    overflow: hidden !important;
}

body:has(.mg-public-header) {
    background: var(--mg5-bg) !important;
    color: var(--mg5-ink);
    font-family: Vazirmatn, IRANSansX, IRANSans, Tahoma, Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body:has(.mg-public-header) button,
body:has(.mg-public-header) input,
body:has(.mg-public-header) select,
body:has(.mg-public-header) textarea {
    font-family: inherit;
}

body:has(.mg-public-header) a,
body:has(.mg-public-header) button {
    -webkit-tap-highlight-color: transparent;
}

/* Telegram conversion strip */
.mg-telegram-strip {
    position: relative;
    z-index: 1002;
    color: #fff;
    background: linear-gradient(100deg, #07539f 0%, #087dc4 52%, #0b61b4 100%);
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 5px 18px rgba(7, 55, 105, .16);
}

.mg-telegram-strip > a {
    width: min(1240px, calc(100% - 32px));
    min-height: 44px;
    margin-inline: auto;
    padding: 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.mg-telegram-strip-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #117bc3;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 38, 82, .18);
}

.mg-telegram-strip-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.mg-telegram-strip strong {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: -.1px;
}

.mg-telegram-strip-id {
    direction: ltr;
    unicode-bidi: isolate;
    padding: 4px 11px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 999px;
    background: rgba(255, 255, 255, .17);
    font-size: 12px;
    font-weight: 900;
}

.mg-telegram-strip-action {
    color: #eef9ff;
    font-size: 11px;
    font-weight: 800;
}

.mg-telegram-strip > a:hover {
    background: rgba(255, 255, 255, .06);
}

/* Shared public header */
.mg-public-header {
    position: sticky !important;
    top: 0;
    z-index: 1000 !important;
    border-bottom: 1px solid rgba(203, 217, 234, .86) !important;
    background: rgba(255, 255, 255, .965) !important;
    box-shadow: 0 8px 28px rgba(34, 70, 112, .055);
    backdrop-filter: blur(16px) saturate(150%);
}

.mg-public-header-inner {
    width: min(1240px, calc(100% - 36px)) !important;
    min-height: 74px !important;
    margin-inline: auto !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
}

.mg-public-brand {
    min-width: max-content !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: var(--mg5-navy) !important;
    text-decoration: none !important;
}

.mg-public-mark {
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px;
    display: grid !important;
    place-items: center !important;
    border-radius: 12px !important;
    background: linear-gradient(140deg, var(--mg5-blue), #515be0) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    box-shadow: 0 9px 20px rgba(23, 105, 213, .23) !important;
}

.mg-public-brand-copy {
    display: block;
}

.mg-public-brand strong {
    display: block !important;
    font-size: 17px !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
}

.mg-public-brand small {
    display: block !important;
    margin-top: 3px !important;
    color: #8ea0b7 !important;
    font-size: 6.5px !important;
    line-height: 1.3 !important;
    letter-spacing: 1.8px !important;
    direction: ltr;
}

.mg-public-nav {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 19px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: visible !important;
}

.mg-public-nav > a {
    position: relative;
    padding: 9px 0 !important;
    color: #506983 !important;
    font-size: 12.5px !important;
    line-height: 1.4 !important;
    font-weight: 750 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
}

.mg-public-nav > a::after {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    bottom: 3px;
    height: 2px;
    border-radius: 99px;
    background: var(--mg5-blue);
    transform: scaleX(0);
    transition: transform .18s ease;
}

.mg-public-nav > a:hover,
.mg-public-nav > a:focus-visible {
    color: var(--mg5-blue) !important;
}

.mg-public-nav > a:hover::after,
.mg-public-nav > a:focus-visible::after {
    transform: scaleX(1);
}

.mg-public-nav-mobile-head {
    display: none;
}

.mg-header-search {
    width: 250px !important;
    min-width: 210px !important;
    height: 42px !important;
    flex: 0 1 250px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
    border: 1px solid var(--mg5-line-strong) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: inset 0 1px 2px rgba(16, 43, 80, .025) !important;
    transition: border-color .16s ease, box-shadow .16s ease !important;
}

.mg-header-search:focus-within {
    border-color: #6da2e6 !important;
    box-shadow: 0 0 0 3px rgba(23, 105, 213, .09) !important;
}

.mg-header-search input {
    min-width: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 13px !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: var(--mg5-ink) !important;
    font-size: 11.5px !important;
}

.mg-header-search input::placeholder {
    color: #93a3b6 !important;
}

.mg-header-search button {
    width: 43px !important;
    height: 100% !important;
    flex: 0 0 43px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    border: 0 !important;
    background: var(--mg5-blue-soft) !important;
    color: var(--mg5-blue) !important;
    cursor: pointer !important;
}

.mg-header-search button svg,
.mg-public-auth svg,
.mg-menu-toggle svg,
.mg-public-nav-mobile-head button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mg-public-auth {
    min-height: 42px !important;
    padding: 0 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    border-radius: 11px !important;
    background: linear-gradient(110deg, var(--mg5-blue), var(--mg5-blue-2)) !important;
    color: #fff !important;
    font-size: 11.5px !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: 0 9px 20px rgba(23, 105, 213, .20) !important;
}

.mg-public-auth svg {
    width: 17px;
    height: 17px;
}

.mg-menu-toggle {
    display: none !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    place-items: center !important;
    border: 1px solid var(--mg5-line) !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: var(--mg5-navy) !important;
    box-shadow: var(--mg5-shadow-sm) !important;
    cursor: pointer !important;
}

.mg-public-nav-backdrop {
    position: fixed;
    inset: 0;
    /*
     * Keep the dimming layer below the sticky header.
     * The mobile drawer lives inside the header stacking context; using the
     * same z-index as the header allowed this later DOM sibling to blur the
     * drawer itself on some mobile browsers.
     */
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    background: rgba(8, 25, 48, .38);
    backdrop-filter: blur(2px);
    transition: opacity .18s ease;
}

/* Safety: a closed/hidden backdrop must never intercept page clicks. */
.mg-public-nav-backdrop[hidden] {
    display: none !important;
    pointer-events: none !important;
}

.mg-public-nav-backdrop.is-open:not([hidden]) {
    opacity: 1;
    pointer-events: auto;
}

/* Home: compact hierarchy and stable cards */
.moein-home .home-hero {
    padding-top: 58px !important;
    padding-bottom: 102px !important;
}

.moein-home .hero-copy h1 {
    color: var(--mg5-navy) !important;
    font-size: clamp(37px, 4vw, 50px) !important;
    line-height: 1.42 !important;
}

.moein-home .hero-copy p {
    color: var(--mg5-muted) !important;
    font-size: 14px !important;
    line-height: 2.05 !important;
}

.moein-home .hero-trust {
    gap: 12px !important;
    margin-top: 24px !important;
    flex-wrap: wrap !important;
}

.moein-home .hero-trust span {
    padding: 6px 10px;
    border: 1px solid #dce7f3;
    border-radius: 999px;
    background: #fff;
    color: #5a718c !important;
    font-size: 10.5px !important;
    font-weight: 750;
}

.moein-home .hero-trust span:first-child {
    color: var(--mg5-green) !important;
}

.moein-home .quick-box {
    border-color: #dce6f2 !important;
    border-radius: 18px !important;
    box-shadow: var(--mg5-shadow-md) !important;
}

.moein-home .quick-field {
    min-width: 0;
    border-radius: 11px !important;
    border-color: #e1e9f3 !important;
}

.moein-home .quick-field select {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--mg5-ink);
    font: inherit;
    font-size: 11.5px;
}

.moein-home .quick-submit {
    min-height: 48px;
    border: 0;
    cursor: pointer;
}

.moein-home .home-section {
    padding: 76px 0 !important;
}

.moein-home .section-heading h2,
.moein-home .blue-heading h2,
.moein-home .why-copy h2 {
    letter-spacing: -.35px;
}

.moein-home .category-card,
.moein-home .home-product {
    border-radius: 18px !important;
    border: 1px solid #e0e9f3 !important;
    box-shadow: 0 10px 28px rgba(31, 73, 121, .055) !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}

.moein-home .category-card:hover,
.moein-home .home-product:hover {
    transform: translateY(-3px) !important;
    border-color: #bed3ec !important;
    box-shadow: 0 17px 38px rgba(31, 73, 121, .10) !important;
}

.moein-home .home-product .product-info h3 {
    font-size: 15px !important;
    line-height: 1.75 !important;
}

.moein-home .home-product .product-info p {
    min-height: 43px;
    margin-top: 7px !important;
    color: #697c92 !important;
    font-size: 11.5px !important;
    line-height: 1.85 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.moein-home .home-product .product-meta {
    margin-top: auto !important;
    padding-top: 13px !important;
    border-top: 1px solid #eef2f7;
}

.moein-home .home-product .product-meta strong {
    color: #0e58b6 !important;
    font-size: 16px !important;
}

.moein-home .home-product .product-meta small {
    font-size: 10px !important;
}

.moein-home .blue-services {
    padding: 62px 0 !important;
}

.moein-home .service-grid {
    gap: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
}

.moein-home .service-grid > div {
    min-height: 218px;
    padding: 24px 22px !important;
}

.moein-home .why-section {
    padding-top: 68px !important;
    padding-bottom: 68px !important;
}

.moein-home .numbers-strip {
    padding-block: 28px !important;
}

.moein-home .numbers-grid b {
    font-size: clamp(23px, 2.5vw, 31px) !important;
}

/* Catalog */
.public-wrap {
    width: 100% !important;
}

.catalog-layout {
    width: min(1240px, calc(100% - 36px)) !important;
    padding-top: 34px !important;
    padding-bottom: 56px !important;
    gap: 24px !important;
}

.page-heading {
    margin-bottom: 20px !important;
}

.page-heading h1 {
    color: var(--mg5-navy) !important;
    font-size: clamp(27px, 3vw, 36px) !important;
    line-height: 1.5 !important;
}

.page-heading p {
    max-width: 760px;
    color: var(--mg5-muted) !important;
    font-size: 13px !important;
    line-height: 2 !important;
}

.catalog-search {
    min-height: 48px !important;
    border: 1px solid var(--mg5-line-strong) !important;
    border-radius: 13px !important;
    background: #fff !important;
    box-shadow: var(--mg5-shadow-sm) !important;
}

.catalog-search input {
    font-size: 12.5px !important;
}

.catalog-search button {
    min-width: 92px;
    border-radius: 10px !important;
    font-size: 12px !important;
}

.category-nav {
    gap: 8px !important;
    margin: 15px 0 22px !important;
    padding: 2px 0 7px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: thin;
}

.category-nav a {
    flex: 0 0 auto !important;
    min-height: 36px;
    padding: 8px 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid #dbe5f0 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #55708c !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    white-space: nowrap;
}

.category-nav a.active,
.category-nav a:hover {
    border-color: #bdd3ef !important;
    background: var(--mg5-blue-soft) !important;
    color: var(--mg5-blue) !important;
}

.catalog-grid {
    gap: 18px !important;
}

.catalog-card {
    min-height: 100% !important;
    padding: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    border: 1px solid #dde7f2 !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 10px 28px rgba(26, 67, 117, .055) !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}

.catalog-card:hover {
    transform: translateY(-3px);
    border-color: #bfd4ec !important;
    box-shadow: 0 18px 38px rgba(26, 67, 117, .10) !important;
}

.catalog-card .product-thumb {
    border-radius: 13px !important;
    background: #f7f9fc !important;
}

.catalog-card .badge {
    padding: 5px 9px !important;
    border-radius: 999px !important;
    font-size: 9.5px !important;
    font-weight: 850 !important;
}

.catalog-card h2 {
    margin: 14px 1px 5px !important;
    color: var(--mg5-navy) !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
}

.catalog-card .desc {
    min-height: 44px;
    color: #6b7e94 !important;
    font-size: 11.5px !important;
    line-height: 1.9 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-card .price {
    margin-top: auto !important;
    padding-top: 15px !important;
    border-top: 1px solid #eef2f7;
}

.catalog-card .price small {
    color: #8795a8 !important;
    font-size: 9.5px !important;
}

.catalog-card .price strong {
    color: #0e59b7 !important;
    font-size: 18px !important;
    line-height: 1.4 !important;
}

.catalog-card .buy {
    min-height: 43px;
    margin-top: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 11px !important;
    background: #eef5ff !important;
    color: #145fbf !important;
    font-size: 11.5px !important;
    font-weight: 850 !important;
}

.catalog-card .buy:hover {
    background: var(--mg5-blue) !important;
    color: #fff !important;
}

.catalog-sidebar {
    border: 1px solid #dce6f1 !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: var(--mg5-shadow-sm) !important;
}

/* Product page */
.mg-product-wrap {
    width: min(1180px, calc(100% - 36px)) !important;
    padding-top: 26px !important;
    padding-bottom: 68px !important;
}

.mg-breadcrumb {
    margin-bottom: 18px !important;
    color: #71849b !important;
    font-size: 11.5px !important;
}

.mg-product-hero {
    gap: 20px !important;
}

.mg-product-media,
.mg-product-summary,
.mg-product-about,
.mg-reviews,
.mg-related-products {
    border-color: #dce6f1 !important;
    border-radius: 20px !important;
    box-shadow: var(--mg5-shadow-sm) !important;
}

.mg-product-media {
    min-height: 480px !important;
    padding: 18px !important;
}

.mg-product-summary {
    padding: 31px !important;
}

.mg-product-summary h1 {
    margin-top: 15px !important;
    color: var(--mg5-navy) !important;
    font-size: clamp(28px, 3vw, 39px) !important;
}

.mg-product-lead {
    color: #5c7089 !important;
    font-size: 14px !important;
    line-height: 2 !important;
}

.mg-product-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 19px;
}

.mg-product-fact {
    min-width: 0;
    padding: 11px 12px;
    display: grid;
    gap: 3px;
    border: 1px solid #e0e8f2;
    border-radius: 11px;
    background: #f8fbff;
}

.mg-product-fact small {
    color: #8392a5;
    font-size: 9.5px;
}

.mg-product-fact strong {
    overflow: hidden;
    color: #254363;
    font-size: 11.5px;
    line-height: 1.7;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mg-product-fact.is-available strong {
    color: var(--mg5-green);
}

.mg-product-fact.is-unavailable strong {
    color: var(--mg5-red);
}

.mg-product-price {
    margin-top: 22px !important;
    padding-top: 20px !important;
}

.mg-product-price strong {
    color: #0e58b4 !important;
}

.mg-buy-button {
    min-height: 54px !important;
    border-radius: 12px !important;
    background: linear-gradient(110deg, var(--mg5-blue), var(--mg5-blue-2)) !important;
    box-shadow: 0 12px 27px rgba(23, 105, 213, .22) !important;
}

.mg-product-assurances {
    margin-top: 14px !important;
    gap: 8px !important;
}

.mg-product-assurances span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #f4f8fd;
    color: #60758e !important;
    font-size: 10.5px !important;
}

.mg-product-about,
.mg-reviews {
    padding: 34px 38px !important;
}

.mg-product-prose {
    color: #304967 !important;
    font-size: 15.5px !important;
    line-height: 2.2 !important;
}

.mg-order-steps > div {
    min-height: 78px;
    padding: 14px !important;
}

.mg-related-products {
    padding: 30px 34px !important;
}

.mg-related-grid > a {
    border-color: #dce6f1 !important;
    box-shadow: 0 7px 20px rgba(28, 68, 114, .045);
}

/* Checkout page */
.mg-checkout-page {
    background: var(--mg5-bg) !important;
}

.mg-checkout-page .checkout {
    width: min(1080px, calc(100% - 36px)) !important;
    margin-top: 28px !important;
    margin-bottom: 56px !important;
    gap: 20px !important;
    align-items: start;
}

.mg-checkout-progress {
    grid-column: 1 / -1;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    border: 1px solid var(--mg5-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--mg5-shadow-sm);
}

.mg-checkout-progress span {
    min-height: 38px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 9px;
    color: #71829a;
    background: #f7f9fc;
    font-size: 10.5px;
    font-weight: 800;
}

.mg-checkout-progress span b {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #e8eef6;
    color: #5d718a;
    font-size: 9px;
}

.mg-checkout-progress span.is-active {
    color: #155caf;
    background: #edf5ff;
}

.mg-checkout-progress span.is-active b {
    color: #fff;
    background: var(--mg5-blue);
}

.mg-checkout-page .card {
    border-color: var(--mg5-line) !important;
    border-radius: 18px !important;
    box-shadow: var(--mg5-shadow-sm) !important;
}

.mg-checkout-page .summary {
    position: sticky;
    top: 92px;
    background: linear-gradient(145deg, #113e7c, #2877db) !important;
}

.mg-checkout-page .field label,
.mg-checkout-page .choice,
.mg-checkout-page .pricing-breakdown > div,
.mg-checkout-page .wallet-line {
    font-size: 12.5px !important;
}

.mg-checkout-page .field input,
.mg-checkout-page .field textarea {
    min-height: 45px;
    border-radius: 11px !important;
    font-size: 13px !important;
}

.mg-checkout-page .field textarea {
    min-height: 95px;
}

.mg-checkout-page .submit {
    min-height: 48px;
    border-radius: 11px !important;
    font-size: 13px !important;
}

/* Compact footer - one canonical visual layer */
.mg-public-footer {
    position: relative !important;
    overflow: hidden !important;
    margin-top: 0 !important;
    padding: 0 max(22px, calc((100% - 1240px) / 2)) !important;
    background: linear-gradient(140deg, #0a2c4f 0%, #0b355e 58%, #0c3b69 100%) !important;
    color: #e7f1fb !important;
    border-top: 0 !important;
    font-size: 13px !important;
    line-height: 1.75 !important;
}

.mg-public-footer::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    background: radial-gradient(circle at 8% 15%, rgba(77, 139, 224, .12), transparent 27%), radial-gradient(circle at 92% 88%, rgba(33, 179, 190, .08), transparent 23%) !important;
}

.mg-public-footer .mg-footer-benefits,
.mg-public-footer .mg-public-footer-grid,
.mg-public-footer .mg-trust-section,
.mg-public-footer .mg-public-footer-bottom {
    position: relative;
    z-index: 1;
}

.mg-public-footer .mg-footer-benefits {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1px !important;
    overflow: hidden !important;
    transform: translateY(-12px) !important;
    margin-bottom: -12px !important;
    border: 1px solid rgba(255,255,255,.13) !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.10) !important;
    box-shadow: 0 12px 30px rgba(2, 25, 50, .16) !important;
}

.mg-public-footer .mg-footer-benefits > div {
    min-height: 66px !important;
    padding: 9px 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background: rgba(18, 78, 139, .72) !important;
}

.mg-public-footer .footer-benefit-visual,
.mg-public-footer .footer-benefit-visual img {
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    flex-basis: 38px !important;
    object-fit: contain !important;
}

.mg-public-footer .mg-footer-benefits strong {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 900 !important;
}

.mg-public-footer .mg-footer-benefits small {
    margin-top: 1px !important;
    color: #cfe0f1 !important;
    font-size: 10.5px !important;
    line-height: 1.6 !important;
}

.mg-public-footer-grid {
    display: grid !important;
    grid-template-columns: 1.35fr repeat(3, minmax(150px, .75fr)) !important;
    gap: 34px !important;
    padding: 27px 0 24px !important;
}

.mg-public-footer-brand {
    padding-left: 12px !important;
}

.mg-public-footer-brand p {
    max-width: 360px !important;
    margin: 13px 0 0 !important;
    color: #c9dced !important;
    font-size: 12.5px !important;
    line-height: 1.9 !important;
}

.mg-public-footer .mg-public-brand strong {
    color: #fff !important;
    font-size: 17px !important;
}

.mg-public-footer .mg-public-brand small {
    color: #9ebbd9 !important;
    font-size: 7px !important;
}

.mg-footer-column h3 {
    margin: 0 0 9px !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 900 !important;
}

.mg-footer-column a,
.mg-footer-column > span {
    width: fit-content !important;
    margin: 4px 0 !important;
    color: #d2e2f2 !important;
    font-size: 12px !important;
    line-height: 1.7 !important;
    text-decoration: none !important;
}

.mg-footer-column a:hover {
    color: #fff !important;
}

.mg-trust-section {
    margin: 0 0 19px !important;
    padding: 14px 16px !important;
    display: grid !important;
    grid-template-columns: minmax(210px, .8fr) minmax(0, 1.5fr) !important;
    align-items: center !important;
    gap: 18px !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.055) !important;
}

.mg-trust-copy > span {
    color: #7de0d5 !important;
    font-size: 10px !important;
    font-weight: 850 !important;
}

.mg-trust-copy h3 {
    margin: 3px 0 !important;
    color: #fff !important;
    font-size: 15px !important;
}

.mg-trust-copy p {
    margin: 0 !important;
    color: #bad0e6 !important;
    font-size: 11px !important;
}

.mg-trust-logos {
    display: flex !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.mg-trust-card {
    width: 92px !important;
    min-height: 86px !important;
    padding: 7px !important;
    gap: 4px !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--mg5-navy) !important;
}

.mg-trust-card img {
    max-width: 58px !important;
    max-height: 55px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

.mg-trust-card small {
    color: #536880 !important;
    font-size: 7.5px !important;
    line-height: 1.35 !important;
}

.mg-public-footer-bottom {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 14px 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    border-top: 1px solid rgba(255,255,255,.12) !important;
    color: #c4d8eb !important;
    font-size: 10.5px !important;
}

@media (max-width: 1100px) {
    .mg-public-header-inner {
        gap: 11px !important;
    }

    .mg-public-nav {
        gap: 11px !important;
    }

    .mg-public-nav > a {
        font-size: 11.5px !important;
    }

    .mg-header-search {
        width: 215px !important;
        flex-basis: 215px !important;
    }

    .mg-public-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 24px !important;
    }

    .mg-public-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .mg-public-header-inner {
        width: calc(100% - 24px) !important;
        min-height: 68px !important;
        padding: 8px 0 !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto 42px !important;
        grid-template-areas:
            "brand auth menu"
            "search search search" !important;
        gap: 8px !important;
    }

    .mg-public-brand {
        grid-area: brand;
    }

    .mg-public-auth {
        grid-area: auth !important;
        width: auto !important;
        min-height: 40px !important;
        padding-inline: 11px !important;
        font-size: 10.5px !important;
    }

    .mg-menu-toggle {
        grid-area: menu !important;
        display: grid !important;
    }

    .mg-header-search {
        grid-area: search !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 42px !important;
        max-width: none !important;
        flex-basis: auto !important;
    }

    .mg-public-nav {
        position: fixed !important;
        inset: 0 0 0 auto !important;
        z-index: 1002 !important;
        width: min(86vw, 360px) !important;
        height: 100dvh !important;
        padding: 16px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 5px !important;
        overflow-y: auto !important;
        border-left: 1px solid #d8e3ef !important;
        background: #fff !important;
        filter: none !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        box-shadow: -24px 0 60px rgba(8, 38, 77, .20) !important;
        transform: translateX(105%) !important;
        visibility: hidden;
        transition: transform .22s ease, visibility .22s ease !important;
    }

    .mg-public-nav.is-open {
        transform: translateX(0) !important;
        visibility: visible;
    }

    .mg-public-nav-mobile-head {
        margin-bottom: 8px;
        padding: 4px 2px 14px;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px solid #e7edf5;
    }

    .mg-public-nav-mobile-head > div {
        display: grid;
        gap: 2px;
    }

    .mg-public-nav-mobile-head b {
        color: var(--mg5-navy);
        font-size: 16px;
        font-weight: 900;
    }

    .mg-public-nav-mobile-head small {
        color: #8292a6;
        font-size: 9.5px;
    }

    .mg-public-nav-mobile-head button {
        width: 39px;
        height: 39px;
        padding: 0;
        display: grid;
        place-items: center;
        border: 1px solid #dce6f1;
        border-radius: 10px;
        background: #f8fafc;
        color: var(--mg5-navy);
        cursor: pointer;
    }

    .mg-public-nav > a {
        width: 100% !important;
        min-height: 45px !important;
        padding: 10px 12px !important;
        display: flex !important;
        align-items: center !important;
        border: 1px solid transparent;
        border-radius: 10px;
        color: #375674 !important;
        font-size: 12.5px !important;
    }

    .mg-public-nav > a::after {
        display: none;
    }

    .mg-public-nav > a:hover,
    .mg-public-nav > a:focus-visible {
        border-color: #d9e6f4;
        background: #f2f7fd;
        color: var(--mg5-blue) !important;
    }

    .mg-public-nav-backdrop {
        display: block;
    }

    .catalog-layout {
        width: calc(100% - 24px) !important;
        grid-template-columns: 1fr !important;
    }

    .catalog-main {
        order: 1 !important;
    }

    .catalog-sidebar {
        position: static !important;
        order: 2 !important;
        width: 100% !important;
    }

    .mg-product-hero {
        grid-template-columns: 1fr !important;
    }

    .mg-product-media {
        min-height: 0 !important;
    }

    .mg-checkout-page .summary {
        position: static;
    }

    .mg-public-footer .mg-footer-benefits {
        grid-template-columns: 1fr !important;
    }

    .mg-public-footer .mg-footer-benefits > div {
        min-height: 59px !important;
        justify-content: flex-start !important;
    }

    .mg-trust-section {
        grid-template-columns: 1fr !important;
    }

    .mg-trust-logos {
        justify-content: flex-start !important;
    }
}

@media (max-width: 620px) {
    .mg-telegram-strip > a {
        width: calc(100% - 20px);
        min-height: 42px;
        justify-content: flex-start;
        gap: 7px;
        overflow: hidden;
    }

    .mg-telegram-strip strong {
        min-width: 0;
        flex: 1 1 auto;
        overflow: hidden;
        font-size: 11.5px;
        text-overflow: ellipsis;
    }

    .mg-telegram-strip-id {
        flex: 0 0 auto;
        padding: 3px 8px;
        font-size: 10.5px;
    }

    .mg-telegram-strip-action {
        display: none;
    }

    .mg-telegram-strip-icon {
        width: 25px;
        height: 25px;
        flex-basis: 25px;
    }

    .mg-public-header-inner {
        width: calc(100% - 20px) !important;
    }

    .mg-public-brand strong {
        font-size: 15px !important;
    }

    .mg-public-brand small {
        display: none !important;
    }

    .mg-public-mark {
        width: 37px !important;
        height: 37px !important;
        flex-basis: 37px !important;
    }

    .mg-public-auth {
        padding-inline: 9px !important;
    }

    .mg-public-auth span {
        font-size: 9.5px;
    }

    .mg-public-auth svg {
        display: none;
    }

    .moein-home .home-hero {
        padding-top: 36px !important;
        padding-bottom: 76px !important;
    }

    .moein-home .home-container {
        width: calc(100% - 22px) !important;
    }

    .moein-home .hero-copy h1 {
        font-size: 29px !important;
    }

    .moein-home .hero-copy p {
        font-size: 12.5px !important;
    }

    .moein-home .home-section {
        padding: 52px 0 !important;
    }

    .moein-home .category-grid,
    .moein-home .products-grid,
    .moein-home .numbers-grid {
        grid-template-columns: 1fr !important;
    }

    .moein-home .service-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .moein-home .service-grid > div {
        min-height: 190px;
        padding: 18px 14px !important;
    }

    .catalog-layout {
        width: calc(100% - 20px) !important;
        padding-top: 24px !important;
    }

    .catalog-grid {
        grid-template-columns: 1fr !important;
        gap: 13px !important;
    }

    .catalog-card {
        padding: 13px !important;
    }

    .catalog-card .desc {
        min-height: 41px;
    }

    .mg-product-wrap {
        width: calc(100% - 20px) !important;
        padding-top: 16px !important;
    }

    .mg-product-media,
    .mg-product-summary,
    .mg-product-about,
    .mg-reviews,
    .mg-related-products {
        border-radius: 16px !important;
    }

    .mg-product-summary {
        padding: 22px 18px !important;
    }

    .mg-product-summary h1 {
        font-size: 27px !important;
    }

    .mg-product-facts {
        grid-template-columns: 1fr 1fr;
    }

    .mg-product-price {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 9px !important;
    }

    .mg-product-price strong {
        font-size: 28px !important;
    }

    .mg-product-about,
    .mg-reviews,
    .mg-related-products {
        padding: 25px 17px !important;
    }

    .mg-product-prose {
        font-size: 14.5px !important;
        line-height: 2.15 !important;
    }

    .mg-related-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 9px !important;
    }

    .mg-checkout-page .checkout {
        width: calc(100% - 20px) !important;
        margin-top: 18px !important;
        grid-template-columns: 1fr !important;
    }

    .mg-checkout-progress {
        gap: 4px;
        padding: 7px;
    }

    .mg-checkout-progress span {
        min-height: 34px;
        padding: 5px 4px;
        gap: 4px;
        font-size: 8.5px;
    }

    .mg-checkout-progress span b {
        width: 18px;
        height: 18px;
        font-size: 8px;
    }

    .mg-checkout-page .card {
        padding: 18px !important;
    }

    .mg-public-footer {
        padding-inline: 14px !important;
    }

    .mg-public-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 20px 16px !important;
        padding: 20px 0 !important;
    }

    .mg-public-footer-brand,
    .mg-footer-contact {
        grid-column: 1 / -1 !important;
    }

    .mg-footer-column h3 {
        font-size: 13px !important;
    }

    .mg-footer-column a,
    .mg-footer-column > span {
        font-size: 11px !important;
    }

    .mg-trust-section {
        padding: 12px !important;
        gap: 12px !important;
    }

    .mg-trust-logos {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }

    .mg-trust-card {
        width: 100% !important;
        min-height: 78px !important;
        padding: 5px !important;
    }

    .mg-trust-card img {
        max-width: 50px !important;
        max-height: 47px !important;
    }

    .mg-trust-card small {
        font-size: 6.5px !important;
    }

    .mg-public-footer-bottom {
        padding: 12px 0 14px !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 3px !important;
        text-align: center !important;
        font-size: 9.5px !important;
    }
}

@media (max-width: 430px) {
    .mg-public-auth span {
        max-width: 82px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .moein-home .service-grid {
        grid-template-columns: 1fr !important;
    }

    .mg-product-facts {
        grid-template-columns: 1fr;
    }

    .mg-related-grid {
        grid-template-columns: 1fr !important;
    }

    .mg-trust-logos {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

.mg-buy-button-disabled {
    background: #e8edf4 !important;
    color: #77889d !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}
