/* Shared accessibility, motion, and performance helpers. */

.skip-link {
    position: absolute;
    left: 16px;
    top: 0;
    z-index: 10000;
    padding: 10px 16px;
    background: #030f27;
    color: #fff;
    border-radius: 0 0 8px 8px;
    transform: translateY(-120%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
    color: #fff;
}

:focus-visible {
    outline: 2px solid #1292ee;
    outline-offset: 3px;
}

html {
    color-scheme: light;
    -webkit-tap-highlight-color: rgba(18, 146, 238, 0.25);
}

body {
    touch-action: manipulation;
    color: #3d4c59;
    transition: color 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

img,
svg {
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3,
.footer-widget-title,
.intro-content .desc h1 {
    text-wrap: balance;
    scroll-margin-top: 96px;
}

.intro-slider {
    position: relative;
}

.intro-slider .swiper-slide {
    display: none;
}

.intro-slider .swiper-slide:first-child {
    display: block;
}

.intro-slider.is-ready .swiper-wrapper {
    display: grid;
}

.intro-slider.is-ready .swiper-slide {
    display: block;
    grid-area: 1 / 1;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
}

.intro-slider.is-ready .swiper-slide.is-leaving {
    opacity: 1;
    z-index: 1;
}

.intro-slider.is-ready .swiper-slide.is-active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
    transition: opacity 0.8s ease;
}

.intro-section {
    background-color: #000;
    background-size: cover;
    background-position: center center;
}

.intro-slider .main-slider-nav {
    position: absolute;
    top: 50%;
    z-index: 30;
    margin-top: -25px;
    color: #fff;
    pointer-events: auto;
}

@media (hover: none) {
    .intro-slider .main-slider-nav {
        opacity: 1;
        visibility: visible;
    }
}

.testimonial-slider .swiper-wrapper {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
}

.testimonial-slider .swiper-slide {
    flex: 0 0 min(280px, 78%);
    scroll-snap-align: start;
}

.testimonial-slider .swiper-slide img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.testimonial-slider .swiper-pagination {
    display: none;
}

.footer-section {
    background-color: #fff;
}

.footer-widget-content,
.footer-widget-content p,
.footer-widget-content a,
.copyright {
    color: #3d4c59;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.intro-content .desc h1 {
    color: #fff;
    margin: 0 0 0.75rem;
}

.store-label {
    margin-left: 5px;
    margin-top: 5px;
}

button.main-slider-nav,
button.search-close,
button.toggle,
button.write-review {
    font: inherit;
    color: inherit;
    border: 0;
    background: transparent;
    padding: 0;
}

button.show-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    color: #030f27;
    background: rgba(255, 255, 255, 0.92);
    border: 0;
    border-radius: 8px;
}

.btn {
    transition: color 0.25s cubic-bezier(0.645, 0.045, 0.355, 1),
        background-color 0.25s cubic-bezier(0.645, 0.045, 0.355, 1),
        border-color 0.25s cubic-bezier(0.645, 0.045, 0.355, 1),
        transform 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.btn:hover {
    transform: translateY(-1px);
}

.show-menu-control:focus-within .dropdown-content,
.show-menu-control:hover .dropdown-content,
.show-menu[aria-expanded="true"] + .dropdown-content {
    display: block;
}

.dropdown-content {
    right: 0;
    left: auto;
}

.footer-widget-content a,
.footer-widget-content span {
    overflow-wrap: anywhere;
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .intro-content {
        max-width: 52%;
    }
}

.contact-icon {
    flex: 0 0 20px;
    margin-right: 10px;
    color: #1292ee;
}

.footer-social-inline a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-social-inline a:hover {
    transform: translateY(-2px);
}

.scroll-top {
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, bottom 0.25s ease;
    right: max(30px, env(safe-area-inset-right));
    bottom: max(-60px, calc(-60px + env(safe-area-inset-bottom)));
}

.scroll-top.show {
    bottom: max(92px, calc(env(safe-area-inset-bottom) + 92px));
}

body::after {
    content: "";
    display: block;
    clear: both;
    height: 6.5rem;
}

.social-dock {
    position: fixed;
    z-index: 1000;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 252, 247, 0.9);
    box-shadow: 0 12px 32px rgba(28, 25, 21, 0.16);
    backdrop-filter: blur(10px);
}

.social-dock a {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(28, 25, 21, 0.16);
    animation: social-dock-in 0.55s ease both, social-dock-bob 2.8s ease-in-out 0.7s infinite;
}

.social-dock a:nth-child(2) { animation-delay: 0.08s, 0.82s; }
.social-dock a:nth-child(3) { animation-delay: 0.16s, 0.94s; }
.social-dock a:nth-child(4) { animation-delay: 0.24s, 1.06s; }
.social-dock a:nth-child(5) { animation-delay: 0.32s, 1.18s; }

.social-dock a:hover,
.social-dock a:focus-visible {
    animation-play-state: paused;
    transform: translateY(-3px) scale(1.08);
    color: #fff;
}

.social-dock svg {
    width: 18px;
    height: 18px;
    display: block;
}

.social-dock span {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: #1c1915;
    color: #fff;
    font-family: "Be Vietnam Pro", "Segoe UI", "Malgun Gothic", sans-serif;
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-dock a:hover span,
.social-dock a:focus-visible span {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.social-dock a[data-brand="facebook"] { background: #1877f2; }
.social-dock a[data-brand="instagram"] { background: linear-gradient(135deg, #f9ce34, #ee2a7b 55%, #6228d7); }
.social-dock a[data-brand="tiktok"] { background: #111; box-shadow: -2px 0 0 #25f4ee, 2px 0 0 #fe2c55; }
.social-dock a[data-brand="youtube"] { background: #e11; }
.social-dock a[data-brand="shopee"] { background: #ee4d2d; }

.social-dock a[data-brand="shopee"]::after {
    content: "";
    position: absolute;
    inset: -3px;
    border: 2px solid #ee4d2d;
    border-radius: inherit;
    pointer-events: none;
    animation: social-dock-ping 2.2s ease-out infinite;
}

@keyframes social-dock-in {
    from { opacity: 0; transform: translateY(14px) scale(0.84); }
    to { opacity: 1; transform: none; }
}

@keyframes social-dock-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes social-dock-ping {
    0% { transform: scale(0.92); opacity: 0.75; }
    100% { transform: scale(1.35); opacity: 0; }
}

@media (max-width: 380px) {
    .social-dock {
        gap: 6px;
        padding: 6px;
        right: max(8px, env(safe-area-inset-right));
    }

    .social-dock a {
        width: 40px;
        height: 40px;
    }
}

.reveal {
    animation: reveal-up 0.7s cubic-bezier(0.645, 0.045, 0.355, 1) both;
}

@keyframes reveal-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 24px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (pointer: fine) {
    html {
        overscroll-behavior: none;
    }
}

.page-title-section.blog-detail-section {
    height: auto;
    aspect-ratio: 3 / 1;
    overflow: hidden;
    padding: 0;
}

.page-title-section.blog-detail-section img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 3 / 1;
    opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal,
    .swiper-slide-active .intro-content > * {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
