/* ========================================
   Sâm Lâm Thịnh - Mobile Responsive CSS
   Optimized for all mobile devices
   ======================================== */

/* ========================================
   TABLET LANDSCAPE (1024px and below)
   ======================================== */
@media (max-width: 1024px) {

    /* Benefits Bar */
    .benefits-pill {
        flex-wrap: wrap;
        border-radius: 20px;
    }

    .benefit-item-pill {
        flex: 1 1 50%;
        min-width: 200px;
        border-radius: 0;
        padding: 12px 10px;
    }

    .benefit-item-pill.green {
        border-radius: 20px 0 0 0;
    }

    .benefit-item-pill.gold {
        border-radius: 0 20px 0 0;
    }

    /* Story Section */
    .story-grid {
        flex-direction: column;
        gap: 25px;
    }

    .story-video,
    .story-content {
        flex: none;
        width: 100%;
    }

    /* Gift Sets Grid */
    .gifts-grid-k5 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Stats Grid */
    .stats-grid-k5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card-k5:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }
}

/* ========================================
   TABLET PORTRAIT (768px and below)
   ======================================== */
@media (max-width: 768px) {

    /* Root adjustments */
    :root {
        --section-padding: 30px;
        --gap: 15px;
    }

    .container {
        padding: 0 15px;
    }

    /* === HEADER === */
    .header-top {
        padding: 8px 0;
    }

    .banner-layout {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 5px;
    }

    .banner-left {
        flex: 0 0 55px;
    }

    .logo-circle-wrapper {
        width: 50px;
        height: 50px;
        border-width: 2px;
    }

    .banner-center {
        flex: 1;
        text-align: center;
        padding: 0 3px;
    }

    .company-sub-title {
        display: none;
    }

    .region-title {
        font-size: 11px;
        font-weight: 700;
        margin-bottom: 0;
        color: #0E4D22;
    }

    .main-brand-title {
        font-size: 20px;
        letter-spacing: 0.3px;
        line-height: 1.1;
        /* Giữ gradient vàng như desktop */
        background: linear-gradient(180deg, #FFEB3B 0%, #FBC02D 40%, #F57F17 60%, #E65100 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        -webkit-text-stroke: 0.3px #a67c00;
        filter: drop-shadow(1px 1px 0px rgba(109, 76, 8, 0.4));
        padding: 3px 0;
        margin: 0;
    }

    .slogan-script {
        font-size: 12px;
        margin-top: 0;
        color: #C62828;
        font-weight: 700;
    }

    .banner-right {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
    }

    .banner-kol {
        height: 45px;
        width: auto;
    }

    /* Hotline button màu đỏ như desktop */
    .banner-hotline-btn {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 4px 10px;
        font-size: 10px;
        background: linear-gradient(180deg, #D32F2F 0%, #B71C1C 100%);
        color: #FFFFFF;
        border-radius: 15px;
        font-weight: 700;
        white-space: nowrap;
        border: 1px solid #FFCDD2;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        position: static;
        left: auto;
        top: auto;
    }

    .banner-hotline-btn i {
        font-size: 10px;
        color: #FFEB3B;
        animation: phone-shake 1.5s infinite;
    }

    /* === NAVIGATION === */
    .nav-bar {
        padding: 10px 0;
        background: linear-gradient(90deg, #0D3D14 0%, #1B5E20 100%);
    }

    .nav-content {
        justify-content: space-between;
        align-items: center;
    }

    .mobile-menu-btn {
        display: flex;
        order: 1;
        padding: 10px;
        font-size: 24px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .mobile-menu-btn:active {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(0.95);
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: linear-gradient(180deg, #0D3D14 0%, #1B5E20 50%, #2E7D32 100%);
        flex-direction: column;
        padding: 20px 0;
        z-index: 1001;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.active {
        display: flex;
        transform: translateX(0);
    }

    /* Menu overlay backdrop */
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 100%;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .nav-menu.active::before {
        opacity: 1;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-menu li:first-child {
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        margin-top: 20px;
    }

    .nav-menu li a {
        padding: 16px 20px;
        font-size: 15px;
        display: flex;
        align-items: center;
        width: 100%;
        color: #fff;
        text-decoration: none;
        transition: background 0.2s ease;
    }

    .nav-menu li a:active {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-menu li a i {
        margin-right: 15px;
        width: 24px;
        text-align: center;
        font-size: 18px;
        color: #d4af37;
    }

    .header-actions {
        order: 2;
    }

    .btn-login {
        padding: 8px 16px;
        font-size: 12px;
        border-radius: 20px;
        font-weight: 600;
        background: linear-gradient(135deg, #d4af37, #b8941e);
        color: #1b4d3e;
        box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    }

    /* === BENEFITS BAR - Compact 2-column grid === */
    .benefits-bar-pill {
        padding: 10px 0;
    }

    .benefits-pill {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        gap: 0;
    }

    .benefit-item-pill {
        flex: none;
        width: 100%;
        padding: 10px 12px;
        border-radius: 0 !important;
        justify-content: flex-start;
        gap: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* 5 items: 2x2 + 1 spanning full width */
    .benefit-item-pill:nth-child(1) {
        border-radius: 12px 0 0 0 !important;
    }

    .benefit-item-pill:nth-child(2) {
        border-radius: 0 12px 0 0 !important;
        border-right: none;
    }

    .benefit-item-pill:nth-child(3) {
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .benefit-item-pill:nth-child(4) {
        border-right: none;
    }

    .benefit-item-pill:nth-child(5) {
        grid-column: span 2;
        border-radius: 0 0 12px 12px !important;
        border-bottom: none;
        justify-content: center;
    }

    .benefit-icon-pill {
        width: 32px;
        height: 32px;
        font-size: 14px;
        flex-shrink: 0;
    }

    .benefit-text-pill {
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .benefit-title-pill {
        font-size: 11px;
        font-weight: 700;
        line-height: 1.2;
    }

    .benefit-subtitle-pill {
        font-size: 9px;
        opacity: 0.9;
        line-height: 1.2;
    }

    /* === STORY SECTION === */
    .our-story {
        padding: 25px 0;
    }

    .story-grid {
        flex-direction: column;
        gap: 20px;
    }

    .story-video,
    .story-content {
        width: 100%;
    }

    .video-wrapper-story {
        border-radius: 10px;
    }

    .story-content {
        padding: 15px;
        border-radius: 10px;
    }

    .story-header {
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .story-main-title {
        font-size: 16px;
        line-height: 1.3;
    }

    .story-main-title i {
        font-size: 0.7em !important;
    }

    .story-sub-title {
        font-size: 12px;
    }

    .story-infographic {
        gap: 8px;
    }

    .info-card {
        padding: 10px 0;
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
    }

    .info-icon-wrapper {
        min-width: 32px;
        height: 32px;
        font-size: 14px;
        margin-right: 10px;
    }

    .info-text-wrapper h4 {
        font-size: 13px;
        margin-bottom: 3px;
    }

    .info-text-wrapper p {
        font-size: 11px;
        line-height: 1.4;
    }

    /* === GIFT SETS SECTION === */
    .gift-sets-k5 {
        padding: 25px 0;
    }

    .gift-sets-k5 .section-title-elegant.white {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .section-title-elegant::after {
        width: 60px;
        height: 2px;
    }

    /* Gift Sets - Horizontal Scroll như carousel */
    .gifts-grid-k5 {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 15px;
        padding: 10px 5px;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .gifts-grid-k5::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .gift-card-k5 {
        flex: 0 0 75%;
        max-width: 75%;
        scroll-snap-align: center;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .gift-image-k5 {
        height: 200px;
    }

    .gift-image-k5 img {
        object-fit: cover;
        object-position: center top;
    }

    .gift-image-k5 .product-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 60%);
    }

    .gift-image-k5 .btn-view {
        padding: 10px 20px;
        font-size: 12px;
        border-radius: 25px;
    }

    .gift-info-k5 {
        padding: 15px 12px;
        min-height: auto;
    }

    .gift-info-k5 h3 {
        font-size: 14px;
        font-weight: 700;
        line-height: 1.3;
        text-align: center;
    }

    .gift-badge {
        width: 24px;
        height: 24px;
        font-size: 10px;
        top: 8px;
        right: 8px;
    }

    /* === PRODUCTS SECTION === */
    .products-section {
        padding: 25px 0;
    }

    .section-title-elegant {
        font-size: 18px;
        margin-bottom: 18px;
        padding: 0 10px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-card {
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        overflow: hidden;
    }

    .product-image {
        position: relative;
    }

    .product-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    }

    .product-overlay .btn-view {
        padding: 8px 16px;
        font-size: 11px;
        border-radius: 20px;
        background: #d4af37;
        color: #1b4d3e;
        font-weight: 600;
    }

    .product-info {
        padding: 10px 8px;
    }

    .product-info h3 {
        font-size: 12px;
        margin-bottom: 4px;
        line-height: 1.3;
        min-height: 32px;
    }

    .product-desc {
        font-size: 10px;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: #666;
        line-height: 1.4;
    }

    .product-price {
        font-size: 14px;
        font-weight: 700;
        color: #c41e3a;
    }

    /* === STATS SECTION === */
    .stats-section-k5 {
        padding: 30px 0;
    }

    .stats-section-k5 .section-title-elegant {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .stats-intro {
        font-size: 13px !important;
        margin-bottom: 20px !important;
        padding: 0 15px;
        line-height: 1.5;
    }

    /* Stats - Xếp dọc 1 cột, uniform cards */
    .stats-grid-k5 {
        display: flex;
        flex-direction: column;
        gap: 12px;
        max-width: 100%;
        margin: 0 auto;
        padding: 0 10px;
    }

    .stat-card-k5 {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 15px;
        padding: 16px 18px;
        border-radius: 12px;
        min-height: auto;
        text-align: left;
        width: 100% !important;
        max-width: 100% !important;
    }

    .stat-card-k5:last-child {
        grid-column: auto;
        max-width: 100% !important;
        width: 100% !important;
    }

    .stat-icon-k5 {
        width: 50px;
        height: 50px;
        font-size: 22px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .stat-card-k5 .stat-text-wrapper {
        display: flex;
        flex-direction: column;
    }

    .stat-label-k5 {
        font-size: 11px;
        margin-bottom: 2px;
        line-height: 1.2;
    }

    .stat-number-k5 {
        font-size: 26px;
        line-height: 1.1;
        font-weight: 800;
    }

    .stat-unit-k5 {
        font-size: 12px;
        font-weight: 600;
    }

    /* === REVIEWS SECTION - Compact horizontal layout === */
    .reviews-section {
        padding: 20px 0;
    }

    .reviews-slider {
        padding: 10px 0;
    }

    .reviews-track {
        flex-direction: column;
        gap: 12px;
    }

    .review-card {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        min-width: 100%;
        width: 100%;
        padding: 15px;
        border-radius: 12px;
    }

    .review-avatar {
        width: 45px;
        height: 45px;
        font-size: 20px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .review-main {
        flex: 1;
    }

    .review-content p {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .review-author h4 {
        font-size: 13px;
        margin-bottom: 2px;
    }

    .review-author span {
        font-size: 11px;
    }

    .review-nav {
        display: none !important;
    }

    /* === TESTIMONIALS SECTION - Compact horizontal layout === */
    .testimonials-section {
        padding: 20px 0;
    }

    .testimonials-section .section-title {
        font-size: 20px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .testimonial-card {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        padding: 15px;
        border-radius: 12px;
    }

    .testimonial-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .testimonial-main {
        flex: 1;
    }

    .testimonial-content p {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 6px;
    }

    .testimonial-author {
        font-size: 12px;
    }

    .testimonial-nav {
        display: none;
    }

    /* === FOOTER === */
    .footer {
        padding-top: 25px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Căn giữa tất cả footer column */
    .footer-col {
        text-align: center !important;
    }

    .footer-brand {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        margin-bottom: 15px;
        align-items: center;
    }

    .footer-brand-logo {
        width: 70px;
        margin: 0 auto;
    }

    .footer-brand-name {
        font-size: 14px;
        text-align: center;
    }

    .footer-contact {
        text-align: center;
    }

    .footer-contact li {
        font-size: 13px;
        margin-bottom: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }

    .footer-col h4,
    .footer-col h3 {
        font-size: 16px;
        margin-bottom: 15px;
        text-align: center;
    }

    .footer-links {
        text-align: center;
    }

    .footer-links li {
        margin-bottom: 10px;
    }

    .footer-links li a {
        font-size: 14px;
    }

    .social-links {
        justify-content: center !important;
        gap: 12px;
        margin-bottom: 15px;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .disclaimer {
        font-size: 11px;
        text-align: center;
    }

    .footer-bottom {
        padding: 15px 0 90px;
        text-align: center;
    }

    .footer-bottom p {
        font-size: 12px;
    }

    /* === SOCIAL SIDEBAR (Bottom) === */
    .social-sidebar {
        display: flex !important;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto !important;
        transform: none !important;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 12px 15px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 1));
        box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.12);
        z-index: 998;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .social-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        border-radius: 12px;
        font-size: 20px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
        transition: transform 0.2s ease;
    }

    .social-btn .zalo-text {
        font-size: 14px;
        font-weight: 700;
    }

    .social-btn:active {
        transform: scale(0.95);
    }

    /* === MODALS === */
    .login-modal-content {
        margin: 10px;
        max-height: 95vh;
        width: calc(100% - 20px);
    }

    .login-body {
        padding: 25px 20px;
    }

    .login-title {
        font-size: 22px;
    }

    .gift-modal-content {
        margin: 10px auto;
        width: calc(100% - 20px);
        max-height: 95vh;
    }

    .gift-modal-body {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .gift-modal-image-col {
        min-height: 250px;
        padding: 15px;
    }

    #giftModalTitle {
        font-size: 22px;
    }

    .gift-modal-actions {
        flex-direction: column;
        gap: 12px;
    }

    .btn-contact-buy {
        width: 100%;
        text-align: center;
    }

    /* === MARQUEE === */
    .marquee-container {
        height: 38px;
        font-size: 13px;
        padding: 0 10px;
        display: flex;
        align-items: center;
    }

    .marquee-content {
        line-height: 38px;
    }

    /* === Back to Top === */
    .back-to-top {
        bottom: 80px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    /* === POLICY TOOLTIP - Mobile Fix (Modal Style) === */
    .policy-tooltip {
        /* Chuyển sang modal style thay vì tooltip */
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        bottom: auto !important;
        width: calc(100vw - 30px) !important;
        max-width: 360px !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        font-size: 12px;
        z-index: 10000 !important;
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4) !important;
        border-radius: 16px !important;
    }

    /* Ẩn mũi tên tooltip trên mobile */
    .policy-tooltip::after {
        display: none !important;
    }

    /* Thêm lớp overlay mờ khi tooltip hiển thị */
    .policy-has-popup:hover::before,
    .policy-has-popup:focus-within::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
    }

    .policy-header-title {
        font-size: 16px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .policy-tier-item {
        padding: 10px;
        margin-bottom: 10px;
    }

    .tier-icon-box {
        width: 32px;
        height: 32px;
        font-size: 13px;
        margin-right: 10px;
    }

    .tier-content h4 {
        font-size: 13px;
        margin-bottom: 3px;
    }

    .tier-content p {
        font-size: 11px;
        line-height: 1.4;
    }

    /* === FOOTER FIX === */
    .footer {
        padding-bottom: 85px !important;
        /* Để tránh bị social bar che */
    }

    .footer-bottom {
        padding-bottom: 20px;
        text-align: center;
    }

    .footer-bottom p {
        font-size: 11px;
        line-height: 1.4;
    }

    /* Footer Social Links */
    .footer-col .social-links {
        justify-content: center !important;
        gap: 12px;
    }

    .footer-col .social-link {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    /* Footer Brand */
    .footer-brand {
        text-align: center;
    }

    .footer-brand-logo {
        margin: 0 auto 10px;
    }

    .footer-brand-name {
        font-size: 14px;
        text-align: center;
    }

    /* Footer Contact */
    .footer-contact li {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .footer-col h3 {
        font-size: 15px;
        margin-bottom: 12px;
    }

    /* Disclaimer */
    .disclaimer {
        font-size: 10px;
        line-height: 1.5;
        text-align: center;
        margin-top: 15px;
    }
}

/* ========================================
   MOBILE SMALL (576px and below)
   ======================================== */
@media (max-width: 576px) {

    /* Root */
    :root {
        --section-padding: 20px;
    }

    .container {
        padding: 0 12px;
    }

    /* Header even smaller */
    .banner-left {
        flex: 0 0 50px;
    }

    .logo-circle-wrapper {
        width: 45px;
        height: 45px;
    }

    .main-brand-title {
        font-size: 16px;
    }

    .region-title {
        font-size: 9px;
    }

    .slogan-script {
        font-size: 9px;
    }

    .banner-right {
        flex: 0 0 55px;
    }

    .banner-kol {
        height: 55px;
    }

    /* Benefits Bar - Stacked */
    .benefits-pill {
        border-radius: 12px;
    }

    .benefit-item-pill {
        padding: 10px 12px;
    }

    .benefit-icon-pill {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .benefit-title-pill {
        font-size: 11px;
    }

    .benefit-subtitle-pill {
        font-size: 9px;
    }

    /* Story Section */
    .story-main-title {
        font-size: 14px;
    }

    .story-sub-title {
        font-size: 11px;
    }

    .info-icon-wrapper {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .info-text-wrapper h4 {
        font-size: 12px;
    }

    .info-text-wrapper p {
        font-size: 10px;
    }

    /* Gift Sets - 1 column, smaller on tiny screens */
    .gifts-grid-k5 {
        gap: 12px;
        max-width: 100%;
    }

    .gift-image-k5 {
        height: 180px;
    }

    .gift-info-k5 {
        padding: 12px 10px;
    }

    .gift-info-k5 h3 {
        font-size: 14px;
    }

    .gift-badge {
        width: 18px;
        height: 18px;
        font-size: 8px;
        top: 5px;
        right: 5px;
    }

    /* Products - Still 2 columns */
    .products-grid {
        gap: 10px;
    }

    .product-info {
        padding: 10px 8px;
    }

    .product-info h3 {
        font-size: 12px;
    }

    .product-desc {
        font-size: 10px;
    }

    .product-price {
        font-size: 12px;
    }

    /* Stats - 1 column stacked */
    .stats-grid-k5 {
        gap: 12px;
        max-width: 100%;
    }

    .stat-card-k5 {
        padding: 15px 12px;
    }

    .stat-icon-k5 {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin-bottom: 8px;
    }

    .stat-label-k5 {
        font-size: 10px;
    }

    .stat-number-k5 {
        font-size: 18px;
    }

    .stat-unit-k5 {
        font-size: 9px;
    }

    /* Reviews */
    .review-card {
        padding: 15px 12px;
    }

    .review-avatar {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-bottom: 12px;
    }

    .review-content p {
        font-size: 12px;
    }

    .review-author h4 {
        font-size: 14px;
    }

    /* Section Titles */
    .section-title-elegant {
        font-size: 18px;
        padding-bottom: 10px;
    }

    .section-title-elegant::after {
        width: 50px;
    }

    /* Footer compact */
    .footer-brand-logo {
        width: 50px;
    }

    .footer-brand-name {
        font-size: 12px;
    }

    .footer-contact li {
        font-size: 12px;
    }

    .footer-col h4 {
        font-size: 14px;
    }

    .footer-links li a {
        font-size: 12px;
    }

    .social-link {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    /* Social bar bottom */
    .social-sidebar {
        padding: 8px 10px;
    }

    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    /* Modals */
    .login-body {
        padding: 20px 15px;
    }

    .login-title {
        font-size: 20px;
    }

    #giftModalTitle {
        font-size: 20px;
    }

    .gift-modal-image-col {
        min-height: 200px;
    }

    .contact-price-label {
        font-size: 20px;
    }
}

/* ========================================
   EXTRA SMALL PHONES (400px and below)
   ======================================== */
@media (max-width: 400px) {
    .container {
        padding: 0 10px;
    }

    /* Header super compact */
    .banner-left {
        flex: 0 0 40px;
    }

    .logo-circle-wrapper {
        width: 38px;
        height: 38px;
    }

    .main-brand-title {
        font-size: 14px;
    }

    .region-title,
    .slogan-script {
        font-size: 8px;
    }

    .banner-right {
        flex: 0 0 45px;
    }

    .banner-kol {
        height: 45px;
    }

    /* Benefits even smaller */
    .benefit-item-pill {
        padding: 8px 10px;
    }

    .benefit-icon-pill {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    .benefit-title-pill {
        font-size: 10px;
    }

    .benefit-subtitle-pill {
        font-size: 8px;
    }

    /* Story */
    .story-main-title {
        font-size: 13px;
    }

    .story-sub-title {
        font-size: 10px;
    }

    /* Gift sets */
    .gift-image-k5 {
        height: 80px;
    }

    .gift-info-k5 h3 {
        font-size: 9px;
    }

    /* Products */
    .product-info h3 {
        font-size: 11px;
    }

    .product-desc {
        font-size: 9px;
    }

    .product-price {
        font-size: 11px;
    }

    /* Stats */
    .stat-icon-k5 {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .stat-label-k5 {
        font-size: 7px;
    }

    .stat-number-k5 {
        font-size: 16px;
    }

    .stat-unit-k5 {
        font-size: 8px;
    }

    /* Section titles */
    .section-title-elegant {
        font-size: 16px;
    }

    .gift-sets-k5 .section-title-elegant.white {
        font-size: 16px;
    }

    /* Reviews */
    .review-avatar {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .review-content p {
        font-size: 11px;
    }

    .review-author h4 {
        font-size: 13px;
    }
}

/* ========================================
   LANDSCAPE MODE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) and (orientation: landscape) {

    /* Story section side by side in landscape */
    .story-grid {
        flex-direction: row;
        gap: 15px;
    }

    .story-video,
    .story-content {
        flex: 1;
    }

    /* Gift sets - 4 columns in landscape */
    .gifts-grid-k5 {
        grid-template-columns: repeat(4, 1fr);
    }

    .gift-image-k5 {
        height: 100px;
    }

    /* Stats - 3 columns as normal */
    .stats-grid-k5 {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Reviews horizontal scroll */
    .reviews-track {
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .review-card {
        min-width: 80%;
        scroll-snap-align: start;
    }
}

/* ========================================
   TOUCH DEVICE OPTIMIZATIONS
   ======================================== */
@media (hover: none) and (pointer: coarse) {

    /* Remove hover effects on touch devices */
    .product-card:hover {
        transform: none;
    }

    .gift-card-k5:hover {
        transform: none;
    }

    .stat-card-k5:hover {
        transform: none;
    }

    /* Show overlay always on touch */
    .product-overlay {
        opacity: 0;
    }

    .gift-image-k5 .product-overlay {
        opacity: 0;
    }

    /* Larger touch targets */
    .btn-view,
    .btn-gift,
    .btn-login {
        min-height: 44px;
        min-width: 44px;
    }

    /* Better tap feedback */
    .social-btn:active,
    .btn-login:active,
    .btn-view:active {
        transform: scale(0.95);
    }
}

/* ========================================
   FIX SPECIFIC ISSUES FROM SCREENSHOTS
   ======================================== */

/* Fix: Benefits bar on mobile not wrapping properly */
@media (max-width: 768px) {
    .benefits-bar-pill .container {
        padding: 0 10px;
    }

    .benefits-pill {
        margin: 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
}

/* Fix: Story section layout broken */
@media (max-width: 768px) {
    .story-content {
        border: none;
        box-shadow: none;
        background: #fafafa;
    }

    .story-header {
        border-bottom-color: #eee;
    }
}

/* Fix: Gift card images stretching */
@media (max-width: 768px) {
    .gift-image-k5 {
        background: #f0f0f0;
    }

    .gift-image-k5 img {
        object-fit: cover;
        object-position: center top;
    }
}

/* Fix: Footer overlapping with social bar */
@media (max-width: 768px) {
    .footer-bottom {
        padding-bottom: 80px;
    }

    .certification {
        margin-top: 15px;
        padding-top: 10px;
    }
}

/* Fix: Prevent horizontal scroll */
html,
body {
    overflow-x: hidden;
}

@media (max-width: 768px) {

    section,
    .container,
    .benefits-pill,
    .story-grid,
    .gifts-grid-k5,
    .products-grid,
    .stats-grid-k5,
    .reviews-track,
    .footer-grid {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* ========================================
   SMOOTH SCROLL & ANIMATIONS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   PRODUCTS PAGE (CUA HANG) RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
    .products-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100% !important;
        margin-bottom: 20px;
    }

    .products-content {
        width: 100% !important;
    }

    .products-grid.three-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .products-page-section {
        padding: 20px 0;
    }

    .sidebar-widget {
        padding: 15px;
    }

    .widget-title {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .category-list li a {
        padding: 10px 0;
        font-size: 13px;
    }

    .products-grid.three-col {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .page-link {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .products-grid.three-col {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .category-list li a {
        font-size: 12px;
    }
}

/* ========================================
   PRODUCT MODAL RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .product-modal .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        max-height: 95vh;
        border-radius: 12px;
    }

    .product-modal .modal-body {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .product-modal .modal-image {
        width: 100%;
        max-height: 300px;
    }

    .product-modal .modal-image img {
        max-height: 300px;
        object-fit: contain;
    }

    .product-modal .modal-info {
        width: 100%;
        padding: 0;
    }

    .product-modal .modal-product-title {
        font-size: 20px;
    }

    .product-modal .modal-product-desc {
        font-size: 13px;
    }

    .product-modal .modal-product-price {
        font-size: 22px;
    }

    .product-modal .modal-gallery {
        justify-content: center;
    }

    .product-modal .modal-gallery img {
        width: 50px !important;
        height: 50px !important;
    }

    .product-modal .modal-actions {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .product-modal .modal-actions .quantity-selector {
        justify-content: center;
    }

    .product-modal .modal-actions .btn-primary {
        text-align: center;
        width: 100%;
    }

    .close-modal {
        font-size: 32px;
        right: 15px;
        top: 10px;
    }
}

/* ========================================
   CONTACT PAGE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .contact-container {
        padding: 25px 0 100px;
    }

    .contact-info-item {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .contact-icon {
        width: 25px;
        font-size: 1rem;
    }

    .contact-label {
        font-size: 13px;
    }

    .company-title {
        font-size: 1.1rem;
        white-space: normal;
        text-align: center;
    }

    .map-container {
        min-height: 180px;
    }

    .map-container iframe {
        min-height: 180px;
    }
}

/* ========================================
   PAGE CONTENT (GENERIC)
   ======================================== */
@media (max-width: 768px) {
    .page-content {
        padding: 20px 0 100px;
    }

    .page-header {
        margin-bottom: 20px;
    }

    .page-title {
        font-size: 24px;
    }

    .content-area {
        padding: 15px;
    }
}

/* ========================================
   PRINT STYLES (optional)
   ======================================== */
@media print {

    .social-sidebar,
    .back-to-top,
    .mobile-menu-btn,
    .btn-login {
        display: none !important;
    }
}