/**
 * Amadex Travel Deals Styles
 * Modern flight deals grid with slider
 */

/* ==================== Container ==================== */
.amadex-deals-section {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ==================== Header ==================== */
.amadex-deals-header {
    margin-bottom: 30px;
}

.amadex-deals-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.amadex-deals-title .amadex-price-highlight {
    color: #10b981;
}

/* ==================== Navigation ==================== */
.amadex-deals-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.amadex-deals-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.amadex-deal-tab {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.amadex-deal-tab:hover {
    color: #2c3e50;
    background: #f1f5f9;
}

.amadex-deal-tab.active {
    color: #10b981;
    background: #ecfdf5;
    font-weight: 600;
}

.amadex-deal-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 24px;
    right: 24px;
    height: 3px;
    background: #10b981;
    border-radius: 2px 2px 0 0;
}

/* ==================== Slider Controls ==================== */
.amadex-deals-controls {
    display: flex;
    gap: 10px;
}

.amadex-deals-prev,
.amadex-deals-next {
    width: 40px;
    height: 40px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.3s ease;
}

.amadex-deals-prev:hover,
.amadex-deals-next:hover {
    border-color: #10b981;
    color: #10b981;
    background: #ecfdf5;
}

.amadex-deals-prev:disabled,
.amadex-deals-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==================== Container ==================== */
.amadex-deals-container {
    position: relative;
    min-height: 400px;
}

/* ==================== Loader ==================== */
.amadex-deals-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.amadex-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #10b981;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.amadex-deals-loader p {
    color: #64748b;
    font-size: 14px;
}

/* ==================== Grid ==================== */
.amadex-deals-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.amadex-deals-grid.loaded {
    opacity: 1;
}

.amadex-deals-grid[data-cards-per-row="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.amadex-deals-grid[data-cards-per-row="2"] {
    grid-template-columns: repeat(2, 1fr);
}

/* ==================== Deal Card ==================== */
.amadex-deal-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.amadex-deal-card:hover {
    border-color: #10b981;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
    transform: translateY(-4px);
}

/* ==================== Card Header ==================== */
.amadex-deal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.amadex-deal-airline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.amadex-airline-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    flex-shrink: 0;
}

.amadex-airline-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.amadex-airline-name {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

/* ==================== Dates ==================== */
.amadex-deal-dates {
    font-size: 12px;
    color: #64748b;
    text-align: right;
    line-height: 1.4;
}

/* ==================== Route ==================== */
.amadex-deal-route {
    margin: 20px 0;
    flex: 1;
}

.amadex-route-visual {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.amadex-route-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.amadex-route-code {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
}

.amadex-route-city {
    font-size: 12px;
    color: #64748b;
}

.amadex-route-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    border-top: 2px dashed #cbd5e1;
    position: relative;
    margin: 0 -6px;
}

.amadex-route-icon {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
}

.amadex-route-icon::before {
    content: '✈';
    transform: rotate(45deg);
    display: block;
}

.amadex-route-origin-dot {
    width: 8px;
    height: 8px;
    background: #cbd5e1;
    border-radius: 50%;
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
}

/* ==================== Price Button ==================== */
.amadex-deal-price-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.amadex-deal-price-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.amadex-deal-price-btn {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.amadex-deal-price-btn:hover {
    background: #059669;
    transform: scale(1.05);
}

/* ==================== Error State ==================== */
.amadex-deals-error {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.amadex-deals-error p {
    font-size: 16px;
    margin: 0;
}

/* ==================== Responsive ==================== */
@media (max-width: 1200px) {
    .amadex-deals-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .amadex-deals-grid[data-cards-per-row="4"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .amadex-deals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .amadex-deals-title {
        font-size: 28px;
    }
    
    .amadex-deals-nav {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .amadex-deals-controls {
        align-self: flex-end;
    }
}

@media (max-width: 640px) {
    .amadex-deals-grid {
        grid-template-columns: 1fr;
    }
    
    .amadex-deals-title {
        font-size: 24px;
    }
    
    .amadex-deals-tabs {
        gap: 8px;
    }
    
    .amadex-deal-tab {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .amadex-deal-tab.active::after {
        left: 16px;
        right: 16px;
    }
}

/* ==================== Animation ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.amadex-deal-card {
    animation: fadeIn 0.4s ease forwards;
}

.amadex-deal-card:nth-child(1) { animation-delay: 0.05s; }
.amadex-deal-card:nth-child(2) { animation-delay: 0.1s; }
.amadex-deal-card:nth-child(3) { animation-delay: 0.15s; }
.amadex-deal-card:nth-child(4) { animation-delay: 0.2s; }
.amadex-deal-card:nth-child(5) { animation-delay: 0.25s; }
.amadex-deal-card:nth-child(6) { animation-delay: 0.3s; }
.amadex-deal-card:nth-child(7) { animation-delay: 0.35s; }
.amadex-deal-card:nth-child(8) { animation-delay: 0.4s; }

















