/* Navid design system — colors & typography (Figma) */

/* Original Lahzeh bundle (fonts/Lahzeh) */
@font-face {
    font-family: 'Lahzeh';
    src:
        url('../fonts/Lahzeh/woff2/Lahzeh-FaNum-Regular.woff2') format('woff2'),
        url('../fonts/Lahzeh/woff/Lahzeh-FaNum-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lahzeh';
    src:
        url('../fonts/Lahzeh/woff2/Lahzeh-FaNum-Medium.woff2') format('woff2'),
        url('../fonts/Lahzeh/woff/Lahzeh-FaNum-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lahzeh';
    src:
        url('../fonts/Lahzeh/woff2/Lahzeh-FaNum-SemiBold.woff2') format('woff2'),
        url('../fonts/Lahzeh/woff/Lahzeh-FaNum-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lahzeh';
    src:
        url('../fonts/Lahzeh/woff2/Lahzeh-FaNum-Bold.woff2') format('woff2'),
        url('../fonts/Lahzeh/woff/Lahzeh-FaNum-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Designer Lahzeh-FaNum bundle (fonts/LahzehFaNum) */
@font-face {
    font-family: 'Lahzeh-FaNum';
    src:
        url('../fonts/LahzehFaNum/woff2/Lahzeh-FaNum-Regular.woff2') format('woff2'),
        url('../fonts/LahzehFaNum/woff/Lahzeh-FaNum-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lahzeh-FaNum';
    src:
        url('../fonts/LahzehFaNum/woff2/Lahzeh-FaNum-Medium.woff2') format('woff2'),
        url('../fonts/LahzehFaNum/woff/Lahzeh-FaNum-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lahzeh-FaNum';
    src:
        url('../fonts/LahzehFaNum/woff2/Lahzeh-FaNum-SemiBold.woff2') format('woff2'),
        url('../fonts/LahzehFaNum/woff/Lahzeh-FaNum-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lahzeh-FaNum';
    src:
        url('../fonts/LahzehFaNum/woff2/Lahzeh-FaNum-Bold.woff2') format('woff2'),
        url('../fonts/LahzehFaNum/woff/Lahzeh-FaNum-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --navid-primary: #f3703a;
    --navid-primary-hover: #e06533;
    --navid-secondary: #003663;
    --navid-tertiary: #ededee;
    --navid-gray: #6c7580;
    --navid-gray-2: #a3a9b2;
    --navid-error: #f54848;
    --navid-yellow: #e6b34c;
    --navid-blue: #00558f;
    --navid-green: #009294;
    --navid-white: #ffffff;
    --navid-black: #231f20;
    --navid-radius-sm: 4px;
    --navid-image-bg: #f4f5f6;

    --navid-font: 'Lahzeh', Tahoma, sans-serif;
    --navid-font-fanum: 'Lahzeh-FaNum', 'Lahzeh', Tahoma, sans-serif;
    --navid-form-field-gap: 16px;
    --navid-form-row-gap: 24px;
    --navid-form-field-gap-tight: 8px;
    --navid-content-width: 1280px;
    --navid-container-padding: clamp(16px, calc((100vw - var(--navid-content-width)) / 2), 320px);
    --navid-btn-font-weight: 600;

    /* Desktop header stack (Figma): 24 + 56 + 16 + 48 (+ 24 bottom pad when bordered) */
    --navid-header-pad-top: 24px;
    --navid-header-pad-bottom: 24px;
    --navid-header-top-h: 56px;
    --navid-header-mid-gap: 16px;
    --navid-header-nav-h: 48px;
    --navid-header-stack-height: calc(
        var(--navid-header-pad-top) + var(--navid-header-top-h) + var(--navid-header-mid-gap) +
            var(--navid-header-nav-h)
    );
    --navid-header-stack-height-bordered: calc(
        var(--navid-header-stack-height) + var(--navid-header-pad-bottom)
    );
    --navid-page-hero-gap: 24px;
    --navid-page-hero-top-offset: calc(
        var(--navid-header-stack-height) + var(--navid-page-hero-gap)
    );
}

.navid-block-loader {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid var(--navid-tertiary);
    border-top-color: var(--navid-secondary);
    border-radius: 50%;
    animation: navid-block-spin 0.7s linear infinite;
    box-sizing: border-box;
}

@keyframes navid-block-spin {
    to {
        transform: rotate(360deg);
    }
}

/* jQuery blockUI — Navid loading overlay */
.blockUI.blockOverlay {
    border-radius: 4px !important;
    background-color: rgba(255, 255, 255, 0.72) !important;
    opacity: 1 !important;
}

.blockUI.blockMsg {
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    color: transparent !important;
    box-shadow: none !important;
}

.blockUI.blockMsg .navid-block-loader {
    display: block;
    margin: 0 auto;
}

.navid-btn.blockUI,
.navid-btn .blockUI.blockOverlay {
    border-radius: 4px !important;
}

/* Center blockUI loader on buttons and compact mobile actions */
.navid-btn,
.navid-cart-mobile-sticky__btn,
.navid-checkout-mobile-sticky__btn,
.navid-coupon__apply,
.navid-product-mobile-sticky__actions,
.navid-product-mobile-sticky__add,
.navid-cart-actions,
.navid-pc__media-actions,
.checkout_link {
    position: relative;
}

.navid-btn > .blockUI.blockOverlay,
.navid-btn .blockUI.blockOverlay,
.navid-cart-mobile-sticky__btn > .blockUI.blockOverlay,
.navid-checkout-mobile-sticky__btn > .blockUI.blockOverlay,
.navid-coupon__apply > .blockUI.blockOverlay,
.navid-product-mobile-sticky__actions > .blockUI.blockOverlay,
.navid-product-mobile-sticky__add > .blockUI.blockOverlay,
.navid-cart-actions > .blockUI.blockOverlay,
.navid-pc__media-actions > .blockUI.blockOverlay,
.checkout_link > .blockUI.blockOverlay {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    border-radius: inherit;
}

.navid-btn > .blockUI.blockMsg,
.navid-btn .blockUI.blockMsg,
.navid-cart-mobile-sticky__btn > .blockUI.blockMsg,
.navid-checkout-mobile-sticky__btn > .blockUI.blockMsg,
.navid-coupon__apply > .blockUI.blockMsg,
.navid-product-mobile-sticky__actions > .blockUI.blockMsg,
.navid-product-mobile-sticky__add > .blockUI.blockMsg,
.navid-cart-actions > .blockUI.blockMsg,
.navid-pc__media-actions > .blockUI.blockMsg,
.checkout_link > .blockUI.blockMsg {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    width: 24px !important;
    z-index: 1;
}

/* Shared horizontal alignment — header, page content, footer (Figma 1280px) */
header.navid-header .navid-header__inner,
footer.navid-footer .navid-footer__inner,
.container.main-container {
    width: 100%;
    max-width: calc(var(--navid-content-width) + (2 * var(--navid-container-padding)));
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--navid-container-padding);
    padding-right: var(--navid-container-padding);
    box-sizing: border-box;
}

body {
    font-family: var(--navid-font);
    color: var(--navid-secondary);
    background-color: var(--navid-white);
}

h1, .navid-h1 { font-size: 48px; font-weight: 500; line-height: normal; }
h2, .navid-h2 { font-size: 32px; font-weight: 500; line-height: normal; }
h3, .navid-h3 { font-size: 24px; font-weight: 500; line-height: normal; }
h4, .navid-h4 { font-size: 20px; font-weight: 500; line-height: normal; }

.navid-text-lg-medium { font-size: 16px; font-weight: 500; line-height: normal; }
.navid-text-lg { font-size: 16px; font-weight: 400; line-height: normal; }
.navid-text-md { font-size: 15px; font-weight: 400; line-height: normal; }
.navid-text-sm { font-size: 14px; font-weight: 400; line-height: normal; }
.navid-text-xs { font-size: 12px; font-weight: 400; line-height: normal; }

.navid-nav-desktop { font-size: 16px; font-weight: 500; line-height: normal; }
.navid-nav-mobile { font-size: 16px; font-weight: 400; line-height: normal; }

.navid-input-value { font-size: 16px; font-weight: 500; line-height: normal; }
.navid-input-placeholder { font-size: 15px; font-weight: 400; line-height: normal; color: var(--navid-gray-2); }
.navid-input-label { font-size: 10px; font-weight: 400; line-height: normal; }

.navid-btn-lg-main { font-size: 16px; font-weight: var(--navid-btn-font-weight); line-height: normal; }
.navid-btn-lg-second { font-size: 16px; font-weight: var(--navid-btn-font-weight); line-height: normal; }
.navid-btn-lg-third { font-size: 16px; font-weight: 500; line-height: normal; }
.navid-btn-md { font-size: 14px; font-weight: var(--navid-btn-font-weight); line-height: normal; }
.navid-btn-sm { font-size: 10px; font-weight: var(--navid-btn-font-weight); line-height: normal; }

/* Fill & stroke buttons — Figma SemiBold (600), not Bold (700) */
.navid-btn,
.navid-btn--primary,
.navid-btn--outline,
.navid-logout-modal__btn,
.navid-logout-modal__btn--filled,
.navid-logout-modal__btn--stroke,
.navid-cart-checkout-btn,
.checkout_link,
.navid-cart-mobile-sticky__btn,
.navid-checkout-mobile-sticky__btn,
.navid-products-filter-modal__apply,
.navid-products-filter-modal__clear,
header.navid-header .navid-header__auth-btn,
.fullscreen-slider__btn,
.navid-product-page .btn-show-product,
.navid-product-page .navid-product-add-btn,
.navid-product-page .cart-not-available,
.navid-product-page .navid-product-cart-go,
.navid-product-page .navid-reviews-cta__btn,
.navid-pc__add:not(.navid-pc__add--ghost),
.navid-product-mobile-sticky__add,
.navid-order-card__details-btn,
.navid-order-details-modal__invoice-btn,
.btn-primary-cm {
    font-weight: var(--navid-btn-font-weight);
}

.navid-section-title-lg-bold { font-size: 24px; font-weight: 600; line-height: normal; }
.navid-section-title-lg { font-size: 24px; font-weight: 500; line-height: normal; }
.navid-section-title-md-bold { font-size: 20px; font-weight: 600; line-height: normal; }
.navid-section-title-md { font-size: 20px; font-weight: 500; line-height: normal; }

.navid-product-title-lg { font-size: 24px; font-weight: 500; line-height: normal; }
.navid-product-title-md { font-size: 16px; font-weight: 500; line-height: normal; }
.navid-product-title-sm { font-size: 14px; font-weight: 500; line-height: normal; }
.navid-price-value-lg { font-size: 32px; font-weight: 600; line-height: normal; }
.navid-price-value-md { font-size: 24px; font-weight: 600; line-height: normal; }
.navid-price-value-sm { font-size: 18px; font-weight: 600; line-height: normal; }
.navid-price-currency { font-size: 14px; font-weight: 500; line-height: normal; }
.navid-price-old { text-decoration: line-through; }

img.lazyload-fallback {
    object-fit: contain;
}

/* Remove legacy decorative marks on section titles */
.title-wide h2::before,
.title-wide h2::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

/* Toastr — match Navid UI (flat, no heavy shadow) */
.toast-container > div {
    margin: 0 0 8px;
    padding: 12px 16px !important;
    width: auto;
    max-width: min(360px, calc(100vw - 24px));
    border-radius: var(--navid-radius-sm) !important;
    background-image: none !important;
    box-shadow: none !important;
    color: var(--navid-white) !important;
    font-family: var(--navid-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    text-align: right;
    direction: rtl;
    opacity: 1 !important;
}

.toast-container > div:hover {
    box-shadow: none !important;
    opacity: 1 !important;
    cursor: default;
}

.toast-container > div.rtl {
    padding: 12px 16px !important;
    background-image: none !important;
}

.toast-container .toast-title {
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 600;
}

.toast-container .toast-message {
    color: inherit;
}

.toast-container .toast-close-button {
    top: 0;
    right: auto;
    left: -4px;
    float: left;
    color: var(--navid-white);
    text-shadow: none;
    opacity: 0.7;
}

.toast-container .toast-close-button:hover,
.toast-container .toast-close-button:focus {
    color: var(--navid-white);
    opacity: 1;
}

.toast-container .toast-progress {
    height: 2px;
    opacity: 0.25;
    background-color: var(--navid-white);
}

.toast-success {
    background-color: var(--navid-blue) !important;
    background-image: none !important;
}

.toast-error {
    background-color: var(--navid-error) !important;
    background-image: none !important;
}

.toast-info {
    background-color: var(--navid-secondary) !important;
    background-image: none !important;
}

.toast-warning {
    background-color: var(--navid-yellow) !important;
    background-image: none !important;
    color: var(--navid-secondary) !important;
}

.toast-container > .toast-success,
.toast-container > .toast-error,
.toast-container > .toast-info,
.toast-container > .toast-warning,
.toast-container > .toast-success.rtl,
.toast-container > .toast-error.rtl,
.toast-container > .toast-info.rtl,
.toast-container > .toast-warning.rtl {
    background-image: none !important;
}

.toast-warning .toast-close-button {
    color: var(--navid-secondary);
}

#toast-container.toast-bottom-left {
    bottom: 16px;
    left: 16px;
}

/*
 * Compact viewports (≈320–360px): keep CTA buttons inside their container.
 * Prevents min-width / nowrap labels from overflowing or clipping.
 */
@media (max-width: 360px) {
    .navid-btn,
    .navid-btn--primary,
    .navid-btn--outline,
    .navid-logout-modal__btn,
    .navid-cart-checkout-btn,
    .checkout_link,
    .navid-cart-mobile-sticky__btn,
    .navid-checkout-mobile-sticky__btn,
    .navid-order-card__details-btn,
    .navid-order-details-modal__invoice-btn,
    .navid-order-cart-details__invoice-btn,
    .navid-products-filter-modal__apply,
    .navid-products-filter-modal__clear,
    .navid-product-mobile-sticky__add,
    .navid-notification-card__action.navid-btn,
    header.navid-header .navid-header__auth-btn {
        min-width: 0 !important;
        max-width: 100%;
        box-sizing: border-box;
        padding-left: 10px;
        padding-right: 10px;
        font-size: 14px;
    }

    .navid-btn > span,
    .navid-cart-mobile-sticky__btn > span,
    .navid-checkout-mobile-sticky__btn > span,
    .navid-order-card__details-btn > span,
    .navid-order-details-modal__invoice-btn > span,
    .navid-order-cart-details__invoice-btn > span,
    .navid-product-mobile-sticky__add > span {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        text-align: center;
    }

    .navid-cart-mobile-sticky__inner,
    .navid-checkout-mobile-sticky__inner {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
        gap: 8px;
        padding: 12px;
    }

    .navid-cart-mobile-sticky__btn,
    .navid-checkout-mobile-sticky__btn {
        min-height: 52px;
        padding: 8px 10px;
        white-space: normal;
        text-align: center;
        line-height: 1.25;
    }

    .navid-cart-mobile-sticky__btn > span,
    .navid-checkout-mobile-sticky__btn > span {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .navid-cart-mobile-sticky__summary-value span:last-child,
    .navid-checkout-mobile-sticky__summary-value span:last-child {
        font-size: 14px;
    }

    .navid-cart-mobile-sticky__summary-value span:first-child,
    .navid-checkout-mobile-sticky__summary-value span:first-child {
        font-size: 12px;
    }
}
