﻿/* ==========================================================================
   فروشگاه جامع شهر آجیل و زرخزان صفی‌آباد | app.css
   نسخه نهایی، تمیز، بدون تکرار و کاملاً بهینه
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. فونت محلی و کاملاً آفلاین وزیرمتن (بدون نیاز به اینترنت)
   -------------------------------------------------------------------------- */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
   2. متغیرهای تم و پالت رنگی اختصاصی زعفرانی
   -------------------------------------------------------------------------- */
:root {
    --font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    /* پالت رنگی اصلی */
    --primary-purple: #2E1A47;
    --primary-purple-hover: #452968;
    --gold-accent: #C9A227;
    --gold-hover: #e0b838;
    --gold-subtle: #FAF5E8;
    --border-beige: #EAE3D2;
    --bg-cream: #FAF9F6;
    --text-dark: #2E1A47;
    --text-muted: #776D82;
    --danger-red: #d9534f;
    --success-green: #278653;
    --green-bg: #e8f7ed;
    --green-border: #8bd09b;
    /* پنل ادمین و اندازه‌ها */
    --card: #ffffff;
    --border: #eadfc9;
    --radius: 8px;
    --radius-12: 12px;
    --container-max: 1050px;
    /* سایه‌ها */
    --shadow-sm: 0 2px 8px rgba(46, 26, 71, 0.05);
    --shadow-md: 0 6px 20px rgba(46, 26, 71, 0.06);
    --shadow-lg: 0 10px 30px rgba(46, 26, 71, 0.12);
}

/* --------------------------------------------------------------------------
   3. ریست پایه و تنظیمات عمومی (Global Reset)
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    direction: rtl;
    text-align: right;
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family) !important;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, textarea, select, option {
    font-family: var(--font-family) !important;
}

/* --------------------------------------------------------------------------
   4. استایل‌های صفحه نخست (Home.razor - سه‌بعدی و لوکس)
   -------------------------------------------------------------------------- */
.home-page {
    width: 100%;
    max-width: 520px;
    min-height: 100vh;
    margin: 0 auto;
    padding-bottom: 105px;
    overflow-x: hidden;
    background: #faf9f6;
    color: var(--primary-purple);
}

    .home-page .persian-numbers {
        font-feature-settings: "ss01", "ss02";
        -webkit-font-feature-settings: "ss01", "ss02";
    }

    /* سربرگ فروشگاه */
    .home-page .site-top-header {
        width: 100%;
        padding: 12px 14px 8px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .home-page .brand-badge {
        width: 100%;
        min-height: 58px;
        padding: 8px 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        border: 1px solid rgba(201, 162, 39, 0.38);
        border-radius: 999px;
        background: linear-gradient(135deg, #fff, #faf8f0);
        box-shadow: 0 5px 18px rgba(46, 26, 71, 0.07);
    }

    .home-page .brand-icon {
        flex: 0 0 auto;
        font-size: 1.15rem;
        line-height: 1;
    }

    .home-page .brand-text-group {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .home-page .brand-title {
        margin: 0;
        color: var(--primary-purple);
        font-size: 1.12rem;
        font-weight: 900;
        line-height: 1.3;
    }

    .home-page .brand-slogan {
        max-width: 100%;
        margin-top: 2px;
        color: #a88314;
        font-size: 0.65rem;
        font-weight: 700;
        line-height: 1.5;
    }

    .home-page .home-container {
        width: 100%;
        margin: 0 auto;
        padding: 0 14px 20px;
    }

    .home-page .banner-placeholder {
        min-height: 170px;
        margin: 6px 0 20px;
        padding: 24px 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px dashed rgba(201, 162, 39, 0.55);
        border-radius: 22px;
        background: linear-gradient(135deg, #fffdf6, #f3ecda);
        color: #776d82;
        font-size: 0.85rem;
        text-align: center;
    }

    /* اسلایدر ۳ بعدی لوکس بنر */
.slider-master-wrapper {
    position: relative;
    width: 100%;
    height: clamp(210px, 58vw, 300px); /* ارتفاع فعلی */
    margin: 8px 0 16px;
    isolation: isolate;
    perspective: 1000px;
}


    .home-page .ambient-glow {
        position: absolute;
        z-index: -1;
        inset: 12% 8%;
        border-radius: 50%;
        background: rgba(201, 162, 39, 0.2);
        filter: blur(35px);
        pointer-events: none;
    }

    .home-page .banner-3d-stage {
        position: relative;
        width: 100%;
        height: 100%;
        transform-style: preserve-3d;
    }

    .home-page .slide-card-3d {
        position: absolute;
        top: 5%;
        left: 9%;
        width: 82%;
        height: 82%;
        overflow: visible;
        border-radius: 20px;
        cursor: pointer;
        transition: transform 450ms ease, opacity 450ms ease, filter 450ms ease;
    }

        .home-page .slide-card-3d.is-center {
            z-index: 3;
            opacity: 1;
            transform: translateX(0) scale(1);
            filter: none;
        }

        .home-page .slide-card-3d.is-next {
            z-index: 2;
            opacity: 0.72;
            transform: translateX(39%) scale(0.82);
            filter: saturate(0.8);
        }

        .home-page .slide-card-3d.is-prev {
            z-index: 2;
            opacity: 0.72;
            transform: translateX(-39%) scale(0.82);
            filter: saturate(0.8);
        }

        .home-page .slide-card-3d.is-hidden {
            z-index: 0;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transform: scale(0.7);
        }

    .home-page .card-inner {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
        border: 3px solid rgba(255, 255, 255, 0.85);
        border-radius: 20px;
        background: #eee6d5;
        box-shadow: 0 14px 30px rgba(46, 26, 71, 0.2);
    }

        .home-page .card-inner > img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
        }

    .home-page .shimmer-sweep {
        position: absolute;
        inset: 0;
        background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.18) 48%, transparent 65%);
        pointer-events: none;
    }

    .home-page .crystal-frame {
        position: absolute;
        inset: 0;
        border: 1px solid rgba(201, 162, 39, 0.42);
        border-radius: inherit;
        pointer-events: none;
    }

    .home-page .nav-crystal-btn {
        position: absolute;
        z-index: 5;
        top: 42%;
        width: 36px;
        height: 36px;
        padding: 7px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(201, 162, 39, 0.45);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.94);
        color: var(--primary-purple);
        box-shadow: 0 4px 12px rgba(46, 26, 71, 0.14);
        cursor: pointer;
    }

        .home-page .nav-crystal-btn:hover {
            background: #f7edc8;
        }

        .home-page .nav-crystal-btn svg {
            width: 21px;
            height: 21px;
        }

        .home-page .nav-crystal-btn.prev {
            right: 0;
        }

        .home-page .nav-crystal-btn.next {
            left: 0;
        }

    .home-page .slider-controls {
        position: absolute;
        z-index: 6;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        justify-content: center;
    }

    .home-page .dots-pill {
        min-height: 25px;
        padding: 5px 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        border: 1px solid rgba(201, 162, 39, 0.25);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.88);
        box-shadow: 0 3px 10px rgba(46, 26, 71, 0.08);
    }

    .home-page .pill-dot {
        width: 8px;
        height: 8px;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: #d9d3c6;
        cursor: pointer;
        transition: width 180ms ease, background 180ms ease;
    }

        .home-page .pill-dot.active {
            width: 20px;
            background: var(--gold-accent);
        }

    /* کارت دسته‌بندی‌ها */
    .home-page .categories-master-wrapper {
        position: relative;
        margin: 18px 0 22px;
    }

    .home-page .categories-ambient-glow {
        position: absolute;
        z-index: 0;
        inset: 10px 8%;
        border-radius: 24px;
        background: rgba(201, 162, 39, 0.12);
        filter: blur(22px);
        pointer-events: none;
    }

    .home-page .categories-card-3d {
        position: relative;
        overflow: hidden;
        border: 1px solid rgba(201, 162, 39, 0.28);
        border-radius: 20px;
        background: #fff;
        box-shadow: 0 7px 20px rgba(46, 26, 71, 0.06);
    }

    .home-page .categories-card-inner {
        position: relative;
        z-index: 1;
        padding: 14px 13px 15px;
    }

    .home-page .section-header {
        min-height: 32px;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .home-page .header-title {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 7px;
    }

    .home-page .header-icon {
        font-size: 1rem;
    }

    .home-page .header-title h2 {
        margin: 0;
        color: var(--primary-purple);
        font-size: 0.96rem;
        font-weight: 900;
    }

    .home-page .clear-filter-btn {
        flex: 0 0 auto;
        padding: 6px 10px;
        border: 1px solid rgba(201, 162, 39, 0.35);
        border-radius: 999px;
        background: #fffaf0;
        color: #80620e;
        font-size: 0.7rem;
        font-weight: 700;
        cursor: pointer;
    }

    .home-page .categories-scroll-wrapper {
        display: flex;
        gap: 13px;
        overflow-x: auto;
        padding: 2px 1px 6px;
        scrollbar-width: thin;
        scrollbar-color: #d7c580 transparent;
    }

        .home-page .categories-scroll-wrapper::-webkit-scrollbar {
            height: 4px;
        }

        .home-page .categories-scroll-wrapper::-webkit-scrollbar-thumb {
            border-radius: 99px;
            background: #d7c580;
        }

    .home-page .category-item {
        flex: 0 0 72px;
        min-width: 72px;
        padding: 4px 2px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 7px;
        border: 0;
        border-radius: 14px;
        background: transparent;
        color: #544b60;
        cursor: pointer;
    }

        .home-page .category-item.selected {
            background: #fbf6e6;
        }

    .home-page .cat-avatar-frame {
        position: relative;
        width: 56px;
        height: 56px;
        padding: 3px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(201, 162, 39, 0.42);
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 4px 12px rgba(46, 26, 71, 0.07);
    }

    .home-page .category-item.selected .cat-avatar-frame {
        border: 2px solid var(--gold-accent);
        box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.13);
    }

    .home-page .cat-avatar-glow {
        position: absolute;
        inset: 4px;
        border-radius: 50%;
        background: rgba(201, 162, 39, 0.11);
    }

    .home-page .cat-avatar-inner {
        position: relative;
        z-index: 1;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        border-radius: 50%;
    }

        .home-page .cat-avatar-inner img {
            display: block;
            width: 34px;
            height: 34px;
            object-fit: contain;
        }

    .home-page .cat-emoji {
        font-size: 1.55rem;
        line-height: 1;
    }

    .home-page .cat-title {
        max-width: 72px;
        overflow: hidden;
        color: #554b61;
        font-size: 0.7rem;
        font-weight: 700;
        line-height: 1.4;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .home-page .category-item.selected .cat-title {
        color: #8a6b10;
    }

    .home-page .categories-empty {
        padding: 14px 4px 4px;
        color: #81788a;
        font-size: 0.82rem;
        text-align: center;
    }

    /* محصولات */
    .home-page .products-showcase {
        margin-top: 18px;
    }

    .home-page .showcase-header {
        min-height: 34px;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

        .home-page .showcase-header h3 {
            margin: 0;
            color: var(--primary-purple);
            font-size: 1rem;
            font-weight: 900;
        }

    .home-page .product-count {
        color: #82788a;
        font-size: 0.76rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .home-page .products-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 12px;
        margin-top: 10px;
    }

    .home-page .product-card {
        position: relative;
        min-width: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        border: 1px solid rgba(46, 26, 71, 0.1);
        border-radius: 16px;
        background: linear-gradient(180deg, #fff 0%, #fbfaf7 100%);
        box-shadow: 0 6px 17px rgba(46, 26, 71, 0.07);
    }

    .home-page .prod-click-link,
    .home-page .prod-title-link {
        display: block;
        color: inherit;
        text-decoration: none;
    }

    .home-page .prod-badge {
        position: absolute;
        z-index: 2;
        top: 9px;
        right: 9px;
        max-width: calc(100% - 18px);
        overflow: hidden;
        padding: 4px 9px;
        border: 1px solid rgba(255, 255, 255, 0.7);
        border-radius: 999px;
        background: linear-gradient(135deg, #d8b744, #b08d1f);
        color: var(--primary-purple);
        font-size: 0.68rem;
        font-weight: 800;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .home-page .prod-img-box {
        width: 100%;
        height: 142px;
        padding: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        background: #f7f3ea;
    }

        .home-page .prod-img-box img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

    .home-page .prod-info {
        min-width: 0;
        padding: 9px 10px 11px;
        display: flex;
        flex: 1;
        flex-direction: column;
        text-align: center;
    }

    .home-page .prod-title {
        min-height: 38px;
        margin: 2px 0 5px;
        display: -webkit-box;
        overflow: hidden;
        color: var(--primary-purple);
        font-size: 0.83rem;
        font-weight: 900;
        line-height: 1.45;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .home-page .prod-price-section {
        min-height: 45px;
        margin: 5px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .home-page .price-top-row {
        width: 100%;
        min-height: 20px;
        padding: 0 2px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 4px;
    }

    .home-page .original-price {
        overflow: hidden;
        color: #999;
        font-size: 0.68rem;
        font-weight: 700;
        text-decoration: line-through;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .home-page .discount-badge {
        flex: 0 0 auto;
        padding: 2px 5px;
        border-radius: 6px;
        background: #ffe6e6;
        color: var(--danger-red);
        font-size: 0.64rem;
        font-weight: 900;
    }

    .home-page .prod-price-row {
        width: 100%;
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 4px;
    }

    .home-page .price-val {
        color: var(--primary-purple);
        font-size: 0.92rem;
        font-weight: 900;
    }

    .home-page .price-currency {
        color: var(--text-muted);
        font-size: 0.68rem;
    }

    .home-page .prod-stock-row {
        min-height: 25px;
        margin-bottom: 7px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .home-page .stock-badge {
        padding: 3px 7px;
        border: 1px solid rgba(201, 162, 39, 0.35);
        border-radius: 999px;
        background: rgba(201, 162, 39, 0.08);
        color: #594717;
        font-size: 0.65rem;
        font-weight: 800;
    }

    .home-page .cart-action-area {
        min-height: 39px;
        margin-top: auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .home-page .add-to-cart-btn {
        width: 100%;
        min-height: 39px;
        padding: 7px 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 11px;
        background: var(--success-green);
        color: #fff;
        font-size: 0.75rem;
        font-weight: 900;
        cursor: pointer;
        box-shadow: 0 4px 10px rgba(39, 134, 83, 0.2);
    }

        .home-page .add-to-cart-btn:hover {
            background: #1f7045;
        }

    .home-page .cart-qty-pill {
        width: 100%;
        min-height: 39px;
        padding: 0 5px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-radius: 11px;
        background: var(--success-green);
        color: #fff;
        box-shadow: 0 4px 10px rgba(39, 134, 83, 0.2);
    }

    .home-page .qty-btn {
        width: 28px;
        height: 28px;
        padding: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #fff;
        cursor: pointer;
    }

        .home-page .qty-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

        .home-page .qty-btn svg {
            width: 18px;
            height: 18px;
        }

    .home-page .qty-counter {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .home-page .qty-num {
        color: #fff;
        font-size: 1rem;
        font-weight: 900;
    }

    .home-page .pill-cart-icon {
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .home-page .pill-cart-icon svg {
            width: 16px;
            height: 16px;
        }

    .home-page .no-products-box {
        min-height: 145px;
        padding: 24px 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid rgba(201, 162, 39, 0.25);
        border-radius: 18px;
        background: #fff;
        color: #776d82;
        font-size: 0.85rem;
        text-align: center;
    }

    .home-page .no-products-icon {
        font-size: 1.8rem;
    }

@media (max-width: 360px) {
    .home-page .home-container {
        padding-right: 10px;
        padding-left: 10px;
    }

    .home-page .products-grid {
        gap: 8px;
    }

    .home-page .prod-img-box {
        height: 125px;
    }

    .home-page .prod-info {
        padding-right: 7px;
        padding-left: 7px;
    }

    .home-page .price-val {
        font-size: 0.82rem;
    }
}

/* --------------------------------------------------------------------------
   5. استایل‌های سبد خرید (Cart.razor)
   -------------------------------------------------------------------------- */
.cart-container {
    max-width: 520px;
    margin: 0 auto 100px auto;
    padding: 16px;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cart-title {
    color: var(--primary-purple);
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
}

.cart-badge {
    background: var(--border-beige);
    color: var(--primary-purple);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.btn-back {
    background: #fff;
    border: 1px solid var(--border-beige);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-purple);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

    .btn-back:hover {
        background: var(--primary-purple);
        color: #fff;
    }

.empty-cart-card,
.empty-cart-box {
    background: #fff;
    border: 1px solid var(--border-beige);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.empty-icon-wrapper,
.empty-icon {
    font-size: 3rem;
    color: var(--gold-accent);
    margin-bottom: 12px;
}

.empty-cart-card h3 {
    color: var(--primary-purple);
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.empty-cart-card p,
.empty-cart-box p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.btn-gold-action {
    background: linear-gradient(135deg, var(--gold-accent), var(--gold-hover));
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.3);
    transition: transform 0.2s ease;
}

    .btn-gold-action:hover {
        transform: translateY(-2px);
    }

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.cart-card-item {
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--border-beige);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.item-img {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
    background: #f4f0eb;
    border: 1px solid var(--border-beige);
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-title {
    font-size: 0.95rem;
    color: var(--primary-purple);
    font-weight: 700;
    margin: 0;
}

.item-original-price del {
    color: #999;
    font-size: 0.8rem;
}

.item-unit-price {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.item-total-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-purple);
}

.item-discount-badge {
    color: var(--danger-red);
    font-size: 0.78rem;
    margin-right: 4px;
}

.item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.quantity-controller {
    display: flex;
    align-items: center;
    background: #f5f2eb;
    border-radius: 10px;
    border: 1px solid var(--border-beige);
    overflow: hidden;
}

    .quantity-controller .qty-btn {
        background: transparent;
        border: none;
        width: 28px;
        height: 28px;
        font-weight: bold;
        color: var(--primary-purple);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.15s;
    }

        .quantity-controller .qty-btn:hover {
            background: #e5ded3;
        }

.qty-number {
    padding: 0 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-purple);
}

.btn-delete {
    background: rgba(217, 83, 79, 0.1);
    border: none;
    color: var(--danger-red);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

    .btn-delete:hover {
        background: rgba(217, 83, 79, 0.2);
    }

.cart-summary-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--border-beige);
    padding: 18px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.discount-row {
    color: var(--danger-red);
}

.total-row {
    border-top: 1px dashed var(--border-beige);
    padding-top: 10px;
    font-weight: 700;
    color: var(--primary-purple);
    font-size: 1rem;
}

.highlight-price {
    color: var(--gold-accent);
    font-weight: 800;
    font-size: 1.15rem;
}

.btn-checkout {
    background: var(--primary-purple);
    color: #FAF9F6;
    border: none;
    padding: 14px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 6px;
    box-shadow: 0 4px 15px rgba(46, 26, 71, 0.2);
    transition: all 0.2s ease;
}

    .btn-checkout:hover {
        background: var(--primary-purple-hover);
        transform: translateY(-1px);
    }

.btn-clear {
    background: transparent;
    border: 1px solid var(--border-beige);
    color: var(--text-muted);
    padding: 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-clear:hover {
        background: #f0ebe1;
    }

/* --------------------------------------------------------------------------
   6. استایل‌های صفحه تسویه‌حساب (Checkout.razor)
   -------------------------------------------------------------------------- */
.checkout-container {
    max-width: 540px;
    margin: 0 auto 110px auto;
    padding: 16px;
}

.checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    background: #fff;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid var(--border-beige);
    box-shadow: var(--shadow-sm);
}

    .checkout-header h2 {
        color: var(--primary-purple);
        font-size: 1.15rem;
        font-weight: 800;
        margin: 0;
    }

.checkout-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--border-beige);
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
}

.section-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--primary-purple);
    margin-top: 0;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #F2EDE4;
    padding-bottom: 10px;
}

    .section-title i {
        color: var(--gold-accent);
    }

.invoice-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.invoice-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #333;
}

.item-qty {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.item-price {
    font-weight: 600;
    color: var(--primary-purple);
}

.invoice-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border-beige);
    padding-top: 12px;
    font-weight: 700;
    color: var(--primary-purple);
    margin-top: 8px;
}

.total-price-val {
    color: var(--gold-accent);
    font-size: 1.15rem;
    font-weight: 900;
}

.form-group {
    margin-bottom: 14px;
}

    .form-group label {
        display: block;
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--text-muted);
        margin-bottom: 6px;
    }

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-beige);
    border-radius: 12px;
    background: var(--bg-cream);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--primary-purple);
    outline: none;
    transition: all 0.2s ease;
}

    .form-input:focus,
    .form-textarea:focus {
        border-color: var(--primary-purple);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(46, 26, 71, 0.08);
    }

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--gold-accent);
    background: rgba(201, 162, 39, 0.05);
    border-radius: 14px;
}

.payment-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .payment-details strong {
        color: var(--primary-purple);
        font-size: 0.95rem;
    }

    .payment-details span {
        color: var(--text-muted);
        font-size: 0.8rem;
    }

.submit-section {
    margin-top: 20px;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-hover));
    color: #FAF9F6;
    border: none;
    padding: 15px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(46, 26, 71, 0.25);
    transition: all 0.2s ease;
}

    .btn-submit:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(46, 26, 71, 0.35);
    }

    .btn-submit:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

.btn-home {
    background: var(--primary-purple);
    color: #FAF9F6;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 700;
    margin-top: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .btn-home:hover {
        background: var(--primary-purple-hover);
    }

/* --------------------------------------------------------------------------
   7. استایل‌های پنل ادمین (Admin.razor)
   -------------------------------------------------------------------------- */
.admin-container {
    max-width: var(--container-max);
    margin: 20px auto;
    padding: 15px;
}

.header-box {
    background: var(--primary-purple);
    color: var(--bg-cream);
    padding: 20px;
    border-radius: var(--radius-12);
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 4px solid var(--gold-accent);
}

    .header-box h2 {
        margin: 0 0 8px;
    }

    .header-box p {
        margin: 0;
        opacity: 0.9;
    }

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: var(--card);
    padding: 10px;
    border-radius: var(--radius-12);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 160px;
    padding: 12px;
    border: none;
    background: #f4f4f4;
    color: #333;
    font-weight: bold;
    border-radius: var(--radius);
    cursor: pointer;
    transition: 0.3s;
}

    .tab-btn.active {
        background: var(--primary-purple);
        color: var(--gold-accent);
        box-shadow: 0 4px 10px rgba(46, 26, 71, 0.2);
    }

.form-card, .list-card {
    background: var(--card);
    padding: 25px;
    border-radius: var(--radius-12);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.full-width {
    grid-column: span 2;
}

.form-control {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #dfd2ba;
    border-radius: var(--radius);
    background: #fffefa;
    color: #3e3024;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .form-control:focus {
        border-color: var(--gold-accent);
        box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
    }

.field-help {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 5px;
}

.final-price-label {
    color: var(--success-green) !important;
}

.final-price-input {
    border-color: #319b52;
}

.discount-preview {
    background: var(--green-bg);
    color: #17652e;
    border: 1px solid var(--green-border);
    border-radius: var(--radius);
    padding: 12px 15px;
    font-size: 15px;
}

.discount-icon {
    margin-left: 5px;
}

.discount-number {
    color: #c62828;
    font-size: 20px;
    font-weight: bold;
    margin-right: 5px;
}

.no-discount-preview {
    background: #f8f8f8;
    color: #777;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    padding: 11px 15px;
    font-size: 13px;
}

.upload-status {
    margin-top: 8px;
    color: var(--primary-purple);
    font-weight: bold;
    font-size: 13px;
}

.image-preview-box, .cat-preview-box {
    margin-top: 10px;
    width: 90px;
    height: 90px;
    border: 2px solid var(--gold-accent);
    border-radius: var(--radius-12);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-cream);
    overflow: hidden;
}

.image-preview, .cat-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-preview-emoji {
    font-size: 38px;
}

.btn-group {
    margin-top: 18px;
    display: flex;
    gap: 10px;
}

.btn {
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: 0.2s;
}

.btn-save {
    background: var(--gold-accent);
    color: var(--primary-purple);
}

    .btn-save:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-cancel {
    background: #888;
    color: #fff;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

    .table th, .table td {
        padding: 12px 10px;
        text-align: right;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
    }

.thumb-img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}

@media (max-width: 640px) {
    .admin-tabs {
        flex-direction: column;
    }

    .btn-group {
        flex-direction: column;
    }

        .btn-group .btn {
            width: 100%;
        }
}
/* ==========================================================================
   صفحه سفارش‌ها (Orders.razor)
   ========================================================================== */
.orders-container {
    max-width: 520px;
    margin: 0 auto 100px;
    padding: 16px;
    font-family: inherit;
}

.orders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.orders-title {
    color: #2E1A47;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
}

.orders-subtitle {
    color: #776D82;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 18px;
}

.btn-back {
    background: #fff;
    border: 1px solid #EAE3D2;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #2E1A47;
    box-shadow: 0 2px 8px rgba(46,26,71,.05);
}

.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    background: #f0ece3;
    padding: 4px;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #776D82;
    border-radius: 9px;
    cursor: pointer;
    transition: all .2s;
}

    .tab-btn.active {
        background: #2E1A47;
        color: #FAF9F6;
        box-shadow: 0 3px 10px rgba(46,26,71,.2);
    }

.state-box {
    background: #fff;
    border: 1px solid #EAE3D2;
    border-radius: 16px;
    padding: 36px 20px;
    text-align: center;
    color: #776D82;
}

    .state-box.empty .empty-icon {
        font-size: 2.2rem;
        display: block;
        margin-bottom: 8px;
    }

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.order-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #EAE3D2;
    box-shadow: 0 4px 15px rgba(46,26,71,.05);
    overflow: hidden;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(234,227,210,.25);
    padding: 12px 16px;
    border-bottom: 1px solid #EAE3D2;
}

.order-code {
    font-size: 0.88rem;
    color: #2E1A47;
}

.order-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

    .order-status.processing {
        background: rgba(201,162,39,.15);
        color: #a68218;
    }

    .order-status.delivered {
        background: rgba(46,125,50,.12);
        color: #2e7d32;
    }

    .order-status.canceled {
        background: rgba(217,56,56,.12);
        color: #d93838;
    }

.order-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.86rem;
}

.info-label {
    color: #776D82;
}

.info-value {
    color: #2E1A47;
    font-weight: 600;
}

.highlight-price {
    color: #8C1D40;
    font-weight: 800;
}

.order-footer {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: #faf8f5;
    border-top: 1px solid #f2ede4;
}

.btn-action {
    flex: 1;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

    .btn-action.details {
        background: #fff;
        color: #2E1A47;
        border: 1px solid #2E1A47;
    }

    .btn-action.tracking {
        background: linear-gradient(135deg, #C9A227, #e0b838);
        color: #fff;
        border: none;
    }

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.modal-content {
    background: #FAF9F6;
    width: 100%;
    max-width: 420px;
    border-radius: 18px;
    border: 1px solid #EAE3D2;
    box-shadow: 0 10px 30px rgba(46,26,71,.2);
    overflow: hidden;
}

.modal-header {
    background: #2E1A47;
    color: #FAF9F6;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h3 {
        margin: 0;
        font-size: 0.95rem;
        font-weight: 700;
    }

.close-btn {
    background: transparent;
    border: none;
    color: #FAF9F6;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 18px;
    color: #2E1A47;
    font-size: 0.88rem;
    line-height: 1.8;
}

.modal-footer {
    padding: 12px 18px;
    background: #f0ece3;
    display: flex;
    justify-content: flex-end;
}

.btn-confirm {
    background: #2E1A47;
    color: #FAF9F6;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}
/* ==========================================================================
   صفحه مشخصات محصول (ProductDetails.razor)
   ========================================================================== */
.product-page-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: #FAF9F6;
    padding-bottom: 90px;
}

.persian-numbers, .persian-numbers * {
    font-feature-settings: "ss01", "ss02";
    -webkit-font-feature-settings: "ss01", "ss02";
}

.top-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #EAE6DF;
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2E1A47;
    margin: 0;
}

.nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #EAE6DF;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2E1A47;
    cursor: pointer;
    text-decoration: none;
}

.product-card-view {
    margin: 14px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #EAE6DF;
    box-shadow: 0 8px 24px rgba(46,26,71,.06);
    overflow: hidden;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.category-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #2E1A47;
    color: #fff;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 14px;
}

.details-section {
    padding: 18px;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #2E1A47;
    margin: 0 0 12px 0;
}

.meta-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tag-item {
    background: #F4F1EA;
    color: #2E1A47;
    border: 1px solid #E6DFD3;
    border-radius: 10px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.description-box {
    margin-bottom: 20px;
}

.desc-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0 0 6px 0;
}

.desc-content {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.7;
    margin: 0;
    text-align: justify;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-top: 1px dashed #EAE6DF;
    border-bottom: 1px dashed #EAE6DF;
    margin-bottom: 16px;
}

.quantity-controller {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #d9d2c5;
    border-radius: 12px;
    background: #FAF9F6;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    font-weight: bold;
    color: #2E1A47;
    cursor: pointer;
}

    .qty-btn:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

.qty-number {
    width: 36px;
    text-align: center;
    font-weight: 700;
    color: #2E1A47;
}

.price-wrapper {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-line {
    font-size: 0.8rem;
    color: #666;
}

.unit-amount {
    font-weight: 700;
    color: #444;
    margin-right: 4px;
}

.total-line {
    border-top: 1px solid #F0ECE1;
    padding-top: 4px;
    margin-top: 2px;
}

.price-label {
    font-size: 0.75rem;
    color: #777;
}

.discount-unit-line {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.discount-badge-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.discount-badge {
    background-color: #d93838;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 6px;
}

.original-price {
    font-size: 0.8rem;
    color: #999;
    text-decoration: line-through;
}

.sale-unit-line {
    text-align: left;
}

.price-value {
    display: inline-block;
}

    .price-value .amount {
        font-size: 1.2rem;
        font-weight: 900;
        color: #C9A227;
    }

    .price-value .currency {
        font-size: 0.8rem;
        font-weight: 700;
        color: #2E1A47;
        margin-right: 2px;
    }

.success-banner {
    background: #E8F5E9;
    border: 1px solid #A5D6A7;
    color: #2E7D32;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
}

.add-to-cart-btn {
    width: 100%;
    background: #2E1A47;
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(46,26,71,.25);
}

.loading-state, .not-found-card {
    padding: 60px 20px;
    text-align: center;
    background: #fff;
    margin: 20px;
    border-radius: 16px;
}
/* ==========================================================================
   صفحه پروفایل کاربری (Profile.razor)
   ========================================================================== */
.profile-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 16px 110px;
    box-sizing: border-box;
    font-family: inherit;
}

.profile-header-card {
    background: linear-gradient(135deg, rgba(46,26,71,.95), rgba(74,43,112,.9));
    border: 1.5px solid rgba(201,162,39,.4);
    border-radius: 28px;
    padding: 24px 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(46,26,71,.18);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.profile-avatar-wrap {
    width: 76px;
    height: 76px;
    margin: 0 auto 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-glow {
    position: absolute;
    inset: -4px;
    background: radial-gradient(circle, rgba(201,162,39,.6) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulseGlow 3s ease-in-out infinite;
}

.profile-avatar-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: #FAF9F6;
    border: 2px solid #C9A227;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.profile-avatar-emoji {
    font-size: 2rem;
}

.profile-name {
    margin: 0 0 4px;
    color: #FAF9F6;
    font-size: 1.25rem;
    font-weight: 800;
}

.profile-phone {
    color: #C9A227;
    font-size: 0.82rem;
    font-weight: 600;
}

.profile-sections-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-card {
    background: #FAF9F6;
    border: 1px solid rgba(201,162,39,.3);
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 4px 15px rgba(46,26,71,.05);
}

.login-card {
    text-align: center;
}

.login-desc {
    font-size: 0.82rem;
    color: #665c75;
    margin-bottom: 15px;
    line-height: 1.5;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.edit-toggle-btn {
    background: rgba(201,162,39,.15);
    border: 1px solid rgba(201,162,39,.35);
    color: #2E1A47;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}

    .edit-toggle-btn:active {
        background: rgba(201,162,39,.3);
    }

.edit-form-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #4a3f5c;
}

.form-control-field {
    text-align: right !important;
    font-size: 0.9rem !important;
    margin-bottom: 0 !important;
}

.royal-textarea {
    resize: vertical;
    min-height: 65px;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.save-btn {
    flex: 2;
    padding: 10px !important;
}

.cancel-btn {
    flex: 1;
    background: rgba(46,26,71,.08);
    border: 1px solid rgba(46,26,71,.15);
    color: #4a3f5c;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}

    .cancel-btn:active {
        background: rgba(46,26,71,.15);
    }

.status-alert {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(46,125,50,.12);
    color: #2e7d32;
    border: 1px solid rgba(46,125,50,.3);
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.royal-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 14px;
    border: 1px solid rgba(201,162,39,.4);
    background: #fff;
    text-align: center;
    font-size: 1.05rem;
    box-sizing: border-box;
    margin-bottom: 12px;
    outline: none;
    color: #2E1A47;
}

    .royal-input:focus {
        border-color: #2E1A47;
        box-shadow: 0 0 0 3px rgba(201,162,39,.2);
    }

.royal-btn-primary {
    width: 100%;
    padding: 12px;
    background: #2E1A47;
    color: #FAF9F6;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(46,26,71,.25);
    transition: background .2s;
}

    .royal-btn-primary:active {
        background: #3f2461;
    }

.card-section-title {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #2E1A47;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    font-size: 1.1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(201,162,39,.12);
    font-size: 0.88rem;
}

    .info-row:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

.info-label {
    color: #665c75;
    font-weight: 600;
    min-width: 90px;
}

.info-value {
    color: #2E1A47;
    font-weight: 700;
    text-align: left;
}

.address-inline {
    text-align: right;
    line-height: 1.4;
    font-size: 0.82rem;
}

.role-highlight {
    color: #C9A227;
    background: rgba(201,162,39,.15);
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 0.8rem;
}

.active-status {
    color: #2e7d32;
    background: rgba(46,125,50,.1);
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 0.8rem;
}

.links-card, .special-panel-card {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-link-item {
    width: 100%;
    background: transparent;
    border: none;
    padding: 12px 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: right;
    font-family: inherit;
}

    .profile-link-item:active {
        background: rgba(46,26,71,.06);
    }

.admin-link {
    background: rgba(201,162,39,.12);
}

.staff-link {
    background: rgba(46,26,71,.08);
}

.link-icon {
    font-size: 1.2rem;
}

.link-text {
    flex: 1;
    color: #2E1A47;
    font-size: 0.9rem;
    font-weight: 700;
}

.link-arrow {
    color: #C9A227;
    font-size: 1rem;
    font-weight: 800;
}

.support-box {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, rgba(201,162,39,.12), rgba(201,162,39,.04));
    border: 1px dashed rgba(201,162,39,.5);
    border-radius: 20px;
}

.support-title {
    margin: 0 0 10px;
    color: #2E1A47;
    font-size: 0.85rem;
    font-weight: 700;
}

.support-phone-btn {
    display: inline-block;
    background: #2E1A47;
    color: #FAF9F6;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(46,26,71,.2);
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        opacity: .6;
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}
/* ==========================================================================
   صفحه جستجوی محصولات (Search.razor)
   ========================================================================== */
.search-container {
    max-width: 500px;
    margin: 0 auto 100px;
    padding: 16px;
    font-family: inherit;
}

.search-header-box {
    background: #fff;
    border: 1px solid #EAE3D2;
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(46, 26, 71, 0.04);
}

.search-page-title {
    color: #2E1A47;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 0 4px;
}

.search-page-subtitle {
    color: #776D82;
    font-size: 0.85rem;
    margin: 0 0 14px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-svg {
    position: absolute;
    right: 12px;
    color: #776D82;
}

.search-main-input {
    width: 100%;
    background: #FAF9F6;
    border: 1px solid #EAE3D2;
    border-radius: 14px;
    padding: 10px 40px;
    font-size: 0.9rem;
    color: #2E1A47;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

    .search-main-input:focus {
        border-color: #2E1A47;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(46, 26, 71, 0.08);
    }

.clear-search-btn {
    position: absolute;
    left: 10px;
    background: transparent;
    border: none;
    color: #776D82;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-tags-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tags-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #776D82;
    white-space: nowrap;
}

.tags-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

    .tags-scroll::-webkit-scrollbar {
        display: none;
    }

.tag-chip {
    background: #fff;
    border: 1px solid #EAE3D2;
    color: #776D82;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

    .tag-chip.active {
        background: #2E1A47;
        color: #FAF9F6;
        border-color: #2E1A47;
        box-shadow: 0 3px 10px rgba(46, 26, 71, 0.2);
    }

.results-header-row {
    margin-bottom: 12px;
}

.results-count-text {
    font-size: 0.85rem;
    color: #776D82;
    font-weight: 600;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.product-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #EAE3D2;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(46, 26, 71, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .product-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(46, 26, 71, 0.08);
    }

.prod-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(46, 26, 71, 0.85);
    color: #FAF9F6;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    z-index: 2;
}

.prod-img-box {
    width: 100%;
    height: 140px;
    background: #f4f0eb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .prod-img-box img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.fallback-img-box {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.prod-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.prod-title {
    font-size: 0.9rem;
    color: #2E1A47;
    font-weight: 700;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prod-price-area {
    margin-top: auto;
}

.price-row-discount {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
}

.discount-badge {
    background: rgba(217, 83, 79, 0.12);
    color: #d9534f;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 700;
}

.original-price {
    color: #999;
    text-decoration: line-through;
}

.prod-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-val {
    font-size: 1rem;
    font-weight: 800;
    color: #C9A227;
}

.price-currency {
    font-size: 0.75rem;
    color: #776D82;
}

.add-to-cart-btn {
    width: 100%;
    background: #2E1A47;
    color: #FAF9F6;
    border: none;
    padding: 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    transition: background 0.2s ease;
}

    .add-to-cart-btn:hover {
        background: #3e255f;
    }

.loading-state, .no-results-box {
    background: #fff;
    border: 1px solid #EAE3D2;
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    color: #776D82;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #EAE3D2;
    border-top-color: #2E1A47;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
/* تنظیم نمایش و پایداری نوار ناوبری پایین در موبایل */
.bottom-nav, .mobile-nav, .nav-bottom {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 70px !important;
    background-color: #ffffff !important;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08) !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    z-index: 9998 !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
}

/* جلوگیری از پوشانده شدن محتوای پایین صفحه در موبایل */
@media (max-width: 768px) {
    .orders-container, .cart-container, .profile-container, .home-container {
        padding-bottom: 90px !important;
    }
}
/* ==========================================================================
   ADMIN PANEL STYLES (پنل مدیریت زرخزان / شهر آجیل)
   ========================================================================== */

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 100px 16px;
    font-family: inherit;
    direction: rtl;
}

/* هدر و تب‌ها */
.admin-header {
    margin-bottom: 24px;
    text-align: center;
}

    .admin-header h1 {
        font-size: 1.75rem;
        font-weight: 800;
        color: #2D1832;
        margin-bottom: 18px;
    }

.admin-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #f1edeb;
    padding: 6px;
    border-radius: 16px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    display: inline-flex;
}

.tab-btn {
    padding: 10px 22px;
    border: none;
    background: transparent;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6c5a6f;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .tab-btn:hover {
        color: #3b1443;
    }

    .tab-btn.active {
        background: linear-gradient(135deg, #4A154B 0%, #2D1832 100%);
        color: #FFF8E7;
        box-shadow: 0 4px 12px rgba(45, 24, 50, 0.25);
    }

/* کارت‌های بخش‌های مختلف پنل */
.admin-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 10px 30px rgba(74, 21, 75, 0.05);
    padding: 24px;
    margin-bottom: 30px;
}

    .admin-card h2,
    .admin-card h3 {
        font-size: 1.25rem;
        font-weight: 700;
        color: #3b1443;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #FAF7F2;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

/* فرم‌های افزودن و ویرایش */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .form-group label {
        font-size: 0.85rem;
        font-weight: 600;
        color: #554457;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 14px;
        border-radius: 12px;
        border: 1.5px solid #E5DCD3;
        background: #FAF7F2;
        color: #2D1832;
        font-size: 0.9rem;
        outline: none;
        transition: all 0.2s ease;
        font-family: inherit;
    }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            border-color: #D4AF37;
            background: #ffffff;
            box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
        }

    .form-group textarea {
        resize: vertical;
        min-height: 85px;
    }

/* دکمه‌ها */
.btn-submit {
    background: linear-gradient(135deg, #D4AF37 0%, #AA820A 100%);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
    transition: all 0.25s ease;
    align-self: flex-start;
}

    .btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
    }

.btn-cancel {
    background: #e2deda;
    color: #443747;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 8px;
}

    .btn-cancel:hover {
        background: #d0c9c3;
    }

/* جداول اطلاعات */
.table-responsive {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid #EFEAE4;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 0.88rem;
}

    .admin-table th {
        background: #FAF7F2;
        color: #4A154B;
        font-weight: 700;
        padding: 14px 16px;
        border-bottom: 2px solid #EFEAE4;
        white-space: nowrap;
    }

    .admin-table td {
        padding: 12px 16px;
        border-bottom: 1px solid #F3EFEA;
        color: #382c3b;
        vertical-align: middle;
    }

    .admin-table tr:last-child td {
        border-bottom: none;
    }

    .admin-table tr:hover {
        background-color: #FDFBF7;
    }

    .admin-table img.table-thumb {
        width: 48px;
        height: 48px;
        border-radius: 10px;
        object-fit: cover;
        border: 1px solid #E5DCD3;
    }

/* دکمه‌های عملیات جدول */
.actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-action-edit {
    background: #EDE7F6;
    color: #4A154B;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

    .btn-action-edit:hover {
        background: #D1C4E9;
    }

.btn-action-delete {
    background: #FFEBEE;
    color: #C62828;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

    .btn-action-delete:hover {
        background: #FFCDD2;
    }

/* وضعیت‌ها و برچسب‌ها (Badges) */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-block;
}

    .status-badge.pending {
        background: #FFF8E1;
        color: #F57F17;
    }

    .status-badge.paid,
    .status-badge.completed {
        background: #E8F5E9;
        color: #2E7D32;
    }

    .status-badge.failed,
    .status-badge.cancelled {
        background: #FFEBEE;
        color: #C62828;
    }

/* ریسپانسیو برای نمایشگرهای کوچک */
@media (max-width: 640px) {
    .admin-container {
        padding: 16px 10px 100px 10px;
    }

    .admin-card {
        padding: 16px;
    }

    .tab-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}
/* ==========================================================================
   SHAHRAJIL / ZARKHAZAN - COMPLETE ADMIN PANEL STYLES
   ========================================================================== */

.admin-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 16px 120px 16px;
    font-family: inherit;
    direction: rtl;
    color: #2D1832;
}

/* هدر پنل */
.header-box {
    text-align: center;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #FAF7F2 0%, #F1EDEB 100%);
    padding: 24px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 8px 24px rgba(74, 21, 75, 0.05);
}

    .header-box h1 {
        font-size: 1.8rem;
        font-weight: 800;
        color: #4A154B;
        margin-bottom: 8px;
    }

.section-desc {
    color: #6C5A6F;
    font-size: 0.92rem;
    margin: 0;
}

/* پیام‌ها (موفقیت / خطا) */
.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 600;
    border: 1px solid #C8E6C9;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 600;
    border: 1px solid #FFCDD2;
}

/* تب‌ها */
.admin-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #EFEAE4;
    padding: 6px;
    border-radius: 16px;
    margin-bottom: 28px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6C5A6F;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .tab-btn:hover {
        color: #4A154B;
        background: rgba(255,255,255,0.5);
    }

    .tab-btn.active {
        background: linear-gradient(135deg, #4A154B 0%, #2D1832 100%);
        color: #FFF8E7;
        box-shadow: 0 4px 12px rgba(74, 21, 75, 0.25);
    }

/* کارت‌های فرم و لیست */
.form-card, .list-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 10px 30px rgba(74, 21, 75, 0.05);
    padding: 24px;
    margin-bottom: 28px;
}

    .form-card h2, .list-card h2, .users-header {
        font-size: 1.25rem;
        font-weight: 700;
        color: #4A154B;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #FAF7F2;
    }

/* گرید فرم‌ها */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .form-group label {
        font-size: 0.85rem;
        font-weight: 600;
        color: #554457;
    }

.form-control {
    padding: 11px 14px;
    border-radius: 12px;
    border: 1.5px solid #E5DCD3;
    background: #FAF7F2;
    color: #2D1832;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

    .form-control:focus {
        border-color: #D4AF37;
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
    }

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

.full-width {
    grid-column: 1 / -1;
}

.field-help {
    font-size: 0.78rem;
    color: #8C7A8F;
    margin-top: 2px;
}

/* بخش قیمت و تخفیف پیشرفته */
.final-price-label {
    color: #2E7D32 !important;
    font-weight: 700 !important;
}

.final-price-input {
    border-color: #A5D6A7 !important;
    background: #F1F8E9 !important;
}

.discount-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FFF8E1;
    border: 1px solid #FFE082;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #F57F17;
    font-weight: 600;
    margin-top: 6px;
}

.no-discount-preview {
    font-size: 0.82rem;
    color: #8C7A8F;
    margin-top: 4px;
}

/* پیش‌نمایش تصویر و آیکون */
.image-preview-box, .cat-preview-box {
    margin-top: 10px;
    display: inline-block;
    padding: 6px;
    background: #FAF7F2;
    border: 1px dashed #D4AF37;
    border-radius: 12px;
}

.image-preview, .cat-preview-img {
    width: 75px;
    height: 75px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.cat-preview-emoji {
    font-size: 2.2rem;
    padding: 4px 12px;
}

.upload-status {
    font-size: 0.82rem;
    color: #6C5A6F;
    margin-top: 6px;
}

/* دکمه‌ها */
.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
}

.btn-save {
    background: linear-gradient(135deg, #D4AF37 0%, #AA820A 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
}

    .btn-save:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
    }

    .btn-save:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-cancel {
    background: #EFEAE4;
    color: #554457;
}

    .btn-cancel:hover {
        background: #E2DCD3;
    }

/* جدول‌ها */
.table-responsive {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid #EFEAE4;
    margin-top: 10px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 0.88rem;
}

    .table th {
        background: #FAF7F2;
        color: #4A154B;
        font-weight: 700;
        padding: 14px 16px;
        border-bottom: 2px solid #EFEAE4;
        white-space: nowrap;
    }

    .table td {
        padding: 12px 16px;
        border-bottom: 1px solid #F3EFEA;
        color: #382C3B;
        vertical-align: middle;
    }

    .table tr:last-child td {
        border-bottom: none;
    }

    .table tr:hover {
        background-color: #FDFBF7;
    }

.thumb-img {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #E5DCD3;
}

.category-icon {
    font-size: 1.6rem;
}

/* برچسب‌ها و قیمت‌ها در جدول */
.badge {
    background: #EDE7F6;
    color: #4A154B;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 650;
    display: inline-block;
}

.price-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.original-price {
    font-size: 0.78rem;
    color: #9E9E9E;
    text-decoration: line-through;
}

.final-price {
    font-weight: 700;
    color: #2E7D32;
}

.normal-price {
    font-weight: 600;
    color: #2D1832;
}

.discount-badge {
    background: #FFEBEE;
    color: #C62828;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-block;
    width: fit-content;
}

/* دکمه‌های ویرایش و حذف جدول */
.btn-edit, .btn-action-edit {
    background: #EDE7F6;
    color: #4A154B;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

    .btn-edit:hover, .btn-action-edit:hover {
        background: #D1C4E9;
    }

.btn-delete, .btn-danger {
    background: #FFEBEE;
    color: #C62828;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

    .btn-delete:hover, .btn-danger:hover {
        background: #FFCDD2;
    }

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* تب بنرها */
.banners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.banner-thumb-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #E5DCD3;
    background: #FAF7F2;
    aspect-ratio: 16/9;
}

    .banner-thumb-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.btn-delete-banner {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(198, 40, 40, 0.9);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

    .btn-delete-banner:hover {
        background: rgb(198, 40, 40);
    }

.banner-upload-group {
    margin-bottom: 16px;
}

/* تب کاربران */
.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.user-search-box {
    max-width: 280px;
}

.phone-number {
    direction: ltr;
    unicode-bidi: embed;
    text-align: right;
    font-family: monospace;
    font-weight: 600;
}

.user-role-badge {
    background: #E3F2FD;
    color: #1565C0;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 650;
    display: inline-block;
}

.role-select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1.5px solid #E5DCD3;
    background: #FAF7F2;
    font-size: 0.85rem;
    outline: none;
}

.save-role-button {
    background: #4A154B;
    color: #FFF8E7;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 650;
    cursor: pointer;
}

    .save-role-button:hover {
        background: #3B1443;
    }

.no-users-message {
    text-align: center;
    color: #8C7A8F;
    padding: 24px;
}

.category-edit-status {
    background: #FFF8E1;
    border: 1px solid #FFE082;
    padding: 10px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #F57F17;
    font-weight: 600;
}

/* ریسپانسیو موبایل */
@media (max-width: 700px) {
    .admin-container {
        padding: 12px 8px 100px 8px;
    }

    .form-card, .list-card {
        padding: 16px 12px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .admin-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
        text-align: center;
    }

    .users-header {
        flex-direction: column;
        align-items: stretch;
    }

    .user-search-box {
        max-width: 100%;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}
/* اصلاح ابعاد و گرید بنرها در پنل مدیریت */
.banners-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    margin-top: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.banner-thumb-card {
    position: relative !important;
    width: 100% !important;
    height: 180px !important; /* ارتفاع کنترل‌شده و استاندارد برای کارت بنر */
    border-radius: 16px !important;
    overflow: hidden !important;
    border: 1.5px solid #E5DCD3 !important;
    background: #FAF7F2 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06) !important;
}

    /* مهار کامل تصویر داخل کادر بدون به هم ریختن ابعاد */
    .banner-thumb-card img,
    .banner-thumb-card > img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }

/* دکمه حذف قرمز روی گوشه بنر */
.btn-delete-banner {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    background: rgba(198, 40, 40, 0.9) !important;
    color: #ffffff !important;
    border: none !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 5 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    transition: transform 0.2s, background 0.2s !important;
}

    .btn-delete-banner:hover {
        background: #b71c1c !important;
        transform: scale(1.1) !important;
    }
/* ==========================================
   Staff Orders Page Additions (ShahrAjil / Zarkhzan)
   ========================================== */

.staff-container {
    background-color: var(--cream-bg, #f9f6ef);
    min-height: 100vh;
    font-family: var(--font-family, Tahoma, sans-serif);
    padding-bottom: 90px !important;
}

    .staff-container .card {
        border-radius: var(--radius-lg, 1rem);
        box-shadow: var(--shadow-sm, 0 0.5rem 1rem rgba(0, 0, 0, 0.05));
        border: none;
        overflow: hidden;
    }

    .staff-container .table thead {
        background-color: var(--primary-purple, #4a154b);
        color: #fff;
    }

    .staff-container .table th,
    .staff-container .table td {
        vertical-align: middle;
        padding: 1rem;
        text-align: right;
    }

    .staff-container .badge {
        padding: 0.5em 0.75em;
        font-weight: 500;
        border-radius: 50rem;
    }

    /* مودال مدیریت سفارشات پرسنل */
    .staff-container .modal-content {
        border-radius: var(--radius-lg, 1rem);
        border: none;
        box-shadow: var(--shadow-lg, 0 1rem 3rem rgba(0,0,0,0.2));
    }

    .staff-container .modal-header {
        background-color: var(--primary-purple, #4a154b);
        color: #fff;
        border-top-right-radius: var(--radius-lg, 1rem);
        border-top-left-radius: var(--radius-lg, 1rem);
    }
