:root {
    --primary-color: #0056b3;
    --accent-color: #00d2ff;
    --bg-light: #f4f7f9; /* צבע הרקע של הדף */
    --card-shadow: 0 10px 20px rgba(0,0,0,0.05);
    --drawer-shadow: -10px 0 30px rgba(0,0,0,0.15);
}

#details-col {
    position: fixed;
    top: 0;
    left: -450px;
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    box-shadow: var(--drawer-shadow);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    border-right: 1px solid rgba(0,0,0,0.05);
}

#details-col.open { left: 0; }

.close-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    font-size: 1.5rem;
    color: #ccc;
    transition: 0.2s;
}
.close-panel:hover { color: var(--primary-color); }

.panel-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 60px 20px 30px;
    color: #fff;
    text-align: center;
    border-radius: 0 0 30px 30px;
}

.panel-body { padding: 30px; }

/*filter*/
#filtering {
    background: #ffffff !important;
    border-radius: 30px !important;
    border: 1px solid rgba(0, 0, 0, 0.03) !important;
    padding: 35px !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.04) !important;
}

#filtering h5 {
    font-size: 1.15rem;
    color: #0076a3 !important;
    margin-bottom: 25px !important;
    letter-spacing: -0.5px;
}

#auto-filter-form .form-control, 
#auto-filter-form .form-select {
    height: 54px;
    border-radius: 50px !important;
    font-size: 20px;
    color: #333;
    padding: 0 25px !important;
    transition: all 0.25s ease-in-out;
}

#auto-filter-form .form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23009ddc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-size: 14px !important;
    background-position: left 1.25rem center !important;
    padding-left: 50px !important;
}

#auto-filter-form .input-group {
    border-radius: 50px;
    overflow: hidden;
    background-color: #f1f4f9;
}

#auto-filter-form .input-group-text {
    background-color: transparent !important;
    border: none !important;
    color: #009ddc !important;
    padding-right: 25px;
    font-size: 18px;
}

#auto-filter-form input[name="keyword"] {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding-right: 10px !important;
}

#auto-filter-form .form-control:focus, 
#auto-filter-form .form-select:focus,
#auto-filter-form .input-group:focus-within {
    background-color: #ffffff !important;
    border-color: #009ddc !important;
    box-shadow: 0 0 0 5px rgba(0, 157, 220, 0.1) !important;
    color: #000;
    outline: none;
}

#auto-filter-form .input-group:focus-within {
    background-color: #ffffff;
    border: 2px solid #009ddc;
}

#auto-filter-form .input-group:focus-within input {
    background-color: transparent !important;
}

@media (max-width: 991px) {
    #filtering {
        border-radius: 20px !important;
        padding: 25px !important;
    }
    #auto-filter-form .form-control, 
    #auto-filter-form .form-select {
        height: 50px;
        font-size: 15px;
    }
}

.dynamic-factory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: min-content;
    gap: 20px;
    direction: rtl;
    padding: 20px;
    overflow: visible; 
}

.factory-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    box-shadow: -8px -8px 15px rgb(0 0 0 / 21%);
    border-radius: 15px;
    z-index: 1;
}

.factory-card.featured-square {
    grid-column: span 2;
    grid-row: span 2;
    box-shadow: 8px -8px 15px rgba(0, 0, 0, 0.3);
}

.factory-item {
    background: #fff;
    border-radius: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.factory-card::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    width: 40px;
    height: 40px;
    background-color: #ffffff30;
    z-index: 100;
    pointer-events: none;
}

.logo-wrapper {
    width: 100%;
    height: 70%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-wrapper img {
    width: 70%;
    height: auto;
    max-height: 50%;
    object-fit: contain;
}

.factory-info {
    text-align: center;
    margin-top: 10px;
    display:none;
}
@media (max-width: 1024px) {
    .dynamic-factory-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .factory-card.featured-square {
        grid-row: span 1;
        aspect-ratio: 2 / 1;
    }
}