/* Homepage Redesign CSS - Koh Sanuk */

/* ============================================
   TripAdvisor Badge
   ============================================ */
.tripadvisor-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: 20px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tripadvisor-badge:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tripadvisor-logo {
    height: 24px;
    width: auto;
}

.tripadvisor-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tripadvisor-stars {
    display: flex;
    gap: 2px;
    color: #00aa6c;
    font-size: 0.7rem;
}

.tripadvisor-text {
    color: #00aa6c;
    font-weight: 600;
    font-size: 0.9rem;
}

@media (max-width: 767.98px) {
    .tripadvisor-badge {
        padding: 6px 12px;
        gap: 8px;
        margin-bottom: 15px;
    }

    .tripadvisor-logo {
        height: 18px;
    }

    .tripadvisor-stars {
        font-size: 0.6rem;
    }

    .tripadvisor-text {
        font-size: 0.8rem;
    }
}

/* ============================================
   Find My Tour CTA Button
   ============================================ */
.find-tour-cta {
    display: inline-block;
    padding: 16px 48px;
    background: linear-gradient(135deg, #fd7e14, #e65c00);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(253, 126, 20, 0.4);
    text-decoration: none;
}

.find-tour-cta:hover {
    background: linear-gradient(135deg, #e65c00, #fd7e14);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 126, 20, 0.5);
    color: #fff;
    text-decoration: none;
}

.find-tour-cta:active {
    transform: translateY(0);
}

/* ============================================
   Filter Chips Section
   ============================================ */
.filter-chips-section {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 20px 0;
}

/* Non-hero filter sections and labels */
.filter-chips-section .filter-section {
    margin-bottom: 16px;
}

.filter-chips-section .filter-section:last-child {
    margin-bottom: 0;
}

.filter-chips-section .filter-label {
    display: block;
    color: #495057;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    text-align: center;
}

.filter-chips-section .filter-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.filter-chips-wrapper {
    gap: 10px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: #fd7e14;
    color: #fd7e14;
    background: #fff8f3;
}

.filter-chip[aria-pressed="true"],
.filter-chip.active {
    background: #fd7e14;
    border-color: #fd7e14;
    color: #fff;
}

.filter-chip[aria-pressed="true"]:hover,
.filter-chip.active:hover {
    background: #e65c00;
    border-color: #e65c00;
}

.filter-chip i {
    font-size: 1rem;
    margin-right: 6px;
}

.filter-chip-location {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Mobile horizontal scroll for chips */
@media (max-width: 767.98px) {
    .filter-chips-wrapper {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 8px;
        justify-content: flex-start !important;
    }

    .filter-chips-wrapper::-webkit-scrollbar {
        display: none;
    }

    .filter-chip {
        flex-shrink: 0;
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* ============================================
   Bestsellers Section
   ============================================ */
.bestsellers-section {
    padding: 40px 0 60px;
}

.bestsellers-header {
    text-align: center;
    margin-bottom: 30px;
}

.bestsellers-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 10px;
}

.bestsellers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 991.98px) {
    .bestsellers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 575.98px) {
    .bestsellers-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.bestsellers-loading {
    display: none;
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.bestsellers-loading.active {
    display: block;
}

.bestsellers-loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   Bestseller Card
   ============================================ */
.bestseller-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

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

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

.bestseller-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.bestseller-card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

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

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

.bestseller-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: #fd7e14;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
}

.bestseller-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bestseller-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #343a40;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.bestseller-card-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: auto;
}

.bestseller-card-price .price-label {
    font-size: 0.9rem;
    color: #6c757d;
}

.bestseller-card-price .price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fd7e14;
}

/* View All Button */
.bestsellers-view-all {
    text-align: center;
    margin-top: 30px;
}

.view-all-btn {
    display: inline-block;
    padding: 12px 32px;
    background: transparent;
    border: 2px solid #fd7e14;
    color: #fd7e14;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.view-all-btn:hover {
    background: #fd7e14;
    color: #fff;
    text-decoration: none;
}

/* ============================================
   Trust Signals Section
   ============================================ */
.trust-signals-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

.trust-signals-row {
    display: flex;
    flex-wrap: wrap;
}

.trust-signal-item {
    padding: 20px 15px;
}

.trust-signal-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trust-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.trust-link:hover {
    color: #fd7e14;
    text-decoration: none;
}

.trust-icon {
    font-size: 2rem;
    color: #fd7e14;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.trust-text {
    display: flex;
    flex-direction: column;
}

.trust-text strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: #343a40;
}

.trust-text span {
    font-size: 0.8rem;
    color: #6c757d;
}

@media (max-width: 767.98px) {
    .trust-signal-item {
        padding: 15px 10px;
    }

    .trust-icon {
        font-size: 1.5rem;
        width: 32px;
    }

    .trust-text strong {
        font-size: 0.85rem;
    }

    .trust-text span {
        font-size: 0.75rem;
    }
}

/* ============================================
   Why Choose Us Section (Condensed to 4)
   ============================================ */
.why-choose-section {
    padding: 60px 0;
}

.why-choose-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 40px;
}

.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 991.98px) {
    .why-choose-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 575.98px) {
    .why-choose-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.why-choose-item {
    text-align: center;
    padding: 20px;
}

.why-choose-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff8f3;
    border-radius: 50%;
}

.why-choose-icon i {
    font-size: 1.75rem;
    color: #fd7e14;
}

.why-choose-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 8px;
}

.why-choose-item p {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid animation for bestsellers */
.bestsellers-grid .bestseller-card {
    animation: fadeInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.bestsellers-grid .bestseller-card:nth-child(1) { animation-delay: 0.05s; }
.bestsellers-grid .bestseller-card:nth-child(2) { animation-delay: 0.1s; }
.bestsellers-grid .bestseller-card:nth-child(3) { animation-delay: 0.15s; }
.bestsellers-grid .bestseller-card:nth-child(4) { animation-delay: 0.2s; }
.bestsellers-grid .bestseller-card:nth-child(5) { animation-delay: 0.25s; }
.bestsellers-grid .bestseller-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Hero Filter System (3-tier)
   ============================================ */
.hero-filters {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Filter chips row for hero */
.hero-filters .filter-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

/* Hero chip overrides for dark background */
.hero-filters .filter-chip {
    background: rgba(255, 255, 255, 0.9);
    color: #343a40;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 8px 16px;
    font-size: 0.9rem;
}

.hero-filters .filter-chip:hover {
    background: #fff;
    color: #fd7e14;
}

.hero-filters .filter-chip[aria-pressed="true"],
.hero-filters .filter-chip.active {
    background: #fd7e14;
    color: white;
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.4);
}

.hero-filters .filter-chip[aria-pressed="true"]:hover,
.hero-filters .filter-chip.active:hover {
    background: #e65c00;
}

/* Subcategory section animation */
#subcategory-section {
    animation: fadeIn 0.3s ease-out;
}

#subcategory-section.hiding {
    animation: fadeOut 0.2s ease-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Subcategory loading spinner */
.subcategory-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    color: white;
}

.subcategory-loading i {
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* ============================================
   Hero Inline Results (Quick Preview)
   ============================================ */
.hero-results-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-results-loading {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.hero-results-loading i {
    font-size: 1.5rem;
}

.hero-results-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    padding: 10px;
    font-size: 0.9rem;
}

.hero-results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.hero-result-card {
    display: block;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.hero-result-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.hero-result-info {
    padding: 8px 10px;
}

.hero-result-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #343a40;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-result-price {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fd7e14;
    margin-top: 2px;
}

.hero-view-all {
    display: block;
    text-align: center;
    margin-top: 12px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(253, 126, 20, 0.9);
    border-radius: 20px;
    transition: background 0.2s ease;
}

.hero-view-all:hover {
    background: #fd7e14;
    color: white;
    text-decoration: none;
}

.hero-view-all i {
    margin-left: 6px;
}

/* Hero filter responsive */
@media (max-width: 991.98px) {
    .hero-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .hero-filters {
        padding: 12px;
        margin-top: 10px;
        max-width: 100%;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.2);
    }

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

    /* Location chips: wrap to show 3 on first row, 2 on second */
    .hero-filters #location-chips {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    /* Tour type chips: 2x2 grid */
    .hero-filters #type-chips {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .hero-filters #type-chips .filter-chip {
        justify-content: center;
        width: 100%;
    }

    /* Subcategory chips: wrap */
    .hero-filters #subcategory-chips {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .hero-filters .filter-chip {
        min-height: 36px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .hero-filters .filter-chip i {
        font-size: 0.85rem;
    }

    .filter-label {
        font-size: 0.7rem;
        margin-bottom: 6px;
        text-align: center;
    }

    .hero-results-section {
        margin-top: 12px;
    }

    .hero-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .hero-result-card img {
        aspect-ratio: 3/2;
    }

    .hero-result-info {
        padding: 6px 8px;
    }

    .hero-result-title {
        font-size: 0.7rem;
    }

    .hero-result-price {
        font-size: 0.75rem;
    }

    .hero-view-all {
        font-size: 0.8rem;
        padding: 6px 14px;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .hero-filters {
        padding: 10px;
    }

    .hero-filters .filter-chip {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .filter-label {
        font-size: 0.65rem;
    }
}
