/* ==========================================================================
   THEME ASSETS: CELLPHONES STYLE HEADER & HERO SECTION
   TheGioiSo365.vn - Designed & Optimized
   ========================================================================== */

/* 1. Header Vertical Menu Opener Button (Chuẩn 3 gạch ngang CellphoneS) */
.header-vertical-menu__opener {
    background: rgba(255, 255, 255, 0.22) !important;
    border-radius: 10px !important;
    padding: 7px 14px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.25s ease !important;
    border: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
    line-height: 1 !important;
}
.header-vertical-menu__opener:hover {
    background: rgba(255, 255, 255, 0.32) !important;
    color: #ffffff !important;
}
.header-vertical-menu__opener .header-vertical-menu__icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.header-vertical-menu__opener .header-vertical-menu__icon:before {
    display: none !important;
    content: "" !important;
}
.header-vertical-menu__opener .header-vertical-menu__icon svg {
    display: block !important;
    width: 17px !important;
    height: 13px !important;
}
.header-vertical-menu__opener .header-vertical-menu__title {
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: -0.2px !important;
}
.header-vertical-menu__opener .icon-angle-down {
    display: none !important;
}

/* 2. Tổng Thể Hero Section */
.tgs-cellphones-hero-section {
    background-color: #f4f6f8;
    padding: 12px 0 16px 0;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}
.tgs-hero-main-container {
    max-width: 1370px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
}
.tgs-cellphones-hero-section .tgs-hero-main-row,
.tgs-hero-main-row {
    max-width: 1370px !important;
    width: 100% !important;
    padding: 0 15px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 12px !important;
    position: relative !important;
    box-sizing: border-box !important;
    --col-hero-left-w: 270px !important;
    --hero-gap: 12px !important;
}

/* Cấu trúc 3 Cột: Cột trái & Cột phải kích thước cân đối đều nhau 270px */
.tgs-hero-main-row > .col-hero-left,
.tgs-header-dropdown-row .col-hero-left,
.col-hero-left {
    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;
    flex: 0 0 270px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    position: static !important;
    z-index: 50 !important;
}
.tgs-hero-main-row > .col-hero-center,
.col-hero-center {
    flex: 0 0 calc(100% - 270px - 270px - 24px) !important;
    width: calc(100% - 270px - 270px - 24px) !important;
    max-width: calc(100% - 270px - 270px - 24px) !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 10 !important;
}
.tgs-hero-main-row > .col-hero-right,
.col-hero-right {
    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;
    flex: 0 0 270px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    z-index: 10 !important;
}
.tgs-hero-main-row .col-inner,
.col-hero-left > .col-inner {
    padding: 0 !important;
    margin: 0 !important;
    height: 100% !important;
    width: 100% !important;
    position: static !important;
}

/* 3. Cột 1: Menu Dọc & Flyout Mega Menu */
.tgs-vertical-menu-wrap {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(60,64,67,.08), 0 4px 12px 2px rgba(60,64,67,.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    position: static !important;
    box-sizing: border-box;
}
.tgs-vertical-menu {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    display: flex;
    flex-direction: column;
}
.tgs-menu-item {
    position: static !important;
}
.tgs-menu-item > a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #374151;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    transition: background-color 0.1s ease, color 0.1s ease;
    border-radius: 6px;
    margin: 1px 6px;
}
.tgs-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 9px;
    color: #d70018;
    flex-shrink: 0;
}
.tgs-menu-title {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tgs-menu-arrow {
    font-size: 14px;
    color: #9ca3af;
    margin-left: 4px;
    transition: color 0.1s ease;
}
.tgs-menu-item:hover > a,
.tgs-menu-item.active > a {
    background: #fff1f2;
    color: #d70018;
}
.tgs-menu-item:hover .tgs-menu-arrow {
    color: #d70018;
}

/* Flyout Mega Menu Panel (Bung sang phải chuẩn CellphoneS, che toàn bộ phần còn lại của .tgs-hero-main-row) */
.tgs-flyout-panel,
.tgs-hero-main-row .tgs-flyout-panel {
    display: none;
    position: absolute !important;
    left: calc(15px + var(--col-hero-left-w, 270px) + var(--hero-gap, 12px)) !important;
    right: 15px !important;
    top: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}
.tgs-flyout-panel::-webkit-scrollbar {
    width: 5px;
}
.tgs-flyout-panel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.tgs-flyout-panel:before {
    content: "";
    position: absolute;
    top: 0;
    left: -18px;
    width: 22px;
    height: 100%;
    background: transparent;
    pointer-events: auto;
}
.tgs-menu-item:hover > .tgs-flyout-panel,
.tgs-menu-item.is-open > .tgs-flyout-panel {
    display: block !important;
}
.tgs-flyout-inner {
    padding: 24px 32px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    box-sizing: border-box;
    min-height: 100%;
}
.tgs-flyout-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: #d70018;
    text-transform: uppercase;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #fee2e2;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tgs-flyout-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tgs-flyout-col ul li {
    margin-bottom: 7px;
}
.tgs-flyout-col ul li a {
    color: #4b5563;
    font-size: 12.5px;
    text-decoration: none;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}
.tgs-flyout-col ul li a:hover {
    color: #d70018;
    font-weight: 600;
    padding-left: 3px;
}

/* Chips / Pills dạng nút bo tròn */
.tgs-flyout-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tgs-chip {
    display: inline-block;
    padding: 4px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s ease;
}
.tgs-chip:hover {
    background: #d70018;
    color: #ffffff;
    border-color: #d70018;
}

/* Badges Hot / Mới */
.tgs-badge-hot {
    background: #d70018;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    text-transform: uppercase;
}
.tgs-tag-hot {
    background: #ef4444;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
}
.tgs-tag-new {
    background: #3b82f6;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
}

/* 4. Cột 2: Top Highlight Tabs, Slider Chính & Sub-banners */
.tgs-center-hero-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.tgs-hero-tabs-wrap {
    background: #ffffff;
    border-radius: 12px 12px 0 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: none;
    overflow-x: auto;
    scrollbar-width: none;
}
.tgs-hero-tabs-wrap::-webkit-scrollbar { display: none; }
.tgs-hero-tabs {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}
.tgs-hero-tabs li {
    flex: 1;
    padding: 8px 6px;
    text-align: center;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.tgs-hero-tabs li strong {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #4b5563;
    white-space: nowrap;
    text-transform: uppercase;
}
.tgs-hero-tabs li span {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
    margin-top: 1px;
}
.tgs-hero-tabs li:hover strong {
    color: #d70018;
}
.tgs-hero-tabs li.active {
    border-bottom-color: #d70018;
    background: #ffffff;
}
.tgs-hero-tabs li.active strong {
    color: #d70018;
}
.tgs-hero-tabs li.active span {
    color: #1f2937;
    font-weight: 600;
}

/* Slider chính cao 375px */
.tgs-hero-slider-wrap {
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(60,64,67,.08), 0 4px 12px 2px rgba(60,64,67,.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-top: none;
}
.tgs-hero-slider,
.tgs-hero-slider .flickity-viewport {
    height: 375px !important;
    min-height: 375px !important;
}
.tgs-slide-item {
    width: 100%;
    height: 375px;
}
.tgs-slide-item a {
    display: block;
    width: 100%;
    height: 100%;
}
.tgs-slide-item img {
    width: 100%;
    height: 375px;
    object-fit: cover;
    display: block;
}
.tgs-hero-slider .flickity-page-dots {
    bottom: 10px;
}
.tgs-hero-slider .flickity-page-dots .dot {
    background: #ffffff;
    opacity: 0.6;
    margin: 0 3px;
    width: 8px;
    height: 8px;
}
.tgs-hero-slider .flickity-page-dots .dot.is-selected {
    background: #d70018;
    opacity: 1;
    width: 22px;
    border-radius: 4px;
}

/* 3 Sub-banners phía dưới Slider */
.tgs-sub-banners-row {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}
.tgs-sub-banner-col {
    flex: 1 1 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tgs-sub-banner-col:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.tgs-sub-banner-col a {
    display: block;
    height: 115px;
}
.tgs-sub-banner-col img {
    width: 100%;
    height: 115px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

/* 5. Cột 3: TGS Member Box, Dịch Vụ & Mini Banner */
.tgs-right-hero-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}
.tgs-member-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px 0 rgba(60,64,67,.08), 0 4px 12px 2px rgba(60,64,67,.08);
}
.tgs-member-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 6px;
}
.tgs-member-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fee2e2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tgs-member-head-text strong {
    font-size: 11.5px;
    color: #4b5563;
    display: block;
    line-height: 1.25;
}
.tgs-member-head-text span {
    color: #d70018;
    font-weight: 800;
    font-size: 13px;
}
.tgs-member-desc {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
    margin: 5px 0 8px 0;
}
.tgs-member-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-bottom: 8px;
}
.tgs-btn-auth {
    color: #d70018;
    font-weight: 700;
    text-decoration: none;
}
.tgs-btn-auth:hover {
    text-decoration: underline;
}
.tgs-auth-sep {
    color: #9ca3af;
    font-size: 11px;
}
.tgs-member-perks {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: #374151;
    font-weight: 600;
    padding-top: 7px;
    border-top: 1px dashed #e2e8f0;
    text-decoration: none;
    transition: color 0.15s ease;
}
.tgs-member-perks:hover {
    color: #d70018;
}

/* Service Box */
.tgs-service-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 11px 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px 0 rgba(60,64,67,.08), 0 4px 12px 2px rgba(60,64,67,.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}
.tgs-svc-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.tgs-svc-title {
    background: #f8fafc;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    padding: 4px 6px;
    border-radius: 5px;
    display: block;
    border: 1px solid #e2e8f0;
}
.tgs-svc-group ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tgs-svc-group ul li a {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #4b5563;
    font-size: 11px;
    text-decoration: none;
    padding: 3px 5px;
    border-radius: 4px;
    transition: all 0.15s ease;
    line-height: 1.35;
}
.tgs-svc-dot {
    font-size: 8px;
    color: #d70018;
}
.tgs-svc-group ul li a:hover {
    background: #fff5f5;
    color: #d70018;
}

/* Flash Banner Mini */
.tgs-flash-banner {
    background: linear-gradient(135deg, #d70018 0%, #b91c1c 100%);
    border-radius: 8px;
    padding: 8px 10px;
    text-align: center;
    margin-top: auto;
}
.tgs-flash-banner a {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 800;
}
.tgs-flash-desc {
    background: #fef08a;
    color: #854d0e;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9.5px;
}


/* 8. Responsive Breakpoints */
@media (max-width: 1200px) {
    .col-hero-right {
        display: none !important;
    }
}
@media (max-width: 991px) {
    .col-hero-left {
        display: none !important;
    }
    .tgs-hero-main-row {
        flex-direction: column;
    }
    .tgs-hero-slider,
    .tgs-hero-slider .flickity-viewport {
        height: 240px !important;
        min-height: 240px !important;
    }
    .tgs-slide-item,
    .tgs-slide-item img {
        height: 240px !important;
    }
    .tgs-hero-tabs-wrap {
        display: none !important;
    }
    .tgs-sub-banners-row {
        gap: 6px;
    }
    .tgs-sub-banner-col a,
    .tgs-sub-banner-col img {
        height: 75px !important;
    }
}
@media (max-width: 576px) {
    .tgs-cellphones-hero-section {
        padding: 8px 0;
    }
    .tgs-hero-slider,
    .tgs-hero-slider .flickity-viewport {
        height: 180px !important;
        min-height: 180px !important;
    }
    .tgs-slide-item,
    .tgs-slide-item img {
        height: 180px !important;
    }
    .tgs-sub-banners-row {
        display: none !important;
    }
}

/* 9. Sticky Header & Header Dropdown Menu (Chuẩn CellphoneS) */
#header {
    z-index: 99995 !important;
}
.header-wrapper.stuck {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 99995 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}
.tgs-header-dropdown-overlay {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 99990 !important;
    pointer-events: none !important;
    display: none;
    padding-top: 8px !important;
}
.tgs-header-dropdown-overlay.is-open {
    display: block !important;
}
.tgs-header-dropdown-container {
    max-width: 1370px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    position: relative !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
}
.tgs-header-dropdown-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    position: relative !important;
    pointer-events: auto !important;
    --col-hero-left-w: 270px !important;
    --hero-gap: 12px !important;
    box-sizing: border-box !important;
}
.tgs-header-dropdown-row .col-hero-left {
    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;
    flex: 0 0 270px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    position: static !important;
}
.tgs-header-dropdown-row .tgs-vertical-menu-wrap {
    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;
    box-sizing: border-box !important;
    position: static !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}
.tgs-header-dropdown-row .tgs-flyout-panel {
    display: none;
    position: absolute !important;
    left: calc(var(--col-hero-left-w, 270px) + var(--hero-gap, 12px)) !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: 100% !important;
    min-height: 100% !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}
.tgs-menu-item.is-hover-active > .tgs-flyout-panel {
    display: block !important;
}
.tgs-menu-item.is-hover-active > a {
    background: #fff1f2 !important;
    color: #d70018 !important;
}
.tgs-menu-item.is-hover-active .tgs-menu-arrow {
    color: #d70018 !important;
}

/* Nút Header Opener Active State */
.header-vertical-menu.is-active .header-vertical-menu__opener,
#tgs-header-menu-opener.is-active,
#tgs-header-vertical-menu.is-active .header-vertical-menu__opener {
    background: rgba(255, 255, 255, 0.35) !important;
}

/* Highlight menu Cột 1 khi nhấn nút ở đỉnh trang chủ */
.tgs-highlight-menu {
    box-shadow: 0 0 0 3px #d70018, 0 8px 24px rgba(215, 0, 24, 0.25) !important;
    transition: box-shadow 0.3s ease !important;
}




