/**
 * Archive Property Page Styles
 */

.melkabroad-archive-property {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 0;
    direction: rtl;
}

/* Category Breadcrumb */
.category-breadcrumb {
    margin-bottom: 30px;
    padding: 20px 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    direction: ltr;
    text-align: left;
}

.category-breadcrumb .breadcrumb-link {
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 5px;
}

.category-breadcrumb .breadcrumb-link:hover {
    color: #dc2626;
    background: #fef2f2;
}

.category-breadcrumb .breadcrumb-separator {
    margin: 0 10px;
    color: #9ca3af;
    font-weight: 500;
}

.category-breadcrumb .breadcrumb-current {
    color: #dc2626;
    font-weight: 700;
    padding: 4px 8px;
}

/* Category Children */
.category-children {
    margin-bottom: 40px;
    padding: 35px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.category-children-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 25px 0;
    color: #1a1a1a;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.category-children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.category-child-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: #1a1a1a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.category-child-link:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #dc2626;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.15);
}

.category-child-name {
    font-weight: 600;
    font-size: 1rem;
    color: #1a1a1a;
}

.category-child-count {
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(220, 38, 38, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
}

/* Archive Header */
.archive-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.archive-header-content {
    text-align: right;
}

.archive-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
}

/* Archive Layout - Two Column */
.archive-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

/* Filters Sidebar */
.filters-sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.filters-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 25px 0;
    color: #1a1a1a;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

/* Transaction Type Buttons */
.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-button {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
    text-decoration: none;
}

.filter-button input[type="radio"] {
    display: none;
}

.filter-button.active,
.filter-button:has(input:checked) {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.filter-button:hover {
    border-color: #dc2626;
}

/* Filter Select */
.filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.95rem;
    color: #333;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    padding-right: 15px;
    padding-left: 35px;
}

.filter-select:focus {
    outline: none;
    border-color: #dc2626;
}

/* Filter Input Group */
.filter-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #333;
    background: #ffffff;
    box-sizing: border-box;
}

.filter-input:focus {
    outline: none;
    border-color: #dc2626;
}

.filter-input::placeholder {
    color: #999;
}

/* Amenities Filter */
.amenities-filter {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.amenity-filter-item.amenity-hidden {
    display: none;
}

.amenities-filter.show-all .amenity-filter-item.amenity-hidden {
    display: flex;
}

.show-more-amenities-btn {
    font-family: inherit;
    width: 100%;
    padding: 10px 15px;
    margin-top: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.show-more-amenities-btn:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.1);
    transform: translateY(-1px);
}

.amenity-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
}

.amenity-filter-item:hover {
    border-color: #dc2626;
}

.amenity-filter-item input[type="checkbox"] {
    display: none;
}

.amenity-filter-item:has(input:checked) {
    background: #fef2f2;
    border-color: #dc2626;
}

.amenity-filter-item .amenity-icon {
    font-size: 1.2rem;
}

.amenity-filter-item .amenity-label {
    font-size: 0.9rem;
    color: #333;
}

/* Filter Buttons */
.filter-submit-btn,
.filter-reset-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 12px;
    text-align: center;
    text-decoration: none;
    display: block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.filter-submit-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    border: none;
    font-family: inherit;
}

.filter-submit-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    transform: translateY(-2px);
}

.filter-submit-btn:active {
    transform: translateY(0);
}

.filter-reset-btn {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
    box-sizing: border-box;
    font-family: inherit;
}

.filter-reset-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #212529;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Properties Main Area */
.properties-main {
    min-width: 0;
}

.properties-header {
    margin-bottom: 25px;
    display: flex;
    justify-content: flex-end;
}

.sort-dropdown {
    position: relative;
    display: inline-block;
}

.sort-button {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sort-button:hover {
    border-color: #dc2626;
    color: #dc2626;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.1);
}

.sort-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.sort-dropdown.active .sort-icon {
    transform: rotate(180deg);
}

.sort-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
    min-width: 200px;
    overflow: hidden;
}

.sort-dropdown.active .sort-menu {
    display: block;
}

.sort-option {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.sort-option:last-child {
    border-bottom: none;
}

.sort-option:hover {
    background: #f8f9fa;
    color: #dc2626;
    padding-right: 25px;
}

/* Properties Grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 50px;
}

/* Property Card */
.property-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f0f0;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

.property-card-link {
    display: flex;
    flex-direction: row;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Property Card Content (Left Side) */
.property-card-content {
    flex: 1;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

/* Property Card Image (Right Side) */
.property-card-image {
    position: relative;
    width: 220px;
    min-width: 220px;
    height: 180px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
    padding: 12px;
    box-sizing: border-box;
}

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

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

.property-card-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.no-image-icon {
    font-size: 3rem;
    opacity: 0.5;
}

/* Property Card Location */
.property-card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 0.85rem;
    margin-top: 8px;
}

.location-icon {
    font-size: 0.9rem;
}

.location-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Image Icons */
.property-image-icons {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.image-icon {
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 8px;
    border-radius: 5px;
    backdrop-filter: blur(10px);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 500;
    color: #333;
}

.image-icon.bookmark-icon {
    cursor: pointer;
}

.image-icon.bookmark-icon:hover {
    background: rgba(255, 255, 255, 1);
}

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

.price-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #dc2626;
}

.price-currency {
    font-size: 0.85rem;
    color: #666;
}

.property-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #1a1a1a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}

.property-detail-item {
    position: relative;
    padding-right: 15px;
}

.property-detail-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #ccc;
    border-radius: 50%;
}

/* No Properties */
.no-properties {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.no-properties p {
    font-size: 1.2rem;
    color: #666;
    margin: 0;
}

/* Pagination */
.properties-pagination {
    margin-top: 60px;
    text-align: center;
    padding: 30px 0;
}

.properties-pagination .page-numbers {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.properties-pagination .page-numbers li {
    margin: 0;
    padding: 0;
}

.properties-pagination .page-numbers a,
.properties-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 48px;
    min-height: 48px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.properties-pagination .page-numbers a:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #dc2626;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.properties-pagination .page-numbers .current {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.properties-pagination .page-numbers .prev,
.properties-pagination .page-numbers .next {
    font-weight: 700;
    padding: 12px 24px;
}

.properties-pagination .page-numbers .dots {
    border: none;
    background: transparent;
    box-shadow: none;
    cursor: default;
}

.properties-pagination .page-numbers .dots:hover {
    transform: none;
    background: transparent;
    border: none;
    color: #495057;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .archive-layout {
        grid-template-columns: 280px 1fr;
        gap: 20px;
    }
    
    .filters-sidebar {
        padding: 20px;
    }
    
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .melkabroad-archive-property {
        padding: 0 15px;
    }
    
    .archive-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .filters-sidebar {
        position: static;
        order: 2;
        padding: 20px;
    }
    
    .properties-main {
        order: 1;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .archive-title {
        font-size: 1.5rem;
    }
    
    .amenities-filter {
        grid-template-columns: 1fr;
    }
    
    .property-card-link {
        flex-direction: column;
    }
    
    .property-card-image {
        width: 100%;
        min-width: 100%;
        height: 220px;
        padding: 10px;
    }
    
    .property-card-content {
        padding: 15px;
    }
    
    .sort-dropdown {
        width: 100%;
    }
    
    .sort-button {
        width: 100%;
        justify-content: space-between;
    }
    
    .sort-menu {
        right: 0;
        left: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .property-card-content {
        padding: 12px;
    }
    
    .property-card-title {
        font-size: 0.9rem;
    }
    
    .property-card-details {
        font-size: 0.8rem;
        gap: 8px;
    }
    
    .property-card-image {
        height: 180px;
        padding: 8px;
    }
    
    .filters-sidebar {
        padding: 15px;
    }
    
    .filter-section {
        margin-bottom: 20px;
    }
    
    .filter-submit-btn,
    .filter-reset-btn {
        padding: 12px 18px;
        font-size: 0.95rem;
    }
    
    .properties-pagination .page-numbers {
        gap: 6px;
    }
    
    .properties-pagination .page-numbers a,
    .properties-pagination .page-numbers span {
        padding: 10px 14px;
        font-size: 0.85rem;
        min-width: 40px;
        min-height: 40px;
    }
    
    .price-value {
        font-size: 1rem;
    }
}
