/* ===========================================================================
   fastkart — شیوه‌نامهٔ پوسته
   ===========================================================================

   هرچه روی **هر صفحهٔ** این قالب دیده می‌شود و در `theme-design.css` جا
   نمی‌شد: مسیرِ راهنما، دکمه‌های شناور، اصلاحاتِ ریزِ قالبِ خریداری‌شده.

   تا فاز ۶۶ این 897 خط داخلِ `layout/master.html` بود، یعنی روی هر
   بار باز شدنِ هر صفحه دوباره فرستاده می‌شد و مرورگر نمی‌توانست کشش
   کند. حالا یک فایلِ کش‌شونده است.

   **اینجا جای تصمیم‌های تازه نیست.** توکن‌ها در `foundation.css` و
   هویتِ قالب در `theme-design.css` است؛ این فایل فقط میراثِ همان
   `<style>` است و باید با هر بازنویسی کوچک‌تر شود.
   =========================================================================== */

        .blog-section .blog-detail-image .blog-image-contain{
            position: relative;
        }
        .breadscrumb-section .breadscrumb-contain h1 {
            font-weight: 700;
            font-size: calc(16px + (22 - 16) * ((100vw - 320px) / (1920 - 320)));
            line-height: 1;
            text-transform: capitalize;
            margin: 0;
        }

        .breadscrumb-section .breadscrumb-contain nav .breadcrumb .breadcrumb-item+.breadcrumb-item::before{
            font-family: "Font Awesome 6 Pro";
        }
        .breadscrumb-section .breadscrumb-contain nav .breadcrumb{
            padding-top:0;
        }

        .side-tab-btn {
    position: fixed;
    top: 160px;
    left: 0;
    z-index: 9;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border: 1px solid #ccc;
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    width: 30px;   /* کوچکتر شد */
    height: 50px;  /* کوچکتر شد */
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-btn {
    position: absolute;
    bottom: 35px;
    left: 10px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);       /* افکت شیشه‌ای */
    color: #111;
    padding: 8px 10px;
    border-radius: 14px;              /* گردتر */
    font-size: 15px;
    text-decoration: none;
    font-weight: 600;

    box-shadow: 0 4px 12px rgba(0,0,0,0.15);   /* سایه لطیف */
    transition: all .25s ease;
}

/* افکت هاور */
.ai-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    transform: translateY(-2px);      /* کمی بالا رفتن */
}

.diabetday-btn {
    position: absolute;
    top: 10px;
    right: 50%;
    transform: translateX(50%);
    background: linear-gradient(135deg, #4fff60, #6fadab);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(0, 132, 255, 0.35);
    text-decoration: none;
    transition: 0.25s ease;
}

/* افکت هاور */
.diabetday-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 22px rgba(0, 132, 255, 0.45);
}


/* افکت hover */
.side-tab-btn:hover {
    transform: translateX(3px);
    box-shadow: 3px 2px 8px rgba(0, 0, 0, 0.25);
}

/* آیکون */
.side-tab-btn i {
    font-size: 13px;  /* کوچکتر شد */
    color: #444;
    transition: transform 0.3s ease;
}

/* وقتی منو بازه */
.side-tab-btn.active i {
    transform: rotate(180deg);
}

/* حالت تیره */
@media (prefers-color-scheme: dark) {
    .side-tab-btn {
        background: linear-gradient(145deg, #2b2b2b, #1f1f1f);
        border-color: #444;
    }
    .side-tab-btn i {
        color: #ddd;
    }
}

    @media only screen and (max-width: 768px) {
        .table_res table {
            border: 0;
        }

        .table_res table thead {
            border: none;
            clip: rect(0 0 0 0);
            height: 1px;
            margin: -1px;
            overflow: hidden;
            padding: 0;
            position: absolute;
            width: 1px;
        }

        .table_res table tr {
            border-bottom: 3px solid #ddd;
            display: block;
            margin-bottom: .625em;
        }

        .table_res table td {
            border-bottom: 1px solid #ddd;
            display: block;
            font-size: 12px;
            text-align: left;
            padding: 5px 10px !important;
        }

        .table_res table td::before {
            /*
            * aria-label has no advantage, it won't be read inside a table
            content: attr(aria-label);
            */
            content: attr(data-label);
            float: right;
            font-weight: bold;
            text-transform: uppercase;
        }

        .table_res table td:last-child {
            border-bottom: 0;
        }

        .table_res tbody tr td:nth-of-type(odd) {
            background-color: #f2f2f2;
        }

        .contain-mobile-height{
            height: 217px !important;
        }
    }

    .deal-section .deal-box .deal-detail h5{
        -webkit-box-orient: vertical;
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
    }

    .deal-section .deal-box .deal-detail .item{
        -webkit-box-orient: vertical;
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 1;
    }

    .video-articles-section {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        padding: 60px 0;
    }

    .video-articles-section .title-leaf svg{
        background-color: #f0f2f4;
    }

    .video-article-box {
        display: block;
        border-radius: 22px;
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
        transition: transform 0.45s ease, box-shadow 0.45s ease;
        transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-font-smoothing: subpixel-antialiased;
    }

    .video-article-box:hover {
        transform: translateY(-12px) translateZ(0);
        box-shadow: 0 25px 50px rgba(0,0,0,0.18);
    }

    .video-article-box img {
        width: 100%;
        height: 400px;
        object-fit: cover;
        display: block;
        transition: transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    .video-article-box:hover img {
        transform: scale(1.12) translateZ(0);
    }

    .video-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.65) 100%);
        z-index: 1;
        pointer-events: none;
    }

    .play-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 92px;
        height: 92px;
        margin-top: -46px;
        margin-left: -46px;
        background: rgba(255,255,255,0.98);
        border: 4px solid #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 38px;
        color: var(--theme-color, #28a745);
        z-index: 2;
        box-shadow: 0 12px 35px rgba(0,0,0,0.3);
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    .video-article-box:hover .play-icon {
        transform: translateZ(0) scale(1.18);
        background: #fff;
        box-shadow: 0 20px 50px rgba(40,167,69,0.5);
    }

    .play-icon i {
        margin-left: 8px;
    }

    .video-content {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 32px 28px;
        z-index: 2;
        transform: translateY(15px);
        transition: transform 0.5s ease;
    }

    .video-content h4 {
        -webkit-box-orient: vertical;
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 1;
    }

    .video-article-box:hover .video-content {
        transform: translateY(0);
    }

    .video-duration {
        font-size: 13px;
        padding: 7px 15px;
        border-radius: 50px;
        font-weight: 600;
        background: #fff;
        color: #212529;
    }

    @media (max-width: 768px) {
        .video-article-box {
            border-radius: 18px;
        }
        .video-article-box img { height: auto !important; }
        .play-icon {
            width: 76px;
            height: 76px;
            margin-top: -38px;
            margin-left: -38px;
            font-size: 32px;
        }
    }
/* ============================================
   AUTH MODAL - MODERN DESIGN
   ============================================ */

#authModal .modal-body{
    overflow-y:scroll;
}

/* Modal Container */
#authModal .modal-dialog {
    max-width: 420px;
    margin: 0 auto;
}

.auth-modal-content {
    overflow: hidden;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 100px rgba(61, 207, 255, 0.1);
    position: relative;
}

/* Modal Header - Modern Design */
.auth-modal-header {
    background: linear-gradient(135deg,
        var(--theme-color) 0%,
        #0d8aff 50%,
        #3a86ff 100%);
    padding: 30px 20px 40px;
    position: relative;
    overflow: hidden;
}

/* Animated Background */
.auth-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: float 15s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-10px, -10px); }
}

/* Close Button */
.auth-close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: #333;
    font-size: 14px;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-close-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}


.auth-logo {
    width: 170px;
    margin: 0 auto;
    display: block;
    margin-top: 25px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

/* Welcome Text */
.auth-welcome-text {
    position: relative;
    z-index: 2;
}

.auth-title {
    color: white;
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0;
}

/* Steps Container */
.auth-step {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Labels */
.auth-label {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.auth-label-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--theme-color) 0%, #0d8aff 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    color: white;
    font-size: 16px;
}

/* Mobile Input Group */
.auth-input-group {
    display: flex;
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.auth-input-group:focus-within {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px rgba(61, 207, 255, 0.15);
}

.auth-input-prefix {
    padding: 0 16px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    border-right: 2px solid #e8e8e8;
    font-weight: 600;
    color: #555;
}

.auth-country-code {
    font-size: 16px;
}

.auth-mobile-input {
    flex: 1;
    border: none;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    text-align: left;
    direction: ltr;
    background: transparent;
    outline: none;
    color: #333;
}

.auth-mobile-input::placeholder {
    color: #aaa;
    font-weight: normal;
}

/* Code Inputs */
.auth-code-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-direction: row-reverse;
}

.auth-code-input {
    width: 52px !important;
    height: 64px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    background: white;
    color: #333;
    transition: all 0.2s ease;
    direction: ltr;
}

.auth-code-input:focus {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px rgba(61, 207, 255, 0.15);
    transform: translateY(-2px);
}

.auth-code-input.filled {
    border-color: var(--theme-color);
    background: linear-gradient(135deg, rgba(61, 207, 255, 0.05) 0%, rgba(13, 138, 255, 0.05) 100%);
}

/* Buttons */
.auth-primary-btn,
.auth-verify-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.auth-primary-btn {
    background: linear-gradient(135deg, var(--theme-color) 0%, #0d8aff 100%);
    color: white;
}

.auth-primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(61, 207, 255, 0.4);
}

.auth-verify-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.auth-verify-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.4);
}

.auth-primary-btn:disabled,
.auth-verify-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.auth-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Timer & Resend */
.auth-timer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 12px 0;
}

.auth-timer {
    display: flex;
    align-items: center;
    color: #dc3545;
    font-weight: 600;
    font-size: 14px;
}

.auth-timer-text {
    animation: pulse 2s infinite;
}

.auth-resend-btn {
    background: none;
    border: none;
    color: var(--theme-color);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s;
}

.auth-resend-btn:hover {
    color: #0d8aff;
}

/* Mobile Info */
.auth-mobile-info {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid #e8e8e8;
}

.auth-mobile-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--theme-color) 0%, #0d8aff 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-left: 12px;
}

.auth-mobile-details {
    flex: 1;
}

.auth-mobile-label {
    color: #666;
    font-size: 13px;
    margin-bottom: 4px;
}

.auth-mobile-number {
    color: #333;
    font-weight: 700;
    font-size: 16px;
    direction: ltr;
}

/* Name Inputs */
.auth-name-input-group {
    position: relative;
}

.auth-name-input {
    width: 100%;
    padding: 12px;
    border: none;
    border-bottom: 2px solid #e8e8e8;
    background: transparent;
    font-size: 15px;
    text-align: right;
    transition: all 0.3s ease;
    outline: none;
}

.auth-name-input:focus {
    border-bottom-color: var(--theme-color);
}

/* Back Button */
.auth-back-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    padding: 0;
    margin-bottom: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.auth-back-btn:hover {
    color: var(--theme-color);
}

/* Change Number Link */
.auth-change-number {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.auth-change-number a {
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-change-number a:hover {
    color: var(--theme-color);
}

/* Input Hint */
.auth-input-hint {
    color: #666;
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    align-items: center;
}

/* Footer Text */
.auth-footer-text {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 13px;
}

.auth-terms-link {
    color: var(--theme-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-terms-link:hover {
    text-decoration: underline;
}

/* Loading State */
.auth-loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-loading-spinner {
    text-align: center;
}

.auth-spinner-circle {
    width: 60px;
    height: 60px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--theme-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.auth-spinner-text {
    color: #666;
    font-size: 14px;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.auth-code-input.shake {
    animation: shake 0.5s;
    border-color: #dc3545 !important;
}

/* Responsive Design */
@media (max-width: 576px) {
    #authModal .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100vh;
    }

    .auth-modal-content {
        border-radius: 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .auth-modal-header {
        padding: 25px 20px 35px;
        flex-shrink: 0;
    }

    .auth-step {
        flex: 1;
        overflow-y: auto;
        padding: 20px !important;
    }

    .auth-code-input {
        width: 44px !important;
        height: 56px;
        font-size: 20px;
    }

    .auth-close-btn {
        top: 12px;
        left: 12px;
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .auth-title {
        font-size: 20px;
    }

    /* iOS specific fixes */
    @supports (-webkit-touch-callout: none) {
        .auth-modal-content {
            -webkit-overflow-scrolling: touch;
        }

        .auth-step {
            padding-bottom: 80px !important;
        }

        .auth-primary-btn,
        .auth-verify-btn {
            position: sticky;
            bottom: 20px;
            z-index: 10;
            box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
        }
    }
}

/* Hide number input spinners */
.auth-mobile-input::-webkit-outer-spin-button,
.auth-mobile-input::-webkit-inner-spin-button,
.auth-code-input::-webkit-outer-spin-button,
.auth-code-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.auth-mobile-input[type=number],
.auth-code-input[type=number] {
    -moz-appearance: textfield;
}

/* Accessibility Improvements */
.auth-primary-btn:focus,
.auth-verify-btn:focus,
.auth-mobile-input:focus,
.auth-code-input:focus {
    outline: 2px solid var(--theme-color);
    outline-offset: 2px;
}

/* Performance Optimizations */
.auth-modal-content {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}
.blockUI.blockOverlay {
    z-index: 999999 !important;
}
.blockUI.blockMsg {
    z-index: 999999 !important;
}
    

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
    

/* ---------------------------------------------------------------------------
   لوگوی لودرِ صفحه — فاز ۷۱
   ---------------------------------------------------------------------------
   تا این فاز `style="width: 180px; …"`ِ درون‌خطی بود، روی یک `<img>` که
   مسیرش هم ثابت بود. حالا مسیر از پنل می‌آید
   (`_shared/site_logo.html`) و اندازه اینجاست.

   `max-width` و نه `width`: لوگویی که مالک آپلود می‌کند هر نسبتی
   می‌تواند داشته باشد، و عرضِ ثابت لوگوی بلند و باریک را کشیده نشان
   می‌دهد.
   --------------------------------------------------------------------------- */

.hs-loader__logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 2rem;
}
