/* Stiluri pentru pagina de prețuri anvelope */

.search-filter-wrap {
    background: #f7f7f7;
    border-radius: 5px;
    margin-bottom: 30px;
}

/* Fix pentru input-group-addon cu text "Cantitate:" */
.product-item .input-group-addon {
    width: auto !important;
    min-width: 75px !important;
    padding: 0 8px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    flex: 0 0 auto !important;
}

.product-item .input-group-addon:first-child {
    border-radius: 4px 0 0 4px !important;
}

/* Fix pentru input-group container */
.product-item .input-group {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
}

/* Input pentru cantitate - mărit să ocupe restul spațiului până la lățimea butonului */
.product-item .input-group .quantity-input,
.product-item .input-group .form-control {
    flex: 1 !important;
    width: calc(100% - 85px) !important;
    max-width: none !important;
    border-radius: 0 4px 4px 0 !important;
    text-align: center;
    min-width: 60px !important;
}

/* Buton "Adaugă în coș" pe rând separat */
.product-item .input-group-btn {
    margin-left: 10px !important;
    flex: 1 !important;
}

.product-item .input-group-btn .btn {
    border-radius: 4px !important;
    white-space: nowrap !important;
    width: 100% !important;
}

/* Forțăm grupul Cantitate + Input să aibă aceeași lățime ca butonul */
.product-item .input-group:not(:has(.input-group-btn)) {
    width: calc(100% - 170px) !important;
    display: inline-flex !important;
}

.product-item .input-group:has(.input-group-btn) .input-group-addon {
    min-width: 75px !important;
}

.product-item .input-group:has(.input-group-btn) .form-control {
    width: 80px !important;
    flex: 0 0 80px !important;
}

/* Stiluri pentru căutare mărci avansată */
.marca-advanced-search {
    position: relative;
    margin-bottom: 15px;
}

.marca-search-wrapper {
    position: relative;
}

.marca-search-container {
    position: relative;
    margin-bottom: 10px;
}

#marcaSearchInput {
    background: white;
    border: 2px solid #28a745 !important;
    transition: all 0.3s ease;
    padding: 10px 40px 10px 15px !important;
    font-size: 14px !important;
}

#marcaSearchInput:focus {
    border-color: #1e7e34 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    background: #f8fff9;
}

#marcaSearchInput::placeholder {
    color: #666;
    font-size: 14px;
}

.marca-search-container button {
    position: absolute;
    right: 5px;
    top: 35px;
    padding: 6px 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s;
}

.marca-search-container button:hover {
    background: #c82333;
}

.marca-search-container small {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 12px;
}

.marca-search-container kbd {
    background: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 11px;
    font-family: monospace;
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

/* Stiluri pentru dropdown-ul de sugestii */
#marcaSearchBox {
    padding: 10px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

#marcaSearchBox:focus {
    border-color: #1e7e34 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    outline: none;
}

.marca-suggestions {
    border-radius: 0 0 5px 5px;
}

.marca-suggestion-item:hover {
    background: #e8f5e9 !important;
}

.marca-suggestion-item:last-child {
    border-bottom: none !important;
    border-radius: 0 0 5px 5px;
}

.selected-marca-label {
    background: #d4edda;
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.selected-marca-label button {
    color: #721c24;
    text-decoration: none;
}

.selected-marca-label button:hover {
    color: #dc3545;
}

/* Stil DOAR pentru selectul de mărci când are multe opțiuni */
#filterMarca {
    max-height: 300px;
    overflow-y: auto;
}

/* Asigurăm că celelalte filtre sunt vizibile */
#filterLatime option,
#filterInaltime option,
#filterDiametru option,
#filterIndiceViteza option,
#filterIndiceSarcina option {
    display: block !important;
}

#filterMarca option:disabled {
    color: #dc3545;
    font-style: italic;
    background: #fff5f5;
}

/* Indicator vizual pentru numărul de mărci */
.marca-count {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 5px;
}

/* Animație pentru căutare */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

.marca-search-container.searching #marcaSearchInput {
    animation: pulse 1s;
}

.search-anvelope-form .form-control {
    height: 45px;
    border: 1px solid #e1e1e1;
}

.search-anvelope-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.search-anvelope-form label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.product-item {
    border: 1px solid #e8e8e8;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.season-icon-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.season-icon-container i {
    font-size: 32px !important;
}

.season-icon-container span {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.product-price h4 {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.product-stock .badge {
    padding: 8px 15px;
    font-size: 13px;
    font-weight: normal;
}

.badge-success {
    background-color: #28a745;
}

.badge-warning {
    background-color: #ffc107;
    color: #333;
}

.badge-danger {
    background-color: #dc3545;
}

.quantity-input {
    text-align: center;
    font-weight: bold;
}

.cart-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Formular comandă */
#orderForm {
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.cart-sidebar::-webkit-scrollbar {
    width: 6px;
}

.cart-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cart-sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.cart-sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.cart-sidebar .widget {
    border: 1px solid #e8e8e8;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cart-sidebar .widget-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.cart-item {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item h6 {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.cart-item .text-small {
    font-size: 12px;
    color: #666;
}

.cart-item-quantity {
    width: 70px;
    padding: 5px;
    text-align: center;
}

.cart-total {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

.empty-cart {
    padding: 40px 20px;
}

.empty-cart i {
    color: #ccc;
}

.results-info h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
}

.pagination-wrapper {
    margin-top: 30px;
    margin-bottom: 30px;
}

.pagination {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination li {
    display: inline-block;
    margin: 0 2px;
}

.pagination li a,
.pagination li span {
    display: inline-block;
    padding: 6px 12px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination li.active span {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.pagination li a:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

.pagination li.disabled span {
    color: #999;
    cursor: default;
    background-color: #f9f9f9;
    border-color: #ddd;
}

.pagination .page-link {
    color: #333;
    border-color: #ddd;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.pagination .page-link:hover {
    background-color: #f0f0f0;
}

/* Buton flotant coș pentru mobil */
.mobile-cart-button {
    display: none;
    position: fixed;
    bottom: 90px;  /* Mărit de la 20px la 90px pentru a fi deasupra butonului scroll-up */
    right: 20px;
    background: #007bff;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-cart-button:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.mobile-cart-button .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: 12px;
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .cart-sidebar {
        position: static;
        margin-top: 40px;
        max-height: none;  /* Elimină restricția de înălțime pe mobil */
    }

    #orderForm {
        max-height: none;  /* Formular fără restricții pe mobil */
        overflow-y: visible;
        padding-bottom: 50px;
        margin-bottom: 100px;  /* Spațiu mare pentru a evita suprapunerea cu footer */
    }

    .mobile-cart-button {
        display: flex;  /* Schimbat din block în flex pentru centrare */
    }

    .product-item .row {
        text-align: center;
    }

    .product-item .col-md-7,
    .product-item .col-md-5 {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .search-filter-wrap {
        padding: 15px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .product-price h4 {
        font-size: 20px;
    }

    .cart-sidebar .widget {
        padding: 15px;
    }
}

/* Buton Filtre vertical - stil ProduseLED */
.mobile-filter-button {
    display: none;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #EE3131;
    color: white;
    padding: 10px 5px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    cursor: pointer;
    z-index: 1000;
    border: none;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    height: auto;
    min-height: 70px;
}

.mobile-filter-button:hover {
    background: #cc2828;
    padding-right: 8px;
}

/* Arrow removed - button is now more compact */

/* Panel de filtre pentru mobil */
.mobile-filter-panel {
    position: fixed;
    right: -100%;
    top: 0;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: white;
    z-index: 9999;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    overflow-y: auto;
    display: block !important;
}

.mobile-filter-panel.active {
    right: 0;
}

/* Header panel filtre */
.mobile-filter-header {
    position: sticky;
    top: 0;
    background: #EE3131;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.mobile-filter-header h4 {
    margin: 0;
    font-size: 18px;
    color: white !important;
}

.mobile-filter-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Body panel filtre */
.mobile-filter-body {
    padding: 0px;
}

/* Overlay pentru fundal */
.mobile-filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

.mobile-filter-overlay.active {
    display: block;
}

/* Stiluri responsive pentru filtre mobil */
@media (max-width: 768px) {
    /* Afișează butonul de filtre pe mobil */
    .mobile-filter-button {
        display: block;
    }

    /* Ascunde coloana de filtre pe mobil */
    .col-lg-3.col-md-12.col-sm-12.col-xs-12:first-child {
        display: none;
    }

    /* Ajustează coloana centrală să ocupe tot spațiul */
    .col-lg-6.col-md-12.col-sm-12.col-xs-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Dezactivează sticky pe mobil pentru filtre */
    .sticky-wrapper {
        position: static !important;
        top: auto !important;
    }

    /* Ajustări pentru widget-ul de filtre pe mobil */
    .widget.bg-gray {
        max-height: none !important;
        overflow-y: visible !important;
        margin-bottom: 0;
        border-radius: 0 !important;
    }

    /* Ajustări pentru form controls pe mobil */
    .widget .form-control-sm {
        height: 38px !important;
        padding: 8px 12px !important;
        font-size: 14px !important;
    }

    /* Ascunde bootstrap-select în panelul mobil */
    #mobileFilterPanel .bootstrap-select {
        display: none !important;
    }

    /* Asigură că select-urile native sunt vizibile în panelul mobil */
    #mobileFilterPanel select {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        width: 100% !important;
    }

    /* Spațiere mai mare pentru touch */
    .widget .form-group {
        margin-bottom: 12px !important;
    }

    /* Etichete mai vizibile pe mobil */
    .widget label.text-muted {
        font-size: 13px !important;
        margin-bottom: 5px !important;
    }

    /* Butonul Reset mai proeminent pe mobil */
    #resetFilters {
        background: #dc3545;
        color: white !important;
        padding: 5px 10px !important;
        border-radius: 4px;
    }

    /* Stiluri pentru căutarea mărcilor pe mobil */
    .mobile-marca-search-container {
        position: relative;
        margin-bottom: 15px;
    }

    #mobileMarcaSearchBox {
        background: white;
        border: 2px solid #28a745 !important;
        padding: 10px !important;
        font-size: 14px !important;
    }

    #mobileMarcaSearchBox:focus {
        border-color: #1e7e34 !important;
        box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    }

    #mobileMarcaResults {
        position: absolute;
        z-index: 1000;
        width: 100%;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        max-height: 250px !important;
    }

    #mobileMarcaResults > div {
        transition: background 0.2s;
    }

    #mobileMarcaResults > div:active {
        background: #e9ecef !important;
    }
}

/* Loading spinner */
#loadingSpinner {
    padding: 60px 0;
}

#loadingSpinner i {
    color: #007bff;
}

/* Alerts and notifications */
.alert {
    border-radius: 4px;
    padding: 12px 20px;
    margin-bottom: 20px;
}

.alert-dismissible .close {
    padding: 10px 20px;
    font-size: 24px;
    opacity: 0.5;
}

.alert-dismissible .close:hover {
    opacity: 0.8;
}

/* Buttons enhancements */
.site-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.site-button:hover {
    background-color: #0056b3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.site-button-secondry {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.site-button-secondry:hover {
    background-color: #5a6268;
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Form inputs styling */
.form-control {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

select.form-control {
    height: 45px;
    cursor: pointer;
}

/* Input group styling */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group-btn {
    position: relative;
    font-size: 0;
    white-space: nowrap;
}

.input-group-addon {
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    text-align: center;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px 0 0 4px;
}

/* Utility classes */
.m-t5 { margin-top: 5px; }
.m-t10 { margin-top: 10px; }
.m-t20 { margin-top: 20px; }
.m-t30 { margin-top: 30px; }
.m-b5 { margin-bottom: 5px; }
.m-b10 { margin-bottom: 10px; }
.m-b15 { margin-bottom: 15px; }
.m-b20 { margin-bottom: 20px; }
.m-b30 { margin-bottom: 30px; }
.p-t20 { padding-top: 20px; }
.p-t50 { padding-top: 50px; }
.p-b50 { padding-bottom: 50px; }
.p-a20 { padding: 20px; }
.p-a30 { padding: 30px; }
.border-t { border-top: 1px solid #e8e8e8; }
.border-b { border-bottom: 1px solid #e8e8e8; }
.text-small { font-size: 12px; }
.text-gray { color: #999; }
.text-primary { color: #007bff; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.bg-gray { background-color: #f7f7f7; }
.bg-white { background-color: #fff; }