/* Header Styles */
.business-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.business-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.business-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.business-info {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}




/* Navigation */
.business-nav {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
}

.nav-item {
    flex-shrink: 0;
}

.nav-link {
    display: block;
    padding: 1.2rem 1.5rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}




/* Categories */


.categories-section {
    padding: 4rem 0;
    background: white;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: var(--dark);
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}



.view-btn {
    display: inline-block;
    padding: 0.7rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50px;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: all 0.3s;
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.4);
    color: white;
}





/* Best Selling */
.best-selling {
    padding: 4rem 0;
    background: #f9f9ff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}



.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.2rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a0db4, #1a68e8);
    color: white;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f1f1;
    color: var(--text);
}

.btn-icon:hover {
    background: #e1e1e1;
}



/* Business Info */
.business-info-section {
    padding: 4rem 0;
    background: white;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-content h3 {
    margin: 0 0 0.5rem;
    color: var(--dark);
}

.info-content p {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 992px) {
    .business-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .business-header {
        padding: 3rem 1rem;
    }
    
    .business-title {
        font-size: 1.8rem;
    }
    
    .info-item {
        width: 100%;
        justify-content: center;
    }
    

}

@media (max-width: 576px) {
    .business-title {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .categories-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    

}




/* اسلایدر افقی محصولات */
.products-horizontal-container {
    position: relative;
    padding: 0 30px;
    margin: 20px 0;
}

.products-horizontal-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 15px;
    padding: 15px 0;
    scrollbar-width: none; /* برای Firefox */
    align-items: stretch;
}

.products-horizontal-scroll::-webkit-scrollbar {
    display: none; /* برای Chrome و Safari */
}



/* Product card styles moved into `sales/_product_card.html` to avoid duplication */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.9rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
}



/* 3D Room Scene background for rack */


/* Fixed header (brand/search + tabs) */
#topHeader{ position: fixed; top:0; inset-inline:0; height: var(--nav-h); z-index: 60; }
#tabsBar{ position: fixed; top: var(--nav-h); inset-inline:0; height: var(--tabs-h); z-index: 60; }

/* Fixed right sidebar */
#rightSidebar{ 
     position: fixed; 
     top: calc(var(--nav-h) + var(--tabs-h)); 
     bottom: 0; 
     right: 0 !important; 
     left: auto !important; 
     z-index: 50; 
     width: var(--sidebar-w-c); 
     transition: width .2s ease; }

body.sidebar-expanded #rightSidebar{ 
    width: min(85vw, var(--sidebar-w-e)); 
}

/* Label text toggling for single-list sidebar */
.label-text{ display: none; }
body.sidebar-expanded .label-text{ display: inline; }

/* Layout paddings to avoid overlap with fixed bars */
#pageWrap{ 
    padding-top: 
    calc(var(--nav-h) + var(--tabs-h) + 1rem); 
    padding-right: calc(var(--sidebar-w-c) + .15rem); }

body.sidebar-expanded #pageWrap{ 
    padding-right: calc(min(85vw, var(--sidebar-w-e)) + .15rem); }






#leftChatSidebar {
    position: fixed;
    top:  calc(var(--nav-h) + var(--tabs-h) );      /* ارتفاع هدر + تب ها */
    bottom: 0;
    left: -315px;
    width: 320px;
    transition: left .25s ease;
    z-index: 9999;
}

body.sidebar-chat-expanded #leftChatSidebar {
    left: 0;          /* باز */
}





/* Hover submenu panel that opens to the left of sidebar */
.submenu-panel{ width: min(75vw, 720px); max-height: 70vh; overflow:auto; border-radius: .15rem; box-shadow: 0 10px 25px rgba(0,0,0,.12); z-index: 70; }

/* Tab panes: take full remaining viewport height below fixed header */
.tab-iframe{ width:100%; height: calc(100vh - (var(--nav-h) + var(--tabs-h) + 1rem)); border: 0; }

/* Tabs styling: light blue base, darker and bluer for active */
.tab-link{
background-color: rgba(13,42,82,.14) !important; /* darker light brand */
color: var(--brand) !important;
display: inline-flex;
align-items: center;
gap: .375rem; /* space between title and close */
}
.tab-link:hover{ background-color: rgba(13,42,82,.20) !important; }
.tab-link.active,
.tab-link[aria-selected="true"],
.tab-link[aria-current="page"],
.tab-link.is-active{
background-color: rgba(13,42,82,.45) !important; /* stronger blue */
color: #ffffff !important;
font-weight: 700;
}

/* Close (x) inside tab */
.tab-link .tab-close{
display: inline-flex;
align-items: center;
justify-content: center;
width: 18px; height: 18px;
border-radius: 999px;
background: rgba(255,255,255,.18);
color: #fff;
font-size: 12px;
line-height: 1;
}
.tab-link:hover .tab-close{ background: rgba(255,255,255,.24); }
.tab-link[data-closable="false"] .tab-close{ opacity: .5; cursor: not-allowed; }

/* Utilities for RTL offsets in Tailwind < v4 */
.isr{ inset-inline-start: 0; }
.ise{ inset-inline-end: 0; }
.isr-full{ inset-inline-start: 100%; }





/* Rack Section Container - Match main content width */
.rack-section { 
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}


/* Main 3D Scene Container */
.main-rack {
    position: relative;
    width: 100%;
    /* height: 100%; */
    height: 450px;
    perspective: 1200px;
    overflow: visible;
  }
  
.carousel-wrapper {
    position: absolute;
    inset: 0;
    transform: translateX(40px) translateY(40px);
    pointer-events: none; /* خودش کلیک نمی‌گیره */
  }
  
.main-rack .carousel {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transform: translateZ(-420px) rotateY(0deg);
    will-change: transform;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }
  
.main-rack  .item, .product-card, .product-card * {
    pointer-events: auto !important;
  }
  
.main-rack  .item {
    position: absolute;
    width: 280px;  
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    transform-origin: center center;
    transition: transform 0.3s ease;
    pointer-events: auto; 
    z-index: 10; 
  }


/* کارت داخل آیتم کل عرض را پر کند */
.main-rack .item > article.product-card{ 
    width: 90%; 
    max-width: none; 
    pointer-events: auto; 
    position: relative;
    z-index: 11;       
}

.main-rack .item > article.product-card {
    user-select: auto;  /* اجازه انتخاب متن در کارت محصول */
}

.main-rack .carousel {
    cursor: grab;
}

.main-rack.dragging .carousel {
    cursor: grabbing;
}


.room-scene {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1400px;
    perspective: 1200px;
    transform-style: preserve-3d;
    /* height: 450px;  */
    overflow: hidden;
}


.room-scene::before {
    /* floor */
    content: '';
    position: absolute;
    left: 50%;
    bottom: -120px;
    transform: translateX(-50%) rotateX(75deg);
    width: 87%;
    height: 380px;
    /* background: radial-gradient(ellipse at center, rgba(0,0,0,0.10) 0%, rgba(0, 0, 0, 0.298) 35%, rgba(0, 0, 0, 0.679) 60%, rgba(0, 0, 0, 0.87) 100%),
                repeating-linear-gradient(90deg, #303d65 0 18px, #755983 18px 36px); */
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.298) 35%, rgba(0, 0, 0, 0.679) 60%, rgba(0, 0, 0, 0.87) 100%),
                repeating-linear-gradient(90deg, #8f0a1ba5 0 18px, #755983 18px 36px);            
    filter: blur(0.5px);
    border-radius: 15px;
    /* box-shadow: 0 -40px 120px rgba(14, 4, 4, 0.174) inset; */
    z-index: 0;
}



/* lift rack above background planes */
.room-scene .main-rack { position: relative; z-index: 2; }

/* 3D Scene Decoration */
.room-scene .shop-bg {
    position: absolute;
    left: 0;
    right: 0;
    top: -40px;
    height: 70%;
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    transform: translateZ(-80px) scale(1.12);
    filter: saturate(1.05) contrast(1.04) brightness(1.02);
    border-radius: 18px;
    z-index: 0;
    max-width: 1200px;
    margin: 0 auto;
    width: calc(100% - 2rem);
}

.room-scene .ceiling-lights {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -20px;
    height: 120px;
    width: 90%;
    max-width: 1200px;
    background: radial-gradient(ellipse at 20% 40%, rgba(255,255,255,.55), rgba(255,255,255,0) 60%), 
                radial-gradient(ellipse at 80% 40%, rgba(255,255,255,.55), rgba(255,255,255,0) 60%);
    filter: blur(2px);
    z-index: 0;
}

.room-scene .wall-frame {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -28px;
    height: 62%;
    width: 90%;
    max-width: 1200px;
    border-radius: 16px;
    box-shadow: 0 8px 26px rgba(0,0,0,.10), inset 0 0 0 2px rgba(255,255,255,.35);
    backdrop-filter: blur(0.3px);
    z-index: 0;
}

.room-scene .wall-frame .frame-inner {
    position: absolute;
    inset: 12px;
    border-radius: 12px;
    box-shadow: inset 0 0 0 2px rgba(13,42,82,.08), inset 0 0 22px rgba(13,42,82,.06);
}

.room-sparkle {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,.25) 1px, transparent 1px);
    background-size: 3px 3px;
    opacity: 0.10;
    z-index: 1;
    border-radius: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
}

.vignette {
    position: absolute;
    inset: -2%;
    pointer-events: none;
    box-shadow: inset 0 0 140px rgba(0,0,0,.25);
    border-radius: 20px;
    z-index: 2;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
}

.rack-pole {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    height: 300px;
}

.rack-pole .pole {
    position: absolute;
    left: 50%;
    bottom: 76px;
    transform: translateX(-50%);
    width: 18px;
    height: 220px;
    border-radius: 999px;
    background: linear-gradient(180deg, #e6ebff, #c9d4ff 45%, #aabaff 100%);
    box-shadow: inset 0 2px 6px rgba(255,255,255,.65), 
                inset 0 -4px 10px rgba(0,0,0,.08), 
                0 10px 28px rgba(0,0,0,.18);
    border: 1px solid rgba(0,0,0,.06);
}

.rack-pole .pole-base {
    position: absolute;
    left: 50%;
    bottom: 44px;
    transform: translateX(-50%);
    width: 180px;
    max-width: 90%;
    height: 26px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,.25) 0%, rgba(0,0,0,.12) 45%, rgba(0,0,0,0) 70%);
    filter: blur(1.2px);
    border-radius: 999px;
}

.main-rack .rack-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #cfd8ff 55%, #a5b2ff);
    box-shadow: inset 0 2px 6px rgba(255,255,255,.65), 
                inset 0 -3px 8px rgba(0,0,0,.08), 
                0 8px 18px rgba(0,0,0,.15);
    border: 1px solid rgba(0,0,0,.06);
    z-index: 2;
}

.floor-grid {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) rotateX(70deg);
    bottom: -120px;
    height: 220px;
    width: 90%;
    max-width: 1200px;
    background-image: linear-gradient(rgba(13,42,82,.08) 1px, transparent 1px), 
                    linear-gradient(90deg, rgba(13,42,82,.08) 1px, transparent 1px);
    background-size: 28px 28px;
    background-position: center center;
    filter: blur(.2px);
    z-index: 0;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .room-scene { height: 400px; perspective: 900px; }
    .main-rack .carousel { transform: translateZ(-350px) rotateY(0deg); }
    .main-rack .item { width: 260px; }
}

@media (max-width: 768px) {
    .room-scene { height: 450px; perspective: 800px; }
    .main-rack .item { width: 250px; }
}

@media (max-width: 480px) {
    .rack-section { padding: 0 0.5rem; }
    .room-scene { height: 400px; perspective: 600px; }
    .main-rack .item { width: 240px; }
}

/* جلوگیری از رفتن محتوا زیر منو در موبایل */
@media (max-width: 768px) {

    /* حالت سایدبار بسته */
    body {
        padding-right: calc(var(--sidebar-meno-c) + 12px);
    }

    /* حالت سایدبار باز */
    body.sidebar-expanded {
        padding-right: calc(var(--sidebar-meno-e) + 12px);
    }
}




 /* footer style  */
    .business-section {
        direction: rtl;
        margin-top: 2.5rem;
        font-family: "IRANSans", "Vazirmatn", sans-serif;
    }

    .business-grid {
        display: flex;
        gap: 2rem;
        flex-wrap: wrap;
    }

    /* ستون راست */
    .business-info {
        flex: 1 1 45%;
        display: flex;
        flex-direction: column;
        gap: 1.2rem;
    }

    /* ستون چپ: نقشه */
    .business-map {
        flex: 1 1 50%;
        background: #fff;
        border-radius: 12px;
        position: relative;
        padding: 0;
        overflow: hidden;
        margin-right: 0rem;
    }

    /* جعبه اطلاعات */
    .info-box {
        background: #ffffff;
        padding: 1rem 1.2rem;
        border-radius: 12px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
        display: flex;
        gap: 1rem;
        transition: .2s;
    }

    .info-box:hover {
        transform: translateY(-2px);
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }

    .info-icon {
        font-size: 30px;
        color: #3f51b5;
        background: #eef1ff;
        padding: 10px;
        border-radius: 10px;
    }

    .info-box h3 {
        font-size: 1rem;
        font-weight: 700;
        margin-bottom: .3rem;
    }

    .info-box p {
        margin: 0;
        font-size: .9rem;
    }

    /* نقشه */
    #businessMap {
        width: 100%;
        height: 400px;
    }

    /* هدر بالای نقشه */
    .map-header {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 999;
        background: white;
        padding: 0.7rem 1rem;
        border-radius: 10px;
        display: flex;
        align-items: center;
        gap: 10px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }

    .map-control-btn {
        width: 40px;
        height: 40px;
        background: #fff;
        border: none;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
        cursor: pointer;
        font-size: 18px;
        transition: 0.3s;
    }

    .map-control-btn:hover {
        background: #3f51b5;
        color: white;
        transform: scale(1.1);
    }

    /* موبایل */
    @media(max-width: 768px) {
        .business-info, .business-map {
            flex: 1 1 100%;
        }
        
        #businessMap {
            height: 300px;
        }
    }




    /* page setting */
    .no-scrollbar {
        -ms-overflow-style: none;    /* IE and Edge */
        scrollbar-width: none;       /* Firefox */
    }
    .no-scrollbar::-webkit-scrollbar {
        display: none;               /* Chrome, Safari */
    }

    .Down-section {
        padding: 10px;
        text-align: center;       /* وسط‌چین کردن متن */
        color: rgb(208, 247, 67);             /* رنگ متن سفید */
        font-weight: 600;         /* ضخیم‌تر برای خوانایی */
        font-size: 0.9rem;        /* اندازه مناسب برای تیتر */

        background: radial-gradient(ellipse at 20% 40%, rgba(3, 2, 2, 0.55), rgba(255,255,255,0) 100%), 
                    radial-gradient(ellipse at 80% 40%, rgba(14, 11, 11, 0.55), rgba(255,255,255,0) 100%);
    }


    .title-section {
        padding: 10px;
        text-align:right;       /* وسط‌چین کردن متن */
        color: rgb(15, 0, 5);             /* رنگ متن سفید */
        font-weight: 600;         /* ضخیم‌تر برای خوانایی */
        font-size: 0.9rem;        /* اندازه مناسب برای تیتر */
        margin: 0px 0px 0px 0px;
        background-color: rgba(255, 255, 255, 0) !important; 
    }

    .offers-container {
        background: var(--productback); /* رنگ اصلی تو حفظ میشه */
        border-radius: 1rem; /* گوشه‌ها گرد */
        padding:1.5rem 0.5rem 1.5rem 0.5rem ; 
    }


    .mySwiperOffers {
        direction: rtl;
        padding: 1rem 0;
    }

    .mySwiperOffers .swiper-wrapper {
        align-items: stretch;
    }

    .offers-wrapper {
    /* background-color: #07060636;  */
        border-radius: 5px;
        padding: 1rem 0.5rem 1.5rem;
        position: relative;
        overflow: hidden;
        margin: 0rem 0;
    }  


    .mySwiperOffers .swiper-slide {
        width: 210px; /* عرض ثابت برای همه کارت‌ها */
        flex: 0 0 auto; /* نذار عرض متغیر بشه */
        margin: 0 8px; /* فاصله بین کارت‌ها */
        transition: transform 0.3s ease;
    }

    .mySwiperOffers .swiper-slide:hover {
         transform: translateY(-4px);
    }

    /* دکمه‌های کوچک‌تر و ظریف‌تر */
    .swiper-button-next,
    .swiper-button-prev {
        width: 10px;            /* اندازه کل دکمه */
        height: 10px;
        border-radius: 50%;     /* گرد */
        color: white;           /* رنگ فلش */
    }

    /* خود آیکون فلش */
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 10px;   /* اندازه فلش */
        font-weight: bold;
    }

    /* حالت hover */
        .swiper-button-next:hover,
        .swiper-button-prev:hover {
        background: rgba(80, 75, 108, 0.153);
        transform: scale(1.05);
    }


    @media (max-width: 768px) {
    .swiper-button-next, .swiper-button-prev {
        display: none;
    }
    }