.grayscale {
    filter: grayscale(100%);
    transition: filter 0.3s ease-in-out;
}

.grayscale:hover {
    filter: grayscale(0%);
}

.box-service:hover .grayscale {
    filter: grayscale(0%);
}

.product-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
    border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
}

/* Accordion filter */
.accordion-button {
    background-color: #f9f9f9;
    color: #212529;
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background-color: #1fa84f;
    color: #fff;
}

.accordion-body a {
    text-decoration: none;
    color: #1fa84f;
    display: block;
    margin-bottom: 6px;
}

.accordion-body a:hover {
    text-decoration: underline;
}

.accordion-button:focus {
    box-shadow: none;
    outline: none;
}

.product-card {
    display: flex;
    flex-direction: column;
}

.product-card .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-description {
    min-height: 130px;
    max-height: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.product-card .btn.btn-outline-success.btn-sm:hover {
    color: #212529;
}

.product-info {
    padding-top: 1rem;
    padding-right: 1rem;
}

.product-info h2.title {
    font-size: 28px;
    font-weight: 600;
}

.product-info .product-specs {
    font-size: 16px;
}

.product-specs li {
    margin-bottom: 0.75rem;
    font-size: 16px;
    line-height: 1.6;
}

.product-info .product-specs ul {
    margin-top: 0.5rem;
}

.product-info .equipment-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.recommended-products img {
    height: 200px !important;
    object-fit: cover;
}

@media (min-width: 992px) {
    .product-info {
        padding-left: 2rem;
    }
}

.product-info.box {
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
}

.product-info .title {
    font-size: 28px;
    margin-bottom: 1rem;
}

.thumb-img.active {
    border: 2px solid #198754;
    opacity: 1;
}

.thumb-img {
    opacity: 0.6;
    border: 2px solid transparent;
    transition: border 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}

#main-image {
    width: 100%;
    height: 460px;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

#main-image.show {
    opacity: 1;
}

#products .box img {
    height: 280px;
    object-fit: cover;
}

/* --- Opera-safe sizing --- */
#thumbnail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.thumb-img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    opacity: .6;
    border: 2px solid transparent;
    transition: border .3s ease, opacity .3s ease;
    cursor: pointer;
}

.thumb-img:hover,
.thumb-img.active {
    opacity: 1;
    border-color: #198754;
}

#main-image {
    width: 100%;
    height: 460px;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity .6s ease-in-out;
}

#main-image.show {
    opacity: 1;
}

.recommended-products img {
    width: 100%;
    height: 200px !important;
    object-fit: cover;
    display: block;
}

.grayscale {
    -webkit-filter: grayscale(100%);
    filter: grayscale(100%);
    transition: filter .3s ease-in-out, -webkit-filter .3s ease-in-out;
}

.grayscale:hover,
.box-service:hover .grayscale {
    -webkit-filter: grayscale(0%);
    filter: grayscale(0%);
}

/* Products filters  */
#products .filters-panel {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 10px;
    padding: 16px 14px;
}

#products .filters-panel {
    position: relative;
}

#products .filters-panel .pretitle {
    margin: 0 0 14px;
    padding: 0 0 10px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    font-weight: 700;
    letter-spacing: .4px;
}

#products .filters-panel,
#products .filters-panel * {
    font-family: var(--bs-body-font-family);
}

#products .filters-panel h4 {
    font-family: 'Merriweather', serif;
}

#products .filters-panel form .mb-3 {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 8px;
    padding: 10px 10px 11px;
    margin-bottom: 12px !important;
    transition: border-color .18s ease, background-color .18s ease;
}

#products .filters-panel form .mb-3:hover {
    border-color: rgba(0, 0, 0, .12);
}

#products .filters-panel form .mb-3:focus-within {
    border-color: rgba(31, 168, 79, .55);
    background: #fbfffd;
}

#products .filters-panel .form-label {
    margin: 0 0 6px;
    font-size: .86rem;
    font-weight: 700;
    color: #1b1f23;
}

#products .filters-panel .form-control,
#products .filters-panel .form-select {
    border: 1px solid rgba(0, 0, 0, .10);
    background: #f7f7f7;
    border-radius: 7px;
    padding: 10px 12px;
    font-size: .95rem;
    font-weight: 600;
    color: #1b1f23;
    box-shadow: none !important;
    transition: border-color .18s ease, background-color .18s ease;
}

#products .filters-panel .form-control:focus,
#products .filters-panel .form-select:focus {
    outline: none;
    border-color: #1fa84f;
    background: #fff;
}

#products .filters-panel .form-control::placeholder {
    color: rgba(27, 31, 35, .45);
    font-weight: 500;
}

#products .filters-panel .form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath fill='%231fa84f' d='M7 10l5 5l5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
}

#products .filters-panel .form-select option,
#products .filters-panel select option {
    font-family: var(--bs-body-font-family);
}

#products .filters-panel .d-flex.gap-2 {
    margin-top: 6px;
}

#products .filters-panel .btn {
    border-radius: 10px;
    font-weight: 700;
    padding: 10px 12px;
    box-shadow: none !important;
}

#products .filters-panel .btn.btn-success:hover,
#products .filters-panel a.btn:hover {
    color: #212529;
}

@media (max-width: 991px) {
    #products .filters-panel {
        padding: 14px 12px;
    }

    #products .filters-panel:before {
        width: 3px;
    }
}

/* ---- Product status badge (single product page) ---- */
.product-status-badge {
    display: inline-block;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .5px;
    text-transform: uppercase;
    border-radius: 20px;
    padding: 5px 14px;
    margin: 0 0 10px;
}

.product-status-badge.status-sold {
    background: #dc3545;
    color: #fff;
}

.product-status-badge.status-reserved {
    background: #ffc107;
    color: #212529;
}

/* ---- Full product description block ---- */
.product-description-full .product-description-text {
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.75;
    color: #4a5568;
}

.product-description-full .product-description-text br {
    margin-bottom: .35rem;
    content: "";
    display: block;
}

/* ---- Mobile: give the spec/description boxes more usable width ---- */
@media (max-width: 575px) {
    .product-info.box,
    .product-description-full.box {
        padding: 1rem;
    }

    .product-info {
        padding-left: 0 !important;
    }
}
