/**
 * Custom Category Hover Styles
 * 
 * Enhances the category dropdown experience when hovering over category images
 */

/* Improve hover effect on category cards */
.card-1.border-radius-10.hover-upp {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.card-1.border-radius-10.hover-upp:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Position dropdown above the card */
.dropdown.__subcategory {
    position: relative;
}

/* Enhance dropdown appearance */
.dropdown.__subcategory .dropdown-content {
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 10px 0;
    height: 170px;
    overflow-y: scroll;
    z-index: 1000;
    position: absolute;
    bottom: 100%; /* Position above the button */
    left: 0;
    right: 0;
    margin-bottom: 5px; /* Add some space between dropdown and button */
}

/* Fix dropdown display */
.dropdown.__subcategory .dropdown-content {
    display: none; /* Hide by default */
    transition: opacity 0.2s ease;
}

/* Show dropdown on hover or when active class is added by JS */
.dropdown.__subcategory:hover .dropdown-content,
.dropdown.__subcategory.hover-active .dropdown-content {
    display: block;
    opacity: 1;
}

/* Font size fixes for form elements */
select {
    font-size: 14px !important;
}

.input-row-hyperlink input {
    font-size: 14px !important;
}

/* Improve dropdown links */
.dropdown.__subcategory .dropdown-content a {
    padding: 10px 20px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown.__subcategory .dropdown-content a:hover {
    background-color: rgba(220, 38, 38, 0.08);
    color: #DC2626;
}

/* Add pointer cursor to category images */
.card-1.border-radius-10.hover-upp figure {
    cursor: pointer;
}

/* Highlight effect for dropdown button on hover */
.dropdown.__subcategory .dropbtn:hover,
.dropdown.__subcategory.hover-active .dropbtn {
    background-color: #f1f1f1;
}

/* Specific styling for Hotels dropdown */
.dropdown.__subcategory[data-category="Hotels"] .dropdown-content,
.dropdown.__subcategory .dropdown-content.hotels-dropdown {
    height: 170px !important;
    overflow-y: scroll !important;
    width: auto !important;
}

/* Custom scrollbar for dropdown */
.dropdown.__subcategory .dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.dropdown.__subcategory .dropdown-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.dropdown.__subcategory .dropdown-content::-webkit-scrollbar-thumb {
    background: #DC2626;
    border-radius: 10px;
}

.dropdown.__subcategory .dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

/**
 * Recently Viewed Products Styles
 */

/* Slider arrow positioning */
.recently-viewed-section .section-title {
    margin-bottom: 30px;
}

.recently-viewed-products-arrow {
    position: absolute;
    top: 5px;
    right: 0;
}

.recently-viewed-products-arrow .slider-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e2e2e2;
    border-radius: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 5px;
    background-color: #fff;
}

.recently-viewed-products-arrow .slider-btn:hover {
    background-color: #DC2626;
    color: #fff;
    border-color: #DC2626;
}

/* Ensure slider works properly */
.recently-viewed-slider {
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    margin: 0 -10px;
}

.recently-viewed-slider .col-lg-3 {
    padding: 0 10px;
    flex: 0 0 25%;
    max-width: 25%;
    transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .recently-viewed-slider .col-lg-3 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

@media (max-width: 768px) {
    .recently-viewed-slider .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .recently-viewed-products-arrow {
        position: relative;
        text-align: center;
        top: auto;
        right: auto;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .recently-viewed-slider .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}