/* Modal Window Base - Override theme styles */
.modal-window--promo[data-modal="category-popup"] {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 99999 !important;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease-in-out;
    box-sizing: border-box !important;
}

.modal-window--promo[data-modal="category-popup"].visible {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.modal-window--promo[data-modal="category-popup"] .backplate {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(2px);
}

.modal-window--promo[data-modal="category-popup"] .modal-container {
    position: relative !important;
    max-width: 350px !important;
    width: 90% !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    z-index: 2 !important;
    box-sizing: border-box !important;
}

.modal-window--promo[data-modal="category-popup"] .modal-container__wrapper {
    padding: 0 !important;
}

/* Close button - fully override theme styles */
.modal-window--promo[data-modal="category-popup"] .cls {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    z-index: 100 !important;
    background: rgba(255,255,255,0.9) !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    transition: all 0.2s ease !important;
}

.modal-window--promo[data-modal="category-popup"] .cls:hover {
    background: #fff !important;
    transform: scale(1.1) !important;
}

.modal-window--promo[data-modal="category-popup"] .cls span {
    position: absolute !important;
    width: 16px !important;
    height: 2px !important;
    background: #333 !important;
    border-radius: 1px !important;
    display: block !important;
}

.modal-window--promo[data-modal="category-popup"] .cls span:first-child {
    transform: rotate(45deg) !important;
}

.modal-window--promo[data-modal="category-popup"] .cls span:last-child {
    transform: rotate(-45deg) !important;
}

/* Desktop 1200px+ */
@media (min-width: 1200px) {
    .modal-window--promo[data-modal="category-popup"] .modal-container {
        width: 350px !important;
        max-width: 350px !important;
    }
}

/* Category Popup Content */
.modal-window--promo[data-modal="category-popup"] .category-popup-content {
    display: flex !important;
    flex-direction: column !important;
    direction: rtl !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.modal-window--promo[data-modal="category-popup"] .category-popup-image {
    width: 100% !important;
    position: relative !important;
    padding-top: 100% !important;
    border-bottom: 1px solid rgba(214, 208, 179, 1) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.modal-window--promo[data-modal="category-popup"] .category-popup-image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.modal-window--promo[data-modal="category-popup"] .category-popup-info {
    padding: 20px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.modal-window--promo[data-modal="category-popup"] .category-popup-title {
    margin-bottom: 10px !important;
}

.modal-window--promo[data-modal="category-popup"] .category-popup-title .subtitle {
    display: block !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    color: #000 !important;
}

.modal-window--promo[data-modal="category-popup"] .category-popup-text {
    text-align: center !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-weight: normal !important;
    color: #000 !important;
}

.modal-window--promo[data-modal="category-popup"] .category-popup-text p {
    margin: 0 !important;
    display: inline !important;
}

/* Mobile Styles */
@media (max-width: 767px) {
    .modal-window--promo[data-modal="category-popup"] {
        align-items: center !important;
        padding: 15px !important;
    }

    .modal-window--promo[data-modal="category-popup"] .modal-container {
        width: 85% !important;
        max-width: 320px !important;
    }

    .modal-window--promo[data-modal="category-popup"] .cls {
        top: 8px !important;
        right: 8px !important;
        width: 28px !important;
        height: 28px !important;
    }

    .modal-window--promo[data-modal="category-popup"] .cls span {
        width: 14px !important;
    }

    .modal-window--promo[data-modal="category-popup"] .category-popup-info {
        padding: 15px !important;
    }

    .modal-window--promo[data-modal="category-popup"] .category-popup-text {
        font-size: 13px !important;
    }
}

/* No scroll when popup is open */
body.no-scroll {
    overflow: hidden !important;
}
