/* =========================================================
   SIWA MOTOR - CUSTOM CSS
   Color system:
   --contrast   : #111827
   --contrast-2 : #374151
   --contrast-3 : #6B7280
   --base       : #E5E7EB
   --base-2     : #F3F4F6
   --base-3     : #FFFFFF
   --accent     : #3858e9
   --cam-nhan   : #1b2b4b
   ========================================================= */

/* =========================================================
   SHORTCODE REGION
   ========================================================= */
.siwa-region {
    margin-bottom: 15px;
    color: var(--base-3);
}
.siwa-region p,
.siwa-region h3 {
    margin: 0;
}
.siwa-region__title {
    font-weight: bold;
}
.siwa-region__hotline {
    margin: 6px 0 10px;
}
.siwa-region__addresses {
    margin: 0;
}
.siwa-region__addresses li {
    margin-bottom: 4px;
}

/* =========================================================
   PRODUCT CONTACT FORM (chỉ form, không còn nút)
   ========================================================= */
#swp_contact_container {
    position: relative;
    margin-top: 25px;
    margin-bottom: 20px;
}

/* =========================================================
   FLOATING ACTION BUTTON
   ========================================================= */
.contact-fab-container {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9990;
}
.contact-fab-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.contact-fab__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--base-3);
    color: var(--contrast);
    border: 1px solid rgba(229, 231, 235, .9);
    border-radius: 50%;
    box-shadow: 0 8px 22px rgba(17, 24, 39, .12);
    text-decoration: none;
    transition:
        transform .3s cubic-bezier(.34, 1.56, .64, 1),
        box-shadow .3s ease;
}
.contact-fab__button img,
.contact-fab__button svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    transition: transform .3s ease;
}
.contact-fab__button:hover {
    transform: translateY(-4px);
    box-shadow: 0 13px 30px rgba(17, 24, 39, .17);
}
.contact-fab__button:hover img,
.contact-fab__button:hover svg {
    transform: scale(1.08);
}

/* Phone FAB */
.contact-fab__button.phone {
    color: var(--base-3);
    background: linear-gradient(
        135deg,
        var(--accent) 0%,
        #2946c7 100%
    );
    border: none;
    animation: fab-pulse 3s infinite ease-in-out;
}

/* Phone pulse */
@keyframes fab-pulse {
    0%,
    100% {
        box-shadow:
            0 8px 22px rgba(17, 24, 39, .12),
            0 0 0 0 rgba(56, 88, 233, .35);
    }
    50% {
        box-shadow:
            0 10px 25px rgba(17, 24, 39, .15),
            0 0 0 8px rgba(56, 88, 233, 0);
    }
}

/* =========================================================
   BRANCH MODAL
   ========================================================= */
.branch-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity .3s ease,
        visibility .3s ease;
}
.branch-modal.is-open {
    opacity: 1;
    visibility: visible;
}

/* Modal overlay */
.branch-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .62);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

/* Modal content */
.branch-modal__content {
    position: relative;
    width: 90%;
    max-width: 400px;
    padding: 34px 26px;
    background: rgba(255, 255, 255, .97);
    border: 1px solid rgba(229, 231, 235, .9);
    border-radius: 20px;
    box-shadow:
        0 25px 50px -12px rgba(17, 24, 39, .25);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    transform: translateY(20px) scale(.96);
    transition:
        transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.branch-modal.is-open .branch-modal__content {
    transform: translateY(0) scale(1);
}

/* Modal title */
.branch-modal__title {
    margin: 0 0 22px;
    color: var(--contrast);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

/* Close button */
.branch-modal__close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    padding: 0;
    margin: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: var(--contrast-3);
    background: var(--base-2);
    border: 1px solid var(--base);
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    box-sizing: border-box;
    z-index: 10;
    transition:
        color .25s ease,
        background-color .25s ease,
        border-color .25s ease,
        transform .25s ease;
}
.branch-modal__close-btn svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 20px;
    display: block !important;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    pointer-events: none;
}
.branch-modal__close-btn:hover {
    color: var(--base-3);
    background: var(--contrast);
    border-color: var(--contrast);
    transform: rotate(90deg);
}

/* =========================================================
   BRANCH LIST
   ========================================================= */
.branch-modal__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.branch-modal__list a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    color: var(--contrast);
    background: var(--base-3);
    border: 1px solid var(--base);
    border-radius: 14px;
    text-decoration: none;
    opacity: 0;
    transform: translateY(10px);
    transition:
        transform .2s ease,
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}
.branch-modal.is-open .branch-modal__list a {
    animation: fadeInUp .4s ease forwards;
}
.branch-modal__list a:nth-child(1) {
    animation-delay: .08s;
}
.branch-modal__list a:nth-child(2) {
    animation-delay: .13s;
}
.branch-modal__list a:nth-child(3) {
    animation-delay: .18s;
}
.branch-modal__list a:nth-child(4) {
    animation-delay: .23s;
}

/* List animation */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* List hover */
.branch-modal__list a:hover {
    color: var(--contrast);
    background: var(--base-2);
    border-color: rgba(56, 88, 233, .30);
    transform: translateY(-2px);
    box-shadow:
        0 8px 18px rgba(56, 88, 233, .08);
}

/* Branch icon */
.branch-modal__list a svg,
.branch-modal__list a img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.branch-modal__list a svg {
    color: var(--accent);
}

/* Branch information */
.branch-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.branch-info strong {
    color: var(--contrast);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.35;
}
.branch-info span {
    color: var(--contrast-3);
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.4;
}
.branch-modal__list a:hover .branch-info strong {
    color: var(--accent);
}
.branch-modal__list a:hover .branch-info span {
    color: var(--contrast-2);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    .contact-fab-container {
        right: 20px;
        bottom: 20px;
    }
    .branch-modal__content {
        padding: 30px 20px;
        border-radius: 18px;
    }
}
@media (max-width: 480px) {
    .contact-fab-container {
        right: 16px;
        bottom: 16px;
    }
    .contact-fab__button {
        width: 54px;
        height: 54px;
    }
    .branch-modal__content {
        width: calc(100% - 24px);
        padding: 28px 16px;
        border-radius: 18px;
    }
    .branch-modal__title {
        margin-bottom: 20px;
        font-size: 1.3rem;
    }
    .branch-modal__list a {
        gap: 12px;
        padding: 14px 16px;
        border-radius: 13px;
    }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    .contact-fab__button,
    .contact-fab__button img,
    .contact-fab__button svg,
    .branch-modal,
    .branch-modal__content,
    .branch-modal__list a {
        animation: none !important;
        transition: none !important;
    }
}