/**
 * Showroom & Đại lý MG Quảng Trị Stylesheet (Redesigned Flagship)
 * Lấy cảm hứng từ mgmotor.vn - Phong cách Automotive Thể Thao & Đẳng Cấp
 *
 * @package MG_QuangTri
 * @version 1.2.0
 */

/* ==========================================================================
   1. HERO SECTION (CINEMATIC AUTOMOTIVE DARK)
   ========================================================================== */
.mg-showroom-hero {
    position: relative;
    background: radial-gradient(circle at 50% 30%, #1f2937 0%, #0b0f19 100%);
    color: #ffffff;
    padding: 70px 0 65px;
    border-bottom: 2px solid rgba(220, 38, 38, 0.4);
    overflow: hidden;
}

.mg-showroom-hero-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(11, 15, 25, 0.4), rgba(11, 15, 25, 0.95));
    background-size: 24px 24px, 100% 100%;
    pointer-events: none;
}

.mg-showroom-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 960px;
    margin: 0 auto;
}

.mg-badge-outline {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.5);
    border-radius: 30px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #ef4444;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.mg-showroom-hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #ffffff;
    margin: 0 0 16px 0;
    text-transform: uppercase;
}

.mg-showroom-hero-title .text-red {
    color: #ef4444;
    text-shadow: 0 0 25px rgba(239, 68, 68, 0.35);
}

.mg-showroom-hero-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #cbd5e1;
    max-width: 780px;
    margin: 0 auto 30px auto;
}

.mg-showroom-hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
}

.hero-sr-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 18px;
    border-radius: 30px;
    color: #f1f5f9;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.hero-sr-badge svg {
    color: #ef4444;
    flex-shrink: 0;
}

.hero-sr-badge:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}

/* ==========================================================================
   2. FLAGSHIP SHOWROOM PORTAL (DUAL COLUMN SPLIT)
   ========================================================================== */
.mg-showroom-portal-section {
    background: #f8fafc;
    padding: 60px 0 80px;
}

.mg-showroom-flagship-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 32px;
    align-items: stretch;
}

/* --- Thẻ thông tin đại lý bên trái --- */
.mg-flagship-info-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-status-bar {
    background: #0f172a;
    color: #ffffff;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
    border-bottom: 1px solid #1e293b;
}

.sr-live-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #38bdf8;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: mg-pulse-dot 2s infinite;
}

@keyframes mg-pulse-dot {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.sr-auth-badge {
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #ef4444;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.card-dealer-header {
    padding: 28px 28px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.dealer-brand-logo {
    margin-bottom: 14px;
}

.dealer-brand-logo img {
    height: 38px;
    width: auto;
    display: block;
}

.dealer-name {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: -0.3px;
}

.dealer-type {
    font-size: 0.92rem;
    color: #64748b;
    font-weight: 500;
    display: block;
}

/* Các hàng chi tiết */
.dealer-details-nodes {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
}

.detail-node {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.node-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.detail-node:hover .node-icon {
    transform: scale(1.08);
}

.node-icon.icon-red {
    background: #fee2e2;
    color: #dc2626;
}

.node-icon.icon-green {
    background: #dcfce7;
    color: #16a34a;
}

.node-icon.icon-blue {
    background: #e0f2fe;
    color: #0284c7;
}

.node-icon.icon-gold {
    background: #fef3c7;
    color: #d97706;
}

.node-icon.icon-slate {
    background: #f1f5f9;
    color: #475569;
}

.node-text {
    display: flex;
    flex-direction: column;
    font-size: 0.92rem;
    line-height: 1.5;
}

.node-text strong {
    color: #0f172a;
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.node-text span {
    color: #334155;
    font-weight: 500;
}

.node-text .dealer-hl-large {
    font-size: 1.45rem;
    font-weight: 800;
    color: #dc2626;
    text-decoration: none;
    letter-spacing: 0.5px;
    display: inline-block;
    transition: color 0.2s ease;
}

.node-text .dealer-hl-large:hover {
    color: #991b1b;
    text-decoration: underline;
}

.node-text .dealer-hl-link {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0284c7;
    text-decoration: none;
    display: inline-block;
}

.node-text .dealer-hl-link:hover {
    color: #0369a1;
    text-decoration: underline;
}

.node-text .text-muted {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 4px;
    font-style: italic;
}

/* Nút hành động đại lý */
.dealer-actions-group {
    padding: 20px 28px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dealer-actions-group .mg-btn {
    width: 100%;
    justify-content: center;
    font-weight: 700;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    padding: 12px 20px;
}

.dealer-actions-group .mg-btn-primary {
    background: linear-gradient(135deg, #e52424, #b91c1c);
    box-shadow: 0 4px 14px rgba(229, 36, 36, 0.35);
    color: #ffffff;
    border: none;
}

.dealer-actions-group .mg-btn-primary:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(229, 36, 36, 0.45);
}

.dealer-actions-group .mg-btn-outline {
    border: 1.5px solid #0f172a;
    color: #0f172a;
    background: transparent;
}

.dealer-actions-group .mg-btn-outline:hover {
    background: #0f172a;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Thanh mạng xã hội */
.dealer-social-bar {
    padding: 16px 28px 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.dealer-social-bar span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}

.social-pills {
    display: flex;
    gap: 8px;
}

.social-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.2s ease;
}

.social-pill-btn.fb {
    background: #1877f2;
}

.social-pill-btn.fb:hover {
    background: #0d65d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(24, 119, 242, 0.35);
}

.social-pill-btn.yt {
    background: #ff0000;
}

.social-pill-btn.yt:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.35);
}

.social-pill-btn.zalo {
    background: #0068ff;
}

.social-pill-btn.zalo:hover {
    background: #0054cf;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 104, 255, 0.35);
}

/* --- Thẻ Bản Đồ Google Maps bên phải --- */
.mg-flagship-map-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.map-card-header {
    padding: 18px 24px;
    background: #0f172a;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
}

.map-badge-pin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(220, 38, 38, 0.25);
    color: #ef4444;
    border: 1px solid rgba(220, 38, 38, 0.5);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.map-header-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 6px 0 0 0;
}

.map-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid #334155;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.map-open-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

.map-iframe-container {
    flex-grow: 1;
    min-height: 480px;
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
}

.map-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 480px;
    border: 0;
    display: block;
}

.map-card-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.map-card-footer svg {
    color: #dc2626;
    flex-shrink: 0;
    margin-top: 2px;
}

.map-card-footer p {
    font-size: 0.85rem;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

/* ==========================================================================
   3. TIÊU CHUẨN CƠ SỞ VẬT CHẤT (FACILITIES SHOWCASE)
   ========================================================================== */
.mg-showroom-facilities-section {
    background: #ffffff;
    padding: 85px 0;
    border-top: 1px solid #e2e8f0;
}

.mg-facilities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 45px;
}

.facility-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 34px 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.facility-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #dc2626;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.facility-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.09);
    border-color: #cbd5e1;
    background: #ffffff;
}

.facility-card:hover::before {
    opacity: 1;
}

.fac-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    transition: transform 0.3s ease;
}

.facility-card:hover .fac-icon {
    transform: scale(1.1);
}

.fac-icon.icon-display {
    background: #fee2e2;
    color: #dc2626;
}

.fac-icon.icon-service {
    background: #e0f2fe;
    color: #0284c7;
}

.fac-icon.icon-parts {
    background: #dcfce7;
    color: #16a34a;
}

.fac-icon.icon-lounge {
    background: #fef3c7;
    color: #d97706;
}

.fac-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px 0;
}

.fac-desc {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   4. IN-PAGE DIRECT BOOKING FORM (ĐẶT LỊCH HẸN TRỰC TIẾP)
   ========================================================================== */
.mg-showroom-booking-section {
    background: #090d16;
    padding: 85px 0;
    color: #ffffff;
    border-top: 1px solid #1e293b;
    position: relative;
}

.mg-booking-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
}

.booking-kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ef4444;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.booking-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    margin: 0 0 16px 0;
    text-transform: uppercase;
}

.booking-desc {
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.65;
    margin-bottom: 26px;
}

.booking-perks {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.booking-perks li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    color: #e2e8f0;
    font-weight: 500;
}

.booking-perks svg {
    color: #22c55e;
    flex-shrink: 0;
}

.booking-form-wrap {
    background: #0f172a;
    padding: 36px;
    border-radius: 14px;
    border: 1px solid #334155;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.mg-booking-form .mg-form-group {
    margin-bottom: 18px;
}

.mg-booking-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.mg-booking-form .req {
    color: #ef4444;
}

.mg-booking-form .mg-input,
.mg-booking-form .mg-select {
    width: 100%;
    height: 48px;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 0.92rem;
    color: #ffffff;
    transition: all 0.2s ease;
}

.mg-booking-form .mg-input:focus,
.mg-booking-form .mg-select:focus {
    border-color: #ef4444;
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
    background: #1e293b;
}

.mg-booking-form .mg-btn-block {
    width: 100%;
    justify-content: center;
    height: 50px;
    font-size: 1rem;
    margin-top: 14px;
    background: linear-gradient(135deg, #e52424, #b91c1c);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mg-booking-form .mg-btn-block:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(229, 36, 36, 0.45);
}

.mg-booking-form .mg-form-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.mg-booking-form .alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.mg-booking-form .alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

/* ==========================================================================
   5. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
    .mg-showroom-flagship-grid {
        grid-template-columns: 1fr;
    }

    .mg-facilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mg-booking-box {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 36px 24px;
    }

    .map-iframe-container {
        min-height: 400px;
    }

    .map-iframe-container iframe {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .mg-showroom-hero {
        padding: 45px 0 40px;
    }

    .mg-showroom-hero-desc {
        font-size: 0.95rem;
    }

    .hero-sr-badge {
        font-size: 0.78rem;
        padding: 6px 14px;
    }

    .mg-facilities-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card-dealer-header,
    .dealer-details-nodes,
    .dealer-actions-group,
    .dealer-social-bar {
        padding: 20px 18px;
    }

    .dealer-name {
        font-size: 1.4rem;
    }

    .booking-form-wrap {
        padding: 24px 18px;
    }

    .map-iframe-container {
        min-height: 350px;
    }

    .map-iframe-container iframe {
        min-height: 350px;
    }
}


/* ==========================================================================
   FRONT-PAGE SHOWROOM SECTION ENHANCEMENTS
   ========================================================================== */
.sr-amenities-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.amenity-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.dealer-action-secondary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.dealer-action-secondary-row .mg-btn {
    padding: 10px 14px;
    font-size: 0.84rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 8px;
    text-transform: none;
    letter-spacing: 0;
}

.dealer-action-secondary-row .btn-call {
    border-color: #16a34a;
    color: #16a34a;
}

.dealer-action-secondary-row .btn-call:hover {
    background: #16a34a;
    color: #ffffff;
}

@media (max-width: 576px) {
    .dealer-action-secondary-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .card-status-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 18px;
    }
    .card-status-bar .sr-auth-badge {
        align-self: flex-start;
    }
    .mg-showroom-portal-section {
        padding: 40px 0 60px;
    }
}
