/* ==========================================================================
   FLEET CATALOG & ROUTE PRICING CALCULATOR STYLES
   ========================================================================== */

.fleet-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.txm-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.txm-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(212, 175, 55, 0.4);
}

.txm-card-media {
    position: relative;
    height: 220px;
    background: linear-gradient(135deg, #0a192f 0%, #1e293b 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.txm-card-media img {
    max-height: 85%;
    max-width: 85%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.txm-card:hover .txm-card-media img {
    transform: scale(1.08);
}

.txm-badge-seats {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(10, 25, 47, 0.85);
    color: var(--accent-gold-light);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(4px);
}

.txm-card-body {
    padding: 26px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.txm-card-title {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 6px;
}

.txm-card-specs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.txm-card-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 20px;
    line-height: 1.55;
    flex-grow: 1;
}

.txm-selector-wrap {
    background: var(--bg-light);
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.txm-selector-wrap label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 8px;
}

.txm-route-dropdown {
    width: 100%;
    padding: 11px 14px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.txm-route-dropdown:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.txm-price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #cbd5e1;
}

.txm-price-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}

.txm-price-value {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-gold-dark);
}

.txm-add-to-cart {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #d4af37 0%, #f59e0b 100%);
    color: #0a192f;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-gold);
}

.txm-add-to-cart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.45);
}

.txm-add-to-cart:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

/* ── Sticky Cart Bar ── */
#txm-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0a192f;
    color: #ffffff;
    padding: 14px 24px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
    z-index: 990;
    display: none;
}

.txm-cart-bar-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.txm-cart-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.05rem;
}

.txm-cart-icon-badge {
    position: relative;
    font-size: 1.4rem;
}

.txm-cart-actions {
    display: flex;
    gap: 12px;
}

/* ── Slide-Out Cart Drawer ── */
#txm-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.35);
    z-index: 2100;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease;
    visibility: hidden;
}

#txm-cart-drawer.open {
    transform: translateX(0);
    visibility: visible;
}

.txm-cart-drawer-header {
    background: #0a192f;
    color: #ffffff;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.txm-cart-drawer-header h3 {
    color: #ffffff;
    font-size: 1.25rem;
    margin: 0;
}

#txm-cart-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.6rem;
    cursor: pointer;
}

#txm-cart-items {
    padding: 20px 24px;
    flex-grow: 1;
    overflow-y: auto;
}

.txm-cart-item {
    background: var(--bg-light);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 14px;
}

.txm-cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.txm-cart-item-remove {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.txm-cart-item-route {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.txm-cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.txm-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-full);
    padding: 3px 8px;
}

.txm-qty-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.txm-qty-value {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 18px;
    text-align: center;
}

.txm-cart-drawer-footer {
    padding: 20px 24px;
    background: var(--bg-light);
    border-top: 1px solid #e2e8f0;
}

.txm-drawer-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 16px;
}

#txm-cart-overlay,
.txm-cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2099;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#txm-cart-overlay.open,
.txm-cart-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ── Catalog Mobile Responsiveness ── */
@media (max-width: 768px) {
    .fleet-catalog-grid { grid-template-columns: 1fr; gap: 20px; }
    .txm-card-media { height: 180px; }
    .txm-card-body { padding: 20px; }
    .txm-card-title { font-size: 1.2rem; }
    .txm-route-dropdown { font-size: 0.85rem; padding: 10px 12px; }
    .txm-price-display { flex-direction: column; align-items: flex-start; gap: 4px; }
    .txm-price-value { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    .txm-card-media { height: 160px; }
    .txm-badge-seats { font-size: 0.7rem; padding: 4px 10px; top: 10px; left: 10px; }
    .txm-card-body { padding: 16px; }
    .txm-add-to-cart { padding: 12px; font-size: 0.88rem; }
    .txm-selector-wrap label { font-size: 0.75rem; }
    
    /* Cart item mobile */
    .txm-cart-item { padding: 12px; }
    .txm-cart-item-bottom { flex-wrap: wrap; gap: 10px; }
    .txm-cart-drawer-header h3 { font-size: 1.05rem; }
}
