.filter-header {
    padding: 0.45rem 0.375rem;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease;
    cursor: pointer;
}
.filter-header:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: #212529;
}
.filter-chevron {
    display: inline-block;
    transition: transform 0.2s ease;
}
.filter-header[aria-expanded="false"] .filter-chevron {
    transform: rotate(-90deg);
}
.filter-option {
    padding: 0.3rem 0.5rem;
    border-radius: 0.375rem;
    color: #555;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.filter-option:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: #212529 !important;
}

.product-card {
    width: calc(50% - 0.5rem);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
@media (max-width: 767px) {
    .product-card img {
        max-width: 100% !important;
        height: auto !important;
    }
}
@media (min-width: 768px) {
    .product-card {
        width: 210px;
    }
}
.product-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.09);
    border-color: #d1d5db;
}
.product-card-title {
    font-size: 0.8rem;
    color: #374151;
    padding: 0.5rem 0.75rem;
    line-height: 1.4;
}
.product-card-title:hover {
    color: #111827;
}
.product-card-body {
    padding: 0.5rem 0.75rem 0.75rem;
    border-top: 1px solid #f3f4f6;
}
.stock-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.stock-out {
    background-color: #fde8e8;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}
.stock-low {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #fdba74;
}
.stock-in {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

#menuOffcanvas .nav-action-link {
    display: block;
    border-radius: 0.375rem;
}

.nav-action-link {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.nav-action-link:hover {
    background-color: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
    color: #212529;
}

.form-label {
    display: block;
}

/* ---- Mega Menu ---- */
header.sticky-top {
    background: #fff;
}
.mega-menu-bar {
    background: #fff;
}
.mega-menu-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    padding: 0;
    margin: 0;
}
.mega-room-item {
    position: relative;
    flex-shrink: 0;
}
.mega-room-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
    line-height: 1;
}
.mega-room-btn:hover,
.mega-room-item:hover .mega-room-btn {
    background-color: rgba(0, 0, 0, 0.05);
    color: #212529;
}
.mega-chevron {
    font-size: 0.6rem;
    vertical-align: middle;
    opacity: 0.55;
}
.mega-dropdown-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-top: 2px solid #ccc;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    z-index: 1050;
}
.mega-room-item:hover .mega-dropdown-panel {
    display: block;
}
.mega-group-list {
    padding: 0.25rem 0;
}
.mega-group-item {
    position: relative;
}
.mega-group-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    color: #444;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.mega-group-btn:hover,
.mega-group-item:hover .mega-group-btn {
    background-color: rgba(0, 0, 0, 0.05);
    color: #212529;
}
.mega-type-list {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-top: 2px solid #ccc;
    box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.09);
    padding: 0.25rem 0;
    min-width: 260px;
    z-index: 1051;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}
.mega-group-item:hover .mega-type-list {
    display: block;
}
.mega-room-item.mega-room-scroll-active .mega-dropdown-panel {
    display: block !important;
}
/* Touch-primary (iPad/phone): JS tap-toggle class controls visibility instead of :hover */
.mega-touch .mega-group-item:hover .mega-type-list {
    display: none;
}
.mega-touch .mega-group-item.mega-touch-open .mega-type-list {
    display: block !important;
}
/* Flip the level-3 submenu to the LEFT when it would overflow the right screen edge
   (set by JS in jquery_functions.js for rooms near the end of the menu bar). */
.mega-group-item.mega-flip-left .mega-type-list {
    left: auto;
    right: 100%;
    box-shadow: -4px 4px 16px rgba(0, 0, 0, 0.09);
}
.mega-type-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: #444;
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    transition: background-color 0.12s ease, color 0.12s ease;
}
.mega-type-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #111;
}
.mega-type-name {
    flex: 1 1 auto;
}
/* Standardized thumbnail box beside each product type — fixed size so every row aligns. */
.mega-type-thumb-box {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    overflow: hidden;
}
.mega-type-thumb {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
@media (max-width: 767px) {
    .mega-menu-bar { display: none; }
}