﻿/* =========================
   CATALOG HEADER
========================= */
.catalog-header {
    border-top: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
}

.catalog-header-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: center;
    position: relative;
    padding: 18px 16px 20px;
    background: #fafafa;
    overflow: hidden;
    /* centrato mobile */
    text-align: center;
    justify-items: center;
}

.catalog-header-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.catalog-title {
    margin: 0 0 10px;
    font-size: 1.9rem;
    line-height: 1.15;
    font-weight: 700;
    color: #111;
}

.catalog-brand-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 0.94rem;
    line-height: 1.4;
    color: #444;
}

.catalog-brand-rating-star {
    font-size: 1rem;
    line-height: 1;
}

.catalog-brand-rating-value {
    font-weight: 700;
    color: #111;
}

.catalog-brand-rating-text,
.catalog-brand-rating-count,
.catalog-brand-rating-sep {
    color: #666;
}

.catalog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #666;
}

.catalog-count {
    font-weight: 500;
    color: #111;
}

.catalog-meta-sep {
    color: #ccc;
}

.catalog-active-inline {
    color: #666;
}

.catalog-description {
    max-width: 720px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    text-align: center;
}

.catalog-brand-logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    min-width: 120px;
    max-width: 180px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 14px;
}

.catalog-brand-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 48px;
}

/* =========================
   TABLET
========================= */
@media (min-width: 768px) {
    .catalog-header-main {
        padding: 20px 24px 24px;
        gap: 22px;
        text-align: center;
        justify-items: center;
    }

    .catalog-header-content {
        align-items: center;
    }

    .catalog-title {
        font-size: 2.2rem;
    }

    .catalog-brand-rating {
        font-size: 0.96rem;
    }

    .catalog-meta {
        font-size: 0.92rem;
    }

    .catalog-brand-logo-box {
        min-width: 130px;
        max-width: 190px;
        padding: 15px 18px;
    }

    .catalog-brand-logo {
        max-height: 52px;
    }
}

/* =========================
   DESKTOP
========================= */
@media (min-width: 1200px) {
    .catalog-header-main {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 24px;
        padding: 18px 1em 24px;
        /* torna layout classico */
        text-align: left;
        justify-items: stretch;
    }

    .catalog-header-content {
        align-items: flex-start;
    }

    .catalog-title {
        font-size: 2.2rem;
    }

    .catalog-brand-rating {
        justify-content: flex-start;
        font-size: 15px;
    }

    .catalog-brand-rating-star {
        font-size: 16px;
    }

    .catalog-meta {
        justify-content: flex-start;
        font-size: 14px;
    }

    .catalog-description {
        text-align: left;
    }

    .catalog-brand-logo-box {
        margin: 0;
        min-width: 140px;
        max-width: 200px;
        padding: 16px 20px;
    }

    .catalog-brand-logo {
        max-height: 56px;
    }
}
/* =========================
   CATALOG LAYOUT
========================= */
body.is-searchbar-open {
    overflow: hidden;
}

.catalog-layout {
    display: block;
}

.catalog-main {
    min-width: 0;
}

.catalog-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 360px;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

    .catalog-sidebar > div:last-child {
        z-index: -1;
    }

    .catalog-sidebar.is-open {
        transform: translateX(0);
    }

.catalog-sidebar__header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
}

.catalog-sidebar__title {
    font-family: var(--header-font-family);
    font-size: 1.25rem;
    line-height: 1.2;
}

.catalog-sidebar__close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #f7f7f7;
    color: #222;
    cursor: pointer;
}

.catalog-sidebar .sticky_menu {
    padding: 0px;
    gap: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.catalog-sidebar__content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
    overflow-y: auto;
    padding-right: 20px;
    padding-left: 20px;
    padding-bottom: 20px;
}
/* =========================
   CATALOG TOOLBAR
========================= */
.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.catalog-filters-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

    .catalog-filters-toggle:hover {
        border-color: #bbb;
        background: #fafafa;
    }

.catalog-order-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    margin-left: auto;
    padding-bottom: 24px;
}

.catalog-order-label {
    display: none;
    font-size: 0.95rem;
    color: #666;
    white-space: nowrap;
}

.catalog-order-dropdown {
    position: relative;
}

.catalog-order-toggle {
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #fff;
    color: #222;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

    .catalog-order-toggle:hover {
        border-color: #bbb;
        background: #fafafa;
    }

    .catalog-order-toggle i {
        font-size: 0.8rem;
        color: #666;
        transition: transform 0.2s ease;
    }

.catalog-order-dropdown.open .catalog-order-toggle i {
    transform: rotate(180deg);
}

.catalog-order-current {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    min-width: 220px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
    z-index: 30;
}

.catalog-order-dropdown.open .order-menu {
    display: block;
}

.order-menu li {
    margin: 0;
    padding: 0;
}

    .order-menu li a {
        display: block;
        padding: 10px 14px;
        font-size: 0.95rem;
        color: #222;
        text-decoration: none;
    }

        .order-menu li a:hover {
            background: #f7f7f7;
        }

    .order-menu li.active a {
        font-weight: 600;
    }

/* =========================
   SEARCH FORM
========================= */
.search-form {
    display: flex;
    align-items: center;
    border: 1px solid #dcdcdc;
    border-radius: 999px;
    background: #fff;
}

    .search-form input {
        flex: 1 1 auto;
        min-width: 0;
        border: none;
        padding: 11px 14px;
        font-size: inherit;
        outline: none;
        background: transparent;
    }

    .search-form:focus-within {
        border-color: #999;
    }

    .search-form button {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        border: none;
        background: transparent;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #666;
        padding: 0;
    }

        .search-form button i {
            font-size: 1rem;
            line-height: 1;
        }

        .search-form button:hover {
            color: #111;
        }

/* =========================
   FILTER BLOCKS
========================= */
.filter-block {
    padding-bottom: 18px;
    border-bottom: 1px solid #efefef;
}

    .filter-block:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

.filter-title {
    position: relative;
    margin: 0;
    padding: 0 24px 0 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    color: #111;
    user-select: none;
}

    .filter-title::after {
        content: "\f078";
        font-family: "Font Awesome 5 Pro";
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.85rem;
        color: #666;
        transition: transform 0.2s ease;
    }

.filter-block.closed .filter-title::after {
    transform: translateY(-50%) rotate(-90deg);
    right: 3px;
}

.filter-list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.filter-block.closed .filter-list,
.filter-block.closed .filter-list-toggle,
.filter-block.closed .filter-box,
.filter-block.closed .price-manual-inputs {
    display: none;
}

/* blocco disponibilità in alto */
#disp-filter {
    margin-top: 0;
    padding-bottom: 18px;
    border-bottom: 1px solid #efefef;
}

/* =========================
   FILTER LISTS WITH COUNTS
========================= */
.catalog-sidebar ul.counter li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

    .catalog-sidebar ul.counter li + li {
        margin-top: 6px;
    }

.catalog-sidebar ul.counter .count {
    flex: 0 0 auto;
    font-size: 0.88rem;
    line-height: 1.2;
    color: #888;
    white-space: nowrap;
}

.catalog-sidebar ul.counter a {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.7;
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

    .catalog-sidebar ul.counter a:hover {
        color: #111;
    }

.catalog-sidebar ul li.active a {
    font-weight: 600;
    color: #111;
}

.catalog-sidebar .is-hidden {
    display: none;
}

/* =========================
   PRICE FILTER
========================= */
.price-manual-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 14px;
}

.price-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .price-input-group label {
        font-size: 0.88rem;
        color: #666;
    }

.price-input-wrapper {
    position: relative;
}

.price-currency {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: #484848;
    pointer-events: none;
}

/* input */
.price-input-group input {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 28px; /* 👈 spazio per € */
    border: 1px solid #ddd;
    border-radius: 999px;
    font-size: inherit;
    outline: none;
    background: #fff;
    text-align: right;
}

    .price-input-group input:focus {
        border-color: #999;
    }

.filter-box {
    margin-top: 0;
}

.filter-content {
    padding: 0;
}

.price-filter {
    padding: 4px 2px 0;
}

/* =========================
   FILTER TOGGLE BUTTON
========================= */
.filter-list-toggle {
    margin-top: 10px;
    margin-bottom: 0;
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
    color: #222;
    font-size: 0.93rem;
    text-decoration: underline;
}

/* =========================
   COLOR FILTER
========================= */
.colortype {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

    .colortype li {
        display: inline-block;
    }

    .colortype a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
    }

    .colortype span {
        display: inline-block;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        border: 1px solid #ccc;
        box-sizing: border-box;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .colortype a:hover span {
        transform: scale(1.12);
        box-shadow: 0 0 0 2px rgba(0,0,0,0.12);
    }

    .colortype .active a span,
    .colortype a.active span {
        box-shadow: 0 0 0 2px #000;
    }

    .colortype span[style*="#FFFFFF"],
    .colortype span[style*="#ffffff"] {
        border-color: #999;
    }

/* =========================
   NIB FILTER
========================= */
.nibtype {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

    .nibtype li {
        display: inline-block;
    }

    .nibtype a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.3em 0.6em;
        border: 1px solid #8a8a8a;
        border-radius: 999px;
        background: #f3f4f6;
        color: #222;
        text-decoration: none;
        transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

        .nibtype a:hover {
            background: #c3c3c3;
        }

        .nibtype .active a,
        .nibtype a.active {
            background: #111;
            color: #fff !important;
            border-color: #111;
        }

/* =========================
   MODEL FILTER
========================= */
.model-filter-list.is-collapsed li:nth-child(n+21):not(.force-visible) {
    display: none;
}

/* =========================
   SKELETON
========================= */
.product-card-skeleton {
    pointer-events: none;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: #ececec;
    border-radius: 8px;
}

    .skeleton::after {
        content: "";
        position: absolute;
        inset: 0;
        transform: translateX(-100%);
        background: linear-gradient( 90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 100% );
        animation: skeleton-shimmer 1.4s infinite;
    }

.product-skeleton-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skeleton-badge {
    display: block;
    width: 92px;
    height: 22px;
    border-radius: 999px;
}

.skeleton-badge-small {
    width: 68px;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
}

.skeleton-line {
    height: 14px;
    margin-top: 10px;
    border-radius: 999px;
}

.skeleton-line-title {
    width: 88%;
}

    .skeleton-line-title.short {
        width: 62%;
    }

.product-price-skeleton {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.skeleton-line-price-now {
    width: 34%;
    height: 18px;
    margin-top: 14px;
}

.skeleton-line-price-old {
    width: 22%;
    height: 14px;
    margin-top: 14px;
}

@keyframes skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* =========================
   TABLET
========================= */
@media (min-width: 768px) {
    .catalog-toolbar {
        margin-bottom: 22px;
    }

    .catalog-sidebar {
        max-width: 400px;
    }

    .catalog-order-label {
        display: inline;
    }

    .catalog-sidebar .sticky_menu {
        gap: 20px;
    }

    .catalog-order-toggle {
        min-width: 220px;
    }
}

/* =========================
   DESKTOP
========================= */
@media (min-width: 1200px) {
    .catalog-sidebar .sticky_menu {
        padding: 0;
        overflow: visible;
        gap: 20px;
        height: auto;
    }

    .catalog-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 12px;
        align-items: start;
    }

    .catalog-sidebar {
        display: block;
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        background: transparent;
        transform: none;
        z-index: 1;
    }

    .catalog-sidebar__header {
        display: none;
    }

    .catalog-sidebar__content {
        padding: 0px;
    }

    .sticky_menu {
        position: relative;
        margin-bottom: 20px;
    }

    .catalog-filters-toggle {
        display: none;
    }

    .catalog-order-label {
        display: inline;
    }

    .catalog-order-wrap {
        padding-right: 0;
        justify-content: flex-end;
    }

    .catalog-order-toggle {
        min-width: 220px;
    }

    .search-form {
        border-radius: 999px;
    }

    .filter-title {
        font-size: 1.1rem;
    }
}
/* =========================
   SKELETON
========================= */
.product-card-skeleton {
    pointer-events: none;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: #ececec;
    border-radius: 8px;
}

    .skeleton::after {
        content: "";
        position: absolute;
        inset: 0;
        transform: translateX(-100%);
        background: linear-gradient( 90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 100% );
        animation: skeleton-shimmer 1.4s infinite;
    }

.product-skeleton-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skeleton-badge {
    display: block;
    width: 92px;
    height: 22px;
    border-radius: 999px;
}

.skeleton-badge-small {
    width: 68px;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
}

.skeleton-line {
    height: 14px;
    margin-top: 10px;
    border-radius: 999px;
}

.skeleton-line-title {
    width: 88%;
}

    .skeleton-line-title.short {
        width: 62%;
    }

.product-price-skeleton {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.skeleton-line-price-now {
    width: 34%;
    height: 18px;
    margin-top: 14px;
}

.skeleton-line-price-old {
    width: 22%;
    height: 14px;
    margin-top: 14px;
}

@keyframes skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}