/* =========================================================.kr-amazing {
   FONT
========================================================= */

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* فونت متغیر: وزن‌های واقعی 100 تا 900 تا بولد در همه مرورگرها یکسان و درست نمایش داده شود.
   مرورگرهای قدیمی که woff2-variations را نمی‌شناسند این بلوک را نادیده می‌گیرند و از Regular بالا استفاده می‌کنند. */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn%5Bwght%5D.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}


/* =========================================================
   GLOBAL
========================================================= */

* {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    box-sizing: border-box;
}

/* =========================================================
   محافظ اسکرول افقی — هیچ صفحه‌ای نباید اسکرول/لرزش افقی داشته باشد
   (با روش clip در همه مرورگرهای مدرن و fallback امن در قدیمی‌ها؛
   sticky بودن منو هم در همه مرورگرها سالم می‌ماند)
========================================================= */

html {
    overflow-x: clip;
}

@supports not (overflow: clip) {
    html {
        overflow-x: hidden;
    }
}

:root {
    --primary: #007bff;
    --primary-dark: #0056d2;
    --secondary: #0f172a;
    --bg: #f5f7fb;
    --white: #fff;
    --text: #222;
    --muted: #777;
    --border: #e5e7eb;
    --success: #22c55e;
    --danger: #ef4444;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0,0,0,.08);
}

body {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    /* clip: اسکرول افقی را می‌بندد ولی مثل hidden، منوی sticky را نمی‌شکند */
    overflow-x: clip;
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: .3s;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 98%;
    max-width: none;
    margin: auto;
}


/* =========================================================
   HEADER
========================================================= */

.header {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 9999;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    gap: 25px;
}

/* لوگو اندازه خود را حفظ می‌کند؛ فقط فضای عمودی اطراف آن فشرده شده است */
.logo {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.logo img {
    height: 78px;
}

.header-top .search-box form {
    height: 46px;
}

.header-top .search-box input {
    padding: 10px 18px;
    font-size: 14px;
}

.header-top .search-box button {
    width: 58px;
    font-size: 16px;
}

.logo h1 {
    font-size: 30px;
    color: var(--primary);
}

.search-box {
    flex: 1 1 250px;
    width: 100%;
    max-width: 250px;
    min-width: 90px;
}

.search-box form {
    display: flex;
    background: #f8fafc;
    border: 2px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    border: none;
    background: none;
    padding: 15px 20px;
    font-size: 15px;
    outline: none;
}

.search-box button {
    width: 65px;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
}

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

.header-tools {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 0 0 auto;
    white-space: nowrap;
    margin-inline-end: 35px;
}

.header-tools a {
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    background: #f8fafc;
    transition: .3s;
}

.header-tools a:hover {
    background: var(--primary);
    color: #fff;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.menu-toggle {
    display: none;
}

.menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    list-style: none;
    padding: 3px 0;
    margin: 0;
}

.menu > li {
    position: relative;
}

.menu > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 14px;
    min-height: 34px;
    line-height: 1.4;
    border-radius: 10px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.menu > li > a:hover {
    background: #0ea5e9;
    color: #ffffff;
}

.menu > li.active > a {
    background: #0ea5e9;
    color: #ffffff;
    border-radius: 10px;
}

.menu > li.active > a:hover {
    background: #0284c7;
    color: #ffffff;
}

/* آیکون تصویری داخل آیتم‌های منو همیشه کوچک می‌ماند تا ارتفاع نوار منو زیاد نشود
   (با !important بر استایل inline تولیدشده در navbar.php غلبه می‌کند) */
.menu > li > a .navbar-category-icon img {
    width: 22px !important;
    height: 22px !important;
}

.menu > li > a .navbar-category-icon {
    margin-inline-end: 6px;
}


/* =========================================================
   OLD MEGA MENU
========================================================= */

.has-mega:hover .mega-menu {
    display: grid;
}

.mega-menu {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    position: absolute;
    top: 100%;
    right: 0;
    width: 900px;
    background: #fff;
    padding: 25px;
    border-radius: 0 0 15px 15px;
    box-shadow: var(--shadow);
    z-index: 999999;
}

.mega-menu a {
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    transition: .3s;
    color: #333;
}

.mega-menu a:hover {
    background: #f1f5f9;
    color: var(--primary);
}


/* =========================================================
   LAPTOP / PC MEGA MENU
========================================================= */

.has-laptop-mega {
    position: relative;
}

.laptop-mega-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 900px;
    padding: 22px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .16);
    z-index: 999999;
    display: none;
}

.has-laptop-mega:hover .laptop-mega-menu {
    display: block;
}

.laptop-mega-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 18px;
}

.laptop-mega-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.laptop-mega-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 13px;
    box-sizing: border-box;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    transition: .2s ease;
}

.laptop-mega-link:hover {
    background: #e0f2fe;
    color: var(--primary) !important;
    transform: translateY(-2px);
}


/* =========================================================
   DARK MODE - MEGA MENU
========================================================= */

html[data-theme="dark"] .laptop-mega-menu {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .laptop-mega-title {
    color: #f8fafc;
}

html[data-theme="dark"] .laptop-mega-link {
    background: #0f172a;
    color: #f8fafc !important;
}

html[data-theme="dark"] .laptop-mega-link:hover {
    background: #334155;
    color: #38bdf8 !important;
}


/* =========================================================
   MAIN
========================================================= */

.main {
    min-height: 600px;
    padding: 12px 0;
}


/* =========================================================
   HERO / SLIDER
========================================================= */

.hero {
    margin: 14px 0;
}

.slider {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: var(--shadow);
    background: #fff;
}

.slide {
    display: none;
}

.slide.active {
    display: block;
    animation: fade .5s;
}

.slide img {
    width: 100%;
    height: 470px;
    object-fit: cover;
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255,255,255,.9);
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
}

.slider-prev {
    right: 20px;
}

.slider-next {
    left: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.slider-dots span {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    opacity: .5;
}

.slider-dots .active {
    opacity: 1;
    background: var(--primary);
}

@keyframes fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* =========================================================
   SECTIONS
========================================================= */

.section {
    margin: 45px 0;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.section-title h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.section-title a {
    color: var(--primary);
    font-size: 15px;
    font-weight: 600;
}


/* =========================================================
   CATEGORIES
========================================================= */

.categories {
    display: grid;
    grid-template-columns: repeat(6,1fr);
    gap: 20px;
}

.category-card {
    background: #fff;
    border-radius: 18px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: .35s;
    cursor: pointer;
    border: 1px solid transparent;
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
}

.category-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: auto;
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}


/* =========================================================
   PRODUCTS
========================================================= */

.products {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 25px;
}

.product-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: .35s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
}

.product-image {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #fff;
}

.product-image img {
    max-height: 220px;
    object-fit: contain;
    transition: .35s;
}

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

.product-body {
    padding: 18px;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    height: 50px;
    overflow: hidden;
    margin-bottom: 10px;
}

.product-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    margin: 12px 0;
}

.product-old {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.product-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    background: var(--primary);
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: .3s;
}

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


/* =========================================================
   SERVICES
========================================================= */

.services {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 25px;
}

.service-card {
    background: #fff;
    padding: 35px 25px;
    border-radius: 18px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: .35s;
}

.service-card:hover {
    transform: translateY(-8px);
}

.service-card i {
    font-size: 42px;
    color: var(--primary);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.service-card p {
    font-size: 14px;
    color: #666;
    line-height: 28px;
}


/* =========================================================
   FOOTER
========================================================= */

.footer {
    background: #0f172a;
    color: #fff;
    margin-top: 60px;
    padding: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-box h3 {
    margin-bottom: 20px;
    font-size: 22px;
}

.footer-box p {
    line-height: 32px;
    color: #cbd5e1;
}

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

.footer-box li {
    margin-bottom: 12px;
}

.footer-box a {
    color: #cbd5e1;
    transition: .3s;
}

.footer-box a:hover {
    color: #fff;
    padding-right: 6px;
}

.copyright {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #94a3b8;
}


/* =========================================================
   BADGE / PRICE / STOCK / RATING
========================================================= */

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ef4444;
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0;
}

.stock {
    font-size: 13px;
    color: #16a34a;
    font-weight: 700;
}

.out-stock {
    color: #ef4444;
}

.rating {
    display: flex;
    gap: 3px;
    margin: 8px 0;
    color: #f59e0b;
    font-size: 14px;
}


/* =========================================================
   CART TABLE
========================================================= */

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.cart-table th,
.cart-table td {
    padding: 15px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    background: #f8f8f8;
    font-weight: bold;
}

.cart-table img {
    display: block;
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-total-box {
    margin-top: 25px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    text-align: left;
}


/* =========================================================
   CART DRAWER
========================================================= */

#cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    z-index: 9998;
}

#cart-drawer {
    position: fixed;
    top: 0;
    left: -430px;
    right: auto;
    width: 420px;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 9999;
    transition: .35s;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 25px rgba(0,0,0,.15);
}

#cart-drawer.active {
    left: 0;
}

#cart-overlay.active {
    display: block;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.cart-header h3 {
    margin: 0;
    font-size: 20px;
}

#close-cart {
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
}

#cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: bold;
    margin-bottom: 8px;
}

.cart-item-price {
    color: #1976d2;
    font-weight: bold;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.cart-item-actions a {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    text-decoration: none;
    background: #f2f2f2;
    color: #222;
    font-weight: bold;
}

/* دکمه‌های سبد کشویی: مربع با گوشه گرد */

.cart-item-actions button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all .2s ease;
    font-size: 14px;
}

.cart-item-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, .12);
}

.cart-item-actions button:active {
    transform: translateY(0);
    box-shadow: none;
}

.cart-item-actions .cart-qty-minus:hover {
    background: #fff;
    border-color: #f87171;
    color: #dc2626;
}

.cart-item-actions .cart-qty-plus {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.cart-item-actions .cart-qty-plus:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.cart-item-actions .cart-qty {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    background: #eff6ff;
    border: 2px solid #bfdbfe;
    font-weight: 800;
    font-size: 15px;
    color: #1e3a8a;
    -webkit-user-select: none;
    user-select: none;
}

.cart-item-actions .cart-remove {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
    width: 38px;
}

.cart-item-actions .cart-remove:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
    box-shadow: 0 4px 10px rgba(220, 38, 38, .3);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

.checkout-btn {
    width: 100%;
    display: block;
    box-sizing: border-box;
    text-align: center;
    background: #1976d2;
    color: #fff;
    padding: 11px 15px;
    border-radius: 10px;
    text-decoration: none;
    margin-top: 20px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.5;
}

#cart-btn {
    position: relative;
}

#cart-count {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ff3b30;
    color: #fff;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* =========================================================
   CART NEW DESIGN
========================================================= */

.cart-layout {
    display: grid;
    grid-template-columns: 2fr 380px;
    gap: 25px;
    align-items: start;
}

.cart-products {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cart-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    display: grid;
    grid-template-columns: 90px 1fr 120px 140px 60px;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
}

.cart-image img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.cart-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.cart-info p {
    color: #777;
    font-size: 14px;
}

.cart-price {
    color: #1976d2;
    font-weight: bold;
    margin-top: 10px;
}

.cart-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qty-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #475569;
    transition: all .2s ease;
}

.qty-btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, .12);
}

.qty-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.qty-btn.minus:hover {
    background: #fff;
    border-color: #f87171;
    color: #dc2626;
}

.qty-btn.plus {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.qty-btn.plus:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.qty-value {
    min-width: 40px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #eff6ff;
    border: 2px solid #bfdbfe;
    font-weight: 800;
    font-size: 16px;
    color: #1e3a8a;
    -webkit-user-select: none;
    user-select: none;
}

.cart-sum {
    font-weight: bold;
    color: #222;
}

.delete-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #fef2f2;
    border: 2px solid #fecaca;
    color: #dc2626;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all .2s ease;
}

.delete-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 38, 38, .3);
    text-decoration: none;
}

.delete-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.cart-summary {
    background: #fff;
    border-radius: 18px;
    padding: 25px;
    position: sticky;
    top: 90px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
}

.cart-summary h3 {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
}

.summary-row.total {
    font-size: 20px;
    font-weight: bold;
}


/* =========================================================
   ACCOUNT
========================================================= */

.account-container-box {
    max-width: 550px;
    margin: 40px auto;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.auth-tab-btn {
    flex: 1;
    border: none;
    background: #eef2ff;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    transition: .3s;
}

.auth-tab-btn.active {
    background: #0ea5e9;
    color: #fff;
}

.auth-form-panel {
    display: none;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.auth-form-panel.active-panel {
    display: block;
}

.auth-inner-form h2 {
    text-align: center;
    margin-bottom: 25px;
}

.auth-inner-form .form-group {
    margin-bottom: 18px;
}

.auth-inner-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.auth-inner-form input {
    width: 100%;
    padding: 13px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
}

.auth-inner-form input:focus {
    outline: none;
    border-color: #0ea5e9;
}

.btn-auth-submit {
    width: 100%;
    display: block;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #0ea5e9;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
}

.btn-auth-submit:hover {
    background: #0284c7;
}

.alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    font-weight: 700;
}


/* =========================================================
   CHECKOUT
========================================================= */

.checkout-form {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 20px;
}

.checkout-form .form-group {
    margin: 0;
}

.checkout-form textarea {
    min-height: 120px;
    resize: vertical;
}

.checkout-form h3 {
    grid-column: 1/-1;
    margin-top: 10px;
}

.checkout-form button {
    grid-column: 1/-1;
}


/* =========================================================
   CHECKOUT V2
========================================================= */

.checkout-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
    margin-top: 25px;
}

.checkout-form-box,
.checkout-summary-box {
    background: #fff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.checkout-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.checkout-form .form-group {
    display: flex;
    flex-direction: column;
}

.checkout-form label {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}

.checkout-form input,
.checkout-form textarea,
.checkout-form select {
    height: 46px;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 14px;
    transition: .25s;
}

.checkout-form textarea {
    height: 100px;
    padding-top: 12px;
    resize: none;
}

.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-form select:focus {
    border-color: #008be5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,139,229,.12);
}

.checkout-summary-box {
    position: sticky;
    top: 90px;
}

.summary-card h3 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 800;
}

.summary-item,
.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 15px;
}

.summary-total {
    font-size: 18px;
    font-weight: bold;
    color: #008be5;
}

.checkout-btn {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 12px;
    background: #008be5;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: .25s;
    margin-top: 20px;
}

.checkout-btn:hover {
    background: #0075c4;
    transform: translateY(-2px);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}


/* =========================================================
   REPAIR MENU
========================================================= */

.repair-menu {
    position: relative;
    display: inline-block;
}

.repair-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    margin: 0;
    padding: 8px 12px;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    cursor: pointer;
}

.repair-arrow {
    font-size: 11px;
    transition: transform .2s ease;
}

.repair-menu.open .repair-arrow {
    transform: rotate(180deg);
}

.repair-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 210px;
    display: none;
    padding: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .15);
    z-index: 999999;
}

.repair-menu.open .repair-menu-dropdown {
    display: block;
}

.repair-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border-radius: 9px;
    color: #334155;
    background: transparent;
    text-decoration: none;
    font-family: inherit;
}

.repair-menu-dropdown a i {
    width: 20px;
    color: #0284c7;
    text-align: center;
}

.repair-menu-dropdown a:hover {
    background: #f0f9ff;
    color: #0369a1;
}


/* =========================================================
   FOOTER REPAIR MENU
========================================================= */

.footer .repair-menu {
    display: block;
    width: 100%;
}

.footer .repair-menu-btn {
    width: 100%;
    justify-content: flex-start;
    box-sizing: border-box;
    color: inherit;
    text-align: right;
}

.footer .repair-menu-dropdown {
    position: static;
    width: 100%;
    box-sizing: border-box;
    margin-top: 5px;
    box-shadow: none;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .05);
}

.footer .repair-menu.open .repair-menu-dropdown {
    display: block;
}

.footer .repair-menu-dropdown a {
    padding: 9px 12px;
    color: inherit;
}


/* =========================================================
   REGISTERED ADDRESS
========================================================= */

.registered-address-card {
    margin: 16px 0 !important;
    padding: 16px 20px !important;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.registered-address-card h3 {
    margin: 0 0 13px !important;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.registered-address-card > div:not(.empty-box) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 22px;
    line-height: 1.9 !important;
}

.registered-address-card > div:not(.empty-box) > div {
    white-space: nowrap;
    font-size: 15px;
    color: #475569;
}

.registered-address-card strong {
    color: #0f172a;
    font-weight: 800;
}

.registered-address-card span {
    color: #334155;
    font-weight: 500;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1200px) {

    .products {
        grid-template-columns: repeat(3,1fr);
    }

    .categories {
        grid-template-columns: repeat(4,1fr);
    }

    .services {
        grid-template-columns: repeat(2,1fr);
    }

    .mega-menu {
        width: 700px;
        grid-template-columns: repeat(3,1fr);
    }
}

@media (max-width: 1000px) {

    .laptop-mega-menu {
        width: 750px;
    }

    .laptop-mega-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

@media (max-width: 992px) {

    .header-top {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .logo {
        width: 100%;
        text-align: center;
    }

    .header-top .search-box form {
        height: 42px;
    }

    .search-box {
        flex: 1 1 auto;
        min-width: 160px;
        order: 3;
    }

    .header-tools {
        width: 100%;
        justify-content: center;
        flex-wrap: nowrap;
        margin-inline-end: 0;
    }

    .header-tools a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .products {
        grid-template-columns: repeat(2,1fr);
    }

    .categories {
        grid-template-columns: repeat(3,1fr);
    }

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

    .navbar {
        display: none;
    }

    .menu {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 3px 5px;
        scrollbar-width: none;
    }

    .menu::-webkit-scrollbar {
        display: none;
    }

    .menu > li > a {
        padding: 5px 12px;
        min-height: 31px;
        font-size: 13px;
    }

    .slide img {
        height: 340px;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-card {
        grid-template-columns: 80px 1fr;
    }

    .cart-actions,
    .cart-sum,
    .delete-btn {
        margin-top: 15px;
    }

    .cart-summary {
        position: static;
    }

    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-summary-box {
        position: static;
    }
}

@media (max-width: 900px) {

    .checkout-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 850px) {

    .repair-menu-dropdown {
        width: 190px;
    }

    .repair-menu-btn {
        font-size: 14px;
    }
}

@media (max-width: 768px) {

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

    .categories {
        grid-template-columns: repeat(2,1fr);
    }

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

    .section-title {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .slide img {
        height: 240px;
    }

    .slider-prev,
    .slider-next {
        display: none;
    }

    .header-tools {
        gap: 8px;
        margin-inline-end: 0;
    }

    .header-tools a {
        padding: 7px 12px;
        font-size: 12.5px;
    }

    .logo img {
        height: 60px;
    }

    .logo h1 {
        font-size: 24px;
    }

    #cart-drawer {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .laptop-mega-menu {
        position: static;
        width: 100%;
        box-sizing: border-box;
        border-radius: 0;
        box-shadow: none;
    }

    .laptop-mega-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .registered-address-card {
        padding: 14px !important;
    }

    .registered-address-card > div:not(.empty-box) {
        display: grid;
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 8px 14px;
    }

    .registered-address-card > div:not(.empty-box) > div {
        white-space: normal;
        font-size: 14px;
    }

    .checkout-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {

    .checkout-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 500px) {

    .laptop-mega-grid {
        grid-template-columns: 1fr;
    }

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

    .container {
        width: 92%;
    }

    .search-box input {
        font-size: 13px;
        padding: 10px 12px;
    }

    .product-title {
        font-size: 15px;
    }

    .product-price {
        font-size: 19px;
    }

    .section-title h2 {
        font-size: 22px;
    }

    .footer {
        padding-top: 0;
    }
}
/* =========================================================
   DYNAMIC CATEGORY NAVIGATION - FIXED
========================================================= */
.menu > li.has-submenu{
    position:relative;
}

/* زیرمنو در حالت عادی کاملاً مخفی است */
.category-flyout{
    display:none;
    position:absolute;
    top:calc(100% + 8px);
    right:0;
    width:min(900px, 88vw);
    padding:18px;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:16px;
    box-shadow:0 18px 45px rgba(15,23,42,.16);
    z-index:1000000;
}

/* فقط زیرمنوی همان آیتمی که روی آن قرار گرفته باز می‌شود */
.menu > li.has-submenu:hover > .category-flyout,
.menu > li.has-submenu:focus-within > .category-flyout{
    display:block;
}

.flyout-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
    padding:0 4px 14px;
    margin-bottom:12px;
    border-bottom:1px solid #eef2f7;
    color:#0f172a;
}

.flyout-header strong{
    font-size:16px;
}

.flyout-header span{
    font-size:12px;
    color:#64748b;
}

.flyout-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(150px,1fr));
    gap:8px;
}

.flyout-item{
    display:flex !important;
    align-items:center;
    gap:9px;
    min-width:0;
    padding:11px 12px !important;
    border-radius:10px;
    color:#334155 !important;
    background:#f8fafc;
}

.flyout-item:hover{
    background:#e0f2fe !important;
    color:#0369a1 !important;
}

.flyout-item-icon{
    flex:0 0 auto;
    font-size:18px;
}

.flyout-item-title{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.submenu-arrow{
    margin-right:5px;
    font-size:13px;
    transition:transform .2s ease;
}

.menu > li.has-submenu:hover .submenu-arrow{
    transform:rotate(180deg);
}

@media(max-width:1100px){
    .flyout-grid{
        grid-template-columns:repeat(3,minmax(150px,1fr));
    }
}

@media(max-width:768px){
    .category-flyout{
        position:fixed;
        /* زیر نوار منو باز شود؛ navbar.php این متغیر را با جاوااسکریپت تنظیم می‌کند */
        top:var(--kr-flyout-top, auto);
        right:4vw;
        left:4vw;
        width:auto;
        max-height:70vh;
        overflow-y:auto;
        -webkit-overflow-scrolling:touch;
    }
    .flyout-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

/* =========================================================
   Dynamic Category Shop + Filters
========================================================= */
.shop-page{padding-top:25px}.shop-breadcrumb{display:flex;align-items:center;gap:8px;color:#64748b;font-size:14px;margin-bottom:18px}.shop-breadcrumb a:hover{color:var(--primary)}.shop-heading{display:flex;align-items:center;justify-content:space-between;gap:25px;background:#fff;padding:22px 26px;border-radius:18px;box-shadow:var(--shadow);margin-bottom:25px}.shop-heading h1{margin:0;font-size:25px;color:#0f172a}.shop-heading p{margin:7px 0 0;color:#64748b;font-size:14px}.shop-search{display:flex;width:min(460px,100%);border:1px solid #dbe3ee;border-radius:12px;overflow:hidden}.shop-search input{flex:1;border:0;padding:12px 15px;font-family:inherit;outline:0;background:#f8fafc}.shop-search button{border:0;background:#0ea5e9;color:#fff;padding:0 18px;font-family:inherit;cursor:pointer}.shop-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:25px;align-items:start;direction:ltr}.shop-sidebar,.shop-content{direction:rtl}.shop-sidebar{background:#fff;border:1px solid #edf0f4;border-radius:18px;padding:10px;box-shadow:0 8px 24px rgba(15,23,42,.05);position:sticky;top:110px}.filter-card{padding:17px 12px;border-bottom:1px solid #eef2f7}.filter-card:last-of-type{border-bottom:0}.filter-title{font-size:16px;font-weight:800;color:#1e293b;margin-bottom:13px}.filter-check,.stock-filter{display:flex;align-items:center;gap:9px;padding:7px 0;cursor:pointer;color:#475569;font-size:14px}.filter-check input,.stock-filter input{accent-color:#0ea5e9;width:16px;height:16px}.filter-select,.price-inputs input{width:100%;box-sizing:border-box;border:1px solid #dce3eb;border-radius:9px;padding:10px;font-family:inherit;background:#fff;outline:none}.price-inputs{display:grid;grid-template-columns:1fr 1fr;gap:8px}.filter-clear-one{display:block;margin-top:10px;font-size:12px;color:#ef4444}.filter-empty{font-size:13px;color:#94a3b8}.apply-filter,.reset-filter{display:block;width:100%;box-sizing:border-box;text-align:center;border-radius:10px;padding:12px;font-family:inherit;font-weight:700}.apply-filter{border:0;background:#0ea5e9;color:#fff;cursor:pointer;margin:10px 0}.reset-filter{color:#64748b;background:#f8fafc;border:1px solid #edf0f4}.shop-toolbar{display:flex;justify-content:space-between;align-items:center;background:#fff;padding:14px 18px;border-radius:14px;margin-bottom:20px;color:#64748b}.sort-form{display:flex;align-items:center;gap:8px;font-size:14px}.sort-form select{font-family:inherit;border:1px solid #dce3eb;border-radius:8px;padding:7px 10px;background:#fff}.shop-products{grid-template-columns:repeat(3,1fr);gap:20px}.product-category-label{font-size:12px;color:#0ea5e9;margin-bottom:7px}.product-meta{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.product-meta span{font-size:11px;background:#f1f5f9;color:#64748b;border-radius:7px;padding:4px 6px}.shop-empty{background:#fff;border-radius:18px;padding:70px 25px;text-align:center;box-shadow:var(--shadow)}.shop-empty>div{font-size:48px}.shop-empty h2{margin:12px 0 8px}.shop-empty p{color:#64748b}.shop-empty .product-btn{display:inline-block;width:auto;padding:12px 25px;margin-top:15px}
@media(max-width:1100px){.shop-products{grid-template-columns:repeat(2,1fr)}.shop-layout{grid-template-columns:240px minmax(0,1fr)}}
@media(max-width:850px){.shop-layout{grid-template-columns:1fr;direction:rtl}.shop-sidebar{position:static}.shop-heading{flex-direction:column;align-items:stretch}.shop-search{width:100%}.shop-products{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.shop-products{grid-template-columns:1fr}.shop-toolbar{gap:10px;align-items:flex-start;flex-direction:column}.shop-heading h1{font-size:20px}}

/* Dynamic category filter position */
.shop-layout.filter-right{grid-template-columns:minmax(0,1fr) 280px;direction:rtl}.shop-layout.filter-right .shop-sidebar{order:2}.shop-layout.filter-right .shop-content{order:1}.shop-layout.filter-left{grid-template-columns:280px minmax(0,1fr);direction:ltr}.shop-layout.filter-left .shop-sidebar,.shop-layout.filter-left .shop-content{direction:rtl}@media(max-width:850px){.shop-layout.filter-right,.shop-layout.filter-left{grid-template-columns:1fr;direction:rtl}.shop-layout.filter-right .shop-sidebar,.shop-layout.filter-right .shop-content,.shop-layout.filter-left .shop-sidebar,.shop-layout.filter-left .shop-content{order:initial}}

/* FIX: موقعیت واقعی فیلتر بر اساس انتخاب دسته */
@media (min-width: 851px){
    /* در RTL اولین ستون از سمت راست شروع می‌شود؛ aside در HTML اولین عنصر است */
    .shop-layout.filter-right{
        grid-template-columns:280px minmax(0,1fr) !important;
        direction:rtl !important;
    }
    .shop-layout.filter-right .shop-sidebar{
        order:initial !important;
    }
    .shop-layout.filter-right .shop-content{
        order:initial !important;
    }

    /* در LTR اولین ستون از سمت چپ شروع می‌شود */
    .shop-layout.filter-left{
        grid-template-columns:280px minmax(0,1fr) !important;
        direction:ltr !important;
    }
    .shop-layout.filter-left .shop-sidebar,
    .shop-layout.filter-left .shop-content{
        order:initial !important;
        direction:rtl;
    }
}

/* =========================================================
   STABLE CATEGORY FLYOUT - NO HOVER GAP
========================================================= */
.menu > li.has-submenu > .category-flyout{
    top:100%;
    margin-top:0;
}

/* یک ناحیه نامرئی بین دکمه و منو نگه می‌دارد تا hover قطع نشود */
.menu > li.has-submenu::after{
    content:"";
    position:absolute;
    top:100%;
    right:0;
    width:min(900px, 88vw);
    height:12px;
    z-index:999999;
}

.menu > li.has-submenu:hover > .category-flyout,
.menu > li.has-submenu:focus-within > .category-flyout{
    display:block;
}

@media(max-width:768px){
    .menu > li.has-submenu::after{
        display:none;
    }
    .menu > li.has-submenu > .category-flyout{
        top:auto;
    }
}
/* =========================================================
   AMAZING PRODUCTS - FINAL SALE DESIGN
========================================================= */

/* =========================================================
   MAIN BOX
========================================================= */

.kr-amazing {
    position: relative;

    padding: 28px 28px 32px;

    border-radius: 26px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f8fafc 45%,
            #f1f5f9 100%
        );

    border: 5px solid transparent;

    background-image:
        linear-gradient(#f8fafc, #f8fafc),
        linear-gradient(
            135deg,
            #ef233c,
            #e11d48,
            #7c3aed,
            #2563eb
        );

    background-origin: border-box;
    background-clip: padding-box, border-box;

    box-shadow:
        0 18px 45px rgba(37, 99, 235, .18);

    min-height: 520px;

    box-sizing: border-box;
}


/* =========================================================
   KR LOGO - TOP LEFT
========================================================= */

.kr-amazing::before {
    content: "KR";

    position: absolute;

    /* جلوگیری از بیرون زدن */
    top: 5px;
    left: 5px;

    width: 110px;
    height: 74px;

    display: flex;

    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    background:
        linear-gradient(
            135deg,
            #dc2626,
            #e11d48
        );

    color: #ffffff;

    font-size: 36px;

    font-weight: 900;

    font-family: Arial, sans-serif;

    letter-spacing: 1px;

    line-height: 1;

    /* فقط گوشه داخلی گرد باشد */
    border-radius:
        0 0 24px 0;

    box-shadow:
        5px 5px 18px rgba(220, 38, 38, .20);

    z-index: 10;

    pointer-events: none;
}


/* =========================================================
   HEADER
========================================================= */

.kr-amazing-head {
    position: relative;

    z-index: 5;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    /* فاصله از KR */
    padding:
        15px 15px 25px 135px;

    margin-bottom: 10px;
}


.kr-amazing-head h2 {
    display: flex;

    align-items: center;

    gap: 10px;

    margin: 0;

    font-size: 28px;

    font-weight: 900;

    color: #1e293b;
}


.kr-fire {
    font-size: 34px;
}


.kr-amazing-head p {
    margin: 7px 0 0;

    color: #dc2626;

    font-size: 15px;

    font-weight: 600;
}


/* =========================================================
   VIEW ALL BUTTON
========================================================= */

.kr-amazing .kr-view-all {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 145px;

    padding: 12px 20px;

    border-radius: 12px;

    border: 1px solid #dc2626;

    color: #dc2626;

    background: #ffffff;

    font-size: 14px;

    font-weight: 800;

    text-decoration: none;

    white-space: nowrap;

    transition: .25s ease;
}


.kr-amazing .kr-view-all:hover {
    background: #dc2626;

    color: #ffffff;

    transform: translateY(-2px);
}


/* =========================================================
   SLIDER WRAPPER
========================================================= */

.kr-amazing .kr-product-rail-wrap {
    position: relative;

    width: 100%;

    display: block;

    /* جا برای دو دکمه */
    padding: 0 55px;

    box-sizing: border-box;
}


/* =========================================================
   PRODUCT RAIL
========================================================= */

.kr-amazing .kr-product-rail {
    display: flex !important;

    flex-direction: row !important;

    align-items: stretch;

    gap: 16px;

    width: 100%;

    overflow-x: auto !important;

    overflow-y: hidden;

    scroll-behavior: smooth;

    padding: 8px 2px 18px;

    scrollbar-width: none;

    box-sizing: border-box;
}


.kr-amazing .kr-product-rail::-webkit-scrollbar {
    display: none;
}


/* =========================================================
   PRODUCT CARD
========================================================= */

.kr-amazing .kr-product-card {
    position: relative;

    flex: 0 0 calc((100% - 80px) / 6);

    min-width: 190px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 16px;

    overflow: hidden;

    box-shadow:
        0 8px 22px rgba(15, 23, 42, .08);

    transition:
        transform .25s ease,
        box-shadow .25s ease;

    padding-bottom: 12px;

    box-sizing: border-box;
}


.kr-amazing .kr-product-card:hover {
    transform: translateY(-6px);

    box-shadow:
        0 16px 30px rgba(15, 23, 42, .16);
}


/* =========================================================
   PRODUCT IMAGE
========================================================= */

.kr-amazing .kr-product-image {
    position: relative;

    height: 155px;

    padding: 12px;

    margin-top: 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #f8fafc
        );

    border-bottom:
        1px solid #f1f5f9;
}
/* =========================================================
   PRODUCT BODY
========================================================= */

.kr-amazing .kr-product-body {
    padding: 13px 14px 5px;
}


.kr-amazing .kr-product-category {
    font-size: 11px;

    color: #64748b;

    margin-bottom: 7px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.kr-amazing .kr-product-title {
    height: 48px;

    overflow: hidden;

    line-height: 24px;

    margin-bottom: 8px;
}


.kr-amazing .kr-product-title a {
    font-size: 14px;

    font-weight: 800;

    color: #1e293b;

    text-decoration: none;
}


.kr-amazing .kr-product-title a:hover {
    color: #dc2626;
}


/* =========================================================
   BRAND
========================================================= */

.kr-amazing .kr-product-brand {
    min-height: 24px;

    font-size: 11px;

    color: #64748b;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================================
   PRICE
========================================================= */

.kr-amazing .kr-price {
    margin-top: 10px;
}


.kr-amazing .kr-price-old {
    font-size: 12px;

    color: #94a3b8;

    text-decoration: line-through;
}


.kr-amazing .kr-price-main {
    font-size: 16px;

    font-weight: 900;

    color: #dc2626;
}


.kr-amazing .kr-price-main small {
    font-size: 10px;

    margin-right: 3px;

    color: #dc2626;
}


/* =========================================================
   STOCK
========================================================= */

.kr-amazing .kr-stock {
    margin-top: 8px;

    font-size: 11px;

    font-weight: 700;

    color: #16a34a;
}


.kr-amazing .kr-stock.out {
    color: #dc2626;
}


/* =========================================================
   ADD TO CART
========================================================= */

.kr-amazing .kr-add {
    width: 100%;

    margin-top: 12px;

    padding: 10px 8px;

    border:
        1px solid #e2e8f0;

    border-radius: 10px;

    background: #f8fafc;

    color: #334155;

    font-family: inherit;

    font-size: 12px;

    font-weight: 800;

    cursor: pointer;

    transition: .25s ease;
}


.kr-amazing .kr-add:hover {
    background: #dc2626;

    color: #ffffff;

    border-color: #dc2626;
}


/* =========================================================
   SLIDER BUTTONS
   یکی راست - یکی چپ
========================================================= */

.kr-amazing .kr-rail-btn {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    z-index: 30;

    width: 46px;

    height: 58px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: none;

    border-radius: 16px;

    background: #ffffff;

    color: #dc2626;

    font-size: 38px;

    line-height: 1;

    cursor: pointer;

    box-shadow:
        0 8px 25px rgba(15, 23, 42, .15);

    transition: .25s ease;
}


/* دکمه سمت راست */

.kr-amazing .kr-rail-prev {
    right: 0 !important;

    left: auto !important;
}


/* دکمه سمت چپ */

.kr-amazing .kr-rail-next {
    left: 0 !important;

    right: auto !important;
}


.kr-amazing .kr-rail-btn:hover {
    background: #dc2626;

    color: #ffffff;

    transform:
        translateY(-50%)
        scale(1.08);
}


/* =========================================================
   EMPTY
========================================================= */

.kr-amazing .kr-empty {
    padding: 50px;

    text-align: center;

    background: #ffffff;

    border-radius: 16px;

    color: #64748b;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1300px) {

    .kr-amazing .kr-product-card {
        flex-basis:
            calc((100% - 48px) / 4);
    }

}


@media (max-width: 992px) {

    .kr-amazing {
        padding: 20px;
    }

    .kr-amazing::before {
        top: 5px;
        left: 5px;

        width: 90px;
        height: 65px;

        font-size: 30px;
    }

    .kr-amazing-head {
        padding-left: 100px;
    }

    .kr-amazing .kr-product-card {
        flex-basis:
            calc((100% - 32px) / 3);
    }

}


@media (max-width: 768px) {

    .kr-amazing {
        border-radius: 20px;

        padding: 16px;
    }

    .kr-amazing-head {
        flex-direction: column;

        align-items: flex-start;

        padding:
            70px 5px 15px;
    }

    .kr-amazing-head h2 {
        font-size: 22px;
    }

    .kr-amazing .kr-product-card {
        flex: 0 0 230px;
    }

    .kr-amazing .kr-product-rail-wrap {
        padding: 0;
    }

    .kr-amazing .kr-rail-btn {
        display: none;
    }

}


@media (max-width: 500px) {

    .kr-amazing .kr-product-card {
        flex: 0 0 210px;
    }

    .kr-amazing .kr-view-all {
        width: 100%;
    }

}
/* =========================================================
   FIX AMAZING PRODUCT IMAGES
========================================================= */

.kr-amazing .kr-product-image {
    position: relative;
    background: #ffffff !important;
    isolation: isolate;
}


.kr-amazing .kr-product-image a {
    position: relative;
    z-index: 2;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100%;
    height: 100%;

    background: transparent !important;
}


.kr-amazing .kr-product-image img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    object-fit: contain !important;

    opacity: 1 !important;

    filter: none !important;

    mix-blend-mode: normal !important;

    background: transparent !important;

    position: relative;
    z-index: 3;

    visibility: visible !important;
}


.kr-amazing .kr-product-image::before,
.kr-amazing .kr-product-image::after {
    display: none !important;
}


/* جلوگیری از سیاه شدن تصویر هنگام hover */

.kr-amazing .kr-product-card:hover .kr-product-image img {
    filter: none !important;
    opacity: 1 !important;

    transform: scale(1.04);
}


/* جلوگیری از اعمال استایل عمومی سایت روی تصاویر */

.kr-amazing img {
    filter: none !important;
    mix-blend-mode: normal !important;
}
/* =========================================================
   AMAZING PRODUCTS - IMAGE & CLICK FIX
========================================================= */

.kr-amazing-product-card {
    position: relative;
}

.kr-amazing-product-card .kr-product-image {
    position: relative;
    overflow: hidden;
    background: #fff !important;
}

.kr-amazing-product-card .kr-product-image::before,
.kr-amazing-product-card .kr-product-image::after {
    content: none !important;
    display: none !important;
}

.kr-amazing-product-card .kr-product-image a {
    position: relative;
    z-index: 10;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100%;
    height: 100%;

    cursor: pointer;
}

.kr-amazing-product-card .kr-product-image img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    object-fit: contain !important;

    filter: none !important;
    opacity: 1 !important;
    visibility: visible !important;

    mix-blend-mode: normal !important;

    position: relative;
    z-index: 11;

    cursor: pointer;
}


/* جلوگیری از گرفتن کلیک توسط عناصر تزئینی */

.kr-amazing-kr,
.kr-amazing-product-card .kr-product-badge,
.kr-amazing-product-card .kr-discount-percent {
    pointer-events: none !important;
}


/* لینک عنوان */

.kr-amazing-product-card .kr-product-title a {
    position: relative;
    z-index: 20;

    display: block;

    color: inherit;

    text-decoration: none;

    pointer-events: auto !important;

    cursor: pointer;
}
/* =====================================================
   FIX AMAZING PRODUCT IMAGE DISPLAY
===================================================== */

.kr-amazing-product-card .kr-product-image {
    background: #ffffff !important;
    overflow: hidden !important;
}


.kr-amazing-product-card .kr-product-image a {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;

    align-items: center !important;
    justify-content: center !important;

    position: relative !important;
    z-index: 10 !important;
}


.kr-amazing-product-card .kr-product-image img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;
    max-height: 100% !important;

    object-fit: contain !important;

    opacity: 1 !important;
    visibility: visible !important;

    filter: none !important;

    mix-blend-mode: normal !important;

    position: relative !important;
    z-index: 11 !important;

    background: transparent !important;
}
/* =====================================================
   AMAZING PRODUCT IMAGE - FIXED AUTO FIT
===================================================== */

.kr-amazing-product-card {

    display: flex;

    flex-direction: column;

    overflow: hidden;

    box-sizing: border-box;

}


/* فضای ثابت تصویر */

.kr-amazing-product-card .kr-product-image {

    width: 100%;

    height: 190px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    padding: 10px 12px 5px;

    box-sizing: border-box;

}


/* لینک تصویر */

.kr-amazing-product-card .kr-product-image a {

    display: flex;

    width: 100%;

    height: 100%;

    align-items: center;

    justify-content: center;

    overflow: hidden;

}


/* خود تصویر */

.kr-amazing-product-card .kr-product-image img {

    display: block;

    max-width: 100%;

    max-height: 100%;

    width: auto;

    height: auto;

    object-fit: contain;

}
/* =====================================================
   AMAZING COUNTDOWN
===================================================== */

.kr-amazing-title-area {

    display:flex;

    align-items:center;

    gap:25px;

    flex-wrap:wrap;

}


.kr-amazing-countdown {

    display:flex;

    flex-direction:column;

    align-items:center;

    gap:8px;

    padding:12px 18px;

    border-radius:16px;

    background:
        rgba(255,255,255,.12);

    border:
        1px solid rgba(255,255,255,.25);

    -webkit-backdrop-filter:
        blur(10px);

    backdrop-filter:
        blur(10px);

}


.kr-countdown-label {

    font-size:11px;

    font-weight:800;

    opacity:.9;

}


.kr-countdown-boxes {

    display:flex;

    align-items:center;

    gap:7px;

    direction:rtl;

}


.kr-countdown-item {

    min-width:48px;

    display:flex;

    flex-direction:column;

    align-items:center;

    gap:3px;

}


.kr-countdown-item strong {

    display:flex;

    align-items:center;

    justify-content:center;

    width:46px;

    height:42px;

    border-radius:10px;

    background:
        rgba(0,0,0,.2);

    font-size:18px;

    font-weight:900;

    font-variant-numeric:
        tabular-nums;

}


.kr-countdown-item span {

    font-size:9px;

    opacity:.85;

}


.kr-countdown-separator {

    font-size:18px;

    font-weight:900;

    transform:
        translateY(-8px);

}


.kr-countdown-message {

    font-size:10px;

    opacity:.85;

    text-align:center;

}


.kr-countdown-finished {

    opacity:.65;

}


.kr-countdown-finished .kr-countdown-item strong {

    background:
        rgba(0,0,0,.35);

}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width:768px) {

    .kr-amazing-title-area {

        flex-direction:column;

        align-items:flex-start;

        gap:15px;

    }


    .kr-amazing-countdown {

        width:100%;

        box-sizing:border-box;

    }


    .kr-countdown-boxes {

        justify-content:center;

        width:100%;

    }

}


@media (max-width:480px) {

    .kr-amazing-countdown {

        padding:10px;

    }


    .kr-countdown-item {

        min-width:40px;

    }


    .kr-countdown-item strong {

        width:38px;

        height:38px;

        font-size:15px;

    }


    .kr-countdown-separator {

        font-size:14px;

    }

}
/* =====================================================
   AMAZING PRODUCTS COUNTDOWN
===================================================== */

.kr-amazing-title-area {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}


.kr-amazing-countdown {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px 14px;

    border-radius: 16px;

    background:
        rgba(255,255,255,.10);

    -webkit-backdrop-filter:
        blur(8px);

    backdrop-filter:
        blur(8px);

    border:
        1px solid rgba(255,255,255,.18);
}


.kr-countdown-label {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}


.kr-countdown-boxes {
    display: flex;
    align-items: center;
    gap: 7px;
    direction: ltr;
}


.kr-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-width: 42px;
}


.kr-countdown-item strong {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 42px;
    height: 38px;

    border-radius: 10px;

    background:
        rgba(0,0,0,.20);

    font-size: 17px;
    font-weight: 900;

    font-variant-numeric:
        tabular-nums;
}


.kr-countdown-item span {
    margin-top: 4px;

    font-size: 9px;
    opacity: .85;
}


.kr-countdown-separator {
    font-size: 18px;
    font-weight: 900;

    margin-top: -12px;
}


.kr-countdown-wait,
.kr-countdown-finished {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}


.kr-countdown-finished {
    color: #fecaca;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 768px) {

    .kr-amazing-title-area {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }


    .kr-amazing-countdown {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }


    .kr-countdown-item {
        min-width: 38px;
    }


    .kr-countdown-item strong {
        min-width: 38px;
        height: 36px;
        font-size: 15px;
    }

}


@media (max-width: 480px) {

    .kr-amazing-countdown {
        padding: 10px;
        gap: 8px;
    }


    .kr-countdown-label {
        display: none;
    }


    .kr-countdown-boxes {
        width: 100%;
        justify-content: center;
    }


    .kr-countdown-item strong {
        min-width: 34px;
    }

}
/* =====================================================
   AMAZING PRODUCTS COUNTDOWN
===================================================== */

.kr-amazing-countdown {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 20px;

    margin: 18px 0 25px;

    padding: 15px 20px;

    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            #ef4444,
            #b91c1c
        );

    color: #fff;

    box-shadow:
        0 10px 30px
        rgba(239, 68, 68, 0.20);

    flex-wrap: wrap;

}


.kr-countdown-label {

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 14px;

    white-space: nowrap;

}


.kr-countdown-label span {

    font-size: 22px;

}


.kr-countdown-boxes {

    display: flex;

    align-items: center;

    gap: 8px;

    direction: ltr;

}


.kr-countdown-item {

    min-width: 55px;

    padding: 7px 8px;

    text-align: center;

    border-radius: 10px;

    background:
        rgba(255,255,255,.15);

    border:
        1px solid
        rgba(255,255,255,.20);

}


.kr-countdown-number {

    display: block;

    font-size: 22px;

    font-weight: 900;

    line-height: 1.2;

}


.kr-countdown-item small {

    display: block;

    margin-top: 3px;

    font-size: 10px;

    opacity: .9;

}


.kr-countdown-separator {

    font-size: 22px;

    font-weight: 900;

}


/* MOBILE */

@media (max-width: 650px) {

    .kr-amazing-countdown {

        gap: 12px;

        padding: 14px 10px;

    }


    .kr-countdown-label {

        width: 100%;

        justify-content: center;

    }


    .kr-countdown-item {

        min-width: 45px;

    }


    .kr-countdown-number {

        font-size: 18px;

    }

}
/* =========================================
   AMAZING PRODUCT COUNTDOWN
========================================= */

.kr-product-countdown{
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:4px;

    margin:10px 0 8px;

    padding:8px 5px;

    direction:rtl;

    border-top:1px solid #f1f1f1;

    font-size:11px;

    color:#374151;

    white-space:nowrap;
}


.kr-product-countdown-label{
    font-weight:800;

    color:#374151;

    margin-left:3px;
}


.kr-product-countdown-time{
    display:inline-flex;

    align-items:center;

    gap:1px;
}


.kr-product-countdown-number{
    font-weight:950;

    font-size:14px;

    color:#e11d48;

    font-variant-numeric:
        tabular-nums;
}


.kr-product-countdown-text{
    font-size:10px;

    font-weight:700;

    color:#6b7280;
}


.kr-product-countdown-separator{
    font-size:15px;

    font-weight:900;

    color:#9ca3af;

    margin:0 2px;
}
/* =========================================
   COMPACT AMAZING PRODUCT CARD
========================================= */

/* بدنه کارت جمع‌وجورتر */
.kr-amazing-product-card .kr-product-body{
    padding:12px 14px !important;
}


/* دسته‌بندی */
.kr-amazing-product-card .kr-product-category{
    font-size:10px !important;
    margin-bottom:4px !important;
    line-height:1.4 !important;
}


/* عنوان محصول */
.kr-amazing-product-card .kr-product-title{
    margin-bottom:6px !important;
    min-height:auto !important;
    line-height:1.6 !important;
}

.kr-amazing-product-card .kr-product-title a{
    font-size:13px !important;
    line-height:1.6 !important;

    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;

    overflow:hidden;
}


/* برند و مدل در یک خط */
.kr-product-meta{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:6px;

    direction:rtl;

    margin:5px 0 8px;

    min-height:22px;

    white-space:nowrap;
    overflow:hidden;
}


/* برند */
.kr-product-meta .kr-product-brand{
    display:inline-flex;
    align-items:center;

    font-size:11px;
    font-weight:800;

    color:#374151;

    background:#f3f4f6;

    padding:4px 8px;

    border-radius:7px;

    max-width:45%;

    overflow:hidden;
    text-overflow:ellipsis;
}


/* خط جداکننده */
.kr-product-meta-separator{
    color:#d1d5db;
    font-size:12px;
}


/* مدل */
.kr-product-model{
    font-size:11px;
    color:#6b7280;

    overflow:hidden;
    text-overflow:ellipsis;

    white-space:nowrap;
}


/* قیمت جمع‌وجور */
.kr-amazing-product-card .kr-price{
    margin-top:4px !important;
    margin-bottom:4px !important;
}


/* موجودی */
.kr-amazing-product-card .kr-stock{
    margin-top:4px !important;
    margin-bottom:5px !important;

    font-size:10px !important;
}


/* تایمر جمع‌وجور */
.kr-amazing-product-card .kr-product-countdown{
    margin-top:7px !important;
    margin-bottom:7px !important;

    padding:7px 5px !important;

    min-height:auto !important;
}


/* دکمه */
.kr-amazing-product-card .kr-add{
    margin-top:5px !important;
    padding:9px 8px !important;

    font-size:11px !important;
}
/* =====================================================
   AMAZING PRODUCT CARD - COMPACT VERSION
===================================================== */

.kr-amazing-product-card{
    height:auto !important;
    min-height:0 !important;

    display:flex !important;
    flex-direction:column !important;
}


/* تصویر محصول */
.kr-amazing-product-card .kr-product-image{
    height:170px !important;
    min-height:170px !important;
}

.kr-amazing-product-card .kr-product-image img{
    width:100% !important;
    height:100% !important;
    object-fit:contain !important;
}


/* بدنه */
.kr-amazing-product-card .kr-product-body{
    padding:10px 14px 12px !important;

    display:flex !important;
    flex-direction:column !important;

    gap:4px !important;
}


/* دسته بندی */
.kr-amazing-product-card .kr-product-category{
    margin:0 !important;

    font-size:10px !important;

    line-height:1.4 !important;
}


/* عنوان */
.kr-amazing-product-card .kr-product-title{
    margin:0 !important;

    min-height:42px !important;

    font-size:13px !important;

    line-height:1.6 !important;
}

.kr-amazing-product-card .kr-product-title a{
    display:-webkit-box !important;

    -webkit-line-clamp:2 !important;

    -webkit-box-orient:vertical !important;

    overflow:hidden !important;
}


/* =====================================
   برند و مدل کنار هم
===================================== */

.kr-amazing-product-card .kr-product-meta{
    display:flex !important;

    align-items:center !important;

    gap:6px !important;

    margin:0 !important;

    height:25px !important;

    overflow:hidden !important;

    white-space:nowrap !important;
}


.kr-amazing-product-card .kr-product-brand{
    display:inline-flex !important;

    width:auto !important;

    margin:0 !important;

    padding:0 !important;

    background:none !important;

    font-size:11px !important;

    font-weight:700 !important;

    color:#374151 !important;
}


.kr-amazing-product-card .kr-product-model{
    font-size:11px !important;

    color:#6b7280 !important;
}


/* قیمت */
.kr-amazing-product-card .kr-price{
    margin:2px 0 !important;

    min-height:auto !important;
}


.kr-amazing-product-card .kr-price-old{
    font-size:10px !important;
}


.kr-amazing-product-card .kr-price-main{
    font-size:16px !important;
}


/* موجودی */
.kr-amazing-product-card .kr-stock{
    margin:0 !important;

    font-size:10px !important;

    line-height:1.5 !important;
}


/* =====================================
   تایمر محصول
===================================== */

.kr-amazing-product-card .kr-product-countdown{
    display:flex !important;

    align-items:center !important;

    justify-content:center !important;

    gap:4px !important;

    margin:4px 0 !important;

    padding:5px !important;

    min-height:30px !important;

    font-size:10px !important;
}


.kr-amazing-product-card .kr-product-countdown-number{
    font-size:13px !important;
}


.kr-amazing-product-card .kr-product-countdown-text{
    font-size:9px !important;
}


/* دکمه */
.kr-amazing-product-card .kr-add{
    margin-top:4px !important;

    padding:8px !important;

    min-height:36px !important;

    font-size:11px !important;
}
/* =========================================
   PRODUCT NAME + BRAND + MODEL INLINE
========================================= */

.kr-product-info-line{
    margin:4px 0 6px;
    line-height:1.8;
    min-height:0 !important;
}


.kr-product-info-line .kr-product-title-link{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:5px;

    text-decoration:none;
    color:inherit;

    font-size:12px;
}


.kr-product-name{
    font-weight:800;
    color:#111827;
}


.kr-product-brand-inline{
    font-size:11px;
    color:#6b7280;
}


.kr-product-model-inline{
    font-size:11px;
    color:#6b7280;
}


.kr-product-info-separator{
    color:#d1d5db;
    font-size:11px;
}
/* حذف فاصله بین عنوان محصولات شگفت‌انگیز و محصولات */

.kr-amazing{
    padding-top:10px !important;
}

.kr-amazing-head{
    margin:0 !important;
    padding:0 !important;
    margin-bottom:0 !important;
    min-height:0 !important;
}

.kr-amazing-head > div{
    margin:0 !important;
    padding:0 !important;
}

.kr-amazing-head h2{
    margin:0 !important;
    padding:0 !important;
    line-height:1.2 !important;
}

.kr-amazing-countdown{
    margin-top:3px !important;
    margin-bottom:0 !important;
}

.kr-amazing .kr-product-rail-wrap{
    margin:0 !important;
    padding:0 !important;
    margin-top:-8px !important;
}
/* حذف لوگو یا المان KR از بخش محصولات شگفت‌انگیز */
#krAmazingSection .kr-amazing-logo,
#krAmazingSection .kr-amazing-brand,
#krAmazingSection .kr-amazing-bg,
#krAmazingSection .kr-amazing-decoration,
#krAmazingSection .kr-amazing::before,
#krAmazingSection .kr-amazing::after{
    display:none !important;
    content:none !important;
}
/* انتقال محصولات شگفت‌انگیز کمی به سمت چپ */
#krAmazingSection .kr-product-rail-wrap{
    position: relative;
    overflow: visible;
}

#krAmazingSection .kr-product-rail{
    transform: translateX(-45px);
    width: calc(100% - 45px);
}

/* جای دکمه فلش */
#krAmazingSection .kr-amazing-prev{
    right: 10px;
    z-index: 50;
}
/* =========================================================
   AMAZING PRODUCT COUNTDOWN - ONE LINE
========================================================= */

.kr-product-countdown{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:center !important;
    flex-wrap:nowrap !important;

    direction:rtl;

    width:100%;

    white-space:nowrap !important;

    gap:3px;

    margin:5px 0 6px;

    padding:5px 3px;

    box-sizing:border-box;

    font-size:11px;

    line-height:1.2;
}


.kr-product-countdown-label{
    display:inline-flex !important;
    align-items:center;

    flex:0 0 auto;

    font-weight:800;

    color:#475569;

    margin-left:2px;
}


.kr-product-countdown-inline{
    display:inline-flex !important;
    align-items:center !important;

    flex:0 0 auto;

    gap:1px;

    color:#334155;

    font-size:10px;
}


.kr-product-countdown-inline b{
    display:inline !important;

    font-size:12px;

    font-weight:900;

    color:#dc2626;

    font-variant-numeric:tabular-nums;
}


.kr-product-countdown-separator{
    display:inline-block !important;

    flex:0 0 auto;

    color:#94a3b8;

    font-weight:900;

    margin:0 1px;
}


/* موبایل */

@media(max-width:520px){

    .kr-product-countdown{
        font-size:10px;
        gap:2px;
    }

    .kr-product-countdown-inline{
        font-size:9px;
    }

    .kr-product-countdown-inline b{
        font-size:11px;
    }

}
/* =========================================================
   AMAZING - FINAL SLIDER FIX
========================================================= */

/* فضای اصلی اسلایدر */
.kr-amazing .kr-product-rail-wrap{
    position:relative;
    width:100%;
    padding:0 55px;
    box-sizing:border-box;
}


/* ریل محصولات */
.kr-amazing .kr-product-rail{
    display:flex !important;
    flex-direction:row !important;
    align-items:stretch;
    gap:16px;

    width:100%;

    overflow-x:auto !important;
    overflow-y:hidden !important;

    scroll-behavior:smooth;

    scrollbar-width:none;

    padding:8px 2px 18px;

    box-sizing:border-box;

    /* مهم برای اسلایدر */
    scroll-snap-type:none !important;

    direction:rtl;
}

.kr-amazing .kr-product-rail::-webkit-scrollbar{
    display:none;
}


/* کارت محصول */
.kr-amazing .kr-product-card{
    flex:0 0 220px !important;
    min-width:220px !important;
    max-width:220px !important;
}


/* دکمه‌ها */
.kr-amazing .kr-rail-btn{
    z-index:999 !important;
}


/* =========================================================
   PRODUCT COUNTDOWN - FORCE ONE LINE
========================================================= */

.kr-amazing .kr-product-countdown{
    display:flex !important;

    flex-direction:row !important;

    align-items:center !important;

    justify-content:center !important;

    flex-wrap:nowrap !important;

    white-space:nowrap !important;

    width:100% !important;

    direction:rtl;

    gap:2px !important;

    margin:6px 0 !important;

    padding:3px 0 !important;

    line-height:1.2 !important;

    overflow:hidden !important;

    box-sizing:border-box;
}


.kr-amazing .kr-product-countdown-label{
    display:inline-block !important;

    white-space:nowrap !important;

    flex:none !important;

    font-size:10px !important;

    font-weight:800 !important;
}


.kr-amazing .kr-product-countdown-inline{
    display:inline-flex !important;

    flex-direction:row !important;

    align-items:center !important;

    flex:none !important;

    white-space:nowrap !important;

    gap:1px !important;

    font-size:10px !important;
}


.kr-amazing .kr-product-countdown-inline b{
    display:inline !important;

    font-size:12px !important;

    font-weight:900 !important;

    font-variant-numeric:tabular-nums;
}


.kr-amazing .kr-product-countdown-separator{
    display:inline-block !important;

    flex:none !important;

    margin:0 1px !important;

    font-size:13px !important;

    font-weight:900 !important;
}


/* موبایل */

@media(max-width:768px){

    .kr-amazing .kr-product-rail{
        gap:12px;
    }

    .kr-amazing .kr-product-card{
        flex:0 0 220px !important;
        min-width:220px !important;
    }

}


@media(max-width:500px){

    .kr-amazing .kr-product-card{
        flex:0 0 210px !important;
        min-width:210px !important;
    }

}
/* =========================================================
   BANNER
========================================================= */

.about-banner-wrap {
    position: relative;
    z-index: 1;
    clear: both;

    width: 100%;

    padding: 28px 20px 0;

    background: #f7f9fc;

    box-sizing: border-box;
}


.about-banner {

    position: relative;

    width: 100%;
    max-width: 1120px;

    height: 320px;

    margin: 0 auto;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 22px;

    background:
        linear-gradient(
            135deg,
            #061225,
            #102a52
        );

    box-shadow:
        0 12px 35px rgba(15, 23, 42, .12);
}


/* تصویر بنر */

.about-banner > img {

    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    object-position: center;

}


/* =========================================================
   FALLBACK BANNER
========================================================= */

.about-banner-default {

    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    position: relative;

    overflow: hidden;

    background:

        radial-gradient(
            circle at 20% 50%,
            rgba(37, 99, 235, .25),
            transparent 30%
        ),

        radial-gradient(
            circle at 80% 50%,
            rgba(14, 165, 233, .20),
            transparent 30%
        ),

        linear-gradient(
            135deg,
            #061225,
            #102a52
        );
}


/* =========================================================
   DARK MODE - پوشش کامل (آخر فایل تا بر همه قواعد مقدم باشد)
   ========================================================= */

/* بدنه و صفحه فروشگاه */

html[data-theme="dark"] body,
html[data-theme="dark"] .shop-page,
html[data-theme="dark"] .shop-content,
html[data-theme="dark"] .container,
html[data-theme="dark"] .main,
html[data-theme="dark"] .wrapper {

    background-color:
        #0f172a !important;

    color:
        #e2e8f0 !important;

}

/* کانتینرهای داخل هدر و نوبار نباید پس‌زمینه جداگانه داشته باشند
   تا پس‌زمینه خود هدر/نوبار در تمام عرض صفحه کشیده شود */
html[data-theme="dark"] .header .container,
html[data-theme="dark"] .navbar .container {
    background-color: transparent !important;
}

/* بردارها و کارت‌های سفید صفحه فروشگاه */

html[data-theme="dark"] .shop-heading,
html[data-theme="dark"] .shop-toolbar,
html[data-theme="dark"] .shop-empty,
html[data-theme="dark"] .shop-sidebar,
html[data-theme="dark"] .filter-card,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .product-page,
html[data-theme="dark"] .content-box,
html[data-theme="dark"] .white-box,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .box {

    background-color:
        #16213a !important;

    color:
        #e2e8f0 !important;

    border-color:
        #334155 !important;

}

/* تیترهای تیره داخل این کارت‌ها روشن شوند */

html[data-theme="dark"] .shop-heading h1,
html[data-theme="dark"] .shop-heading h2,
html[data-theme="dark"] .shop-empty h2,
html[data-theme="dark"] .filter-title,
html[data-theme="dark"] .sidebar h3,
html[data-theme="dark"] .sidebar h4,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {

    color:
        #f8fafc !important;

}

/* متن‌های تیره داخل کارت‌ها روشن شوند */

html[data-theme="dark"] .shop-heading p,
html[data-theme="dark"] .shop-empty p,
html[data-theme="dark"] .filter-check,
html[data-theme="dark"] .stock-filter,
html[data-theme="dark"] .shop-breadcrumb,
html[data-theme="dark"] .product-category-label,
html[data-theme="dark"] .filter-clear-one,
html[data-theme="dark"] .reset-filter,
html[data-theme="dark"] p,
html[data-theme="dark"] span,
html[data-theme="dark"] li,
html[data-theme="dark"] label,
html[data-theme="dark"] strong,
html[data-theme="dark"] b {

    color:
        #e2e8f0 !important;

}

/* ورودی‌های فیلتر و جستجو */

html[data-theme="dark"] .shop-search input,
html[data-theme="dark"] .filter-select,
html[data-theme="dark"] .price-inputs input,
html[data-theme="dark"] .sort-form select,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {

    background-color:
        #1e293b !important;

    color:
        #f8fafc !important;

    border-color:
        #475569 !important;

}

html[data-theme="dark"] .product-meta span,
html[data-theme="dark"] .kr-product-brand,
html[data-theme="dark"] .kr-product-model {

    background-color:
        #1e293b !important;

    color:
        #cbd5e1 !important;

}

/* لینک‌ها */

html[data-theme="dark"] .main a,
html[data-theme="dark"] .shop-content a,
html[data-theme="dark"] .sidebar a,
html[data-theme="dark"] footer a {

    color:
        #7dd3fc !important;

}

html[data-theme="dark"] .main a:hover,
html[data-theme="dark"] .shop-content a:hover,
html[data-theme="dark"] .sidebar a:hover,
html[data-theme="dark"] footer a:hover {

    color:
        #38bdf8 !important;

}

/* جدول‌ها و فرم‌های پروفایل/تیکت */

html[data-theme="dark"] table,
html[data-theme="dark"] .table,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .ticket-box,
html[data-theme="dark"] .order-box {

    background-color:
        #16213a !important;

    color:
        #e2e8f0 !important;

    border-color:
        #334155 !important;

}

html[data-theme="dark"] table th {

    background-color:
        #1e293b !important;

    color:
        #f8fafc !important;

}

html[data-theme="dark"] table td,
html[data-theme="dark"] table tr {

    border-color:
        #334155 !important;

    color:
        #e2e8f0 !important;

}

/* مرزها و سایه‌های روشن باقیمانده */

html[data-theme="dark"] .filter-card,
html[data-theme="dark"] .shop-search,
html[data-theme="dark"] .price-inputs input,
html[data-theme="dark"] .filter-select {

    border-color:
        #475569 !important;

}


/* =========================================================
   DARK MODE - بردهای خدمات (kr-strip) با رنگ‌های موضوعی
   ========================================================= */

html[data-theme="dark"] .kr-strip.red {

    background:
        linear-gradient(135deg, #2a1220, #3b1526) !important;

    color:
        #fda4af !important;

    border-color:
        #7f1d1d !important;

}

html[data-theme="dark"] .kr-strip.red span {

    color:
        #fca5a5 !important;

}

html[data-theme="dark"] .kr-strip.red b {

    background:
        #fda4af !important;

    color:
        #7f1d1d !important;

}

html[data-theme="dark"] .kr-strip.blue {

    background:
        linear-gradient(135deg, #10233d, #152c4f) !important;

    color:
        #7dd3fc !important;

    border-color:
        #1e40af !important;

}

html[data-theme="dark"] .kr-strip.blue span {

    color:
        #93c5fd !important;

}

html[data-theme="dark"] .kr-strip.blue b {

    background:
        #7dd3fc !important;

    color:
        #0c4a6e !important;

}

html[data-theme="dark"] .kr-strip.green {

    background:
        linear-gradient(135deg, #0c2a1d, #113a28) !important;

    color:
        #6ee7b7 !important;

    border-color:
        #065f46 !important;

}

html[data-theme="dark"] .kr-strip.green span {

    color:
        #86efac !important;

}

html[data-theme="dark"] .kr-strip.green b {

    background:
        #6ee7b7 !important;

    color:
        #064e3b !important;

}

/* دکمه داخل برد: با currentColor کار می‌کند، پس رنگ والد باید درست باشد */

html[data-theme="dark"] .kr-strip:before {

    background:
        rgba(255, 255, 255, .06) !important;

}


/* =========================================================
   DARK MODE - مزایا (kr-benefits) و کارت‌های کناری
   ========================================================= */

html[data-theme="dark"] .kr-benefits {

    background:
        #16213a !important;

    border-color:
        #334155 !important;

}

html[data-theme="dark"] .kr-benefit {

    border-color:
        #334155 !important;

}

html[data-theme="dark"] .kr-benefit:hover {

    background:
        #1e293b !important;

}

html[data-theme="dark"] .kr-benefit i {

    background:
        #1e293b !important;

}

html[data-theme="dark"] .kr-benefit strong {

    color:
        #f8fafc !important;

}

html[data-theme="dark"] .kr-benefit span {

    color:
        #94a3b8 !important;

}

html[data-theme="dark"] .kr-side-card strong {

    color:
        #f8fafc !important;

}

html[data-theme="dark"] .kr-side-card span {

    color:
        #94a3b8 !important;

}

html[data-theme="dark"] .kr-brand strong {

    color:
        #f8fafc !important;

}

html[data-theme="dark"] .kr-promo strong {

    color:
        #f8fafc !important;

}

html[data-theme="dark"] .kr-promo span {

    color:
        #cbd5e1 !important;

}


/* =========================================================
   DARK MODE - زیرمنوی دسته‌بندی‌ها (flyout) با کنتراست درست
   ========================================================= */

html[data-theme="dark"] .category-flyout {

    background:
        #1e293b !important;

    border-color:
        #334155 !important;

}

html[data-theme="dark"] .flyout-header {

    border-color:
        #334155 !important;

    color:
        #94a3b8 !important;

}

html[data-theme="dark"] .flyout-header-name,
html[data-theme="dark"] .flyout-header strong {

    color:
        #f8fafc !important;

}

/* آیتم‌ها کمی روشن‌تر از پنل تا پس‌زمینه‌شان دیده شود */

html[data-theme="dark"] .flyout-item {

    background:
        #26334d !important;

    color:
        #e2e8f0 !important;

    border-color:
        #334155 !important;

}

html[data-theme="dark"] .flyout-item .flyout-item-title,
html[data-theme="dark"] .flyout-item span {

    color:
        #e2e8f0 !important;

}

html[data-theme="dark"] .flyout-item:hover,
html[data-theme="dark"] .flyout-item:hover .flyout-item-title,
html[data-theme="dark"] .flyout-item:hover span {

    background:
        #334155 !important;

    color:
        #7dd3fc !important;

}

/* مگامنوی لپ‌تاپ */

html[data-theme="dark"] .laptop-mega-menu {

    background:
        #1e293b !important;

    border-color:
        #334155 !important;

}

html[data-theme="dark"] .laptop-mega-title {

    color:
        #f8fafc !important;

}

html[data-theme="dark"] .laptop-mega-link {

    background:
        #26334d !important;

    color:
        #e2e8f0 !important;

}

html[data-theme="dark"] .laptop-mega-link:hover {

    background:
        #334155 !important;

    color:
        #7dd3fc !important;

}


/* =========================================================
   بردهای خدمات - دکمه داخل برد (هر دو حالت روز و شب)
   در استایل اصلی background:currentColor است و چون color:#fff
   روی خود عنصر است، پس‌زمینه سفید + متن سفید = نامرئی می‌شود.
   ========================================================= */

.kr-strip b {

    color:
        #fff !important;

}

.kr-strip.red b {

    background:
        #cf2633 !important;

}

.kr-strip.blue b {

    background:
        #225ab5 !important;

}

.kr-strip.green b {

    background:
        #187447 !important;

}

/* حالت شب: دکمه‌ها با رنگ روشن متنوع */

html[data-theme="dark"] .kr-strip.red b {

    background:
        #fda4af !important;

    color:
        #7f1d1d !important;

}

html[data-theme="dark"] .kr-strip.blue b {

    background:
        #7dd3fc !important;

    color:
        #0c4a6e !important;

}

html[data-theme="dark"] .kr-strip.green b {

    background:
        #6ee7b7 !important;

    color:
        #064e3b !important;

}

/* =========================================================
   حذف کامل نشان قدیمی KR گوشه چپ محصولات شگفت‌انگیز
   (به‌جای آن، نشان قابل‌مدیریت از تنظیمات ادمین استفاده می‌شود)
========================================================= */

.kr-amazing::before,
.kr-amazing::after {

    content: none !important;

    display: none !important;

}

#krAmazingSection .kr-amazing::before,
#krAmazingSection .kr-amazing::after {

    content: none !important;

    display: none !important;

}

/* =========================================================
   MOBILE FIXES - رفع مشکلات ریسپانسیو موبایل
   ========================================================= */

/* ۱) جدول سبد خرید: در موبایل داخل اسکرول افقی قرار می‌گیرد
      تا صفحه کل سایت به‌هم نریزد */
@media (max-width: 768px) {

    .cart-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .cart-table img {
        width: 55px;
        height: 55px;
    }

    .cart-total-box {
        text-align: center;
    }

}

/* ۲) جلوگیری از سرریز افقی کل صفحه در موبایل */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        max-width: 100%;
    }

    .container {
        max-width: 100%;
    }

    .header-top {
        row-gap: 6px;
    }

    .header-tools a {
        padding: 7px 10px;
        font-size: 12.5px;
    }

    .logo img {
        height: 60px;
    }

    .menu > li > a {
        padding: 6px 12px;
        min-height: 33px;
        font-size: 13px;
    }

}

/* ۳) منوی دسته‌ها در موبایل: زیرمنوی flyout حالت لمسی
      (focus-within پشتیبانی می‌شود؛ کاری اضافه لازم نیست)
      فقط مطمئن می‌شویم عرضش از صفحه بیشتر نشود */
@media (max-width: 768px) {

    /* هم‌تراز با بلوک اصلی موبایل (بالا در همین فایل) */
    .category-flyout {
        right: 4vw;
        left: 4vw;
        width: auto;
    }

}

/* =========================================================
   DARK MODE - فیلتر برند (bios.php)
   فیلتر سفید در حالت شب نباید سفید بماند
   ========================================================= */

html[data-theme="dark"] .bios-page .shop-sidebar,
html[data-theme="dark"] .bios-page .filter-card {

    background-color:
        #16213a !important;

    border-color:
        #334155 !important;

}

html[data-theme="dark"] .bios-page .filter-title {

    color:
        #f8fafc !important;

}

html[data-theme="dark"] .bios-page .filter-check {

    color:
        #e2e8f0 !important;

}

html[data-theme="dark"] .bios-page .filter-check input {

    accent-color: #38bdf8;

}

html[data-theme="dark"] .bios-page .filter-clear-one {

    color:
        #f87171 !important;

}

html[data-theme="dark"] .bios-page .filter-empty {

    color:
        #94a3b8 !important;

}

html[data-theme="dark"] .bios-page .apply-filter {

    background:
        linear-gradient(135deg, #0284c7, #2563eb) !important;

    color:
        #fff !important;

    border: none;

}

html[data-theme="dark"] .bios-page .reset-filter {

    background:
        #1e293b !important;

    color:
        #93c5fd !important;

    border: 1px solid #334155 !important;

}

html[data-theme="dark"] .bios-page .bios-toolbar .bios-search input {

    background-color:
        #1e293b !important;

    color:
        #f8fafc !important;

    border-color:
        #475569 !important;

}

html[data-theme="dark"] .bios-page .bios-toolbar .bios-search button {

    background:
        linear-gradient(135deg, #0284c7, #2563eb) !important;

    color:
        #fff !important;

    border: none;

}

html[data-theme="dark"] .bios-page .bios-card {

    background-color:
        #16213a !important;

    border-color:
        #334155 !important;

    box-shadow:
        0 6px 22px rgba(0, 0, 0, .35) !important;

}

html[data-theme="dark"] .bios-page .bios-card .thumb {

    background:
        radial-gradient(circle at 80% 15%, rgba(56, 189, 248, .10), transparent 55%),
        radial-gradient(circle at 12% 90%, rgba(37, 99, 235, .10), transparent 50%),
        linear-gradient(140deg, #1a2740, #14203a) !important;

}

html[data-theme="dark"] .bios-page .bios-card h3 {

    color:
        #f8fafc !important;

}

html[data-theme="dark"] .bios-page .bios-card .model,
html[data-theme="dark"] .bios-page .bios-card .desc {

    color:
        #94a3b8 !important;

}

html[data-theme="dark"] .bios-page .bios-card .meta {

    color:
        #64748b !important;

}

html[data-theme="dark"] .bios-page .bios-card .brand-tag {

    background: #1e293b !important;

    color: #7dd3fc !important;

    border-color: #334155 !important;

}

html[data-theme="dark"] .bios-page .bios-card .price-tag.free {

    background: #1e293b !important;

    color: #6ee7b7 !important;

    border-color: #14532d !important;

}

html[data-theme="dark"] .bios-page .bios-card .btn-bios.ghost {

    background: #1e293b !important;

    color: #7dd3fc !important;

    border-color: #334155 !important;

}

html[data-theme="dark"] .bios-page .bios-card .btn-bios.ghost:hover {

    background: #26334d !important;

}

html[data-theme="dark"] .bios-page .bios-empty {

    background: #16213a !important;

    border-color: #334155 !important;

    color: #94a3b8 !important;

}

html[data-theme="dark"] .bios-page .bios-empty h3 {

    color: #cbd5e1 !important;

}

html[data-theme="dark"] .bios-page .step {

    background-color:
        #16213a !important;

    border-color:
        #334155 !important;

}

html[data-theme="dark"] .bios-page .step h4 {

    color: #f8fafc !important;

}

html[data-theme="dark"] .bios-page .step p {

    color: #94a3b8 !important;

}

/* =========================================================
   گرید محصولات صفحه فروشگاه: 4 محصول در هر ردیف
   ========================================================= */

.shop-products {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px;
}

/* فاصله کمتر بین عکس محصول و نام محصول در کارت‌های صفحه فروشگاه */
.shop-products .product-image {
    height: 190px !important;
    padding: 10px 20px 6px !important;
}

.shop-products .product-image img {
    max-height: 175px !important;
}

.shop-products .product-body {
    padding-top: 8px !important;
}

.shop-products .product-title {
    margin-top: 0 !important;
}

@media (max-width: 1100px) {
    .shop-products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    .shop-products {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   DARK MODE - صفحات ورود/ثبت‌نام و حساب کاربری
   (account.php / forgot_password.php / verify_reset.php /
    change-password.php / profile_edit.php)
   ========================================================= */

/* کارت اصلی فرم ورود/ثبت‌نام (account.php) */

html[data-theme="dark"] .auth-form-panel {

    background-color:
        #16213a !important;

    color:
        #e2e8f0 !important;

    border:
        1px solid #334155;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .35);

}

/* کارت مستقل فرم در صفحاتی که auth-inner-form مستقیم داخل
   account-container-box است (تغییر رمز / ویرایش پروفایل / ...) */

html[data-theme="dark"] .account-container-box > .auth-inner-form {

    background-color:
        #16213a !important;

    color:
        #e2e8f0 !important;

    border:
        1px solid #334155;

    border-radius:
        16px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .35);

}

/* تب‌های ورود / ثبت‌نام سریع / ثبت‌نام کامل */

html[data-theme="dark"] .auth-tab-btn {

    background:
        #1e293b !important;

    color:
        #cbd5e1 !important;

    border:
        1px solid #334155;

}

html[data-theme="dark"] .auth-tab-btn:hover {

    background:
        #334155 !important;

    color:
        #f8fafc !important;

}

html[data-theme="dark"] .auth-tab-btn.active {

    background:
        var(--site-primary, #0ea5e9) !important;

    color:
        #fff !important;

    border-color:
        transparent;

}

/* لینک‌های داخل فرم (مثل «رمز عبورم را فراموش کرده‌ام»)
   — رنگ اینلاین #2563eb با !important بازنویسی می‌شود */

html[data-theme="dark"] .auth-inner-form a {

    color:
        #7dd3fc !important;

}

html[data-theme="dark"] .auth-inner-form a:hover {

    color:
        #38bdf8 !important;

}

/* تصویر کپچا — حاشیه روشن به حاشیه تیره تبدیل می‌شود */

html[data-theme="dark"] .auth-inner-form img {

    border-color:
        #475569 !important;

}

/* پیام‌های خطا و موفقیت */

html[data-theme="dark"] .alert-danger {

    background:
        #2a1215 !important;

    color:
        #fca5a5 !important;

    border:
        1px solid #7f1d1d;

}

html[data-theme="dark"] .alert-success {

    background:
        #0c2a22 !important;

    color:
        #6ee7b7 !important;

    border:
        1px solid #14532d;

}