/* ==========================================================================
   RonikaPlus - Nordic Emerald & Obsidian Edition (طراحی اختصاصی)
   Pure White Base | Sharp 4px Corners | Zero Motion | High-End Retail RTL
   ========================================================================== */

/* --------------------------------------------------------------------------
   Root Variables (Emerald & Obsidian Palette)
   -------------------------------------------------------------------------- */
:root {
    --bg-page: #ffffff;
    --bg-surface: #ffffff;
    /* تپوگرافی خوانا و سنگین */
    --text-primary: #121816;
    --text-secondary: #3b4742;
    --text-muted: #788780;
    --text-light: #abb8b2;
    /* رنگ اصلی: سبز زمردی عمیق نوردیک */
    --accent-emerald: #0d5c46;
    --accent-emerald-hover: #084030;
    --accent-emerald-active: #04241b;
    --accent-emerald-tint: #f0f7f4;
    /* رنگ لهجه مکمل: کهربایی تیره برای تخفیف‌ها */
    --accent-amber: #d95b00;
    --accent-amber-hover: #b84a00;
    /* خطوط مرزی دقیق و مویی */
    --border-hairline: #eef2f0;
    --border-subtle: #d3dfda;
    --border-strong: #9fb5ab;
    /* گوشه‌های تیزِ منظم */
    --radius-sm: 4px;
    --radius-btn: 4px;
    --radius-card: 4px;
    /* سایه‌های بسیار تخت و کنترل شده */
    --shadow-soft: 0 1px 3px rgba(13, 92, 70, 0.05);
    --shadow-pop: 0 8px 24px rgba(13, 92, 70, 0.09);
}

/* --------------------------------------------------------------------------
   Typography & Zero-Animation Reset
   -------------------------------------------------------------------------- */
@font-face {
    font-family: iransan;
    src: url(san.woff2);
    font-display: swap;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

html {
    direction: rtl;
    text-align: right;
    scroll-behavior: auto !important;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: iransan, Tahoma, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.text-muted-custom {
    color: var(--text-muted) !important;
}

.border-hairline {
    border: 1px solid var(--border-hairline) !important;
}

.bg-white {
    background: #ffffff !important;
}

/* --------------------------------------------------------------------------
   Panels, Boxes & Flat Surfaces
   -------------------------------------------------------------------------- */
.glass-panel,
.flat-panel,
.card,
.panel,
.box,
.modal-content,
.offcanvas,
.toast,
.alert {
    background: #ffffff !important;
    border: 1px solid var(--border-hairline) !important;
    border-radius: var(--radius-card) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* --------------------------------------------------------------------------
   Navbar & RTL Header
   -------------------------------------------------------------------------- */
.navbar,
.navbar-custom {
    background: #ffffff !important;
    border-bottom: 2px solid var(--accent-emerald) !important;
    direction: rtl !important;
    text-align: right !important;
    padding: 12px 0;
}

.navbar-brand {
    color: var(--accent-emerald) !important;
    font-weight: 500;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 400;
    padding: 8px 14px !important;
}

    .navbar-brand:hover,
    .nav-link:hover,
    .nav-link:focus {
        color: var(--accent-emerald) !important;
    }

.navbar-toggler {
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-sm) !important;
}

    .navbar-toggler:focus {
        box-shadow: none !important;
    }

/* منوی بازشونده راست‌چین */
.dropdown-menu {
    background: #ffffff !important;
    min-width: 230px;
    padding: 6px 0;
    direction: rtl !important;
    text-align: right !important;
    right: 0 !important;
    left: auto !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-pop) !important;
}

.dropdown-item {
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 300;
    color: var(--text-secondary) !important;
    direction: rtl !important;
    text-align: right !important;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background: var(--accent-emerald-tint) !important;
        color: var(--accent-emerald) !important;
    }

/* زیرمنوها در RTL */
.dropdown-submenu {
    position: relative;
    direction: rtl !important;
    text-align: right !important;
}

    .dropdown-submenu > .dropdown-menu {
        top: 0;
        right: 100% !important;
        left: auto !important;
        margin-top: 0;
        display: none;
    }

    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }

    .dropdown-submenu > .submenu-toggle::before {
        content: "‹";
        float: left;
        color: var(--text-muted);
        font-size: 16px;
        line-height: 1;
    }

@media (min-width: 992px) {
    .navbar .dropdown:hover > .dropdown-menu,
    .navbar .dropdown-menu li:hover > .dropdown-menu {
        display: block;
    }
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #ffffff !important;
        padding: 16px;
        border-radius: var(--radius-card) !important;
        margin-top: 10px;
        border: 1px solid var(--border-hairline) !important;
        box-shadow: var(--shadow-pop) !important;
    }

    .dropdown-menu {
        position: static !important;
        width: 100%;
        margin-top: 4px;
        box-shadow: none !important;
        border: none !important;
        padding-right: 12px;
    }

    .dropdown-submenu > .dropdown-menu {
        right: 0 !important;
        padding-right: 12px;
    }
}

/* --------------------------------------------------------------------------
   فرم‌ها و ورودی‌ها
   -------------------------------------------------------------------------- */
input,
select,
textarea,
.form-control,
.form-select {
    background: #ffffff !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important;
    padding: 9px 12px;
    font-size: 14px;
    box-shadow: none !important;
}

    input:focus,
    select:focus,
    textarea:focus,
    .form-control:focus,
    .form-select:focus {
        outline: none !important;
        border-color: var(--accent-emerald) !important;
        box-shadow: 0 0 0 1px var(--accent-emerald) !important;
    }

.form-check-input:checked {
    background-color: var(--accent-emerald) !important;
    border-color: var(--accent-emerald) !important;
}

/* --------------------------------------------------------------------------
   دکمه‌ها
   -------------------------------------------------------------------------- */
.btn,
 
.btn-primary,
.btn-secondary,
.btn-glow,
.btn-purple,
.btn-red {
    background-color: var(--accent-emerald) !important;
    background: var(--accent-emerald) !important;
    border: 1px solid var(--accent-emerald) !important;
    color: #ffffff !important;
    border-radius: var(--radius-btn) !important;
    padding: 9px 20px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: none !important;
}

    .btn:hover,
    button:hover,
    .btn-primary:hover,
    .btn-secondary:hover {
        background-color: var(--accent-emerald-hover) !important;
        background: var(--accent-emerald-hover) !important;
        border-color: var(--accent-emerald-hover) !important;
        color: #ffffff !important;
    }

    .btn:active,
    button:active {
        background-color: var(--accent-emerald-active) !important;
        border-color: var(--accent-emerald-active) !important;
    }

/* دکمه‌های حاشیه‌دار (Outline) */
.btn-outline,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-light-custom {
    background: #ffffff !important;
    border: 1px solid var(--accent-emerald) !important;
    color: var(--accent-emerald) !important;
    border-radius: var(--radius-btn) !important;
    padding: 8px 18px;
    font-weight: 400;
}

    .btn-outline:hover,
    .btn-outline-primary:hover {
        background: var(--accent-emerald) !important;
        color: #ffffff !important;
    }

/* --------------------------------------------------------------------------
   تایتل بخش‌ها
   -------------------------------------------------------------------------- */
.section-title {
    position: relative;
    margin-bottom: 24px;
    padding-right: 14px;
    font-weight: 500;
    font-size: 1.2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}
.serachResult {
    display: block;
    position: absolute;
    background: white;
    z-index: 2000;
    border: 1px var(--bg-dark-3);
    border-radius: 2px;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.5px gray;
}
    .section-title::before {
        content: "";
        width: 5px;
        height: 22px;
        border-radius: 2px;
        background: var(--accent-emerald) !important;
        flex: 0 0 auto;
    }

    .section-title::after {
        content: "";
        height: 1px;
        flex: 1;
        background: var(--border-hairline) !important;
    }

/* --------------------------------------------------------------------------
   کارت‌های محصول (Flat, High-End & Sharp)
   -------------------------------------------------------------------------- */
.product-card,
.product-card-lg {
    background: #ffffff !important;
    border: 1px solid var(--border-hairline) !important;
    border-radius: var(--radius-card) !important;
    overflow: hidden;
    box-shadow: none !important;
    min-height: 430px;
    position: relative;
    direction: rtl;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card-lg {
    min-height: 480px;
}

    .product-card:hover,
    .product-card-lg:hover {
        border-color: var(--border-subtle) !important;
        box-shadow: var(--shadow-soft) !important;
    }

.product-thumb-wrap {
    position: relative;
    background: #ffffff !important;
    padding: 16px;
}

.product-thumb {
    width: 100%;
    height: 220px;
    object-fit: contain;
    display: block;
    background: #ffffff;
}

.product-body {
    padding: 16px;
    text-align: right;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.circle {
    background: var(--primary-purple-light);
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 3;
    border-radius: 10px;
    box-shadow: 0px 0px 5px black;
}
.category-img {
    width: 80%;
    object-fit: cover;
    left:-22px;
    position:relative;
}
.swiper-wrapper {
    height: auto !important;
}
 

.product-category {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 300;
    margin-bottom: 6px;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text-primary) !important;
    line-height: 1.6;
    min-height: 44px;
}

.timePart {
    background: #eeeeee;
    color: black;
    display: inline-block;
    border-radius: 10px;
    padding: 5px 0px 0px 5px;
}

.timeBack {
    position: relative;
    border-radius: 10px;
    min-height: 300px;
}

.timeBack {
    position: relative;
    border-radius: 10px;
    min-height: 300px;
}

.timeFront {
    position: absolute;
    bottom: 10px;
    z-index: 2;
    right: 10px;
}

.timeBkg {
    position: absolute;
    left: 0px;
    right: 0px;
    bottom: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 1;
    object-fit: cover;
    opacity: 0.7;
    object-position: center;
    border-radius: 10px;
}

.product-rating {
    color: #e09300;
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    margin-bottom: 54px;
}

.price-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.old-price {
    color: var(--text-light);
    font-size: 0.82rem;
    text-decoration: line-through;
}

.product-price {
    color: var(--text-primary) !important;
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 0;
}

.price-tag {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--accent-emerald) !important;
}

.stock-status {
    font-size: 0.82rem;
    color: var(--accent-emerald);
    font-weight: 400;
}

/* بج‌های تخفیف با نارنجی کهربایی جذاب */
.badge,
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background: var(--accent-amber) !important;
    color: #ffffff !important;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: var(--radius-sm) !important;
}

.product-actions {
    position: absolute;
    left: 10px;
    top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.icon-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm) !important;
    background: #ffffff !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
    cursor: pointer;
}

    .icon-btn:hover {
        color: #ffffff !important;
        background: var(--accent-emerald) !important;
        border-color: var(--accent-emerald) !important;
    }

/* دکمه پایین کارت */
.product-card .btn,
.product-card .btn-primary,
.product-card-lg .btn,
.product-card-lg .btn-primary {
    position: absolute;
    left: 14px;
    right: 14px;
    width: calc(100% - 28px) !important;
    bottom: 14px;
    border-radius: var(--radius-btn) !important;
}

/* --------------------------------------------------------------------------
   اسلایدرها و Swiper
   -------------------------------------------------------------------------- */
.hero-slider .carousel-item img {
    width: 100%;
    object-fit: contain;
    border-radius: var(--radius-card);
    background: #ffffff;
}

.swiper {
    padding: 8px 2px 40px;
}

.swiper-main {
    height: 400px;
    border-radius: var(--radius-card);
    margin-bottom: 12px;
    border: 1px solid var(--border-hairline);
    background: #ffffff;
}

.swiper-thumbs .swiper-slide {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-hairline);
    background: #ffffff;
}

.swiper-thumbs .swiper-slide-thumb-active {
    border-color: var(--accent-emerald) !important;
}

.swiper-button-next,
.swiper-button-prev {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm) !important;
    background: #ffffff !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

    .swiper-button-next:hover,
    .swiper-button-prev:hover {
        background: var(--accent-emerald) !important;
        border-color: var(--accent-emerald) !important;
        color: #ffffff !important;
    }

.swiper-pagination-bullet-active {
    background: var(--accent-emerald) !important;
}

/* --------------------------------------------------------------------------
   تب‌ها و صفحه‌بندی (Pagination)
   -------------------------------------------------------------------------- */
.nav-tabs {
    border-bottom: 1px solid var(--border-hairline) !important;
    margin-bottom: 20px;
}

    .nav-tabs .nav-link {
        color: var(--text-muted) !important;
        border: none !important;
        border-bottom: 2px solid transparent !important;
        font-weight: 400;
        padding: 10px 18px;
        background: transparent !important;
        border-radius: 0 !important;
    }

        .nav-tabs .nav-link.active {
            color: var(--accent-emerald) !important;
            border-bottom: 2px solid var(--accent-emerald) !important;
        }

.pagination-custom .page-link,
.custom-pagination .page-link,
.page-link {
    background: #ffffff !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm) !important;
    margin: 0 3px;
    font-weight: 500;
}

    .pagination-custom .page-link:hover,
    .page-link:hover {
        background: var(--accent-emerald-tint) !important;
        border-color: var(--accent-emerald) !important;
        color: var(--accent-emerald) !important;
    }

.pagination-custom .page-item.active .page-link,
.page-item.active .page-link {
    background: var(--accent-emerald) !important;
    border-color: var(--accent-emerald) !important;
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   سبد خرید، شمارنده و موارد تعاملی
   -------------------------------------------------------------------------- */
.cart-badge {
    position: absolute;
    top: -5px;
    left: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: var(--radius-sm);
    background: var(--accent-amber) !important; /* چشمک‌زن نباشه اما فوری جلب توجه کنه */
    color: #ffffff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 500;
}

.quantity-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: #ffffff;
}

    .quantity-box a {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--text-primary);
        background: var(--accent-emerald-tint);
        font-size: 16px;
        font-weight: 500;
    }

        .quantity-box a:hover {
            background: var(--accent-emerald);
            color: #ffffff;
        }

.quantity-number {
    min-width: 36px;
    text-align: center;
    font-weight: 500;
}

.btn-wishlist:hover,
.btn-wishlist.active {
    background: var(--accent-emerald) !important;
    border-color: var(--accent-emerald) !important;
    color: #ffffff !important;
}

#btnBackToTop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm) !important;
    background: var(--accent-emerald) !important;
    color: #ffffff !important;
    border: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   واکنش‌گرایی (Responsive)
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .product-thumb {
        height: 170px;
    }

    .price-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .swiper-button-next, .swiper-button-prev {
        display: none;
    }
}

@media print {
    .navbar, .navbar-custom, #btnBackToTop, footer, .dontPrint {
        display: none !important;
    }
}
