/**
 * Hostaway Properties Core Styles
 * Version: 2.2 - Clean & Optimized
 * Common property card and grid styles
 */

/* ========================================
   PROPERTY GRID LAYOUT
======================================== */

.hostaway-properties-grid {
    display: grid;
    gap: 24px;
    margin: 30px 0 40px;
}

.hostaway-properties-grid.columns-1 {
    grid-template-columns: 1fr;
}

.hostaway-properties-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.hostaway-properties-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.hostaway-properties-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ========================================
   PROPERTY CARD
======================================== */

.hostaway-property-card {
    background: #e7ece9;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.hostaway-property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* ========================================
   PROPERTY CARD IMAGE SECTION
======================================== */

.property-card-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

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

.hostaway-property-card:hover .property-card-image img {
    transform: scale(1.05);
}

/* ========================================
   PROPERTY CAROUSEL (Individual Card)
======================================== */
/* ========================================
   PROPERTY CAROUSEL (Individual Card)
======================================== */

.property-carousel {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.property-carousel .slider-container {
    height: 100%;
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.property-carousel .slider-container::-webkit-scrollbar {
    display: none;
}

.property-carousel .slider-container li,
.property-carousel li {
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: start;
}

.property-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Carousel Navigation Arrows - FIXED VERSION */
.property-carousel .slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex !important; /* Force display */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Arrow icons */
.property-carousel .slider-nav:before {
    content: '';
    width: 8px;
    height: 8px;
    /* border-top: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color); */
    transform: rotate(-135deg);
    margin-right: -2px;
}

.property-carousel .slider-nav.slider-nav-next:before {
    transform: rotate(45deg);
    margin-right: 0;
    margin-left: -2px;
}

/* Previous button positioning */
.property-carousel .slider-nav:not(.slider-nav-next) {
    left: 8px;
}

/* Next button positioning */
.property-carousel .slider-nav.slider-nav-next {
    right: 8px;
}

/* Show arrows on hover - MULTIPLE SELECTORS */
.property-carousel:hover .slider-nav {
    opacity: 1 !important;
}

.hostaway-property-card:hover .property-carousel .slider-nav {
    opacity: 1 !important;
}

/* Inside carousel container hover */
.hostaway-properties-carousel .hostaway-property-card:hover .property-carousel .slider-nav {
    opacity: 1 !important;
}

/* Direct hover on carousel */
.hostaway-property-card .property-carousel:hover .slider-nav {
    opacity: 1 !important;
}

.property-carousel .slider-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.property-carousel .slider-nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* Carousel Indicators (Dots) */
.property-carousel .slider-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.property-carousel .slider-indicators button {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.property-carousel .slider-indicators button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.property-carousel .slider-indicators button.active {
    background: #fff;
    width: 20px;
    border-radius: 3px;
}
/* ========================================
   PROPERTIES CAROUSEL (Multi-Item Slider)
======================================== */

.hostaway-properties-carousel .slider-container {
    display: flex !important;
    gap: 24px;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hostaway-properties-carousel .hostaway-slider-container {
    display: flex !important;
    overflow-x: hidden !important;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hostaway-properties-carousel .hostaway-slider-container li {
    list-style: none;
    display: block;
}

.hostaway-properties-carousel .slider-container::-webkit-scrollbar {
    display: none;
}

.hostaway-properties-carousel .carousel-item,
.hostaway-properties-carousel li {
    flex: 0 0 auto;
    scroll-snap-align: start;
    margin: 0 !important;
}

/* Column-specific gaps */
.hostaway-properties-carousel.slider-item-show2 .slider-container,
.hostaway-properties-carousel.slider-item-show3 .slider-container {
    gap: 24px;
}

.hostaway-properties-carousel.slider-item-show4 .slider-container {
    gap: 20px;
}

/* Navigation buttons for multi-item carousel */
.hostaway-properties-carousel .slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.hostaway-properties-carousel .slider-nav:first-of-type:not(.slider-nav-next) {
    left: -15px;
}

.hostaway-properties-carousel .slider-nav.slider-nav-next {
    right: -15px;
}

/* ========================================
   PROPERTY BADGES
======================================== */

.property-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 10;
}

.property-badges li {
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.property-badges li svg {
    color: #FFD700;
}

/* ========================================
   PROPERTY CARD CONTENT
======================================== */

.property-card-content {
    padding: 16px;
}

.property-card-title {
    margin: 0 0 8px 0;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.4;
}

.property-card-title a {
    color: #1f3f3c;
    text-decoration: none;
    transition: color 0.2s ease;
}

.property-card-title a:hover {
    color: #5e8f7a;
}

.property-card-price span.price-label{
    color: #425b57;
}

/* Property Meta Info */
.property-card-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 14px;
    color: #717171;
}

.property-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #4f6b63;
}

/* Property Location */
.property-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #717171;
    margin-bottom: 12px;
}

.property-location svg {
    flex-shrink: 0;
    color: #000;
}

/* Property Price */
.property-card-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #EBEBEB;
}

.price-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.price-label {
    font-size: 14px;
    color: #717171;
}

/* Property Excerpt */
.property-card-excerpt {
    font-size: 14px;
    color: #717171;
    margin: 12px 0;
    line-height: 1.5;
}

/* ========================================
   CARD SIZE VARIATIONS
======================================== */

.hostaway-property-card.card-small {
    max-width: 280px;
}

.hostaway-property-card.card-small .property-card-title {
    font-size: 14px;
}

.hostaway-property-card.card-small .property-card-meta {
    font-size: 12px;
}

.hostaway-property-card.card-small .property-card-price .price-amount {
    font-size: 16px;
}

.hostaway-property-card.card-large {
    max-width: none;
}

.hostaway-property-card.card-large .property-card-title {
    font-size: 20px;
}

.hostaway-property-card.card-large .property-card-content {
    padding: 20px;
}

/* ========================================
   NO RESULTS MESSAGE
======================================== */

.hostaway-no-results {
    text-align: center;
    padding: 80px 20px;
}

.hostaway-no-results svg {
    margin-bottom: 20px;
}

.hostaway-no-results h2,
.hostaway-no-results h3 {
    margin: 20px 0 10px;
    color: var(--primary-color);
}

.hostaway-no-results p {
    color: #717171;
    margin: 10px 0;
}

/* ========================================
   BUTTONS
======================================== */

.hostaway-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.hostaway-btn.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border-radius: 8px;
}

.hostaway-btn.btn-primary:hover {
    background: #4e7b67;
    transform: translateY(-1px);
    box-shadow: unset;
}

.hostaway-btn.btn-secondary {
    border-radius: 8px;
    padding: 6px 20px;
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.hostaway-btn.btn-secondary:hover {
    background: #F7F7F7;
}

/* Load More Button */
.hostaway-load-more-wrapper {
    text-align: center;
    margin: 40px 0;
}

#hostaway-load-more {
    padding: 14px 32px;
    font-size: 16px;
}

#hostaway-load-more.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.hostaway-load-more-spinner svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   PAGINATION
======================================== */

.hostaway-pagination,
.archive-pagination {
    margin: 40px 0;
    text-align: center;
}

.hostaway-pagination ul,
.archive-pagination ul {
    list-style: none;
    display: inline-flex;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.hostaway-pagination li,
.archive-pagination li {
    display: inline-block;
}

.hostaway-pagination a,
.hostaway-pagination span,
.archive-pagination a,
.archive-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #DDDDDD;
}

.hostaway-pagination a:hover,
.archive-pagination a:hover {
    background: #F7F7F7;
    border-color: var(--primary-color);
}

.hostaway-pagination .current,
.archive-pagination .current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ========================================
   RESULTS INFO
======================================== */

.hostaway-results-info,
.archive-results-count {
    margin: 20px 0;
    padding: 12px 16px;
    background: #F7F7F7;
    border-radius: 8px;
    text-align: center;
}

.hostaway-results-info p,
.archive-results-count {
    margin: 0;
    color: var(--primary-color);
    font-weight: 500;
}

/* ========================================
   ACTIVE FILTERS
======================================== */

.active-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 16px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #5e8f7a36;
    border-radius: 20px;
    font-size: 14px;
    color: var(--primary-color);
}

.remove-filter {
    color: #717171;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.remove-filter:hover {
    color: #e00707;
}

.clear-all-filters {
    color: #e00707;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
}

.clear-all-filters:hover {
    color: #D90B63;
}

/* ========================================
   FULL IMAGE CAROUSEL
======================================== */

.hostaway-image-carousel {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.hostaway-image-carousel .slider-container {
    height: 400px;
}

.hostaway-image-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   ARCHIVE HEADER
======================================== */

.archive-header {
    margin: 30px 0;
}

.archive-header h1 {
    margin: 0 0 35px 0;
    font-size: 58px;
    font-weight: 500;
    color: var(--title-color);
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

.post-type-archive-property .archive-search-section {
    margin-top: 25px;
}

.post-type-archive-property .hostaway-archive-container {
    display: flex;
    flex-direction: column;
    padding: 20px 0 60px;
    max-width: 1200px;
}

.post-type-archive-property .hostaway-archive-container .archive-header {
    order: -1;
    margin-bottom: 0;
    margin-top: 60px;
    text-align: center;
}

.hostaway-search-bar-wrapper{
    margin-bottom: 15px !important;
}

@media (max-width: 1200px){
    .post-type-archive-property .hostaway-archive-container {
        padding: 20px 20px 60px;
    }
}


/* Tablet - 1024px and below */
@media (max-width: 1024px) {
    .hostaway-properties-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .property-card-title {
        font-size: 22px;
    }

    .archive-header h1 {
        font-size: 40px;
    }
}

/* Mobile Large - 992px and below */
@media (max-width: 992px) {
    .hostaway-properties-carousel.slider-item-show3 .slider-container,
    .hostaway-properties-carousel.slider-item-show4 .slider-container {
        gap: 20px;
    }
}

/* Tablet - 768px and below */
@media (max-width: 768px) {
    /* Grid adjustments */
    .hostaway-properties-grid.columns-3,
    .hostaway-properties-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Image heights */
    .property-card-image,
    .property-carousel {
        height: 220px;
    }
    
    .hostaway-image-carousel .slider-container {
        height: 300px;
    }
    
    /* Badges */
    .property-badges {
        top: 8px;
        left: 8px;
        gap: 6px;
    }
    
    .property-badges li {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    /* Carousel navigation */
    .hostaway-properties-carousel .slider-container {
        gap: 16px;
    }
    
    .hostaway-properties-carousel .slider-nav:first-of-type:not(.slider-nav-next) {
        left: 5px;
    }
    
    .hostaway-properties-carousel .slider-nav.slider-nav-next {
        right: 5px;
    }
    
    /* Property card carousel - always show arrows on mobile */
    .property-carousel .slider-nav {
        opacity: 0.8 !important;
        width: 28px;
        height: 28px;
    }
    
    /* Archive header */
    .archive-header h1 {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .property-card-title {
        font-size: 20px;
    }
}

/* Mobile - 480px and below */
@media (max-width: 480px) {
    /* Single column layout */
    .hostaway-properties-grid,
    .hostaway-properties-grid.columns-2,
    .hostaway-properties-grid.columns-3,
    .hostaway-properties-grid.columns-4 {
        grid-template-columns: 1fr;
    }
    
    /* Slightly taller images on mobile */
    .property-card-image,
    .property-carousel {
        height: 240px;
    }
}