/* Loading spinner */
.search-loading {
    display: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Search box container */
.search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-container input[type="text"] {
    width: 100%;
    padding: 10px 35px 10px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Material filters */
.material-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.material-filter {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.material-filter:hover {
    background-color: #e0e0e0;
}

.material-filter.active {
    background-color: #3498db;
    color: white;
    border-color: #2980b9;
}

/* Products grid */
.productes-grid {
    display: grid;
    gap: 2rem;
    width: 100%;
    padding: 0;
}

@media (min-width: 1024px) {
    .productes-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .productes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .productes-grid {
        grid-template-columns: 1fr;
    }
}

/* Pagination */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination .page-numbers.current {
    background-color: #3498db;
    color: white;
    border-color: #2980b9;
}

.pagination .page-numbers:hover:not(.current) {
    background-color: #f5f5f5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .productes-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .productes-grid {
        grid-template-columns: 1fr;
    }
    
    .material-filters {
        flex-direction: column;
    }
    
    .material-filter {
        width: 100%;
        text-align: center;
    }
}

.productes-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.productes-filters-trigger {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.productes-filters-trigger.beneath-tabs {
    justify-content: flex-start;
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
}

.productes-filters-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(55, 65, 81, 0.18);
    background: #f9fafb;
    color: #1f2937;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.productes-filters-button:hover,
.productes-filters-button:focus {
    border-color: #ec8d36;
    color: #ec8d36;
    background: #fff7ed;
    box-shadow: 0 6px 14px rgba(236, 141, 54, 0.18);
}

.productes-filters-button.is-active {
    border-color: #ec8d36;
    color: #ec8d36;
    background: #fff3e6;
}

.filters-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filters-button-text {
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.productes-filters-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.productes-filters-modal.is-open {
    display: flex;
}

.productes-filters-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.productes-filters-content {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    padding: 1.75rem;
    width: min(900px, 95vw);
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 28px 45px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateX(-22px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    overflow-y: auto !important;
}
.productes-filters-modal.is-open .productes-filters-content {
    transform: translateX(0);
    opacity: 1;
}
.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    padding-bottom: 0.75rem;
}
.filters-header h2 {
    margin: 0;
    font-size: 2rem !important;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #141820;
}
.filters-close {
    background: #f3f4f6;
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #1f2937;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    padding: 0;
}
.filters-close:hover,
.filters-close:focus {
    background-color: #111;
    color: #fff;
}
.productes-filters-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 0.5rem;
}
.filters-section {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.filters-section h3 {
    margin: 0;
    font-size: 1.6rem !important;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7280;
}
.filters-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.filters-group-label {
    font-weight: 600;
    font-size: 0.68rem !important;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
}
.filters-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}
.filters-options--grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}
.filters-option {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: #111827;
    background: #fdfdfd;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.filters-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #111827;
}
.filters-option:hover {
    border-color: #111827;
    color: #111827;
}
.filters-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}
.filters-apply {
    background: #111827;
    color: #ffffff;
    border: none;
    padding: 0.75rem 2.25rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
}
.filters-apply:hover {
    background: #1f2937;
}
.filters-apply:active {
    transform: scale(0.98);
}
.filters-clear {
    color: #4b5563;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(148, 163, 184, 0.45);
    padding: 0.72rem 2rem;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.filters-clear:hover {
    color: #111827;
    background-color: #f3f4f6;
}
@media (max-width: 600px) {
    .productes-filters-content {
        padding: 1.3rem;
    }
    .filters-options--grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    .filters-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .filters-apply,
    .filters-clear {
        width: 100%;
        text-align: center;
    }
}

/* Títol de la pàgina de tipus */
.tipus-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
}

/* Tabs de categories filles amb buscador */
.tipus-children-tabs-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
}

/* Quan no hi ha tabs però sí buscador */
.tipus-children-tabs-wrapper.no-tabs {
    justify-content: flex-end;
}

.tipus-children-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    flex: 1;
}

.tipus-tab {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tipus-tab:hover {
    border-color: #EC8D36;
    color: #EC8D36;
    background: #FFF8F0;
}

.tipus-tab.active {
    background: #222;
    color: #fff;
    border-color: #222;
}

.tipus-tab.active:hover {
    background: #333;
    border-color: #333;
}

/* Buscador inline (a la dreta dels tabs) */
.productes-search-inline {
    display: flex;
    min-width: 300px;
}

.productes-search-inline .search-form {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.productes-search-inline input.search-field {
    flex: 1;
    padding: 0.65rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.productes-search-inline button.search-submit {
    padding: 0.65rem 1.25rem;
    background: #2c5282;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.productes-search-inline button.search-submit:hover {
    background: #1a365d;
}

@media (max-width: 1024px) {
    .tipus-children-tabs-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .productes-search-inline {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .tipus-page-title {
        font-size: 1.5rem;
    }
    
    .tipus-children-tabs {
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
    }
    
    .tipus-tab {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .productes-search-inline button.search-submit {
        padding: 0.65rem;
        font-size: 0;
    }
    
    .productes-search-inline button.search-submit .icon-lupa {
        margin: 0;
    }
    
    .tipus-children-tabs-wrapper.no-tabs {
        justify-content: stretch;
    }
    
    .tipus-children-tabs-wrapper.no-tabs .productes-search-inline {
        width: 100%;
    }
}

.productes-filters {
    margin-bottom: 2rem;
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
    width: 100%;
}

/* Mobile: layout vertical com abans */
@media (max-width: 768px) {
    .productes-filters {
        display: block;
    }
    
    .materials-filter {
        margin-bottom: 1.5rem;
    }
    
    .materials-filter h3 {
        margin: 0 0 1rem;
        font-size: 1.2rem;
    }
    
    .productes-search {
        margin-bottom: 0;
    }
    
    /* Mobile: només lupa, sense text "Cercar" */
    .productes-search .search-submit {
        padding: 0.75rem;
        width: auto;
        min-width: auto;
        position: relative;
        text-indent: -9999px;
        overflow: hidden;
        white-space: nowrap;
    }
    
    .productes-search .search-submit .icon-lupa {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-indent: 0;
        font-size: 1rem;
    }
    
    .productes-search .search-submit .icon-lupa svg {
        width: 20px;
        height: 20px;
    }
}

/* Desktop: filtre i cercador en la mateixa fila */
@media (min-width: 769px) {
    .productes-filters {
        display: flex;
        align-items: flex-end;
        gap: 2rem;
        background-color: white;
        border: 1px solid #ddd;
    }
    
    .materials-filter {
        flex: 1;
        margin-bottom: 0 !important;
    }
    
    .materials-filter h3 {
        margin: 0 0 0.5rem;
        font-size: 1.2rem;
    }
    
    .productes-search {
        margin-bottom: 0 !important;
        flex: 1;
        max-width: 400px;
    }
}

.productes-search {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

.productes-search input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.productes-search button {
    padding: 0.75rem 1.5rem;
    background: #2c5282;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.productes-search button:hover {
    background: #1a365d;
}

.materials-filter h3 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
}

.material-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.material-tag:hover,
.material-tag.active {
    background-color: #2c5282;
    color: white;
    border-color: #2c5282;
}

.material-tag.clear-filter {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.material-tag.clear-filter:hover {
    background: #f5c6cb;
    border-color: #f1b0b7;
}

.producte-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.producte-card:hover {
    transform: translateY(-5px);
}

.producte-card a {
    text-decoration: none;
    color: inherit;
}

.producte-image {
    aspect-ratio: 1;
    overflow: hidden;
}

.producte-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    overflow: hidden !important;
}

.producte-info {
    padding: 1rem;
}

.producte-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: #333;
}

.producte-preu {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c5282;
    margin: 0.5rem 0;
}

.producte-materials {
    font-size: 0.9rem;
    color: #666;
}

/* Canviat: Classe per als tipus a la targeta */
.producte-tipus {
    font-size: 0.9rem;
    color: #666;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.pagination {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 2rem;
}

.pagination .page-numbers {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background: #f5f5f5;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination .current {
    background: #2c5282;
    color: white;
}

.related-products {
    display: grid;
    gap: 2rem;
    margin-top: 1rem;
}

@media (min-width: 1024px) {
    .related-products {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .related-products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .related-products {
        grid-template-columns: 1fr;
    }
}

.productes-title {
    font-size: 2rem;
    color: #2c5282;
    margin-bottom: 2rem;
    text-align: center;
}

/* Forzar el ancho completo del contenedor de archivo de productos */
.productes-archive {
    width: 100% !important;
    box-sizing: border-box;
}

/* Refuerzo para el dropdown de idiomas */
.language-dropdown {
    position: relative !important;
    z-index: 10000 !important;
}
.lang-dropdown-list {
    display: none !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 99999 !important;
    position: absolute !important;
    right: 0;
    top: 120%;
    background: #fff !important;
    color: #222 !important;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
    min-width: 90px;
    padding: 8px 0;
    margin-top: 8px;
}
.lang-dropdown-list.open {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
    z-index: 99999 !important;
    background: #fff !important;
    color: #222 !important;
}
.lang-dropdown-toggle[aria-expanded="true"] + .lang-dropdown-list {
    display: block !important;
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    font-size: 1.08rem;
    color: #222;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.18s, color 0.18s;
    min-width: 90px;
    margin: 2px 0;
    text-decoration: none;
    justify-content: center;
}
.lang-dropdown-item img {
    width: 32px !important;
    height: 22px !important;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    object-fit: cover;
    background: #f8f8f8;
}
.lang-dropdown-item:hover, .lang-dropdown-item:focus {
    background: #f4f4f4 !important;
    color: #EC8D36 !important;
    outline: none;
}
.lang-dropdown-list {
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 #fff;
    max-height: 220px;
    overflow-y: auto;
}
.lang-dropdown-list::-webkit-scrollbar {
    width: 6px;
    background: #fff;
}
.lang-dropdown-list::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 6px;
}
.lang-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px !important;
    background: #fff !important;
    border-radius: 22px;
    font-size: 1rem !important;
    cursor: pointer;
    transition: box-shadow 0.18s, border 0.18s, background 0.18s, padding 0.18s;
    min-width: 54px;
    min-height: 36px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: relative;
    height: auto;
}
.lang-dropdown-toggle img {
    width: 28px !important;
    height: 20px !important;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    object-fit: cover;
    background: #f8f8f8;
    margin-right: 4px;
}
.lang-dropdown-toggle:focus, .lang-dropdown-toggle[aria-expanded="true"], .lang-dropdown-toggle:hover {
    background: #fff;
    border-width: 2px !important;
    border-color: #000 !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
    box-shadow: 0 0 0 2px #EC8D3633;
    outline: none;
}
.lang-dropdown-toggle .lang-dropdown-arrow {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 4px;
    vertical-align: middle;
    transition: transform 0.2s;
}
.lang-dropdown-toggle[aria-expanded="true"] .lang-dropdown-arrow {
    transform: rotate(180deg);
}

* {
    overflow: visible !important;
}

.productes-top-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    font-size: 15px;
    margin: 0;
    padding: 0 2rem;
    box-sizing: border-box;
    border: none;
    border-radius: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    max-height: 64px;
    height: 64px;
    overflow: hidden;
    gap: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.productes-top-bar .topbar-col {
    display: flex;
    align-items: center;
    min-width: 0;
    background: transparent;
    border: none;
    height: 100%;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 1.5rem;
}
.productes-top-bar .topbar-contact {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding-left: 0.5rem;
    flex-shrink: 1;
    max-width: 100%;
}
.productes-top-bar .topbar-contact-group {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    margin: 0;
}
.productes-top-bar .topbar-contact-group + .topbar-contact-group {
    margin-top: 0;
}
.productes-top-bar .topbar-delivery {
    justify-content: center;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    color: #7a8a3a;
    letter-spacing: 0.5px;
    background: #f7f7f7;
    border-radius: 16px;
    padding: 8px 24px;
    margin: 0 auto;
}
.productes-top-bar .topbar-strong {
    font-size: 16px;
    color: #EC8D36;
    font-weight: bold;
    display: inline;
    margin-left: 6px;
}
.productes-top-bar .topbar-lang {
    justify-content: flex-end;
    align-items: center;
    text-align: right;
    min-width: 120px;
    gap: 10px;
}
.productes-top-bar .topbar-icon {
    font-size: 17px;
    color: #222;
    display: inline-block;
    vertical-align: middle;
    margin: 0;
}
.productes-top-bar .topbar-link {
    color: #222;
    text-decoration: underline;
    word-break: break-all;
    font-size: 15px;
    margin: 0;
    transition: color 0.2s;
}
.productes-top-bar .topbar-link:hover {
    color: #EC8D36;
}
.productes-top-bar .topbar-sep {
    display: inline;
    color: #bbb;
    margin: 0 10px;
    font-weight: 300;
}
@media (max-width: 900px) {
    .productes-top-bar {
        font-size: 14px;
        height: auto;
        max-height: none;
        flex-direction: column;
        padding: 0.5rem 0.5rem;
        gap: 8px;
    }
    .productes-top-bar .topbar-col {
        padding: 6px 0;
        font-size: 14px;
        justify-content: center !important;
    }
    .productes-top-bar .topbar-delivery {
        margin: 0.5rem 0;
        padding: 8px 16px;
        font-size: 14px;
    }
    .productes-top-bar .topbar-contact {
        align-items: center;
        padding-left: 0;
        flex-direction: row;
        gap: 10px;
    }
    .productes-top-bar .topbar-contact-group {
        justify-content: center;
    }
}

.hover-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    align-items: stretch;
    padding: 30px 0;
}

.hover-box {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    background: #fff;
    /* Borde sutil y sombra suave por defecto */
    border: 2.5px solid #f7b95a;
    box-shadow: 0 4px 18px rgba(247,185,90,0.10), 0 2px 8px rgba(0,0,0,0.08);
    transition: 
        transform 0.4s cubic-bezier(.4,2,.6,1), 
        box-shadow 0.4s, 
        border-color 0.4s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hover-box:hover {
    transform: scale(1.06) rotate(-1deg);
    /* Sombra más intensa y borde más vivo al hacer hover */
    box-shadow: 0 16px 48px rgba(247,185,90,0.18), 0 16px 48px rgba(0,0,0,0.22);
    border-color: #ffb300;
    z-index: 2;
}

.hover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.5s, transform 0.5s;
    filter: brightness(0.88) grayscale(0.1);
}

.hover-box:hover .hover-img {
    filter: brightness(1.15) saturate(1.3) blur(1.5px);
    transform: scale(1.08) rotate(1deg);
}

.hover-box span {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 22px 10px 18px 10px;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5px;
    background: linear-gradient(0deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.18) 100%);
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.38s cubic-bezier(.4,2,.6,1);
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}

.hover-box:hover span {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive para móviles */
@media (max-width: 600px) {
    .hover-box {
        width: 95vw;
        height: 180px;
    }
}
/* Diseño minimalista para familia-productes */
.familia-productes .e-con-inner {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    column-gap: 10px !important;
    row-gap: 7.5px !important;
    max-width: 980px !important;
    margin: 0 auto !important;
    padding: 2.2rem 0.5rem !important;
}

.familia-productes .e-con-child {
    width: 100% !important;
    height: 260px !important;
    min-width: 220px !important;
    min-height: 260px !important;
    max-width: 260px !important;
    max-height: 260px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* Específico para los primeros dos elementos del grid */
.familia-productes .e-con-inner > .e-con-child:nth-child(1),
.familia-productes .e-con-inner > .e-con-child:nth-child(2) {
    width: 100% !important;
}

.familia-productes .elementor-widget-container {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: stretch !important;
}

.familia-productes .elementor-widget-html {
    padding: 0 !important;
}

.familia-productes .hover-box {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.familia-productes .e-con-full.e-flex.e-con.e-child, .familia-productes .elementor-widget.elementor-widget-html {
    width: 100% !important;
    padding: 0 !important;
    height: 100% !important;
}

.familia-productes .hover-box {
    position: relative !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    text-decoration: none !important;
    background: #ffffff !important;
    border: 1px solid rgba(148, 163, 184, 0.4) !important;
    box-shadow: 0 6px 15px rgba(148, 163, 184, 0.18) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 240px !important;
    height: 100% !important;
    min-height: 260px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.familia-productes .hover-box::before {
    display: none !important;
}

.familia-productes .hover-box img {
    width: 100% !important;
    height: 180px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    transition: transform 0.2s ease !important;
}

.familia-productes .hover-box:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 10px 20px rgba(148, 163, 184, 0.24) !important;
}

.familia-productes .hover-box:hover img {
    transform: scale(1.02) !important;
}

/* TEXTO SIEMPRE VISIBLE - Diseño minimalista */
.familia-productes .hover-box span {
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    width: 100% !important;
    padding: 0.85rem 0.5rem 1.1rem !important;
    margin: 0 !important;
    color: #111827 !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    background: #ffffff !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    opacity: 1 !important;
    transform: none !important;
    border-radius: 0 !important;
}

/* --- RESPONSIVE: Tablet --- */
@media (max-width: 900px) {
    .familia-productes .e-con-inner {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 1.5rem !important;
        padding: 2rem 1rem !important;
    }
    .familia-productes .e-con-child {
        height: 260px !important;
        min-height: 260px !important;
        max-height: 260px !important;
    }
    .familia-productes .hover-box {
        height: 100% !important;
        min-height: 100% !important;
        max-height: 100% !important;
    }
    .familia-productes .hover-box img {
        height: 160px !important;
    }
}

/* --- MOBILE: 1 columna --- */
@media (max-width: 600px) {
    .familia-productes .e-con-inner {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 1.5rem 1rem !important;
    }
    .familia-productes .e-con-child {
        height: 240px !important;
        min-height: 240px !important;
        max-height: 240px !important;
        min-width: 100% !important;
    }
    .familia-productes .hover-box {
        height: 100% !important;
        min-height: 100% !important;
        max-height: 100% !important;
        min-width: 100% !important;
    }
    .familia-productes .hover-box img {
        height: 140px !important;
    }
    .familia-productes .hover-box span {
        padding: 1rem !important;
        font-size: 1rem !important;
    }
} 

.widget_related_products_widget .producte-tipus {
    display: none !important;
}

.widget_related_products_widget h3 {
    font-size: 27px !important;
}

/* --- Estilo base para el título del producto --- */
.producte-title {
    font-size: 1.56rem;
}

/* --- Responsive para el detalle de producto --- */
@media (max-width: 900px) {
    .producte-container {
      padding: 0 10px;
    }
    .producte-content {
      grid-template-columns: 1fr !important;
      gap: 1.5rem !important;
      display: grid !important;
    }
    .producte-gallery-form-col, .producte-details {
      width: 100% !important;
      max-width: 100% !important;
      padding: 0 !important;
    }
    .producte-gallery {
      margin-bottom: 1.5rem !important;
    }
    .producte-contact-form {
      margin: 1.5rem 0 0 0 !important;
      padding: 1rem !important;
    }
    .producte-title {
      font-size: 1.4rem !important;
    }
    .producte-description, .producte-caracteristiques, .producte-distribucio, .producte-icons-info, .producte-documents-list {
      font-size: 1rem !important;
    }
  }

/* --- Desktop: padding-top 0 per producte-container --- */
.producte-container {
  padding-top: 0 !important;
}

/* --- Desktop: padding-top 0 per producte-container --- */
@media (min-width: 769px) {
    .single-producte .producte-container {
    padding-top: 0 !important;
  }
}

/* --- Desktop: grid layout per producte-content --- */
.producte-content {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 2rem !important;
}

  
  @media (max-width: 600px) {
    .producte-container {
      padding: 0 2vw;
    }
    .producte-content {
      grid-template-columns: 1fr !important;
      gap: 1rem !important;
      display: block !important;
      margin-top: 100px !important;
    }
    .producte-gallery-form-col, .producte-details {
      width: 100% !important;
      max-width: 100% !important;
      padding: 0 !important;
    }
    .producte-gallery {
      margin-bottom: 1rem !important;
    }
    .main-image {
      max-width: 100% !important;
      height: auto !important;
    }
    .producte-featured-image {
      max-width: 100% !important;
      height: auto !important;
      border-radius: 10px !important;
    }
    .thumbnail-grid {
      gap: 4px !important;
      margin-top: 6px !important;
    }
    .thumbnail {
      border-radius: 6px !important;
    }
    .producte-contact-form {
      margin: 1rem 0 0 0 !important;
      padding: 0.5rem !important;
    }
    .producte-title {
      font-size: 1.25rem !important;
    }
    .producte-description, .producte-caracteristiques, .producte-distribucio, .producte-icons-info, .producte-documents-list {
      font-size: 0.98rem !important;
    }
    .producte-taula-personalitzada-wrap {
      margin: 1rem 0 !important;
      overflow-x: auto !important;
    }
    .producte-taula-personalitzada {
      min-width: 350px !important;
      font-size: 0.92em !important;
    }
    .producte-content {
      margin-top: 100px !important;
    }
  }

/* Estilos del formulario de contacto */
.producte-contact-form-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    padding: 3rem 1rem;
    position: relative;
}

.producte-contact-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw !important;
    height: 100%;
    background-color: #f5f5f5 !important;
    z-index: -1;
}

.producte-contact-form {
    max-width: 600px;
    width: 100%;
    padding: 2rem;
    background: #fff !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.producte-contact-form h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group textarea {
    resize: vertical;
}

button[type="submit"] {
    background: #2c5282;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background: #2a4365;
}

@media (max-width: 768px) {
    .producte-contact-form-container {
        padding: 2rem 0.5rem;
    }
    
    .producte-contact-form {
        padding: 1.5rem;
    }
}

.productes-archive {
    padding: 3rem 0 2rem 0;
    /* background: #f8f9fb; */
    min-height: 100vh;
}
.productes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.productes-buscador.mejorado {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}
.search-form.mejorado {
    background: #fff;
    box-shadow: 0 4px 24px 0 rgba(0,0,0,0.07);
    border-radius: 40px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 420px;
}
.search-field.mejorado {
    border: none;
    outline: none;
    font-size: 1.1rem;
    padding: 0.7rem 1.2rem;
    border-radius: 30px;
    background: #f3f4f7;
    flex: 1;
    transition: background 0.2s;
}
.search-field.mejorado:focus {
    background: #e9eaf0;
}
.search-submit.mejorado {
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 0.7rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.07);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.search-submit.mejorado:hover {
    background: linear-gradient(90deg, #0056b3 0%, #007bff 100%);
}
.icon-lupa {
    display: flex;
    align-items: center;
    height: 20px;
}
.productes-grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 2rem;
    background: #fff;
    border-radius: 18px;
}
@media (max-width: 1200px) {
    .productes-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 0 !important;
    }
}
@media (max-width: 900px) {
    .productes-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 1.5rem 0.5rem;
    }
}
@media (max-width: 600px) {
    .productes-grid {
        grid-template-columns: 1fr;
        padding: 1rem 0.2rem;
    }
    .search-form.mejorado {
        max-width: 100%;
        padding: 0.3rem 0.5rem;
    }
    .search-field.mejorado {
        font-size: 1rem;
        padding: 0.5rem 0.7rem;
    }
    .search-submit.mejorado {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}
.producte-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
}
.producte-card:hover {
    transform: translateY(-7px) scale(1.03);
    box-shadow: 0 6px 24px rgba(0,0,0,0.13);
}
.producte-card a {
    text-decoration: none;
    color: inherit;
}
.producte-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f3f4f7;
}
.producte-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.producte-info {
    padding: 1.2rem 1rem 1rem 1rem;
}
.producte-info h2 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: #222;
    font-weight: 500;
}
.producte-tipus {
    font-size: 0.95rem;
    color: #666;
}
.no-productes {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    background: #f5f5f5;
    border-radius: 8px;
}

/* Breadcrumb Styles */
.productes-breadcrumb {
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: #005177;
    text-decoration: underline;
}

.breadcrumb-item.current span {
    color: #222;
    font-weight: 500;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #999;
}

@media (max-width: 600px) {
    .breadcrumb-list {
        font-size: 0.85rem;
    }
    
    .breadcrumb-separator {
        margin: 0 0.3rem;
    }
}

/* Estilos del filtro de productos */
.productes-filter {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    color: #222;
    font-size: 1.1rem;
    margin: 0;
    white-space: nowrap;
}

.productes-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    min-width: 250px;
    max-width: 400px;
    flex: 1;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    font-family: inherit;
}

/* Fallback para navegadores que no soportan appearance: none */
@supports not (appearance: none) {
    .productes-select {
        background-image: none;
        padding-right: 1rem;
    }
}

.productes-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.productes-select:hover {
    border-color: #0073aa;
}

.productes-select option {
    padding: 0.5rem;
    color: #333;
}

.productes-select option:disabled {
    color: #999;
    font-style: italic;
}

@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .filter-label {
        text-align: center;
    }
    
    .productes-select {
        min-width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .productes-filter {
        padding: 1rem;
    }
    
    .filter-label {
        font-size: 1rem;
    }
    
    .productes-select {
        font-size: 0.95rem;
        padding: 0.6rem 0.8rem;
        padding-right: 2.2rem;
    }
}

/* Infinite Scroll Loading Indicators */
.productes-loading,
.productes-no-more {
    text-align: center;
    padding: 2rem 1rem;
    margin: 2rem 0;
}

.productes-loading p,
.productes-no-more p {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

.productes-loading p::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.productes-loading {
    position: relative;
}

.productes-loading::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin-loader 1s linear infinite;
    vertical-align: middle;
}

@keyframes spin-loader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.productes-no-more p {
    color: #999;
    font-style: italic;
}

.contact-intro h3 {
    font-size: 27px !important;
}

.filters-active-wrapper {
    margin: 0.75rem 0 1.25rem;
}
.filters-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid rgba(148, 163, 184, 0.45);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #111827;
    font-weight: 600;
}
.filter-chip--clear {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.filter-chip--clear:hover {
    background: #1f2937;
    color: #ffffff;
}
.filters-options--boolean .filters-option {
    padding: 0.45rem 0.95rem;
}
.filters-group--mandril {
    margin-top: 0.5rem;
}
@media (min-width: 1024px) {
    .filters-options--grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
.filters-options--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}
.filters-group--grid-three .filters-options--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 768px) {
    .filters-group--grid-three .filters-options--grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 480px) {
    .filters-group--grid-three .filters-options--grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}