/* TradeTracker Feed Display - Frontend Styles */

/* Products Wrapper */
.ttfd-products-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filters Section */
.ttfd-filters {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.ttfd-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    align-items: start;
}

.ttfd-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ttfd-filter-group label {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ttfd-checkbox-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255,255,255,0.7);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.05);
}

.ttfd-checkbox-filters label {
    font-weight: normal;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    transition: all 0.2s;
}

.ttfd-checkbox-filters label:hover {
    transform: translateX(5px);
}

.ttfd-checkbox-filters input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.ttfd-filter-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    margin-top: 10px;
}

.ttfd-search-input,
.ttfd-filter-select,
.ttfd-price-input {
    padding: 12px 16px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    transition: all 0.3s;
    background: white;
    color: #333;
    font-weight: 500;
}

.ttfd-search-input {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.ttfd-search-input::placeholder {
    color: #999;
}

.ttfd-search-input:focus,
.ttfd-filter-select:focus,
.ttfd-price-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
    transform: translateY(-1px);
}

.ttfd-price-filter .ttfd-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ttfd-price-input {
    width: 100%;
}

.ttfd-price-separator {
    color: #666;
    font-weight: 600;
}

.ttfd-reset-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.ttfd-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}



/* Loading Indicator */
.ttfd-loading {
    text-align: center;
    padding: 40px;
}

.ttfd-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: ttfd-spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Products Grid */
.ttfd-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Product Card */
.ttfd-product-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.ttfd-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.ttfd-product-image {
    position: relative;
    padding-top: 75%;
    background: #f8f9fa;
    overflow: hidden;
}

.ttfd-product-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.ttfd-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ttfd-badge-stars {
    background: #ffc107;
    color: #000;
}

.ttfd-badge-wifi {
    background: #17a2b8;
    color: white;
}

.ttfd-badge-pool {
    background: #007bff;
    color: white;
}

.ttfd-badge-pets {
    background: #28a745;
    color: white;
}

.ttfd-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.3s;
}

.ttfd-product-image img[src*="no-image"],
.ttfd-product-image img[src*="placeholder"] {
    opacity: 0.3;
}

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

.ttfd-product-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ttfd-product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ttfd-product-country {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.ttfd-product-description {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
    max-height: 60px;
    overflow: hidden;
}

.ttfd-product-description p {
    margin: 0;
}

.ttfd-product-brand {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.ttfd-product-category {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 3px;
    display: inline-block;
    width: fit-content;
}

.ttfd-product-price {
    font-size: 22px;
    font-weight: 700;
    color: #28a745;
    margin: auto 0 15px 0;
}

.ttfd-product-link {
    display: block;
    text-align: center;
    padding: 12px 20px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s;
}

.ttfd-product-link:hover {
    background: #005a87;
    color: white;
}

/* No Products Message */
.ttfd-no-products {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    grid-column: 1 / -1;
}

.ttfd-no-products p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* Pagination */
.ttfd-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
    grid-column: 1 / -1;
}

.ttfd-page-btn {
    padding: 10px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.ttfd-page-btn:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.ttfd-page-btn.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ttfd-filters {
        grid-template-columns: 1fr;
    }
    
    .ttfd-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .ttfd-product-title {
        font-size: 14px;
    }
    
    .ttfd-product-price {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .ttfd-products-grid {
        grid-template-columns: 1fr;
    }
    
    .ttfd-price-filter .ttfd-price-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .ttfd-price-separator {
        display: none;
    }
}

/* Map Container */




/* Results Info */
.ttfd-results-info {
    text-align: center;
    padding: 15px;
    color: #666;
    font-size: 14px;
    grid-column: 1 / -1;
}

/* Pagination improvements */
.ttfd-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
    flex-wrap: wrap;
    grid-column: 1 / -1;
}

.ttfd-pagination span {
    padding: 8px;
    color: #666;
}

.ttfd-page-ellipsis {
    padding: 10px 5px;
}

/* Price Filter Styling */
.ttfd-price-filter {
    grid-column: span 1;
}

.ttfd-price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ttfd-price-input {
    flex: 1;
    min-width: 0;
}

.ttfd-price-separator {
    color: #666;
    font-weight: 600;
    font-size: 18px;
}

/* Responsive Filters */
@media (max-width: 768px) {
    .ttfd-filters-grid {
        grid-template-columns: 1fr;
    }
    
    .ttfd-filter-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .ttfd-reset-btn,

/* Detail Page Styles */
.ttfd-detail-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ttfd-detail-header {
    margin-bottom: 30px;
}

.ttfd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.ttfd-back-link:hover {
    color: #764ba2;
    transform: translateX(-5px);
}

.ttfd-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.ttfd-detail-images {
    position: relative;
}

.ttfd-detail-images img {
    max-width: 100%;
    height: auto;
}

.ttfd-detail-content {
    padding: 40px;
}

.ttfd-detail-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.ttfd-detail-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.ttfd-icon {
    font-size: 24px;
}

.ttfd-detail-price-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.ttfd-detail-price {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 5px;
}

.ttfd-detail-price-label {
    font-size: 16px;
    opacity: 0.9;
}

.ttfd-detail-description {
    margin-bottom: 30px;
}

.ttfd-detail-description h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
}

.ttfd-detail-description p {
    line-height: 1.8;
    color: #666;
}

.ttfd-detail-features h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
}

.ttfd-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.ttfd-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ddd;
}

.ttfd-feature-item.ttfd-feature-yes {
    background: #e8f5e9;
    border-left-color: #4caf50;
}

.ttfd-feature-icon {
    font-size: 24px;
}

.ttfd-feature-label {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.ttfd-feature-value {
    font-size: 14px;
    color: #666;
}

.ttfd-detail-actions {
    margin: 50px 0 30px 0;
    padding: 0;
    clear: both;
}

.ttfd-booking-btn {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 22px 40px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    text-align: center !important;
    text-decoration: none !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    transition: all 0.3s !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    border: none !important;
    cursor: pointer !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

.ttfd-booking-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5) !important;
    color: white !important;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
    text-decoration: none !important;
}

.ttfd-booking-btn:visited {
    color: white !important;
}

.ttfd-booking-btn:active {
    transform: translateY(-1px) !important;
}

.ttfd-detail-meta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 13px;
}

.ttfd-detail-error {
    text-align: center;
    padding: 60px 20px;
}

.ttfd-detail-error p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.ttfd-detail-error a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

/* Product card link wrapper */
.ttfd-product-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.ttfd-product-link-wrapper:hover .ttfd-product-card {
    transform: translateY(-5px);
}

.ttfd-detail-btn {
    display: inline-block;
    color: #667eea;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s;
}

.ttfd-product-link-wrapper:hover .ttfd-detail-btn {
    color: #764ba2;
    transform: translateX(5px);
}

.ttfd-price-label {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

/* Responsive Detail Page */
@media (max-width: 968px) {
    .ttfd-detail-container {
        grid-template-columns: 1fr;
    }
    
    .ttfd-detail-main-image {
        height: 400px;
    }
    
    .ttfd-detail-content {
        padding: 30px 20px;
    }
    
    .ttfd-detail-title {
        font-size: 24px;
    }
    
    .ttfd-detail-price {
        font-size: 32px;
    }
    
    .ttfd-features-grid {
        grid-template-columns: 1fr;
    }
}

/* SEO Meta Tags (hidden but present for crawlers) */
.ttfd-meta-description {
    display: none;
}

/* Image Gallery Styles */
.ttfd-detail-gallery {
    position: relative;
}

.ttfd-gallery-main {
    position: relative;
    width: 100%;
    height: 600px;
    background: #000;
    overflow: hidden;
    border-radius: 12px;
}

.ttfd-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ttfd-gallery-prev,
.ttfd-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 30px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.ttfd-gallery-prev:hover,
.ttfd-gallery-next:hover {
    background: rgba(0,0,0,0.8);
}

.ttfd-gallery-prev {
    left: 20px;
}

.ttfd-gallery-next {
    right: 20px;
}

.ttfd-gallery-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10;
}

.ttfd-gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding: 10px 0;
    align-items: flex-start;
}

.ttfd-gallery-thumbnails .ttfd-thumbnail {
    width: 100px !important;
    height: 75px !important;
    max-width: 100px !important;
    max-height: 75px !important;
    min-width: 100px !important;
    min-height: 75px !important;
    object-fit: cover !important;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: block !important;
}

.ttfd-gallery-thumbnails .ttfd-thumbnail:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.ttfd-gallery-thumbnails .ttfd-thumbnail.active {
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102,126,234,0.5);
}

.ttfd-gallery-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.ttfd-gallery-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.ttfd-gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.ttfd-gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width: 968px) {
    .ttfd-gallery-main {
        height: 400px;
    }
    
    .ttfd-gallery-prev,
    .ttfd-gallery-next {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .ttfd-gallery-prev {
        left: 10px;
    }
    
    .ttfd-gallery-next {
        right: 10px;
    }
    
    .ttfd-thumbnail {
        width: 80px;
        height: 60px;
    }
}

/* Top Results Counter */
.ttfd-results-info-top {
    text-align: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Location Link Styles */
.ttfd-location-link {
    color: #333;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    padding: 5px 10px;
    margin: -5px -10px;
    border-radius: 8px;
}

.ttfd-location-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(3px);
}

.ttfd-maps-icon {
    font-size: 20px;
    opacity: 0.7;
    transition: all 0.3s;
}

.ttfd-location-link:hover .ttfd-maps-icon {
    opacity: 1;
    transform: scale(1.2);
}
