/* --- FRONTEND FILTERS --- */
.dm-travel-filter-wrap { text-align: left; margin-bottom: 40px; }

/* Base Grid: Preserving your original 200px preference */
.dm-filter-bar { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 12px; 
    margin-bottom: 25px; 
    background: #f8f9fa; 
    padding: 20px; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.06); 
    border: 1px solid #f0f0f1; 
    align-items: center; 
}

/* Desktop: Spanning logic for Search bar (if space allows) */
@media (min-width: 800px) {
    .dm-span-2 { grid-column: span 2; }
}

.dm-select-group { width: 100%; position: relative; }

/* SHARED BASE STYLES */
.dm-filter-bar select, 
.dm-filter-bar input[type="text"] { 
    width: 100%; 
    padding: 12px 16px; 
    border: 1px solid #e2e4e7; 
    border-radius: 8px; 
    background-color: #fff; 
    font-size: 14px; 
    color: #333; 
    box-sizing: border-box; 
    outline: none; 
    margin: 0; 
    height: 45px; 
    transition: all 0.2s ease;
}

.dm-filter-search { 
    /* Background image logic removed since we use physical button now, but keeping style consistent */
}

.dm-filter-bar select:focus, 
.dm-filter-bar input[type="text"]:focus { 
    border-color: #2271b1; 
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1); 
}

/* Reset Button Icon Style */
.dm-filter-reset svg { 
    stroke: #999; 
    transition: stroke 0.2s; 
}
.dm-filter-reset:hover svg { 
    stroke: #d63638; 
}

/* --- RESULTS GRID --- */
.dm-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; text-align: left; }

.dm-result-card { 
    background: #fff; border: 1px solid #eaeaea; border-radius: 12px; overflow: hidden; position: relative; 
    transition: transform 0.2s, box-shadow 0.2s; animation: dmFadeInUp 0.5s ease-out forwards; opacity: 0; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); 
}

.dm-result-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.08); }
@keyframes dmFadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.dm-card-link { text-decoration: none; color: inherit; display: block; }
.dm-card-img { height: 180px; background: #eee; overflow: hidden; position: relative; }
.dm-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.dm-result-card:hover .dm-card-img img { transform: scale(1.05); }
.dm-card-badge { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.75); color: #fff; padding: 4px 10px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; border-radius: 4px; font-weight: 600; }
.dm-card-content { padding: 20px; }
.dm-card-city { display: block; font-size: 11px; color: #2271b1; text-transform: uppercase; font-weight: 700; margin-bottom: 8px; letter-spacing: 0.5px; }
.dm-card-excerpt { margin-top: 10px; font-size: 14px; color: #555; line-height: 1.6; }
.dm-read-more { color: #2271b1; font-weight: 600; font-size: 13px; margin-left: 5px; text-decoration: none; }
.dm-read-more:hover { text-decoration: underline; }
.dm-result-card h4 { margin: 0; font-size: 19px; line-height: 1.3; color: #222; font-weight: 700; }
.dm-no-results { grid-column: 1 / -1; padding: 40px; background: #fff; color: #555; border-radius: 8px; text-align: center; border: 1px solid #eee; }
.dm-load-more-wrap { text-align: center; margin-top: 40px; }
.dm-load-more-btn { background: transparent; border: 2px solid #2271b1; color: #2271b1; padding: 12px 30px; font-size: 15px; font-weight: 600; border-radius: 50px; cursor: pointer; transition: all 0.2s ease; }
.dm-load-more-btn:hover { background: #2271b1; color: #fff; transform: translateY(-2px); }
.dm-related-tours { margin-top: 50px; border-top: 1px solid #eee; padding-top: 30px; }
.dm-related-tours h3 { font-size: 22px; margin-bottom: 20px; }
.dm-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.dm-related-item img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.dm-related-item h4 { font-size: 15px; margin: 0; line-height: 1.4; }

/* --- INTERACTIONS BAR --- */
.dm-interaction-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; margin: 20px 0 25px 0; padding-bottom: 15px; border-bottom: 1px solid #eee; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

.dm-bucket-btn { box-sizing: border-box; height: 36px; background: #fff; border: 1px solid #dce0e5; color: #333; padding: 0 18px; border-radius: 20px; cursor: pointer; font-size: 13px; font-weight: 600; letter-spacing: 0.3px; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s ease; }
.dm-bucket-btn:hover { background: #ff5a5f; border-color: #ff5a5f; color: #fff; box-shadow: 0 4px 12px rgba(255, 90, 95, 0.25); transform: translateY(-1px); }
.dm-bucket-btn:hover .dm-icon-heart { color: #fff; }
.dm-bucket-btn.active { background: #ff5a5f; border-color: #ff5a5f; color: #fff; }
.dm-bucket-btn.active .dm-icon-heart { color: #fff; }
.dm-icon-heart { font-size: 15px; line-height: 1; color: #ccc; transition: color 0.2s; }

.dm-affiliate-btn { display: inline-flex; align-items: center; gap: 6px; background: #00aa6c; color: #fff !important; padding: 8px 20px; border-radius: 20px; font-weight: 700; font-size: 14px; text-decoration: none !important; box-shadow: 0 2px 8px rgba(0,170,108,0.3); transition: all 0.2s; height: 36px; box-sizing: border-box; }
.dm-affiliate-btn:hover { background: #008f5a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,170,108,0.4); }

.dm-view-link { display: inline-block; font-size: 13px; color: #666; text-decoration: underline; margin-left: 5px; opacity: 1 !important; pointer-events: auto !important; }

.dm-rating-wrap { display: flex; align-items: center; gap: 8px; }
.dm-stars { display: flex; flex-direction: row; gap: 3px; font-size: 20px; line-height: 1; cursor: pointer; }
.dm-star { color: #00aa6c; user-select: none; transition: transform 0.1s; }
.dm-star:active { transform: scale(1.2); }
.dm-rating-meta { font-size: 13px; color: #444; display: flex; align-items: center; line-height: 1; }
.dm-rating-score { font-weight: 800; color: #222; font-size: 14px; margin-right: 4px; }
.dm-rating-count { color: #777; font-weight: 400; font-size: 13px; }

.dm-bucket-remove { display: block; width: 100%; margin-top: 12px; padding: 8px; background: #fff0f0; border: 1px solid #ffcaca; color: #d63638; cursor: pointer; border-radius: 6px; font-size: 12px; font-weight: 600; transition: background 0.2s; }
.dm-bucket-remove:hover { background: #ffebeb; border-color: #ffb3b3; }
#dm-pdf-export { background: #2c3338; color: #fff; border: none; }
#dm-pdf-export:hover { background: #1d2327; }

/* --- MOBILE FIXES (<767px) --- */
@media screen and (max-width: 767px) {
    .dm-filter-bar { 
        /* Force single column stack */
        grid-template-columns: 100%; 
        display: grid;
        gap: 10px; 
    }
    
    /* Reset any desktop spans */
    .dm-span-2 { grid-column: auto !important; }
    
    /* Inputs full width & standard appearance */
    .dm-filter-bar select, 
    .dm-filter-bar input[type="text"] {
        -webkit-appearance: none !important; 
        -moz-appearance: none !important; 
        appearance: none !important; 
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3e") !important; 
        background-repeat: no-repeat !important; 
        background-position: right 12px center !important; 
        background-size: 16px !important; 
        padding-right: 40px !important;
    }
    
    /* Stack Interaction Bar */
    .dm-interaction-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .dm-rating-wrap { width: 100%; margin-bottom: 5px; }
    .dm-bucket-btn, .dm-affiliate-btn { width: 100%; justify-content: center; }
    .dm-view-link { display: block; width: 100%; text-align: center; margin-left: 0; margin-top: -2px; padding: 5px 0; }
}

@media screen and (max-width: 480px) {
    .dm-filter-bar {
	gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
	}
	.dm-select-group {
    display: contents;
	}
}