  /* =========================
           1. Reset & Base
        ========================== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: var(--light);
            color: var(--dark);
            line-height: 1.6;
        }

        /* =========================
           2. Variables
        ========================== */
        :root {
            --primary: #2563eb;
            --primary-dark: #1e40af;
            --secondary: #64748b;
            --success: #10b981;
            --danger: #ef4444;
            --dark: #0f172a;
            --light: #f8fafc;
            --border: #e2e8f0;
            --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
        }

        .container {
            max-width: 1400px;
            margin: 30px auto;
            padding: 0 20px;
        }

        /* =========================
           3. Top Bar
        ========================== */
        .top-bar {
            background: var(--dark);
            color: white;
            padding: 8px 0;
            font-size: 13px;
        }

        .top-bar .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .top-bar a {
            color: white;
            text-decoration: none;
            margin: 0 10px;
            transition: color 0.3s;
        }

        .top-bar a:hover {
            color: var(--primary);
        }

        /* =========================
           4. Header
        ========================== */
        header {
            background: white;
            box-shadow: var(--shadow);
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .header-main {
            max-width: 1400px;
            margin: 0 auto;
            padding: 15px 20px;
            display: flex;
            align-items: center;
            gap: 40px;
        }

        .logo {
            font-size: 24px;
            font-weight: 700;
            color: var(--primary);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 10px;
            white-space: nowrap;
        }

        .logo i {
            font-size: 28px;
        }

        /* =========================
           5. Search Bar
        ========================== */
        .search-container {
            flex: 1;
            max-width: 600px;
        }

        .search-form {
            position: relative;
            display: flex;
        }

        .search-form input {
            width: 100%;
            padding: 10px 45px 10px 15px;
            border: 2px solid var(--border);
            border-radius: 50px;
            font-size: 14px;
            transition: all 0.3s;
        }

        .search-form input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        .search-form button {
            position: absolute;
            right: 10px;
            left: 5px;
            top: 50%;
            transform: translateY(-50%);
            background: var(--primary);
            color: white;
            border: none;
            width: 35px;
            height: 35px;
            border-radius: 50%;
            cursor: pointer;
            transition: background 0.3s;
        }

        .search-form button:hover {
            background: var(--primary-dark);
        }

        .clear-search {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--secondary);
            cursor: pointer;
            font-size: 18px;
            display: none;
        }

        .clear-search.active {
            display: block;
        }

        /* =========================
           6. Header Actions
        ========================== */
        .header-actions {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .header-actions a {
            color: var(--dark);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            font-weight: 500;
            transition: color 0.3s;
            position: relative;
        }

        .header-actions a:hover {
            color: var(--primary);
        }

        .cart-icon {
            position: relative;
        }

        .cart-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: var(--danger);
            color: white;
            font-size: 11px;
            padding: 2px 6px;
            border-radius: 10px;
            font-weight: 600;
        }

        .user-menu {
            position: relative;
        }

        .user-avatar {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            background: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            cursor: pointer;
        }

        .orders-icon {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .order-badge {
            background-color: #e74c3c;
            color: #fff;
            border-radius: 999px;
            padding: 2px 8px;
            font-size: 12px;
            margin-right: 4px;
        }

        /* =========================
           7. Navigation
        ========================== */
        .main-nav {
            background: white;
            border-top: 1px solid var(--border);
            border-bottom: 1px solid var(--border);
        }

        .nav-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 20px;
            display: flex;
            align-items: center;
            gap: 30px;
        }

        .nav-item {
            position: relative;
            padding: 15px 0;
        }

        .nav-item > a {
            color: var(--dark);
            text-decoration: none;
            font-weight: 500;
            font-size: 15px;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: color 0.3s;
        }

        .nav-item > a:hover {
            color: var(--primary);
        }

        .nav-item i {
            font-size: 12px;
            transition: transform 0.3s;
        }

        .nav-item:hover > a i {
            transform: rotate(180deg);
        }

        /* =========================
           8. Dropdown Menu
        ========================== */
        .dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            background: white;
            min-width: 250px;
            box-shadow: var(--shadow-lg);
            border-radius: 8px;
            padding: 10px 0;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.3s;
            z-index: 100;
        }

        .nav-item:hover .dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-menu a {
            display: block;
            padding: 10px 20px;
            color: var(--dark);
            text-decoration: none;
            font-size: 14px;
            transition: all 0.3s;
        }

        .dropdown-menu a:hover {
            background: var(--light);
            color: var(--primary);
            padding-right: 25px;
        }

        .dropdown-menu .has-children {
            position: relative;
        }

        .dropdown-menu .has-children > a::after {
            content: '\f053';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            left: 15px;
            font-size: 12px;
        }

        .sub-dropdown {
            position: absolute;
            right: 100%;
            top: 0;
            background: white;
            min-width: 220px;
            box-shadow: var(--shadow-lg);
            border-radius: 8px;
            padding: 10px 0;
            opacity: 0;
            visibility: hidden;
            transform: translateX(10px);
            transition: all 0.3s;
        }

        .has-children:hover .sub-dropdown {
            opacity: 1;
            visibility: visible;
            transform: translateX(0);
        }

        /* =========================
           9. Breadcrumb
        ========================== */
        .breadcrumb {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            font-size: 14px;
            color: var(--secondary);
        }

        .breadcrumb a {
            color: var(--secondary);
            text-decoration: none;
        }

        .breadcrumb a:hover {
            color: var(--primary);
        }

        /* =========================
           10. Product Grid
        ========================== */
        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 25px;
            margin-top: 30px;
        }

        .product-card {
            background: white;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: all 0.3s;
            display: flex;
            flex-direction: column;
        }

        .product-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-lg);
        }

        .product-image {
            position: relative;
            padding-top: 75%;
            overflow: hidden;
            background: var(--light);
        }

        .product-image img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s;
        }

        .product-card:hover .product-image img {
            transform: scale(1.05);
        }

        .product-badge {
            position: absolute;
            top: 15px;
            right: 15px;
            background: var(--danger);
            color: white;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
        }

        .product-info {
            padding: 20px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .product-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--dark);
            margin-bottom: 10px;
            line-height: 1.4;
        }

        .product-title a {
            color: inherit;
            text-decoration: none;
            transition: color 0.3s;
        }

        .product-title a:hover {
            color: var(--primary);
        }

        .product-meta {
            display: flex;
            gap: 15px;
            margin-bottom: 15px;
            font-size: 13px;
            color: var(--secondary);
        }

        .product-meta span {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .product-price {
            font-size: 20px;
            font-weight: 700;
            color: var(--success);
            margin-bottom: 15px;
        }

        .product-files {
            margin-top: auto;
        }

        .file-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px;
            background: var(--light);
            border-radius: 8px;
            margin-bottom: 8px;
            font-size: 13px;
        }

        .file-name {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--dark);
        }

        .file-size {
            color: var(--secondary);
            font-size: 12px;
        }

        /* =========================
           11. Buttons
        ========================== */
        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn_advanced {
            background: var(--primary-dark);
            color: white;
        }

        .btn-primary {
            background: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background: var(--primary-dark);
        }

        .btn-success {
            background: var(--success);
            color: white;
        }

        .btn-secondary {
            background: var(--secondary);
            color: white;
        }

        .btn-sm {
            padding: 6px 12px;
            font-size: 12px;
        }

        .btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        /* =========================
           12. Empty State
        ========================== */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
        }

        .empty-state i {
            font-size: 64px;
            color: var(--secondary);
            margin-bottom: 20px;
        }

        .empty-state h3 {
            font-size: 24px;
            color: var(--dark);
            margin-bottom: 10px;
        }

        .empty-state p {
            color: var(--secondary);
            font-size: 16px;
        }

        /* =========================
           13. Footer
        ========================== */
        .site-footer {
            background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
            color: #ffffff;
            padding: 55px 20px 20px;
            direction: rtl;
            margin-top: 60px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
        }

        .footer-container {
            max-width: 1250px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
            gap: 35px;
            align-items: start;
        }

        .footer-section h3 {
            font-size: 18px;
            margin-bottom: 18px;
            color: #fff;
            position: relative;
            padding-bottom: 10px;
        }

        .footer-section h3::after {
            content: "";
            position: absolute;
            right: 0;
            bottom: 0;
            width: 45px;
            height: 3px;
            background: #8b5cf6;
            border-radius: 12px;
        }

        .footer-section.about-store {
            text-align: center;
            padding: 15px 10px;
        }

        .about-box {
            background: linear-gradient(135deg, #2563eb, #1e40af);
            padding: 18px 0;
            border-radius: 12px;
            color: #fff;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            margin-bottom: 12px;
            transition: 0.3s ease;
        }

        .about-box:hover {
            transform: translateY(-4px);
        }

        .about-title {
            font-size: 14px;
            opacity: 0.9;
            display: block;
        }

        .about-number {
            font-size: 32px;
            font-weight: 800;
            margin: 4px 0;
            display: block;
        }

        .about-subtitle {
            font-size: 14px;
            opacity: 0.85;
            display: block;
        }

        .about-desc,
        .footer-desc {
            color: #cbd5e1;
            font-size: 14px;
            line-height: 2;
            margin: 0;
        }

        .footer-links {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .footer-links li {
            margin-bottom: 13px;
        }

        .footer-links li a {
            color: #d1d5db;
            text-decoration: none;
            font-size: 14px;
            transition: all 0.3s ease;
            display: inline-block;
            position: relative;
        }

        .footer-links li a:hover {
            color: #ffffff;
            transform: translateX(-5px);
        }

        .footer-trust {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            flex-wrap: wrap; /* جلوگیری از فشار و چپ‌چپ شدن */
        }

        .footer-trust img {
            height: 65px; /* اندازه مناسب */
            width: auto; /* حفظ تناسب تصویر */
            padding: 8px;
            background: #fff;
            border-radius: 10px;
            object-fit: contain; /* جلوگیری از کشیدگی لوگو */
            display: block;
        }


        .footer-trust img:hover {
            transform: scale(1.05);
        }

        .footer-social {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-top: 18px;
        }

        .footer-social .social img {
            width: 20px;
            height: 20px;
            object-fit: contain;
        }

        .footer-social .social {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            border-radius: 14px;
            text-decoration: none;
            color: #fff;
            background: rgba(255, 255, 255, 0.07);
            border: 1px solid rgba(255, 255, 255, 0.08);
            transition: all 0.3s ease;
            font-size: 14px;
            min-width: 110px;
            justify-content: center;
        }

        .footer-social .social:hover {
            transform: translateY(-4px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
        }

        .footer-social .telegram:hover {
            background: #229ED9;
        }

        .footer-social .instagram:hover {
            background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
        }

        .footer-social .bale:hover {
            background: #22c55e;
        }

        .footer-social .eitaa:hover {
            background: #f59e0b;
        }

        .footer-bottom {
            max-width: 1250px;
            margin: 35px auto 0;
            padding-top: 18px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            text-align: center;
        }

        .footer-bottom p {
            margin: 0;
            color: #94a3b8;
            font-size: 14px;
            letter-spacing: 0.2px;
        }

        /* =========================
           14. Search Results Dropdown
        ========================== */
        .search-results-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #ddd;
            border-radius: 0 0 8px 8px;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            max-height: 400px;
            overflow-y: auto;
        }

        .search-item {
            display: flex;
            align-items: center;
            padding: 10px;
            border-bottom: 1px solid #eee;
            text-decoration: none;
            color: #333;
        }

        .search-item:hover {
            background: #f8f9fa;
        }

        .search-item img {
            width: 40px;
            height: 40px;
            object-fit: contain;
            margin-left: 10px;
        }

        .search-item .info {
            display: flex;
            flex-direction: column;
        }

        .search-item .info .title {
            font-weight: bold;
            font-size: 14px;
        }

        .search-item .info .meta {
            font-size: 11px;
            color: #777;
        }

        /* =========================
           15. Responsive
        ========================== */
        @media (max-width: 992px) {
            .footer-container {
                grid-template-columns: 1fr 1fr;
            }
        }

        @media (max-width: 768px) {
            .site-footer {
                padding: 45px 15px 20px;
            }

            .footer-container {
                grid-template-columns: 1fr;
                gap: 28px;
            }

            .footer-section {
                text-align: center;
            }

            .about-number {
                font-size: 30px;
            }

            .footer-links li a,
            .about-desc,
            .footer-desc,
            .footer-bottom p {
                font-size: 13px;
            }

            .footer-social .social {
                width: 100%;
                justify-content: center;
            }

            .header-main {
                flex-wrap: wrap;
                gap: 15px;
            }

            .search-container {
                order: 3;
                width: 100%;
                max-width: 100%;
            }

            .nav-container {
                overflow-x: auto;
                gap: 15px;
            }

            .products-grid {
                grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
                gap: 15px;
            }
        }

        .download-notice {
            background: #f1f8ff;
            border: 1px solid #cfe2ff;
            padding: 12px 15px;
            border-radius: 8px;
            font-size: 14px;
            color: #0b3d91;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .download-notice i {
            font-size: 18px;
            color: #0d6efd;
        }

        .user-greeting {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: #f1f5ff;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 14px;
            color: #333;
            border: 1px solid #e0e6ff;
            transition: 0.3s;
        }

        .user-greeting i {
            color: #4a6cf7;
            font-size: 16px;
        }

        .user-greeting:hover {
            background: #e8eeff;
        }

        .user-greeting-text {
            font-weight: 600;
        }


        .site-brand {
            display: flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
        }

        .site-logo {
            height: 50px;
            width: auto;
            object-fit: contain;
        }

        .site-title {
            font-size: 20px;
            font-weight: 700;
            color: #1a73e8;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            text-shadow: 0 0 8px rgba(26, 115, 232, 0.4);
            font-family: 'Orbitron', sans-serif;
        }

        .site-brand:hover .site-logo {
            transform: scale(5);
            transition: 0.2s;
        }
/*ّFilter options in Advanced Search*/
 .btn-open-filter{
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: #4f6ef7;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}
#open-advanced-filter{
  padding:10px 18px;
  border:none;
  border-radius:10px;
  background:#4f6ef7;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}
/* modal */
/* دکمه باز کردن */

/* ===== RESET & BASE ===== */
.af-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.af-modal.open {
  display: flex;
}

/* ===== BOX ===== */
.af-box {
  width: min(1600px, 98vw);
  max-height: 90vh;
  background: #f8faff;
  border-radius: 20px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  direction: rtl;
}

/* ===== HEADER ===== */
.af-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 18px;
  background: #fff;
  border-bottom: 1px solid #e4e9f5;
  flex-shrink: 0;
}

.af-header h3 {
  margin: 0 0 3px;
  font-size: 18px;
  font-weight: 800;
  color: #1a2340;
}

.af-header p {
  margin: 0;
  font-size: 12px;
  color: #8494b3;
}

.af-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: #f0f3ff;
  color: #4f6ef7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.af-close:hover {
  background: #dde4ff;
}

/* ===== GRID: 8 COLUMNS ===== */
.af-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr 1fr 1fr 1fr 1fr 0.9fr;
  gap: 0;
  flex: 1;
  overflow: hidden;
}

/* ===== COLUMN ===== */
.af-col {
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e4e9f5;
  min-width: 0;
}

.af-col:last-child {
  border-left: none;
}

.af-col-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px 10px;
  background: #fff;
  border-bottom: 2px solid #eef1fb;
  font-size: 12px;
  font-weight: 800;
  color: #3d4f7a;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.af-col-icon {
  font-size: 14px;
}

.af-col-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: #c8d0f0 transparent;
}

.af-col-body::-webkit-scrollbar { width: 4px; }
.af-col-body::-webkit-scrollbar-thumb {
  background: #c8d0f0;
  border-radius: 10px;
}

/* ===== SEARCH INPUT ===== */
.af-search-wrap {
  margin-bottom: 8px;
}

.af-search {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #dde3f5;
  border-radius: 8px;
  font-size: 12px;
  background: #fff;
  color: #1a2340;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
  direction: rtl;
}

.af-search:focus {
  border-color: #4f6ef7;
  box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.12);
}

/* ===== CATEGORY TREE ===== */
.af-tree {
  font-size: 12.5px;
}

.af-loading {
  color: #8494b3;
  font-size: 12px;
  padding: 8px 0;
}

.af-tree-node {
  user-select: none;
}

.af-tree-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 4px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s;
  color: #2d3a5e;
}

.af-tree-row:hover {
  background: #eef1ff;
}

.af-tree-row.selected {
  background: #4f6ef7;
  color: #fff;
}

.af-tree-row.selected .af-tree-toggle {
  color: rgba(255,255,255,0.8);
}

.af-tree-toggle {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #8494b3;
  font-size: 10px;
  transition: transform 0.2s;
  border-radius: 4px;
}

.af-tree-toggle.open {
  transform: rotate(90deg);
}

.af-tree-toggle.leaf {
  color: transparent;
  pointer-events: none;
}

.af-tree-name {
  flex: 1;
  line-height: 1.3;
  font-weight: 500;
}

.af-tree-children {
  padding-right: 14px;
  border-right: 1px dashed #d0d8f0;
  margin-right: 8px;
}

/* ===== CHIP LIST (package, value, component, color) ===== */
.af-chip-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.af-chip {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  color: #2d3a5e;
  background: #fff;
  border: 1px solid #e4e9f5;
  gap: 8px;
}

.af-chip:hover {
  background: #eef1ff;
  border-color: #b8c5ff;
}

.af-chip.selected {
  background: #4f6ef7;
  color: #fff;
  border-color: #4f6ef7;
}

.af-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.4);
}

.af-chip-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.af-chip-check {
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.12s;
}

.af-chip.selected .af-chip-check {
  opacity: 1;
}

/* ===== INPUTS ===== */
.af-field-group {
  margin-bottom: 14px;
}

.af-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #4f6ef7;
  margin-bottom: 5px;
  letter-spacing: 0.3px;
}

.af-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #dde3f5;
  border-radius: 8px;
  font-size: 12.5px;
  background: #fff;
  color: #1a2340;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
  direction: ltr;
}

.af-input:focus {
  border-color: #4f6ef7;
  box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.12);
}

.af-input-half {
  width: calc(50% - 8px);
}

.af-range-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.af-range-sep {
  color: #8494b3;
  font-size: 11px;
  flex-shrink: 0;
}

/* ===== TYPE CARDS ===== */
.af-type-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.af-type-card {
  border: 2px solid #e4e9f5;
  border-radius: 12px;
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
  text-align: center;
  position: relative;
}

.af-type-card:hover {
  border-color: #b8c5ff;
  background: #f3f5ff;
}

.af-type-card.active {
  border-color: #4f6ef7;
  background: #4f6ef7;
  color: #fff;
}

.af-type-icon {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #4f6ef7;
  transition: color 0.15s;
}

.af-type-card.active .af-type-icon {
  color: #fff;
}

.af-type-label {
  font-size: 10px;
  color: #8494b3;
  margin-top: 3px;
  transition: color 0.15s;
}

.af-type-card.active .af-type-label {
  color: rgba(255,255,255,0.8);
}

.af-type-check {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}

.af-type-card.active .af-type-check {
  opacity: 1;
}

/* ===== FOOTER ===== */
.af-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #fff;
  border-top: 1px solid #e4e9f5;
  flex-shrink: 0;
}

.af-active-count {
  font-size: 12px;
  color: #8494b3;
  min-height: 18px;
}

.af-active-count span {
  color: #4f6ef7;
  font-weight: 700;
}

.af-footer-actions {
  display: flex;
  gap: 10px;
}

.af-btn-primary,
.af-btn-reset {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.af-btn-primary {
  background: #4f6ef7;
  color: #fff;
}

.af-btn-primary:hover {
  background: #3a5bf0;
  box-shadow: 0 4px 16px rgba(79, 110, 247, 0.35);
  transform: translateY(-1px);
}

.af-btn-reset {
  background: #f0f3ff;
  color: #3d4f7a;
}

.af-btn-reset:hover {
  background: #e2e7ff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .af-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .af-col {
    border-bottom: 1px solid #e4e9f5;
    border-left: 1px solid #e4e9f5;
  }
}

@media (max-width: 700px) {
  .af-modal { padding: 0; }

  .af-box {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .af-grid {
    grid-template-columns: 1fr 1fr;
  }
}
