:root {
    --bg-dark: #f5f5f5;
    --text-primary: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: #2d3748;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1.3;
}

h3, h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #1a202c;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

p {
    font-weight: 400;
    color: #4a5568;
    font-size: 0.95rem;
}
/*LOGO , TÌM KIẾM , GIỎ HÀNG , ĐĂNG NHÂP*/
header {
    background: #4a5568;
    padding: 5px 2%;
    }

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    padding-bottom: 0px;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    color: #333;
    font-size: 1.8rem;
    letter-spacing: -5px;
}

.logo a {
    color: inherit;           
    text-decoration: none;     
    display: inline-block;     
    cursor: pointer;           
    transition: color 0.2s ease; 
}

.icons ul { 
    display: flex; 
    list-style: none; 
    gap: 30px; /* Định cấu hình khoảng cách đều nhau giữa 3 icon */
    align-items: center; /* Giúp tất cả các phần tử con thẳng hàng tuyệt đối theo chiều dọc */
    margin: 0;
    padding: 0;
}

/* Đảm bảo các thẻ li con bên trong không bị chiếm khoảng trống lạ */
.icons ul li {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.icons a {  
    color: #f5f5f5;
    text-decoration: none; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.icons a svg {
    stroke: currentColor; 
    transition: transform 0.2s ease;
}
.icons a:hover { 
    color: #40E0D0; /* Khi rê chuột vào, icon đổi sang màu xanh ngọc (Turquoise) */
}
.icons a:hover svg {
    transform: scale(1.12); 
}
/*MENU CHÍNH*/
.main-menu {
    margin: 0px; 
}

.main-menu > ul { 
    display: flex; 
    justify-content: center;
    align-items: center;
    list-style: none; 
    gap: 30px; 
    padding: 0;
    margin: 0;
} 

.main-menu > ul > li { 
    position: relative;  
} 
.main-menu > ul > li:hover > a {
    color: #40E0D0;
}
.main-menu a { 
    color: #f5f5f5; 
    text-decoration: none; 
    font-weight: 400; 
    text-transform: uppercase; 
    font-size: 0.85rem; 
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

.main-menu ul li ul { 
    position: absolute; 
    top: 100%; 
    left: 50%; 
    transform: translateX(-50%) translateY(15px); 
    background-color: #2d3748; 
    width: 210px; 
    padding: 8px 0; 
    border-radius: 6px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); 
    display: flex; 
    flex-direction: column; 
    gap: 0; 
    list-style: none;
    opacity: 0; 
    visibility: hidden; 
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
} 


.main-menu ul li ul a { 
    display: block; 
    padding: 10px 20px; 
    color: #ffffff; 
    text-transform: none; 
    font-size: 0.85rem; 
    text-align: left; 
    transition: all 0.2s ease; 
} 


.main-menu ul li ul a:hover { 
    background-color: #1a202c; 
    color: #40E0D0; 
    padding-left: 25px; 
} 

.main-menu > ul > li:hover ul { 
    opacity: 1; 
    visibility: visible;
    transform: translateX(-50%) translateY(0); 
}
/*BANNER*/
.banner-slider {
    position: relative;
    width: 100%;
    height: 750px;
    margin-bottom:70px ;
    aspect-ratio: 16 / 6;
    overflow: hidden;
    background-color: #1a202c;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    animation: chuyen-dong-tuan-tu 12s infinite ease-in-out;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 4s; }
.slide:nth-child(3) { animation-delay: 8s; }

@keyframes chuyen-dong-tuan-tu {
    0% { opacity: 0; }
    8% { opacity: 1; z-index: 3; }
    33% { opacity: 1; }
    41% { opacity: 0; z-index: 1; }
    100% { opacity: 0; }
}

.nut-banner-tam {
    position: absolute;
    bottom: 30px;
    left:50%;
    transform: translateX(-50%);
    z-index: 4;
    display: inline-block;
    padding: 15px 35px;
    background-color: #40E0D0;
    color: #1a202c;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nut-banner-tam:hover {
    background-color: #ffffff;
    color: #1a202c;
    box-shadow: 0 6px 25px rgba(64, 224, 208, 0.6);
    transform: translateX(-50%) translateY(-4px) scale(1.03);
}

.nut-banner-tam:active {
    transform: translateX(-50%) scale(0.97);
}
/*SAN PHAM MOI NHAT*/
.san-pham-moi-nhat {
    width: 96%;
    margin: 20px auto;
}

.tieu-de-trai {
    text-align: left;
    font-size: 1.6 rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 400;
    letter-spacing: -1px;
}

.luoi-san-pham {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.khoi-sp {
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    cursor:pointer;
}

.khung-anh1 {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 4px;
}

.khung-anh1 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.thong-tin-sp {
    padding: 10px 2px;
}

.ten-sp {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    color: #2d3748;
    font-weight: 500;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
}

.gia-sp {
    font-size: 1rem;
    color: #e53e3e;
    font-weight: bold;
}
.mua-sp {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.nut-gio-hang {
    background-color: #1a202c;
    color: #ffffff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nut-gio-hang svg {
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.nut-gio-hang:hover {
    background-color: #40E0D0;
    color: #1a202c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 224, 208, 0.4);
}

.nut-gio-hang:hover svg {
    transform: scale(1.1);
}

.nut-gio-hang:active {
    transform: translateY(0);
    box-shadow: none;
}
/*DANH MỤC*/
.khoi-danh-muc {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 96%;
    margin: 20px auto;
    margin-top:100px;
}

.danh-muc {
    position: relative;
    overflow: hidden;
    background-color: #1a202c;
    cursor: pointer;
}

.item-vuong {
    aspect-ratio: 1 / 1;
}

.item-cuoi {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
}

.khung-anh {
    width: 100%;
    height: 100%;
}

.khung-anh img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.danh-muc .khung-anh::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.nut-trung-tam {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    padding: 14px 28px;
    background-color: #40E0D0;
    color: #1a202c;
    border: none;
    border-radius: 40px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.danh-muc:hover .khung-anh img {
    transform: scale(1.05);
}

.nut-trung-tam:hover {
    background-color: #ffffff;
    color: #1a202c;
    box-shadow: 0 0 25px rgba(64, 224, 208, 0.8);
    transform: translateX(-50%) scale(1.06);
}

.nut-trung-tam:active {
    transform: translateX(-50%) scale(0.96);
}
/*FOOTER*/
.site-footer {
    background: #4a5568;
    padding: 50px 5%;
    margin-top: 50px;
    border-top: 1px solid #333;
    font-family: 'Inter', sans-serif;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-col h3 {
    font-family: 'Poppins', sans-serif;
    color: #f5f5f5;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: #f5f5f5;
    text-decoration: none;
    font-weight: 300;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    display: inline-block;
    transition: all 0.2s ease;
}

.footer-col a:hover {
    color: #ffffff;
    padding-left: 5px;
}

.footer-bottom {
    margin-top: 20px; 
    padding:15px;
    padding-bottom: 15px ;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center; 
    width: 100%; 
}

.footer-bottom p {
    color: #a0aec0; 
    font-size: 0.8rem; 
    font-weight: 300; 
    text-transform: none;
    margin: 0; 
    line-height:1;
}
@media (max-width: 992px) {
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .footer-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .footer-columns {
        grid-template-columns: 1fr;
    }
}
/*FORM ĐĂNG NHẬP */
.modal {
    display: none; 
    position: fixed;
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #1a202c;
}

.modal h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

.input-group {
    margin-bottom: 15px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.95rem;
}

.input-group input:focus {
    outline: none;
    border-color: #40E0D0;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background-color: #1a202c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.2s;
}

.btn-submit:hover {
    background-color: #40E0D0;
    color: #1a202c;
}

/*GIỎ HÀNG */
.cart-icon-wrapper {
    position: relative;
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #e53e3e;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* TÌM KIẾM  */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: transparent; 
    border-radius: 30px;
    padding: 0; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    height: 32px; 
}

.search-box.active {
    background-color: #ffffff; 
    padding: 0 12px; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); 
}

#search-input {
    border: none;
    background: none;
    outline: none;
    padding: 0;
    color: #1a202c; 
    font-size: 0.9rem;
    width: 0px; 
    opacity: 0; 
    transition: all 0.3s ease;
}

#search-input::placeholder {
    color: #718096; 
}

#search-btn {
    color: #f5f5f5; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    text-decoration: none; 
    transition: all 0.2s ease;
}

#search-btn svg {
    transition: transform 0.2s ease;
}

.search-box:not(.active) #search-btn:hover {
    color: #40E0D0; 
}
.search-box:not(.active) #search-btn:hover svg {
    transform: scale(1.12); 
}

.search-box.active {
    background-color: #ffffff; 
    padding: 4px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); 
}

.search-box.active #search-input {
    width: 180px; 
    opacity: 1; 
    padding-right: 5px; /
}

.search-box.active #search-btn {
    color: #1a202c; 
}
.search-box.active #search-btn:hover {
    color: #40E0D0;
}
.account-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-switch {
    margin-top: 15px;
    text-align: center;
    font-size: 0.85rem !important;
    color: #718096;
}

.auth-switch a {
    color: #40E0D0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-switch a:hover {
    color: #1a202c;
    text-decoration: underline;
}