* { font-family: 'Vazirmatn', Tahoma, sans-serif; }

/* سایت کل عرض صفحه را بگیرد، بدون حاشیه سفید کنارها */
.container {
    max-width: 100% !important;
    padding-left: 28px;
    padding-right: 28px;
}
@media (max-width: 576px) {
    .container { padding-left: 14px; padding-right: 14px; }
}

.topbar { background: #111; color: #ddd; }

.banner-img { width: 100%; max-height: 420px; object-fit: cover; }

.category-chip { transition: .2s; }
.category-chip:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-2px); border-color: var(--brand) !important; }

.category-banner-wrap {
    perspective: 1200px;
    display: flex;
    align-items: stretch;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 28px rgba(0,0,0,.14), 0 4px 10px rgba(0,0,0,.08);
    transition: box-shadow .35s ease;
    background: #fff;
}
.category-banner {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}
.category-banner-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
    transform-style: preserve-3d;
    animation: bannerSway3D 6s ease-in-out infinite;
}
/* هر بنر با کمی تاخیر نسبت به بغلی‌اش می‌چرخد تا حرکت طبیعی‌تر و کمتر یکنواخت باشد */
.category-banner-wrap:nth-of-type(2) .category-banner-img,
.col:nth-child(2) .category-banner-img { animation-delay: -1.5s; }
.col:nth-child(3) .category-banner-img { animation-delay: -3s; }
.col:nth-child(4) .category-banner-img { animation-delay: -4.5s; }
.col:nth-child(5) .category-banner-img { animation-delay: -1s; }
.col:nth-child(6) .category-banner-img { animation-delay: -2.5s; }

@keyframes bannerSway3D {
    0%   { transform: perspective(1200px) rotateY(-30deg) scale(1.06); }
    50%  { transform: perspective(1200px) rotateY(30deg) scale(1.06); }
    100% { transform: perspective(1200px) rotateY(-30deg) scale(1.06); }
}

.category-banner-caption {
    flex: 0 0 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    background: var(--brand);
    color: #fff;
}
.category-banner-caption span { line-height: 1.4; }
.category-banner-wrap:hover {
    box-shadow: 0 28px 48px rgba(0,0,0,.24), 0 10px 20px rgba(0,0,0,.14);
}
.category-banner-wrap:hover .category-banner-img {
    animation-play-state: paused;
    transform: perspective(1200px) rotateY(0deg) scale(1.1);
    transition: transform .4s ease;
}
@media (max-width: 768px) {
    .category-banner-img { height: 260px; }
    .category-banner-caption { flex-basis: 90px; padding: 6px; font-size: .85rem; }
}
@media (max-width: 576px) {
    .category-banner-img { height: 220px; }
}
/* برای کاربرانی که ترجیح می‌دهند حرکت کمتری ببینند (تنظیمات سیستم‌عامل) */
@media (prefers-reduced-motion: reduce) {
    .category-banner-img { animation: none !important; }
}

.product-img { height: 180px; object-fit: contain; padding: 10px; background: #fafafa; }
.product-title { font-size: .92rem; line-height: 1.4; min-height: 2.6em; overflow: hidden; }
.product-card { transition: .2s; }
.product-card:hover { box-shadow: 0 8px 20px rgba(0,0,0,.08); }

.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-outline-primary { color: var(--brand); border-color: var(--brand); }
.btn-outline-primary:hover { background: var(--brand); border-color: var(--brand); }

.site-footer a:hover { color: #fff !important; }

/* ===========================================================
   Aurora Background — پس‌زمینه راه‌راه نرم و پاستلی پشت کل صفحه
   =========================================================== */
body {
    position: relative;
    background-color: transparent !important;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    display: var(--bg-display, block);
    background-image: repeating-linear-gradient(100deg,
        var(--bg-color-1, #3b82f6) 10%,
        var(--bg-color-2, #6366f1) 18%,
        var(--bg-color-3, #0ea5e9) 26%,
        var(--bg-color-2, #6366f1) 34%,
        var(--bg-color-1, #3b82f6) 42%);
    background-size: 200% 200%;
    filter: blur(var(--bg-blur, 40px)) opacity(var(--bg-opacity, 38%)) saturate(140%);
    animation: auroraSmoothBg 22s ease-in-out infinite;
}
@keyframes auroraSmoothBg {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
    body::before { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
    .aurora-hero-bg::after { animation: none; }
}

/* ===========================================================
   دکمه Liquid Metal — شبیه‌سازی CSS از افکت حلقه فلزی متحرک با آیکون
   =========================================================== */
.btn-liquid-metal {
    position: relative;
    display: inline-flex;
    align-items: center;
    border: none;
    background: transparent;
    padding: 4px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 16px 40px -12px rgba(0,0,0,.3);
    transition: transform .15s ease;
}
.btn-liquid-metal:hover { transform: translateY(-2px); }
.btn-liquid-metal:active { transform: translateY(0) scale(.98); }
.btn-liquid-metal:disabled { opacity: .5; cursor: not-allowed; }

.btn-liquid-metal::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: conic-gradient(from 0deg, #7a7a7d, #f5f5f7, #9a9a9d, #ffffff, #6b6b6e, #e8e8ea, #7a7a7d);
    animation: liquidMetalSpin 3.5s linear infinite;
}
@keyframes liquidMetalSpin {
    to { transform: rotate(360deg); }
}

.btn-liquid-metal-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-radius: 999px;
    padding: 10px 26px 10px 10px;
    transition: background .2s ease;
}
.btn-liquid-metal:hover .btn-liquid-metal-inner { background: #fafafa; }
.btn-liquid-metal-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #f0f0f1;
    box-shadow: inset 0 2px 4px rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 1.1rem;
}
.btn-liquid-metal-label {
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
    .btn-liquid-metal::before { animation: none; }
}

/* ===========================================================
   لودر متحرک (Kinetic Loader) — برای عملیات‌های در حال بارگذاری
   =========================================================== */
.kinetic-loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(3px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.kinetic-loader-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.kinetic-loader-text {
    display: flex;
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--brand, #0d6efd);
    letter-spacing: 6px;
}
.kinetic-loader-text span {
    display: inline-block;
    transform-origin: 100% 70%;
    animation: kineticLetterStretch 1800ms cubic-bezier(.25,.23,.73,.75) infinite;
}
@keyframes kineticLetterStretch {
    0%, 100% { transform: scale(1, .55); opacity: .55; }
    25% { transform: scale(1, 1.25); opacity: 1; }
    50% { transform: scale(1, .8); opacity: .8; }
    75% { transform: scale(1, 1.05); opacity: .95; }
}

/* ===========================================================
   شمارشگر انیمیشنی تعداد (Animated Number) - برای انتخاب تعداد خرید
   =========================================================== */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}
.qty-stepper button {
    background: #f8f9fa;
    border: none;
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease;
}
.qty-stepper button:hover { background: #e9ecef; }
.qty-stepper button:active { transform: scale(.92); }
.qty-stepper .qty-value {
    width: 48px;
    text-align: center;
    font-weight: 700;
    font-size: 1.05rem;
    position: relative;
    height: 1.4em;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.qty-stepper .qty-value .digit-in {
    animation: digitRollIn .35s ease-out;
}
@keyframes digitRollIn {
    from { transform: translateY(var(--roll-from, 100%)); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ===========================================================
   مودال جستجوی سریع (⌘K) - پنل شیشه‌ای مطابق کامپوننت SearchModal
   =========================================================== */
#quickSearchModal .modal-content {
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,.07);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px -14px rgba(0,0,0,.28);
    overflow: hidden;
}
.qs-searchbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0,0,0,.06);
}
.qs-searchbar input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    font-size: .95rem;
}
.qs-kbd {
    display: flex;
    align-items: center;
    gap: 2px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(0,0,0,.03);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    color: #9a9a9a;
}
.qs-section-label {
    padding: 12px 18px 6px;
    font-size: 12px;
    color: #9a9a9a;
}
.qs-result-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin: 0 8px 2px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background .15s ease;
}
.qs-result-row:hover { background: rgba(0,0,0,.035); color: inherit; }
.qs-result-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0,0,0,.05);
}
.qs-result-name { font-size: .9rem; }
.qs-result-meta { font-size: .82rem; color: #9a9a9a; margin-right: 6px; }
.qs-quick-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin: 0 8px 2px;
    border-radius: 10px;
    border: none;
    background: transparent;
    width: calc(100% - 16px);
    text-align: right;
    text-decoration: none;
    color: inherit;
    transition: background .15s ease;
}
.qs-quick-action:hover { background: rgba(0,0,0,.035); }
.qs-quick-action-icon {
    width: 30px; height: 30px; border-radius: 8px;
    background: rgba(0,0,0,.04);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 15px;
}

/* صفحه حساب کاربری */
.account-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--brand); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: bold;
}
.account-sidebar .list-group-item.active { background: var(--brand); border-color: var(--brand); }
.account-sidebar .list-group-item { border-left: none; border-right: none; }
