:root {
    --brg-color: #363534;
    --light-text: #fff;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    color: var(--text-color);
    line-height: 1.5;
    font-family: 'Open Sans', sans-serif;
    overflow-x: hidden;
    width: 100%;
}

.container {
    width: 90%;
    margin: 0 auto;
}
.space{
    width: 100%;
    height: 80px;
}
#Top-bar {
    background-color: var(--brg-color);
    width: 100%;
    height: 48px;
}
.top-bar-content {
    display: flex;
    justify-content: space-between;
    height: 100%;
}
#Top-left {
    display: flex;
    height: 100%;
}

.tab {
    text-decoration: none;
    color: var(--light-text);
    padding: 0 20px;
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s;
}
.tab.active {
    background-color: var(--light-text);
    color: var(--brg-color);
}
.tab:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.1);
}

#Top-right {
    display: flex;
    height: 100%;
}
.main-header-content{
    display:flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}
.search-form{
    width: 427px;
    height: 46px;
    background-color: #fff;
    padding: 12px;
    border:1px solid var(--brg-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.search-input{
    width: 380px;
    height: 22px;
    color: var(--brg-color);
    border: none;
    outline: none;
    align-items: center;
    
}

#hd-center img{
    width: 284px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-link {
    display: flex;
    list-style: none;
    gap: 24px;
}
.header-link a{
    text-decoration: none;
    color: var(--brg-color);
    font-size: 14px;
    font-weight: 600;

}

.header-link a:hover{
    text-decoration: underline;
    cursor: pointer;
}

#list{
    width: 100%;
    height: 80px;
    background-color: #fff;
}
.main-list{
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    list-style: none;
}
.main-list li a {
    text-decoration: none;
    color: var(--brg-color);
    font-size: 16px;
    padding: 10px 0;
    display: block;
}

.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.submenu{
    position: absolute;
    top: 80px;
    left: 0px;
    background-color: #fff;
    width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 10;
}
.submenu li a {
    text-decoration: none;
    color: var(--brg-color);
    font-size: 14px;
    padding: 10px 20px;
    display: block;
    transition: background-color 0.2s;
}

.submenu li a:hover {
    background-color: #f5f5f5;

}

.dropdown:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#deal {
    background-color: #f2f2f2;
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
   
}

.ct-deal {
    list-style: none;
    display: flex;
    justify-content: space-between;
}

.ct-deal li a {
    text-decoration: none;
    color: var(--brg-color);
    font-size: 14px;
}
#deal-tg {
    background-color: var(--brg-color);
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
}
.tg-deal {
    list-style: none;
    display: flex;
    justify-content: center;
}

.tg-deal li a {
    text-decoration: none;
    color: var(--light-text);
    font-size: 14px;
}

.main-prd-content {
    height: auto;
    display: flex;
    gap: 20px;
}

.main-prd-content-left{
    width: calc(25% - 10px);
    height: auto;
}

.main-prd-content-right{
    width: calc(75% - 10px);
    height: auto;
}

.list-produce-menu {
    width: 100%;
    height: auto;
}

.filter-group {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
}
.filter-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--brg-color);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-title::-webkit-details-marker {
    display: none;
}
.filter-title::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
    color: var(--brg-color);
    transition: transform 0.3s ease;
}
details[open] .filter-list {
    animation: slideDown 0.3s ease-out forwards;
    transform-origin: top;
}
details[open] .filter-title::after {
    content: '-'; 
    transform: rotate(180deg);
}
.filter-list {
    list-style: none;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px; 
}

.filter-list li label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #444;
    cursor: pointer;
}

.filter-list li input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--brg-color); 
}
.text-ct h1{
    font-size: 22px;
    font-weight: 600;
}

.text-ct {
    width: 100%;
    height: auto;
    margin: 20px 0;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.product-item {
    width: calc((100% - 40px) / 3); 
    text-decoration: none;
    color: var(--brg-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-img-box {
    width: 100%;
    height: 180px; 
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 4px;
    position: relative;
}

.product-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.4s ease-in-out;
}

.product-img-box img:first-child {
    width: 100%;
    height: 100%;
    display: block;
}

.product-img-box img:first-child {
    opacity: 1; 
    z-index: 1;
}

.product-img-box img:nth-child(2) {
    opacity: 0; 
    z-index: 2;
}

.product-item:hover .product-img-box img:nth-child(2) {
    opacity: 1; 
}

.product-item:hover .product-img-box img:first-child {
    opacity: 0;
}

.product-info {
    padding: 15px 0;
}

.product-name {
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
}

.product-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--brg-color); 
}

.footer {
    background-color: var(--brg-color);
    width: 100%;
    height: auto;
}

.top-footer {
    height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.search-form h3 {
    color: #fff;
}

.top-footer .search-form {
    flex-direction: column; 
    height: auto; 
    background-color: transparent;
    border: none; 
    padding: 0;
    gap: 15px;
}

.top-footer .search-input {
    width: 100%; 
    flex: 1;
    height: 46px; 
    padding: 12px;
    border: none; 
    outline: none;
}
.top-footer .search-form h3 {
    text-align: center;
    color: #f5f5f5; 
}
.content-footer {
    height: 650px;
}
.top-footer .input-group {
    display: flex;
}

.top-footer .submit-btn {
    height: 46px;
    flex-shrink: 0;
    width: 120px;
    padding: 0 24px;
    background-color: var(--brg-color);
    color: var(--light-text);
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.top-footer .input-group {
    display: flex;
    border: 1px solid #fff; 
    overflow: hidden; 
    width: fit-content;
    width: 100%;
    max-width: 550px;
}

.content-footer{
    display: flex;
    justify-content: space-between;
}

.ct-footer ul{
    list-style: none;
}

.ct-footer ul li{
    color: var(--light-text);
    font-size: 14px;
    line-height: 40px;
}

.ct-footer ul li.m-content{
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--light-text);
}

/* CSS SIGNUP */

.main{
    width: 50%;
    height: 800px;
    margin: 0 auto;
}

.main-content{
    height: 100%;
}

.main-content h1{
    color: var(--brg-color);
    margin-top: 50px;
}

.main-content h4{
    margin-top: 5px;
    color: var(--brg-color);
    font-weight: 200;
}
.signup-form {
    display: flex;
    flex-direction: column;
    margin-top: 30px;
    gap: 15px;
    width: 100%;
}

.signup-form input[type="text"],
.signup-form input[type="email"],
.signup-form input[type="tel"],
.signup-form input[type="password"] {
    height: 48px;
    padding: 0 15px;
    border: 1px solid var(--brg-color);
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.signup-form input:focus {
    border-width: 2px;
}

.password-hint {
    font-size: 14px;
    color: var(--brg-color);
    margin-top: -10px;
    margin-bottom: 5px;
    line-height: 1.2;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 14px;
    color: var(--brg-color);
    cursor: pointer;
    line-height: 1.4;
}

.register-btn {
    height: 48px;
    background-color: var(--brg-color);
    color: var(--light-text);
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.register-btn:hover {
    background-color: #555;
}

/* CSS LOGIN */

.qmk{
    display: flex;
    gap: 30px;
}
.qmk h4 a {
    color: var(--brg-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.qmk h4 a:hover {
    text-decoration: underline;
}
