


.machineBase {
    display: grid;
    position: relative;
    top: 3.5rem;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    grid-auto-rows: 150px;
    gap: 1rem;
    justify-content: center;
    height: calc(100% - 4.8rem);
    padding: 0 1rem 1rem 1rem; /* Added padding to give cards breathing room */
    overflow-y: auto;
}
.AdMayCogioi {
    display: block;
    position: fixed;
    bottom: 50px;
}

.machinBase > .inlineBlock {
    display: block;
    width: 100%;
    height: auto;
}

/* width */
::-webkit-scrollbar:horizontal {
    height: 3px;
}

/* Track */
::-webkit-scrollbar-track {
    box-shadow: inset 0 0 1px grey;
    border-radius: 0px;
}

/* Handle */
::-webkit-scrollbar-thumb:horizontal {
    border-radius: 0px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #b30000;
}

.productPanel {
}

.filter {
    display: flex; /* Switched to flex for better alignment */
    align-items: center;
    gap: 8px;
    position: relative;
    top: 0.5rem;
    height: 2.5rem;
    width: min(95%,600px);
    margin: auto;
    padding: 0 5px;
}

.filter input {
    flex: 1;
    height: 100%;
    border: 1px solid var(--grey);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.filter input:focus {
    border-color: var(--main);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter .close, .filter .MyImg {
    flex: 0 0 calc(2.5rem - 4px);
    height: calc(2.5rem - 4px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    color: var(--fontcolor);
    border-radius: var(--radius-sm);
    border: 1px solid var(--grey);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.filter .close:hover, .filter .MyImg:hover {
    background-color: var(--grey);
    border-color: #cbd5e1;
}

.filter .close img, .filter .MyImg img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}
.groupContainer {
    display: block;
    position: relative;
    top: 0.85rem;
    height: calc(100% - 2.9rem);
}

.groupContainer--shrink {
    top: 0.5rem;
    height: calc(100% - 8.5rem);
}

.filterActive {
    background-color: #dbeafe !important;
    border-color: var(--main) !important;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.25) !important;
}

.filterAdvance {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    background-color: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 0.4rem auto 0;
    width: min(95%, 600px);
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.2s ease;
}

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

.filterAdvance__title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filterAdvance__inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filterAdvance__inputs input {
    flex: 1;
    height: 2.2rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0 10px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.filterAdvance__inputs input:focus {
    border-color: var(--main);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.12);
}

.filterAdvance__inputs span {
    color: #94a3b8;
    font-weight: 500;
}

.filterAdvance__btns {
    display: flex;
    gap: 8px;
}

.filterAdvance__btns .btnApply {
    flex: 1; height: 36px; width: auto; margin: 0;
    background-color: var(--main); color: white;
    border: none; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.85rem; cursor: pointer;
    box-shadow: var(--shadow-sm); transition: all 0.2s;
}

.filterAdvance__btns .btnApply:hover {
    background-color: var(--main__hover); transform: translateY(-1px);
}

.filterAdvance__btns .btnClear {
    flex: 1; height: 36px; width: auto; margin: 0;
    background-color: #fee2e2; color: #dc2626;
    border: 1px solid #fca5a5; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.85rem; cursor: pointer;
    box-shadow: none; transition: all 0.2s;
}

.filterAdvance__btns .btnClear:hover {
    background-color: #fecaca; transform: translateY(-1px);
}


.grouppanel {
    display: flex;
    flex-flow: row wrap;
    overflow-y: auto;
    height: 100%;
}

button {
    width: min(45vw,200px);
    height: 40px; /* slightly taller for mobile friendliness */
    background-color: var(--main);
    margin: 4px;
    border-radius: var(--radius-md);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    border: 0px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover {
    background-color: var(--main__hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}
/* === Search Result Count === */
.searchResultCount { padding: 5px 16px; font-size: 0.8rem; color: #64748b; }
.searchResultCount strong { color: #3b82f6; font-weight: 700; }
/* === Empty State === */
.emptyState { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px 20px; text-align: center; gap: 8px; }
.emptyState__icon { font-size: 3.5rem; opacity: 0.45; }
.emptyState__text { font-size: 1rem; font-weight: 600; color: #475569; }
.emptyState__sub  { font-size: 0.8rem; color: #94a3b8; }
/* === Quick Filter Chips === */
.quickFilter { display: flex; gap: 6px; position: fixed; top: 3.15rem; left: 0; right: 0; padding: 0.35rem 0.75rem; background: #f8fafc; z-index: 101; border-bottom: 1px solid #e2e8f0; overflow-x: auto; scrollbar-width: none; }
.quickFilter::-webkit-scrollbar { display: none; }
.quickFilter button { flex: 0 0 auto; height: 26px; min-width: 56px; width: auto; padding: 0 12px; margin: 0; background-color: white; color: #374151; border: 1px solid #e2e8f0; border-radius: 20px; font-size: 0.75rem; font-weight: 500; cursor: pointer; box-shadow: none; transition: all 0.15s ease; white-space: nowrap; }
.quickFilter button:hover { border-color: #3b82f6; color: #3b82f6; transform: none; }
.quickFilter button.active { background-color: #3b82f6; color: white; border-color: #3b82f6; box-shadow: 0 2px 6px rgba(59,130,246,0.35); }

/* === Advanced Filter Panel === */
.advancedPanel {
    position: fixed;
    top: 3rem;
    left: 0;
    right: 0;
    bottom: 60px;
    background: white;
    z-index: 102;
    overflow-y: auto;
    padding: 16px;
    animation: slideUp 0.25s ease;
    border-top: 3px solid #2563eb;
}

.advancedPanel__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.advField {
    margin-bottom: 18px;
}

.advField label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.advField__row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.advField__row input {
    flex: 1;
    height: 2.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.advField__row input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.12);
}

.advField__row span {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.advField__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.chip:hover { border-color: #3b82f6; color: #3b82f6; }
.chipActive { background: #3b82f6; color: white; border-color: #3b82f6; box-shadow: 0 2px 6px rgba(59,130,246,0.3); }

.advField__actions {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    margin-top: 8px;
}

.resultHint {
    font-size: 0.82rem;
    color: #3b82f6;
    font-weight: 600;
}

.filterBadge {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 8px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 12px;
    font-size: 0.72rem;
    cursor: pointer;
    font-weight: 600;
}

.filterBadge:hover { background: #fecaca; }

/* MyImg in filter (gear icon) */
.filter .MyImg {
    flex: 0 0 calc(2.5rem - 4px);
    height: calc(2.5rem - 4px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: #374151;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.filter .MyImg:hover { background:#f1f5f9; border-color: #cbd5e1; }
