/* ============================================
   COMPONENT: Header (home/header.html)
   --clr-primary / --clr-primary-dark come from
   the single :root in theme_variables.css.
   ============================================ */

/* Blue utilities -> root dynamic green */
.text-blue-600 { color: var(--clr-primary) !important; }
.text-blue-800 { color: var(--clr-primary-dark) !important; }
.hover\:text-blue-600:hover { color: var(--clr-primary) !important; }
.hover\:text-blue-800:hover { color: var(--clr-primary-dark) !important; }
.group-hover\:text-blue-600:hover,
.group:hover .group-hover\:text-blue-600 { color: var(--clr-primary) !important; }
.bg-blue-600 { background-color: var(--clr-primary) !important; }
.bg-blue-700 { background-color: var(--clr-primary-dark) !important; }
.hover\:bg-blue-600:hover { background-color: var(--clr-primary-dark) !important; }
.hover\:bg-blue-700:hover { background-color: var(--clr-primary-dark) !important; }
.bg-blue-50 { background-color: color-mix(in srgb, var(--clr-primary) 10%, #ffffff) !important; }
.hover\:bg-blue-50:hover { background-color: color-mix(in srgb, var(--clr-primary) 10%, #ffffff) !important; }
.border-blue-600 { border-color: var(--clr-primary) !important; }
.focus\:border-blue-600:focus { border-color: var(--clr-primary) !important; }

.nav-item.dropdown { position: static !important; }
.nav-item.dropdown:hover .dropdown-menu { display: block !important; }
.dropdown-menu {
    border: none;
    border-top: 2px solid var(--clr-primary);
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    background: white;
    padding: 1rem 0;
}
.dropdown-menu .container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
.s_mega_menu_odoo_menu {
    max-height: 450px; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: var(--clr-primary) #f1f1f1;
}
.s_mega_menu_odoo_menu::-webkit-scrollbar { width: 5px; }
.s_mega_menu_odoo_menu::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.s_mega_menu_odoo_menu::-webkit-scrollbar-thumb { background: var(--clr-primary); border-radius: 10px; }
.s_mega_menu_odoo_menu::-webkit-scrollbar-thumb:hover { background: var(--clr-primary-dark); }
#categories-container { display: flex; align-items: center; overflow: hidden; flex: 1; }
#overflow-list { max-height: 400px; overflow-y: auto; padding: 0.5rem 0; width: 320px; }
#overflow-list .nav-item { position: relative !important; border-bottom: 1px solid #f1f5f9; display: block; width: 100%; padding: 0; }
#overflow-list .nav-item:last-child { border-bottom: none; }
#overflow-list .nav-item > a {
    display: flex !important; align-items: center; justify-content: space-between;
    padding: 0.75rem 1rem !important; color: #334155 !important;
    font-size: 0.875rem !important; font-weight: 600 !important; text-decoration: none !important;
}
#overflow-list .nav-item > a:hover { background-color: #f8fafc !important; color: var(--clr-primary) !important; }
#overflow-list .nav-item > a i { font-size: 0.75rem; opacity: 0.5; }
#overflow-list .nav-item > a img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; margin-right: 0.5rem; }
#overflow-list .dropdown-menu {
    position: fixed !important; top: 80px !important; width: 600px !important;
    max-width: 600px !important; margin-top: 0 !important; display: none !important;
    border-top: 2px solid var(--clr-primary); border-radius: 0.5rem !important;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2) !important;
    max-height: 450px !important; overflow-y: auto; background: white;
    z-index: 10000 !important; padding: 1rem !important;
}
#overflow-list .nav-item:hover .dropdown-menu { display: block !important; }
#overflow-list .dropdown-menu .row { margin: 0 -0.5rem; padding: 0; display: flex; flex-wrap: wrap; }
#overflow-list .dropdown-menu .col-md-6.col-lg-3 { flex: 0 0 25%; max-width: 25%; padding: 0 0.5rem; margin-bottom: 1rem; }
#overflow-list .dropdown-menu h4 { margin-top: 0; margin-bottom: 0.75rem; font-size: 0.875rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#overflow-list .dropdown-menu h4 a { color: var(--clr-primary); text-decoration: none; display: flex; align-items: center; gap: 0.25rem; }
#overflow-list .dropdown-menu h4 a img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
#overflow-list .dropdown-menu h4 a:hover { text-decoration: underline; }
#overflow-list .dropdown-menu .nav { display: flex; flex-direction: column; gap: 0.25rem; }
#overflow-list .dropdown-menu .nav-link { font-size: 0.75rem; padding: 0.25rem 0 !important; color: #475569; text-decoration: none; display: flex; align-items: center; gap: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#overflow-list .dropdown-menu .nav-link img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
#overflow-list .dropdown-menu .nav-link:hover { color: var(--clr-primary); background: none; text-decoration: underline; }
#overflow-list .bi-chevron-down { transform: rotate(270deg); transition: transform 0.2s; }
#overflow-list .nav-item:hover .bi-chevron-down { transform: rotate(270deg) scale(1.1); opacity: 1; color: var(--clr-primary); }
#compare-drawer.is-open { transform: translateY(0) !important; }
#compare-drawer-overlay.show { display: block !important; }
.compare-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 290px;
    margin: 0 auto;
    width: 100%;
}
.compare-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.compare-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 60%;
    background: #f9fafb;
    overflow: hidden;
    border-bottom: 1px solid #f3f4f6;
}
.compare-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}
.compare-card:hover .compare-image-wrapper img {
    transform: scale(1.05);
}

.compare-content {
    padding: 0.5rem 0.6rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #fff;
}
.compare-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
}
.compare-price {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--clr-primary);
    margin-top: auto;
    margin-bottom: 0;
    letter-spacing: -0.01em;
}

.remove-compare-btn {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    font-size: 0.65rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: 1px solid #e5e7eb;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    z-index: 1;
    backdrop-filter: blur(4px);
}
.compare-card:hover .remove-compare-btn { opacity: 1; }
.remove-compare-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    transform: scale(1.1);
}

.similar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem;
    border-bottom: 1px solid #f9fafb;
    cursor: pointer;
    transition: background 0.15s ease;
}
.similar-item:hover { background: #f8fafc; }
.similar-item:last-child { border-bottom: none; }
.similar-item img {
    width: 30px; height: 30px;
    object-fit: contain; background: #fff;
    border-radius: 6px; border: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.similar-item-title {
    font-size: 0.65rem; font-weight: 600;
    color: #1e293b; max-width: 110px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.similar-item-price {
    font-size: 0.6rem; font-weight: 700;
    color: var(--clr-primary);
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
