/* ===========================================
   Camp Hotspots Widget - RTL Styles
   =========================================== */

/* Wrapper */
.camp-hotspots-wrapper {
    position: relative;
    direction: rtl;
    font-family: inherit;
}

/* Container */
.camp-hotspots-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.camp-hotspots-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* ===========================================
   Hotspot Styles
   =========================================== */
.camp-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
}

.camp-hotspot i,
.camp-hotspot svg {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.camp-hotspot svg {
    fill: currentColor;
}

/* ===========================================
   Hotspot Animations
   =========================================== */

/* Pulse Animation */
.camp-hotspot.animation-pulse {
    animation: campPulse 2s infinite;
}

@keyframes campPulse {
    0% {
        box-shadow: 0 0 0 0 var(--hotspot-color, rgba(231, 76, 60, 0.7));
    }
    70% {
        box-shadow: 0 0 0 15px transparent;
    }
    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

/* Bounce Animation */
.camp-hotspot.animation-bounce {
    animation: campBounce 2s infinite;
}

@keyframes campBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate(-50%, -50%);
    }
    40% {
        transform: translate(-50%, calc(-50% - 12px));
    }
    60% {
        transform: translate(-50%, calc(-50% - 6px));
    }
}

/* Glow Animation */
.camp-hotspot.animation-glow {
    animation: campGlow 2s infinite;
}

@keyframes campGlow {
    0%, 100% {
        box-shadow: 0 0 5px var(--hotspot-color, #e74c3c),
                    0 0 10px var(--hotspot-color, #e74c3c),
                    0 0 15px var(--hotspot-color, #e74c3c);
    }
    50% {
        box-shadow: 0 0 10px var(--hotspot-color, #e74c3c),
                    0 0 20px var(--hotspot-color, #e74c3c),
                    0 0 30px var(--hotspot-color, #e74c3c);
    }
}

/* Ripple Animation */
.camp-hotspot-ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--hotspot-color, #e74c3c);
    animation: campRipple 2s infinite;
    pointer-events: none;
}

.camp-hotspot-ripple.ripple-delay {
    animation-delay: 0.6s;
}

@keyframes campRipple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* ===========================================
   Tooltip Styles
   =========================================== */
.camp-hotspot-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
}

.camp-hotspot-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: currentColor transparent transparent transparent;
}

.camp-hotspot:hover .camp-hotspot-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 15px);
}

/* ===========================================
   Products Panel Styles
   =========================================== */
.camp-products-panel {
    position: absolute;
    background: #fff;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.camp-products-panel.active {
    opacity: 1;
    visibility: visible;
}

/* Panel Positions */

/* Right Position */
.camp-products-panel.position-right {
    top: 0;
    right: 0;
    height: 100%;
    border-radius: 12px 0 0 12px;
    transform: translateX(100%);
}

.camp-products-panel.position-right.animation-slide.active {
    transform: translateX(0);
}

.camp-products-panel.position-right.animation-fade {
    transform: translateX(0);
}

/* Left Position */
.camp-products-panel.position-left {
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 0 12px 12px 0;
    transform: translateX(-100%);
}

.camp-products-panel.position-left.animation-slide.active {
    transform: translateX(0);
}

.camp-products-panel.position-left.animation-fade {
    transform: translateX(0);
}

/* Bottom Position */
.camp-products-panel.position-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    max-height: 60%;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
}

.camp-products-panel.position-bottom.animation-slide.active {
    transform: translateY(0);
}

.camp-products-panel.position-bottom.animation-fade {
    transform: translateY(0);
}

.camp-products-panel.position-bottom .camp-products-list {
    flex-direction: row;
    flex-wrap: wrap;
}

.camp-products-panel.position-bottom .camp-product-card {
    width: calc(25% - 9px);
    flex-direction: column;
}

.camp-products-panel.position-bottom .camp-product-image {
    width: 100%;
    height: 120px;
}

.camp-products-panel.position-bottom .camp-product-info {
    padding-top: 10px;
}

/* Modal Position */
.camp-products-panel.position-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    max-width: 500px;
    width: 90vw;
    max-height: 80vh;
    border-radius: 16px;
}

.camp-products-panel.position-modal.animation-scale.active {
    transform: translate(-50%, -50%) scale(1);
}

.camp-products-panel.position-modal.animation-fade.active {
    transform: translate(-50%, -50%);
}

.camp-products-panel.position-modal.animation-slide {
    transform: translate(-50%, -40%);
}

.camp-products-panel.position-modal.animation-slide.active {
    transform: translate(-50%, -50%);
}

/* Panel Animations */
.camp-products-panel.animation-fade {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.camp-products-panel.animation-slide {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.camp-products-panel.animation-scale {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.camp-products-panel.animation-none.active {
    transform: none;
}

.camp-products-panel.position-right.animation-none,
.camp-products-panel.position-left.animation-none {
    transform: translateX(0);
}

.camp-products-panel.position-bottom.animation-none {
    transform: translateY(0);
}

.camp-products-panel.position-modal.animation-none {
    transform: translate(-50%, -50%);
}

/* Modal Overlay */
.camp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.camp-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===========================================
   Panel Header
   =========================================== */
.camp-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.camp-panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.camp-panel-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: all 0.3s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camp-panel-close:hover {
    background: #f5f5f5;
}

.camp-panel-close svg {
    display: block;
}

/* ===========================================
   Products List
   =========================================== */
.camp-products-list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar */
.camp-products-list::-webkit-scrollbar {
    width: 6px;
}

.camp-products-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.camp-products-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.camp-products-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ===========================================
   Product Card
   =========================================== */
.camp-product-card {
    display: flex;
    gap: 12px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

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

.camp-product-image {
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.camp-product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.camp-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.camp-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}

.camp-product-title {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.camp-product-price {
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.camp-product-price del {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.6;
}

.camp-product-price ins {
    text-decoration: none;
}

.camp-product-price .woocommerce-Price-currencySymbol {
    font-size: 0.85em;
}

/* ===========================================
   Add to Cart Button
   =========================================== */
.camp-add-to-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    margin-top: 6px;
    width: fit-content;
}

.camp-add-to-cart svg {
    flex-shrink: 0;
}

.camp-add-to-cart.loading {
    pointer-events: none;
    opacity: 0.7;
}

.camp-add-to-cart.loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: campButtonSpin 0.8s linear infinite;
    margin-right: 6px;
}

.camp-add-to-cart.loading svg,
.camp-add-to-cart.loading span {
    display: none;
}

.camp-add-to-cart.added {
    background-color: #27ae60 !important;
}

@keyframes campButtonSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ===========================================
   Panel Footer
   =========================================== */
.camp-panel-footer {
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid #eee;
    text-align: center;
    flex-shrink: 0;
}

.camp-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

.camp-view-all:hover {
    gap: 12px;
}

.camp-view-all svg {
    transition: transform 0.3s ease;
}

.camp-view-all:hover svg {
    transform: translateX(-4px);
}

/* ===========================================
   No Products & Loading
   =========================================== */
.camp-no-products {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.camp-no-products svg {
    margin-bottom: 15px;
    opacity: 0.5;
}

.camp-no-products p {
    margin: 0;
    font-size: 14px;
}

.camp-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 20px;
    flex: 1;
}

.camp-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top-color: #e74c3c;
    border-radius: 50%;
    animation: campSpin 0.8s linear infinite;
}

@keyframes campSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ===========================================
   Body Class when Panel is Open
   =========================================== */
body.camp-panel-open {
    overflow: hidden;
}

@media (min-width: 769px) {
    body.camp-panel-open {
        overflow: auto;
    }
}

/* ===========================================
   Responsive Styles
   =========================================== */

/* Tablet */
@media (max-width: 1024px) {
    .camp-products-panel.position-bottom .camp-product-card {
        width: calc(33.333% - 8px);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .camp-hotspots-container {
        min-height: 300px;
    }

    .camp-products-panel {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 75vh !important;
        border-radius: 20px 20px 0 0 !important;
        transform: translateY(100%) !important;
    }

    .camp-products-panel.active {
        transform: translateY(0) !important;
    }

    .camp-products-panel.position-modal {
        max-width: 100% !important;
    }

    .camp-products-list {
        flex-direction: column !important;
    }

    .camp-product-card {
        width: 100% !important;
        flex-direction: row !important;
    }

    .camp-product-image {
        width: 80px !important;
        height: 80px !important;
    }

    .camp-hotspot {
        width: 38px !important;
        height: 38px !important;
    }

    .camp-hotspot i,
    .camp-hotspot svg {
        font-size: 14px !important;
        width: 14px !important;
        height: 14px !important;
    }

    .camp-hotspot-tooltip {
        font-size: 11px;
        padding: 6px 10px;
    }

    .camp-panel-title {
        font-size: 16px;
    }

    .camp-modal-overlay {
        display: block !important;
        opacity: 0;
        visibility: hidden;
    }

    .camp-products-panel.active ~ .camp-modal-overlay,
    .camp-hotspots-wrapper:has(.camp-products-panel.active) .camp-modal-overlay {
        opacity: 1;
        visibility: visible;
    }

    /* Add drag handle for mobile */
    .camp-products-panel::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
    }

    .camp-panel-header {
        padding-top: 10px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .camp-product-image {
        width: 70px !important;
        height: 70px !important;
    }

    .camp-product-title {
        font-size: 13px;
    }

    .camp-product-price {
        font-size: 12px;
    }

    .camp-add-to-cart {
        font-size: 11px;
        padding: 5px 10px;
    }

    .camp-hotspot {
        width: 32px !important;
        height: 32px !important;
    }

    .camp-hotspot i,
    .camp-hotspot svg {
        font-size: 12px !important;
        width: 12px !important;
        height: 12px !important;
    }
}

/* ===========================================
   Elementor Editor Styles
   =========================================== */
.elementor-editor-active .camp-hotspot {
    cursor: move;
}

.elementor-editor-active .camp-products-panel {
    pointer-events: none;
}

.elementor-editor-active .camp-products-panel.active {
    pointer-events: auto;
}


/* ===========================================
   Hotspot Positioning - Fixed for all resolutions
   =========================================== */
.camp-hotspot {
    position: absolute;
    /* حذف transform از اینجا */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
    /* اضافه کردن margin برای center کردن */
    margin-left: -22px; /* نصف عرض پیش‌فرض (44px) */
    margin-top: -22px; /* نصف ارتفاع پیش‌فرض (44px) */
}

/* اصلاح transform فقط برای hover و active */
.camp-hotspot:hover {
    transform: scale(1.2);
}

.camp-hotspot.active {
    z-index: 11;
}

/* اصلاح انیمیشن bounce */
@keyframes campBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-12px);
    }
    60% {
        transform: translateY(-6px);
    }
}

/* ===========================================
   Panel Positioning - Fixed for Frontend
   =========================================== */
.camp-hotspots-wrapper {
    position: relative;
    direction: rtl;
    font-family: inherit;
    /* اضافه کردن isolation برای جلوگیری از مشکلات z-index */
    isolation: isolate;
}

/* Container باید relative باشد */
.camp-hotspots-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

/* Panel باید absolute نسبت به wrapper باشد */
.camp-products-panel {
    position: absolute;
    background: #fff;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* اضافه کردن pointer-events */
    pointer-events: none;
}

.camp-products-panel.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Right Position */
.camp-products-panel.position-right {
    top: 0;
    right: 0;
    bottom: 0;
    height: auto;
    border-radius: 12px 0 0 12px;
    transform: translateX(100%);
}

.camp-products-panel.position-right.animation-slide.active {
    transform: translateX(0);
}

/* Left Position */
.camp-products-panel.position-left {
    top: 0;
    left: 0;
    bottom: 0;
    height: auto;
    border-radius: 0 12px 12px 0;
    transform: translateX(-100%);
}

.camp-products-panel.position-left.animation-slide.active {
    transform: translateX(0);
}

/* Bottom Position */
.camp-products-panel.position-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    max-height: 60%;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
}

.camp-products-panel.position-bottom.animation-slide.active {
    transform: translateY(0);
}

/* Modal Position */
.camp-products-panel.position-modal {
    position: fixed !important; /* مهم: باید fixed باشد */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    max-width: 500px;
    width: 90vw;
    max-height: 80vh;
    border-radius: 16px;
    z-index: 9999;
}

.camp-products-panel.position-modal.animation-scale.active {
    transform: translate(-50%, -50%) scale(1);
}

/* Modal Overlay */
.camp-modal-overlay {
    position: fixed !important; /* مهم: باید fixed باشد */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.camp-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ===========================================
   Responsive - Fixed Hotspot Positioning
   =========================================== */
@media (max-width: 768px) {
    .camp-hotspot {
        margin-left: -19px; /* نصف 38px */
        margin-top: -19px;
    }
    
    /* پنل همیشه از پایین بیاید در موبایل */
    .camp-products-panel {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 75vh !important;
        border-radius: 20px 20px 0 0 !important;
        transform: translateY(100%) !important;
        z-index: 9999 !important;
    }

    .camp-products-panel.active {
        transform: translateY(0) !important;
    }
}

@media (max-width: 480px) {
    .camp-hotspot {
        margin-left: -16px; /* نصف 32px */
        margin-top: -16px;
    }
}

/* ===========================================
   Elementor Editor Compatibility
   =========================================== */
.elementor-editor-active .camp-products-panel {
    pointer-events: auto !important;
}

.elementor-editor-active .camp-hotspot {
    cursor: move !important;
}

/* جلوگیری از تداخل با المنتور */
.elementor-editor-active .camp-modal-overlay {
    display: none !important;
}


/* ===========================================
   Container & Image - Fixed for Mobile
   =========================================== */
.camp-hotspots-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    /* اطمینان از نمایش صحیح */
    width: 100%;
    min-height: 300px;
}

.camp-hotspots-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    /* اضافه کردن max-width */
    max-width: 100%;
}

/* ===========================================
   Hotspot Positioning - Responsive Fix
   =========================================== */
.camp-hotspot {
    position: absolute;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
    /* استفاده از transform به جای margin */
    transform: translate(-50%, -50%);
    /* اطمینان از نمایش روی تصویر */
    will-change: transform;
}

.camp-hotspot:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

/* اصلاح انیمیشن bounce */
@keyframes campBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate(-50%, -50%);
    }
    40% {
        transform: translate(-50%, calc(-50% - 12px));
    }
    60% {
        transform: translate(-50%, calc(-50% - 6px));
    }
}

/* ===========================================
   Mobile Specific Fixes
   =========================================== */
@media (max-width: 768px) {
    .camp-hotspots-container {
        /* حداقل ارتفاع برای موبایل */
        min-height: 400px;
        /* اطمینان از aspect ratio */
        aspect-ratio: 16 / 9;
    }
    
    .camp-hotspots-image {
        /* اطمینان از پوشش کامل */
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
    
    /* کاهش سایز پوینترها در موبایل */
    .camp-hotspot {
        width: 38px !important;
        height: 38px !important;
        /* اطمینان از transform */
        transform: translate(-50%, -50%);
    }
    
    .camp-hotspot:hover {
        transform: translate(-50%, -50%) scale(1.15);
    }
    
    .camp-hotspot i,
    .camp-hotspot svg {
        font-size: 14px !important;
        width: 14px !important;
        height: 14px !important;
    }
    
    /* اصلاح tooltip برای موبایل */
    .camp-hotspot-tooltip {
        font-size: 11px;
        padding: 6px 10px;
        bottom: calc(100% + 8px);
        white-space: nowrap;
        max-width: 150px;
        text-overflow: ellipsis;
        overflow: hidden;
    }
    
    /* غیرفعال کردن انیمیشن‌های سنگین در موبایل */
    .camp-hotspot.animation-ripple .camp-hotspot-ripple {
        display: none;
    }
}

@media (max-width: 480px) {
    .camp-hotspots-container {
        min-height: 300px;
        aspect-ratio: 4 / 3;
    }
    
    .camp-hotspot {
        width: 32px !important;
        height: 32px !important;
    }
    
    .camp-hotspot i,
    .camp-hotspot svg {
        font-size: 12px !important;
        width: 12px !important;
        height: 12px !important;
    }
    
    .camp-hotspot-tooltip {
        display: none; /* مخفی کردن tooltip در موبایل کوچک */
    }
}

/* ===========================================
   Landscape Mode Fix
   =========================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .camp-hotspots-container {
        min-height: 300px;
        aspect-ratio: 16 / 9;
    }
}

/* ===========================================
   Very Small Screens
   =========================================== */
@media (max-width: 360px) {
    .camp-hotspots-container {
        min-height: 250px;
    }
    
    .camp-hotspot {
        width: 28px !important;
        height: 28px !important;
    }
    
    .camp-hotspot i,
    .camp-hotspot svg {
        font-size: 10px !important;
        width: 10px !important;
        height: 10px !important;
    }
}

/* ===========================================
   Tablet Specific
   =========================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .camp-hotspots-container {
        min-height: 500px;
    }
    
    .camp-hotspot {
        width: 40px !important;
        height: 40px !important;
    }
    
    .camp-hotspot i,
    .camp-hotspot svg {
        font-size: 16px !important;
        width: 16px !important;
        height: 16px !important;
    }
}

/* ===========================================
   High Resolution Displays
   =========================================== */
@media (min-width: 1441px) {
    .camp-hotspots-container {
        min-height: 700px;
    }
}

/* ===========================================
   Touch Device Optimization
   =========================================== */
@media (hover: none) and (pointer: coarse) {
    /* دستگاه‌های لمسی */
    .camp-hotspot {
        /* افزایش سایز برای لمس راحت‌تر */
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    /* غیرفعال کردن hover effects */
    .camp-hotspot:hover {
        transform: translate(-50%, -50%);
    }
    
    /* اضافه کردن active state */
    .camp-hotspot:active {
        transform: translate(-50%, -50%) scale(0.95);
    }
    
    /* نمایش tooltip با tap */
    .camp-hotspot-tooltip {
        display: none;
    }
    
    .camp-hotspot.active .camp-hotspot-tooltip {
        display: block;
        opacity: 1;
        visibility: visible;
    }
}

/* ===========================================
   Image Loading State
   =========================================== */
.camp-hotspots-image {
    background: #f5f5f5;
    transition: opacity 0.3s ease;
}

.camp-hotspots-image[src=""],
.camp-hotspots-image:not([src]) {
    opacity: 0;
}

.camp-hotspots-image.loaded {
    opacity: 1;
}

/* ===========================================
   Prevent Layout Shift
   =========================================== */
.camp-hotspots-wrapper {
    position: relative;
    direction: rtl;
    font-family: inherit;
    isolation: isolate;
    /* جلوگیری از layout shift */
    contain: layout style paint;
}

/* ===========================================
   Safari iOS Specific Fixes
   =========================================== */
@supports (-webkit-touch-callout: none) {
    .camp-hotspot {
        /* رفع مشکل transform در Safari */
        -webkit-transform: translate(-50%, -50%);
    }
    
    .camp-hotspot:hover {
        -webkit-transform: translate(-50%, -50%) scale(1.2);
    }
    
    .camp-hotspots-container {
        /* رفع مشکل aspect-ratio در Safari قدیمی */
        position: relative;
    }
    
    .camp-hotspots-container::before {
        content: '';
        display: block;
        padding-top: 56.25%; /* 16:9 aspect ratio */
    }
    
    .camp-hotspots-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* ===========================================
   Print Styles
   =========================================== */
@media print {
    .camp-hotspot {
        display: none !important;
    }
    
    .camp-products-panel {
        display: none !important;
    }
    
    .camp-modal-overlay {
        display: none !important;
    }
}

/* ===========================================
   Mobile Image Fix - Change object-fit
   =========================================== */
@media (max-width: 768px) {
    .camp-hotspots-image {
        /* تغییر به contain تا کل تصویر نمایش داده شود */
        object-fit: contain !important;
        /* اضافه کردن background برای فضای خالی */
        background: #f5f5f5;
    }
    
    .camp-hotspots-container {
        /* ارتفاع را بر اساس aspect ratio تصویر تنظیم کنید */
        height: auto !important;
        min-height: 300px;
    }
}