/* =========================================================
   1. RESET CSS
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #fff;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
a {
    color: inherit;
    text-decoration: none;
}
ul,
ol {
    list-style: none;
}
button,
input,
textarea,
select {
    font-family: inherit;
}
button {
    cursor: pointer;
}
/* =========================================================
   2. BIẾN MÀU SẮC
========================================================= */
:root {
    --primary: #008575;;
    --primary-dark: #b51218;
    --primary-logo: #003399;
    --secondary: #1f2937;
    --text: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --black: #000000;
    --border: #e5e5e5;
    --background: #f5f6f8;
    --success: #137949;
    --warning: #f59e0b;
    --container: 1200px;
    --radius-small: 4px;
    --radius: 8px;
    --radius-large: 12px;
    --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.10);
    --camera-red: #d70018;
    --camera-red-light: #fff5f5;
    --camera-border: #e5e5e5;
    --camera-text: #333;
    --camera-text-light: #555;
    --camera-list-width: 260px;
    --camera-mega-gap: 3px;
    --camera-menu-radius: 6px;
    --camera-menu-shadow:
        0 8px 25px rgba(0, 0, 0, 0.12);
}
main{
    padding-top: 137px ;
}
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}
/* =========================================================
   4. HEADER
========================================================= */

.header {
    position:sticky;
    top:0;
    z-index:1000;
}


/* =========================================================
   5. HEADER TOP
========================================================= */

.header-top {
    width: 100%;
    height: 55px;
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000 !important;
}

.header-top-items{
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-top-items a {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.header-top-items img {
    width: auto;
    max-width: 100%;
    max-height: 45px;
    object-fit: contain;
    transition: transform 0.25s ease;
}
.header-top-items a:hover img {
    transform: translateY(-1px);
}
.header-top-prev,
.header-top-next {
    display: none;
    position: absolute;
    top: 12%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 102, 0, 0.5);
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}
.header-top-prev {
    left: 0;
}
.header-top-next {
    right: 0;
}
.header-top-prev:hover,
.header-top-next:hover {
    background: #006600;
    transform: translateY(-50%) scale(1.05);
}
/* =========================================================
   6. HEADER MAIN
========================================================= */
.header-main {
    width: 100%;
    height: 82px;
    background: var(--primary);
    color: #ffffff;
    z-index: 1000 !important;
}
.header-main .container {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}
/* =========================================================
   7. LOGO
========================================================= */
.logo {
    width: 210px;
    min-width: 210px;
    height: 100%;
    display: flex;
    align-items: center;
}
.logo a {
    width: 100%;
    display: flex;
    align-items: center;
}
.logo img {
    width: 200px;
    max-height: 68px;
    object-fit: contain;
}
/* =========================================================
   8. DANH MỤC
========================================================= */

.header-category {
    width: 120px;
    min-width: 120px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.25s ease,
        transform 0.25s ease;
    position: relative;
    z-index: 100001;
    user-select: none;
}
.header-category:hover {
    background: rgba(255, 255, 255, 0.24);

    transform: translateY(-1px);
}


/* =========================================================
   9. ICON DANH MỤC
========================================================= */

.header-category-icon {
    width: 21px;
    height: 16px;
    position: relative;
    border-top: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}
.header-category-icon::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 5px;
    height: 2px;
    background: #ffffff;
}
/* =========================================================
   10. Ô TÌM KIẾM
========================================================= */

.header-search-box {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #ffffff;
    border: 2px solid transparent;
    border-radius: 8px;
    flex: 1;
    min-width: 200px;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.header-search-box form:focus-within {
    border-color: #ffb7b9;

    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.12);
}

.header-search-box input {
    flex: 1;
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 0 18px;
    border: none;
    outline: none;
    background: #ffffff;
    color: #333333;
    font-size: 15px;
}
.header-search-box input::placeholder {
    color: #999999;
}
.header-search-box button {
    width: 70px;
    min-width: 70px;
    height: 100%;
    border: none;
    background: #f1f1f1;
    color: #333333;
    font-size: 14px;
    font-weight: 600;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}
.header-search-box button:hover {
    background: #e5e5e5;

    color: var(--primary);
}
/* =========================================================
   11. HEADER CONTACT
========================================================= */
.header-contact {
    position: relative;
    width: 110px;
    min-width: 110px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.25s ease,
        transform 0.25s ease;
    z-index: 1001;
}
.header-contact:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}
.header-contact-title {
    display: flex;
    align-items: center;
    justify-content: center;

    white-space: nowrap;
}
.header-contact-title::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 8px;
    margin-top: -4px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg);
    transition:
        transform 0.25s ease,
        margin-top 0.25s ease;
}
.header-contact:hover .header-contact-title::after {
    transform: rotate(225deg);

    margin-top: 4px;
}
.header-contact-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    padding: 5px 0;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.20);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease;
    
}
.header-contact-dropdown::before {
    content: "";
    position: absolute;
    top: -9px;
    right: 0;
    width: 100%;
    height: 10px;
    background: transparent;
    z-index: 1001;
}
.header-contact:hover .header-contact-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.header-contact-item {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
}
.header-contact-item:last-child {
    border-bottom: none;
}
.header-contact-item a {
    display: block;
    padding: 13px 18px 4px;
    color: #333333;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}
.header-contact-item a:hover {
    color: var(--primary);
    background: #fff5f5;
}
.header-contact-item span {
    display: block;
    padding: 0 18px 13px;
    color: #777777;
    font-size: 12px;
    line-height: 1.4;
}
.header-contact-item {
    transition: background 0.2s ease;
}
.header-contact-item:hover {
    background: #fffafa;
}
/*========================================================
    21. MENU
========================================================*/
.header{position:relative}
.header-main .header-top{position:relative;z-index:999!important;}
.camera-category-overlay{position:fixed;margin-top: 137px;top:0;left:0;width:100%;height:100vh;background:rgba(39, 35, 35, 0.45);z-index:998;display:none}
.camera-category-menu{position:absolute;top:100%;left:50%;transform:translateX(-50%);width:100%;max-height:650px;z-index:1000;display:none;background:#fff;border-radius:0 0 8px 8px;box-shadow:0 8px 30px rgba(0,0,0,.18);overflow:hidden}
.camera-category-menu.is-open{display:flex}
.camera-category-list{width:25%;flex:0 0 25%;background:#fff;border-right:1px solid #e5e5e5;padding:8px 0;overflow-y:auto;max-height:650px}
.camera-category-list>a{display:block;text-decoration:none;color:inherit}
.camera-category-item{width:100%;min-height:58px;display:flex;align-items:center;justify-content:space-between;padding:10px 18px;cursor:pointer;background:#fff;transition:background-color .2s ease,color .2s ease;box-sizing:border-box}
.camera-category-item-left{min-width:0;display:flex;align-items:center;gap:12px}
.camera-category-item-left img{width:34px;height:34px;object-fit:contain;flex:0 0 34px}
.camera-category-item-left span{font-size:15px;font-weight:500;line-height:1.35;color:#333}
.camera-category-arrow{flex:0 0 auto;margin-left:10px;font-size:25px;line-height:1;color:#888;transition:transform .2s ease,color .2s ease}
.camera-category-item:hover,.camera-category-item.active{background:#f5f5f5}
.camera-category-item:hover .camera-category-item-left span,.camera-category-item.active .camera-category-item-left span{color:#d60000}
.camera-category-item:hover .camera-category-arrow,.camera-category-item.active .camera-category-arrow{color:#d60000;transform:translateX(3px)}
.camera-mega-menu{width:75%;flex:0 0 75%;background:#fff;max-height:650px;overflow-y:auto;overflow-x:hidden}
.camera-mega-content{width:100%;min-height:100%;padding:25px 28px;box-sizing:border-box}
.camera-mega-panel{width:100%;display:none;grid-template-columns:repeat(5,minmax(0,1fr));column-gap:25px;row-gap:30px}
.camera-mega-panel.active{display:grid}
.camera-mega-column{min-width:0}
.camera-mega-column-title{display:block;margin-bottom:12px;padding-bottom:8px;border-bottom:2px solid #d60000;font-size:15px;font-weight:700;line-height:1.35;color:#222}
.camera-mega-column a{display:block;padding:5px 0;color:#444;font-size:14px;line-height:1.4;text-decoration:none;transition:color .2s ease,padding-left .2s ease}
.camera-mega-column a:hover{color:#d60000;padding-left:5px}
.camera-category-list::-webkit-scrollbar,.camera-mega-menu::-webkit-scrollbar{width:6px}
.camera-category-list::-webkit-scrollbar-track,.camera-mega-menu::-webkit-scrollbar-track{background:#f5f5f5}
.camera-category-list::-webkit-scrollbar-thumb,.camera-mega-menu::-webkit-scrollbar-thumb{background:#ccc;border-radius:10px}
.camera-category-list::-webkit-scrollbar-thumb:hover,.camera-mega-menu::-webkit-scrollbar-thumb:hover{background:#aaa}
.camera-category-close {display: none;}
@media (max-width: 1199px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    .header-main .container {
        gap: 8px;
    }
    .logo {
        width: 185px;
        min-width: 185px;
    }
    .logo img {
        width: 175px;
    }
    .header-category {
        width: 105px;
        min-width: 105px;

        font-size: 14px;
    }
    .header-search-box {
        min-width: 180px;
    }
    .header-contact {
        width: 100px;
        min-width: 100px;

        font-size: 14px;
    }
    /*Menu */
    .camera-category-menu{width:calc(100% - 30px);max-height:600px}
    .camera-category-list{width:32%;flex-basis:32%;max-height:600px}
    .camera-mega-menu{width:68%;flex-basis:68%;max-height:600px}
    .camera-category-item{padding:9px 14px}
    .camera-category-item-left{gap:9px}
    .camera-category-item-left img{width:30px;height:30px;flex-basis:30px}
    .camera-category-item-left span{font-size:14px}
    .camera-mega-content{padding:22px 20px}
    .camera-mega-panel{grid-template-columns:repeat(3,minmax(0,1fr));column-gap:20px;row-gap:25px}
    .camera-mega-column-title{font-size:14px}
    .camera-mega-column a{font-size:13px}
}
/* =========================================================
   23. TABLET NGANG
   768px - 991px
========================================================= */
@media (max-width: 991px) {
    .header-top {
        height: 48px;
    }
    .header-top-items {
        gap: 10px;
    }
    .header-top img {
        max-height: 38px;
    }
    .header-main {
        height: 75px;
    }
    .header-main .container {
        gap: 6px;
    }
    .logo {
        width: 155px;
        min-width: 155px;
    }
    .logo img {
        width: 150px;
        max-height: 55px;
    }
    .header-category {
        width: 90px;
        min-width: 90px;
        height: 44px;
        font-size: 13px;
        gap: 5px;
    }
    .header-category-icon {
        width: 18px;
    }
    .header-search-box {
        min-width: 150px;
    }
    .header-search-box form {
        height: 44px;
    }
    .header-search-box input {
        padding: 0 12px;
        font-size: 14px;
    }
    .header-search-box button {
        width: 60px;
        min-width: 60px;
    }
    .header-contact {
        width: 90px;
        min-width: 90px;
        height: 44px;
        font-size: 13px;
    }
    .header-contact-dropdown {
        width: 300px;
    }
    /*Menu*/
    .camera-category-menu{width:calc(100% - 20px);max-height:550px}
    .camera-category-list{width:35%;flex-basis:35%;max-height:550px}
    .camera-mega-menu{width:65%;flex-basis:65%;max-height:550px}
    .camera-category-item{min-height:52px;padding:8px 11px}
    .camera-category-item-left{gap:8px}
    .camera-category-item-left img{width:27px;height:27px;flex-basis:27px}
    .camera-category-item-left span{font-size:13px}
    .camera-category-arrow{font-size:21px}
    .camera-mega-content{padding:18px 15px}
    .camera-mega-panel{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:18px;row-gap:22px}
    .camera-mega-column-title{font-size:13px}
    .camera-mega-column a{font-size:12px;padding:4px 0}
}
/* =========================================================
   24. TABLET DỌC
   576px - 767px
========================================================= */
@media (max-width: 767px) {
    main{
        padding-top: 160px ;
    }
    .header-top {
        height: 40px;
    }
    .header-main {
        height: auto;
        min-height: 120px;
        padding: 8px 0;
    }
    .header-main .container {
        height: auto;

        display: flex;
        flex-wrap: wrap;

        gap: 8px;
    }
    .logo {
        width: 180px;
        min-width: 180px;
        height: 45px;

        display: flex;
        align-items: center;
    }
    .logo img {
        width: 170px;
        max-height: 45px;
    }
    .header-category {
        width: 95px;
        min-width: 95px;
        height: 42px;
        margin-left: auto;
        z-index:997;
    }
    .header-contact {
        width: 90px;
        min-width: 90px;
        height: 42px;
        margin-left: 0;
        z-index: 997;
    }
    .header-search-box {
        order: 10;

        width: 100%;
        flex: 0 0 100%;

        min-width: 0;
    }
    .header-search-box form {
        height: 44px;
    }
    .header-contact-dropdown {
        width: 290px;
        right: 0;
    }
    /*Menu MOBILE*/
    .camera-category-close {display: block;}
     .camera-category-overlay{
        position:fixed;
        inset:0;
        width:100%;
        height:100vh;
        background:rgba(0,0,0,.55);
        z-index:998;
        visibility:hidden;
        opacity:0;
        pointer-events:none;
        transition:opacity .3s ease,visibility .3s ease;
    }
    .camera-category-overlay.is-open{
        visibility:visible;
        opacity:1;
        pointer-events:auto;
    }
    .camera-category-menu{
        position:fixed;
        top:0;
        left:0;
        width:85%;
        max-width:360px;
        height:100vh;
        max-height:none;
        margin:0;
        padding:0;
        transform:translateX(-100%);
        display:block;
        visibility:hidden;
        opacity:1;
        pointer-events:none;
        z-index:999;
        background:#fff;
        border-radius:0;
        box-shadow:5px 0 25px rgba(0,0,0,.2);
        overflow:hidden;
        transition:transform .4s cubic-bezier(.22,1,.36,1),visibility .4s ease;
    }
    .camera-category-menu.is-open{
        display:block;
        visibility:visible;
        opacity:1;
        pointer-events:auto;
        transform:translateX(0);
    }
    .camera-category-list{
        width:100%;
        height:100vh;
        max-height:none;
        padding:55px 0 15px;
        border-right:0;
        overflow-y:auto;
        overflow-x:hidden;
        box-sizing:border-box;
    }
    .camera-category-item{
        width:100%;
        min-height:58px;
        padding:10px 18px;
        border-bottom:1px solid #eee;
    }
    .camera-category-item-left{
        width:100%;
        gap:12px;
    }
    .camera-category-item-left img{
        width:32px;
        height:32px;
        flex:0 0 32px;
    }
    .camera-category-item-left span{
        font-size:15px;
        font-weight:500;
        color:#333;
    }
    .camera-category-arrow{
        display:none!important;
    }
    .camera-mega-menu{
        display:none!important;
    }
    .camera-category-list>a{
        width:100%;
    }
    .camera-category-item:hover{
        background:#fff;
    }
    .camera-category-item.active{
        background:#f5f5f5;
    }
    .camera-category-item:hover .camera-category-item-left span{
        color:#333;
    }
    .camera-category-item.active .camera-category-item-left span{
        color:#d60000;
    }
    .camera-category-close{
        position:absolute;
        top:0;
        right:0;
        width:50px;
        height:50px;
        display:flex;
        align-items:center;
        justify-content:center;
        border:0;
        background:#d60000;
        color:#fff;
        font-size:28px;
        line-height:1;
        cursor:pointer;
        z-index:1001;
    }
    .camera-category-close:hover{
        background:#b80000;
    }
    body.camera-menu-open{
        overflow:hidden;
    }
}
/* =========================================================
   27. MOBILE RẤT NHỎ
   <= 350px
========================================================= */
@media (max-width: 400px) {
    .logo {
        width: calc(100% - 100px);
    }
    .logo img {
        max-width: 100px;
    }
     /* Hiện nút */
    .header-top-prev,
    .header-top-next {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .header-top-prev {
        display: none;
    }
    .header-top-next {
        display: flex;
    }
    .header-category {
        width: 90px;
        min-width: 90px;
        font-size: 10px;
    }
    .header-contact {
       display:none;
    }
    .header-search-box input {
        padding-left: 10px;
        font-size: 12px;
    }
    .header-search-box button {
        width: 52px;
        min-width: 52px;
    }
}