@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/assets/fonts/Vazirmatn/Vazirmatn-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --accent: #c6f91f;
    --accent-dark: #a8d418;
    --dark: #171717;
    --dark-800: #262626;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --white: #ffffff;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--gray-50);
    color: var(--dark);
    line-height: 1.7;
}

/* ===== NAVBAR ===== */
.navbar-main {
    background: var(--white) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: .7rem 0;
    position: sticky;
    top: 0;
    z-index: 1050;
}
.navbar-brand-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.brand-logo {
    width: 44px;
    height: 44px;
    background: var(--dark);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 20px;
    font-weight: 800;
}
.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
}

.nav-link-custom {
    font-size: .92rem;
    font-weight: 500;
    color: var(--gray-700) !important;
    padding: .5rem .9rem !important;
    transition: color .2s;
    cursor: pointer;
}
.nav-link-custom:hover { color: var(--dark) !important; }

.nav-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    text-decoration: none;
    transition: all .2s;
    position: relative;
    font-size: .95rem;
}
.nav-icon-btn:hover {
    background: var(--dark);
    border-color: var(--dark);
    color: var(--white);
}

.nav-item{
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
}

.nav-item:hover {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    border-color: #56ab2f;
    transform: translateY(-1px);
}
/* .dropdown-menu{

} */

.cart-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: var(--white);
    border-radius: 50%;
    font-size: .65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: var(--dark);
    color: var(--gray-400);
    font-size: .8rem;
    padding: 8px 0;
}
.top-bar a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color .2s;
}
.top-bar a:hover { color: var(--accent); }

/* ===== BREADCRUMB ===== */
.breadcrumb-bar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 14px 0;
}
.breadcrumb-bar .breadcrumb {
    margin: 0;
    font-size: .84rem;
}
.breadcrumb-bar .breadcrumb-item a {
    color: var(--gray-500);
    text-decoration: none;
    transition: color .2s;
}
.breadcrumb-bar .breadcrumb-item a:hover { color: var(--dark); }
.breadcrumb-bar .breadcrumb-item.active {
    color: var(--dark);
    font-weight: 500;
}
.breadcrumb-bar .breadcrumb-item + .breadcrumb-item::before {
    color: var(--gray-300);
}

/* ===== MEGA MENU ===== */
.mega-menu {
    width: 560px !important;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
    padding: 0 !important;
    overflow: hidden;
    margin-top: 10px !important;
    border: none;
    left: auto;
}
.mega-menu-list {
    list-style: none;
    padding: 8px;
    margin: 0;
}
.mega-menu-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    border-radius: 10px;
    color: var(--gray-700);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: all .2s;
}
.mega-menu-list li a:hover,
.mega-menu-list li a.active {
    background: var(--gray-100);
    color: var(--dark);
}
.mega-menu-list li a i.fa-chevron-left {
    font-size: .65rem;
    color: var(--gray-400);
}
.mega-menu-list li a:hover i.fa-chevron-left {
    color: var(--dark);
}
.mega-submenu {
    display: none;
    padding: 20px;
    border-right: 1px solid var(--gray-200);
    min-height: 100%;
    background: var(--gray-50);
}
.mega-submenu.active { display: block; }
.mega-submenu-title {
    font-size: .8rem;
    color: var(--gray-400);
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: .5px;
}
.mega-submenu a {
    display: block;
    padding: 7px 0;
    color: var(--gray-600);
    text-decoration: none;
    font-size: .88rem;
    transition: all .2s;
}
.mega-submenu a:hover {
    color: var(--dark);
    padding-right: 6px;
}

/* ===== BUTTONS ===== */
.btn-accent {
    background: var(--accent);
    color: var(--dark);
    border: none;
    padding: 13px 36px;
    border-radius: 12px;
    font-weight: 600;
    font-size: .95rem;
    transition: all .2s;
    text-decoration: none;
    display: inline-block;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
}


.btn-accent:hover {
    background: var(--accent-dark);
    color: var(--dark);
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(198,249,31,0.35);
}

/* ===== PRODUCT CARD ===== */
.product-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: all .35s cubic-bezier(.16,1,.3,1);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.08);
    border-color: transparent;
}
.product-img-wrap {
    position: relative;
    height: 230px;
    overflow: hidden;
    background: var(--gray-100);
}
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.16,1,.3,1);
}
.product-card:hover .product-img-wrap img {
    transform: scale(1.08);
}
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--danger);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: .72rem;
    font-weight: 600;
}
.product-badge.new-badge {
    background: var(--accent);
    color: var(--dark);
}
.product-badge.discount-badge {
    background: #f97316;
    color: var(--white);
}
.product-wishlist {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    cursor: pointer;
    transition: all .2s;
    font-size: .85rem;
    opacity: 0;
    transform: scale(.8);
}
.product-card:hover .product-wishlist {
    opacity: 1;
    transform: scale(1);
}
.product-wishlist:hover {
    color: var(--danger);
    background: var(--white);
}
.product-wishlist.liked {
    color: var(--danger);
    opacity: 1;
    transform: scale(1);
}
.product-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-category-label {
    font-size: .75rem;
    color: var(--gray-400);
    font-weight: 500;
    margin-bottom: 6px;
}
.product-name {
    font-size: .92rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 12px;
}
.product-rating i {
    font-size: .72rem;
    color: #fbbf24;
}
.product-rating span {
    font-size: .78rem;
    color: var(--gray-400);
    margin-right: 5px;
}
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}
.product-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
}
.product-price small {
    font-size: .72rem;
    color: var(--gray-400);
    font-weight: 400;
    margin-right: 3px;
}
.product-old-price {
    font-size: .76rem;
    color: var(--gray-400);
    text-decoration: line-through;
    margin-top: 2px;
}
.product-cart-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
    font-size: .85rem;
}
.product-cart-btn:hover {
    background: var(--dark);
    border-color: var(--dark);
    color: var(--white);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all .8s cubic-bezier(.16,1,.3,1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
}
.custom-toast {
    background: var(--dark);
    color: var(--white);
    padding: 14px 22px;
    border-radius: 12px;
    font-size: .88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
    animation: toastIn .4s ease;
    margin-top: 8px;
    font-family: 'Vazirmatn', sans-serif;
}
.custom-toast i { color: var(--accent); }
.custom-toast.error-toast i { color: var(--danger); }
@keyframes toastIn {
    from { opacity: 0; transform: translateY(16px) scale(.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--dark);
    color: var(--gray-400);
    padding-top: 60px;
    margin-top: 60px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 16px;
}
.footer-brand .brand-logo {
    width: 38px;
    height: 38px;
    font-size: 17px;
}
.footer-brand .brand-text {
    color: var(--white);
    font-size: 1.1rem;
}
.footer-desc {
    font-size: .87rem;
    line-height: 1.9;
    color: var(--gray-500);
    margin-bottom: 20px;
}
.social-links {
    display: flex;
    gap: 10px;
}
.social-link {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    text-decoration: none;
    transition: all .25s;
    font-size: 1rem;
}
.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--dark);
    transform: translateY(-3px);
}
.footer-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: .88rem;
    transition: all .2s;
}
.footer-links a:hover {
    color: var(--accent);
    padding-right: 4px;
}
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    font-size: .87rem;
    color: var(--gray-500);
    line-height: 1.7;
}
.footer-contact-item i {
    margin-top: 5px;
    color: var(--accent);
    font-size: .85rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.enamad-box {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.enamad-item {
    width: 88px;
    height: 88px;
    border-radius: 10px;
    border: 1px solid var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-800);
    overflow: hidden;
    transition: border-color .2s;
    cursor: pointer;
}
.enamad-item:hover { border-color: var(--gray-500); }
.enamad-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 22px 0;
    margin-top: 50px;
    text-align: center;
    font-size: .82rem;
    color: var(--gray-600);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

a:hover {
    text-decoration: none;
}

.navbar-toggler-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  background: none !important; /* حذف آیکون پیش‌فرض Bootstrap */
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #333;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* افکت تبدیل به X در حالت باز */
.navbar-toggler:not(.collapsed) .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.navbar-toggler:not(.collapsed) .hamburger-line:nth-child(2) {
  opacity: 0;
}

.navbar-toggler:not(.collapsed) .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}