@import './home.css';
@import './contact.css';
@import './blog.css';
@import './post-show.css';
@import './service-show.css';
@import './services.css';
@import './product-show.css';
@import './shop.css';
@import './checkout.css';

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-base);
}

body {
    font-family: 'Vazirmatn FD NL', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--transition-smooth), color var(--transition-smooth);
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 32px);
}

.page-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
}

.page-loading.active {
    display: block;
}

.page-loading-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    border-radius: 0 3px 3px 0;
    animation: loadingProgress 1.5s ease-in-out infinite;
}

@keyframes loadingProgress {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

.header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur, saturate(180%) blur(30px));
    -webkit-backdrop-filter: var(--glass-blur, saturate(180%) blur(30px));
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-smooth);
    height: var(--header-height);
}

.header.scrolled {
    background: var(--glass-bg-solid);
    box-shadow: var(--shadow-md);
    border-bottom-color: transparent;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: clamp(16px, 3vw, 32px);
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.header-logo {
    flex-shrink: 0;
    z-index: 2;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity var(--transition-fast);
}

.logo-link:hover {
    opacity: 0.85;
}

.logo-img {
    height: clamp(36px, 5vw, 44px);
    width: auto;
    border-radius: var(--radius-sm);
}

.logo-icon {
    width: clamp(38px, 5vw, 44px);
    height: clamp(38px, 5vw, 44px);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1d23;
    font-size: clamp(18px, 2.5vw, 22px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-title {
    font-size: clamp(17px, 2vw, 20px);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.logo-subtitle {
    font-size: var(--font-xs);
    font-weight: 400;
    color: var(--text-muted);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-size: var(--font-sm);
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
}

.nav-link:hover {
    color: var(--primary-light);
    background: var(--primary-bg);
}

.nav-link.active {
    color: var(--primary-light);
    background: var(--primary-bg);
    font-weight: 600;
}

.nav-link i {
    font-size: 17px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.nav-link:hover i,
.nav-link.active i {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    z-index: 2;
}

.theme-switcher-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.theme-switcher-btn:hover {
    background: var(--bg-hover);
    color: var(--primary);
    border-color: rgba(245, 158, 11, 0.3);
}

.theme-switcher-btn i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    position: absolute;
}

.theme-switcher-btn .icon-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.theme-switcher-btn .icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

html[data-theme="light"] .theme-switcher-btn .icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

html[data-theme="light"] .theme-switcher-btn .icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #1a1d23;
    font-weight: 600;
    font-size: var(--font-sm);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
    transition: all var(--transition-smooth);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    color: #1a1d23;
}

.cta-btn i {
    font-size: 15px;
}

.nav-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 16px 5px 5px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-medium);
    background: var(--bg-card);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-btn:hover {
    border-color: var(--border-hover);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #1a1d23;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-name {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.chevron-icon {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.nav-dropdown-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 12px);
    min-width: 280px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all var(--transition-bounce);
    border: 1px solid var(--border-light);
    pointer-events: none;
    z-index: 1100;
}

.nav-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
}

.dropdown-user-info img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.dropdown-user-info .user-avatar-placeholder {
    width: 48px;
    height: 48px;
    font-size: 20px;
}

.dropdown-user-name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.dropdown-user-role {
    display: inline-block;
    font-size: 11px;
    color: var(--primary-light);
    background: var(--primary-bg);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}

.nav-dropdown-menu a,
.dropdown-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: var(--font-sm);
    font-weight: 500;
    text-decoration: none;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: right;
    transition: all var(--transition-fast);
}

.nav-dropdown-menu a:hover,
.dropdown-logout:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-dropdown-menu a i {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 16px;
}

.nav-dropdown-menu a:hover i {
    color: var(--primary);
}

.dropdown-logout {
    color: var(--danger);
}

.dropdown-logout:hover {
    background: var(--danger-bg);
    color: var(--danger-light);
}

.dropdown-logout i {
    color: var(--danger);
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--transition-bounce);
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--primary);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--primary);
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(6px);
    z-index: 1499;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-header {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.mobile-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    flex: 1;
}

.mobile-nav-logo img {
    height: 32px;
    width: auto;
    border-radius: 6px;
    flex-shrink: 0;
}

.mobile-nav-logo i {
    font-size: 18px;
    color: var(--primary);
    flex-shrink: 0;
}

.mobile-nav-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.mobile-nav-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.footer {
    background: var(--footer-bg);
    margin-top: 64px;
    padding: 56px 0 28px;
    transition: background var(--transition-smooth);
}

.footer .grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(24px, 4vw, 40px);
    margin-bottom: 36px;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
}

.footer h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer p,
.footer li {
    font-size: var(--font-sm);
    color: var(--text-footer);
    line-height: 1.9;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 8px;
}

.footer ul li a {
    transition: color var(--transition-fast);
}

.footer ul li a:hover {
    color: var(--text-primary);
}

.footer .social {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.footer .social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--footer-social-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-footer);
    font-size: 18px;
    transition: all var(--transition-fast);
}

.footer .social a:hover {
    background: var(--primary);
    color: #1a1d23;
    transform: translateY(-2px);
}

.footer .bottom {
    border-top: 1px solid var(--footer-border);
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-footer-muted);
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.install-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #1a1d23;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4);
    transition: all var(--transition-bounce);
}

.install-fab:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
        --font-base: 15px;
    }
    .header-inner {
        padding: 0 14px;
    }
    .logo-img {
        height: 32px;
    }
    .logo-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
    .logo-title {
        font-size: 15px;
    }
    .logo-subtitle {
        display: none;
    }
    .desktop-cta {
        display: none;
    }
    .user-name {
        display: none;
    }
    .user-btn {
        padding: 3px;
        border: none;
        background: transparent;
    }
    .user-avatar,
    .user-avatar-placeholder {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    .theme-switcher-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    .menu-toggle {
        display: flex;
    }
    .nav-overlay {
        display: block;
    }
    .header-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(300px, 85vw);
        height: 100vh;
        height: 100dvh;
        background: var(--bg-dark);
        z-index: 1500;
        flex-direction: column;
        padding: 0;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
        display: flex;
    }
    .header-nav.open {
        transform: translateX(0);
    }
    .mobile-nav-header {
        display: flex;
    }
    .nav-links {
        flex-direction: column;
        gap: 2px;
        width: 100%;
        flex: 1;
        overflow-y: auto;
        padding: 12px;
    }
    .nav-link {
        width: 100%;
        padding: 13px 16px;
        font-size: 15px;
        gap: 12px;
        border-radius: 10px;
    }
    .nav-link i {
        font-size: 19px;
    }
    .nav-dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 20px 20px 0 0;
        min-width: auto;
        z-index: 1600;
        padding: 16px;
        max-height: 70vh;
        overflow-y: auto;
        box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.5);
    }
    .footer .grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
    .footer h3 {
        font-size: 16px;
    }
    .install-fab {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 56px;
        --font-base: 14px;
    }
    .header-inner {
        padding: 0 12px;
    }
    .logo-img {
        height: 28px;
    }
    .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    .logo-title {
        font-size: 14px;
    }
    .header-nav {
        width: 270px;
    }
    .nav-link {
        padding: 12px 14px;
        font-size: 14px;
    }
    .footer .grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .footer {
        padding: 40px 0 20px;
    }
}

@media (min-width: 769px) {
    .mobile-nav-header {
        display: none !important;
    }
    .nav-overlay {
        display: none !important;
    }
}