/*
 * Custom CSS for DFS Group Theme
 */

/* Hero Swiper pagination — plain class names (Swiper uses matches(); Tailwind !/[#] breaks) */
.heroSwiper .swiper-pagination {
    bottom: 1.25rem;
}
.hero-swiper-pagination-bullet {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0.5;
    transition: opacity 0.2s ease, background 0.2s ease;
}
.hero-swiper-pagination-bullet-active {
    background: #eba800;
    opacity: 1;
}

/* --- Home Explore: content fade (fade-out nhanh → fade-in chậm) --- */
.homeExplore__content .swiper-wrapper {
    position: relative;
}

.homeExplore__content .swiper-slide {
    opacity: 0;
    transition: opacity 0.3s ease-out;
    /* fade out nhanh */
    pointer-events: none;
}

.homeExplore__content .swiper-slide.swiper-slide-active {
    opacity: 1;
    transition: opacity 1s ease-in;
    /* fade in chậm 1s */
    pointer-events: auto;
}

.site-logo .custom-logo-link img {
    max-height: 70px;
    width: auto;
}

/* Marquee Animation */
.js-marquee-wrapper {
    display: flex;
    white-space: nowrap;
}

.marquee-track {
    display: inline-block;
    padding-right: 0;
    animation: marquee-scroll 45s linear infinite;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* --------------------------------------------------------------------------
   GLOBAL POST/PAGE CONTENT STYLES (.entry-content)
   -------------------------------------------------------------------------- */
:where(.entry-content) {
    font-size: 16px;
}

:where(.entry-content) h1,
:where(.entry-content) h2,
:where(.entry-content) h3,
:where(.entry-content) h4,
:where(.entry-content) h5,
:where(.entry-content) h6 {
    font-weight: 700;
    margin-bottom: 10px;
}

:where(.entry-content) h1 {
    font-size: 22px;
}

:where(.entry-content) h2 {
    font-size: 20px;
}

:where(.entry-content) h3 {
    font-size: 18px;
}

:where(.entry-content) h4,
:where(.entry-content) h5,
:where(.entry-content) h6 {
    font-size: 16px;
}

:where(.entry-content) p {
    margin-bottom: 12px;
}

:where(.entry-content) ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin-bottom: 12px;
}

:where(.entry-content) ol {
    list-style-type: decimal;
    padding-left: 2rem;
    margin-bottom: 12px;
}

:where(.entry-content) li {
    display: list-item;
}

:where(.entry-content) ul ul,
:where(.entry-content) ol ul {
    list-style-type: circle;
    margin-bottom: 0;
}

:where(.entry-content) ul ul ul,
:where(.entry-content) ol ul ul {
    list-style-type: square;
}

:where(.entry-content) ol ol,
:where(.entry-content) ul ol {
    list-style-type: lower-alpha;
    margin-bottom: 0;
}

/* --- Global: Custom Pagination (.dfs-pagination) --- */
.dfs-pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dfs-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    color: #475569;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.dfs-pagination .page-numbers:hover:not(.current):not(.dots) {
    border-color: #1cadc3;
    color: #1cadc3;
    background-color: #f0f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 173, 195, 0.15);
}

.dfs-pagination .page-numbers.current {
    background-color: #1cadc3;
    border-color: #1cadc3;
    color: #fff;
    box-shadow: 0 4px 14px rgba(28, 173, 195, 0.3);
}

.dfs-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
}

.dfs-pagination .next.page-numbers,
.dfs-pagination .prev.page-numbers {
    font-size: 14px;
}

/* --- Package: Booking Popup & CF7 Styling --- */
#booking-modal .booking-modal-content {
    border-radius: 8px;
}

.wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wpcf7-form p {
    margin-bottom: 0;
}

.wpcf7-form label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #000;
}

.wpcf7-form-control-wrap {
    display: block;
}

.wpcf7-form-control {
    width: 100% !important;
    padding: 8px 16px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 4px !important;
    font-size: 15px !important;
    color: #374151 !important;
    background-color: #fff !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}

.wpcf7-form-control:focus {
    border-color: #000 !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05) !important;
}

.wpcf7-submit {
    background-color: #000 !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 14px 40px !important;
    border-radius: 0 !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border: none !important;
    margin-top: 10px !important;
}

.wpcf7-submit:hover {
    background-color: #333 !important;
    transform: translateY(-2px);
}

.wpcf7-spinner {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.wpcf7-response-output {
    margin: 20px 0 0 0 !important;
    padding: 12px 16px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    text-align: center !important;
    border-width: 1px !important;
}

.wpcf7-mail-sent-ok {
    border-color: #10b981 !important;
    color: #047857 !important;
    background-color: #ecfdf5 !important;
}

.wpcf7-validation-errors {
    border-color: #ef4444 !important;
    color: #991b1b !important;
    background-color: #fef2f2 !important;
}

/* Double column for some fields if needed */
.booking-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .booking-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- Responsive Header Refinements --- */
@media (max-width: 991px) {
    .site-header .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .site-logo img {
        height: 28px !important;
        width: auto;
    }
}

/* --- Back to Top Button --- */
#back-to-top {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

@media (max-width: 991px) {
    #back-to-top {
        bottom: calc(24px + env(safe-area-inset-bottom));
        right: 16px;
    }
}

#back-to-top:hover {
    transform: scale(1.1);
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* --- DFS Toast Notifications --- */
.dfs-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 360px;
    line-height: 1.4;
}

.dfs-toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.dfs-toast--success {
    border-left: 4px solid #10b981;
}

.dfs-toast--error {
    border-left: 4px solid #ef4444;
}

/* --- DFS Form Checkbox --- */
.dfs-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dfs-checkbox__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
    appearance: none;
    -webkit-appearance: none;
}

.dfs-checkbox__box {
    width: 24px;
    height: 24px;
    border: 1.5px solid #c6c6c8;
    border-radius: 3.6px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    pointer-events: none;
}

.dfs-checkbox__check {
    width: 16px;
    height: 16px;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.dfs-checkbox__input:checked+.dfs-checkbox__box {
    background-color: #1cadc3;
    border-color: #1cadc3;
}

.dfs-checkbox__input:checked+.dfs-checkbox__box .dfs-checkbox__check {
    opacity: 1;
    transform: scale(1);
}

.dfs-checkbox__input:focus-visible+.dfs-checkbox__box {
    outline: 2px solid #1cadc3;
    outline-offset: 2px;
}

/* --- DFS Form Radio --- */
.dfs-radio {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dfs-radio__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
    appearance: none;
    -webkit-appearance: none;
}

.dfs-radio__box {
    width: 24px;
    height: 24px;
    border: 1.5px solid #c6c6c8;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    pointer-events: none;
}

.dfs-radio__check {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #fff;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.dfs-radio__input:checked+.dfs-radio__box {
    background-color: #1cadc3;
    border-color: #1cadc3;
}

.dfs-radio__input:checked+.dfs-radio__box .dfs-radio__check {
    opacity: 1;
    transform: scale(1);
}

.dfs-radio__input:focus-visible+.dfs-radio__box {
    outline: 2px solid #1cadc3;
    outline-offset: 2px;
}

/* --- Home Product Form: Error state for inputs --- */
#home-prod-form .space-y-2 input.home-prod-error-state {
    border-color: #ff383c !important;
    box-shadow: 0 0 0 1px rgba(255, 56, 60, 0.3) !important;
}

/* --- Home Explore: tab progress-fill animation (FE CREDIT style) --- */
.homeExplore__tab {
    position: relative;
}

.progress-fill {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0ms linear;
    will-change: transform;
}

.homeExplore__tab.active .progress-fill {
    transform: scaleX(1);
    transition: transform var(--tab-duration, 5s) linear;
}

.homeExplore__tab:not(.active) .progress-fill {
    transform: scaleX(0);
    transition: transform 0ms linear;
}

/* --- Home Store: InfoWindow (popup title) --- */
.homeStore-info-window {
    position: relative;
    min-width: 120px;
    max-width: 280px;
    padding: 14px 40px 14px 16px;
    margin: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
    font-family: inherit;
}

.homeStore-info-window__title {
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
}

.homeStore-info-window__close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}

.homeStore-info-window__close:hover {
    color: #475569;
    background: #f1f5f9;
}

/*
 * InfoWindow: bỏ lớp nền/bóng mặc định của Google (tránh “2 lớp” trùng .homeStore-info-window).
 * Chỉ giữ giao diện trên .homeStore-info-window.
 */
.homeStore__mapWrap .gm-style-iw {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
}

.homeStore__mapWrap .gm-style-iw-c {
    padding: 0 !important;
    max-width: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.homeStore__mapWrap .gm-style-iw-d {
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Hàng chrome (đóng mặc định / viền trên) — đã có nút X tùy chỉnh */
.homeStore__mapWrap .gm-style-iw-chr,
.homeStore__mapWrap .gm-style-iw-ch {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.homeStore__mapWrap button.gm-ui-hover-effect {
    display: none !important;
}

/* --- Home Store: map container --- */
.homeStore__map {
    width: 100% !important;
    height: 100% !important;
}

/* Marker highlight animation (pulse) */
.homeStore__marker--active .homeStore__marker-dot {
    background-color: #e11d48;
    transform: scale(1.3);
}

/* --- Home Store: danh sách chi nhánh (active giống mẫu) --- */
.homeStore__list-btn {
    border-left: 4px solid transparent;
    padding: 24px;
}

.homeStore__list-btn:not(.homeStore__list-btn--active):hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.homeStore__list-btn--active {
    background-color: #fff;
    border-left-color: #22d3ee;
}

.homeStore__list-btn .title {
    color: #0F172A;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
}

.homeStore__list-btn .address {
    color: rgba(15, 23, 42, 0.70);
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
    text-align: left;
}

.homeStore__list-btn .phone {
    color: #0F172A;
    font-size: 24px;
    font-weight: 800;
    line-height: 24px;
    letter-spacing: -0.5px;
}

.homeStore__list::-webkit-scrollbar {
    width: 6px;
}

.homeStore__list::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 9999px;
}

/* --- Global: Language Switcher (GTranslate) --- */
.language-switcher .lang-option {
    cursor: pointer;
    background: none;
    border: none;
    text-align: left;
}

.language-switcher .lang-option .check-mark {
    transition: opacity 0.2s ease;
}

#lang-switch-dropdown {
    transform-origin: top right;
}

/* Ensure GTranslate doesn't break header layout */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0 !important;
}


.prodGallerySwiper {
    overflow: visible !important;
    perspective: 1200px;
    padding: 40px 0;
}
@media (max-width: 575px) {
    .prodGallerySwiper {
        padding: 0px 0;
    }
}
.prodGallerySwiper .swiper-wrapper {
    transform-style: preserve-3d;
}
.prodGallerySwiper .swiper-slide {
    width: 388px !important;
    height: 464px !important;
    transition-property: transform, opacity;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-center;
}
.prodGallerySwiper .gallery-item-wrap {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.prodGallerySwiper .gallery-item-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.prodGallery__slider.loading .prodGallerySwiper {
    opacity: 0;
}
.prodGallery__slider {
    transition: opacity 0.3s ease;
}
/* Override swiper button colors/positions */
.prodGallery__btn {
    width: 50px;
    height: 50px;
    background: #FFF;
    border-radius: 50%;
    color: #0F172A !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.prodGallery__btn:after {
    font-size: 20px;
}