.ccw-catalogo {
    --ccw-sidebar-width: 280px;
    --ccw-gap: 1.75rem;
    --ccw-section-padding: 1.4rem;
    --ccw-border: #d7deea;
    --ccw-surface: #ffffff;
    --ccw-surface-soft: #f4f7fb;
    --ccw-surface-strong: #eaf0f7;
    --ccw-text: #16202d;
    --ccw-muted: #6b7684;
    --ccw-accent: #21486d;
    --ccw-accent-dark: #173553;
    --ccw-accent-soft: rgba(33, 72, 109, 0.1);
    --ccw-accent-line: rgba(33, 72, 109, 0.16);
    --ccw-card-glow: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 248, 252, 0.92));
    --ccw-shadow: 0 24px 60px rgba(22, 32, 45, 0.08);
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, var(--ccw-sidebar-width)) minmax(0, 1fr);
    gap: var(--ccw-gap);
    align-items: start;
    margin: 2rem 0;
}

.ccw-catalogo::before {
    content: "";
    position: absolute;
    inset: 1.25rem 1rem auto auto;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(33, 72, 109, 0.16), rgba(33, 72, 109, 0));
    pointer-events: none;
    filter: blur(4px);
}

.ccw-sidebar,
.ccw-content,
.ccw-card {
    background: var(--ccw-surface);
    border: 1px solid var(--ccw-border);
    border-radius: 24px;
    box-shadow: var(--ccw-shadow);
}

.ccw-sidebar {
    position: sticky;
    top: 1.5rem;
    overflow: hidden;
    isolation: isolate;
    background:
        linear-gradient(180deg, rgba(33, 72, 109, 0.08), rgba(33, 72, 109, 0) 26%),
        var(--ccw-surface);
}

.ccw-sidebar::after,
.ccw-content::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

.ccw-sidebar-header,
.ccw-toolbar {
    padding: var(--ccw-section-padding) var(--ccw-section-padding) 0;
}

.ccw-sidebar-title,
.ccw-content-title {
    margin: 0;
    color: var(--ccw-text);
    line-height: 1.2;
}

.ccw-sidebar-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.ccw-content-title {
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 750;
    letter-spacing: -0.03em;
}

.ccw-category-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem calc(var(--ccw-section-padding) - 0.3rem) calc(var(--ccw-section-padding) - 0.3rem);
}

.ccw-category-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(33, 72, 109, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--ccw-text);
    text-align: left;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.ccw-category-button:hover,
.ccw-category-button:focus-visible {
    border-color: rgba(33, 72, 109, 0.25);
    box-shadow: 0 12px 28px rgba(33, 72, 109, 0.12);
    transform: translateX(3px);
    outline: none;
}

.ccw-category-button.is-active {
    border-color: rgba(33, 72, 109, 0.28);
    background: linear-gradient(135deg, rgba(33, 72, 109, 0.14), rgba(255, 255, 255, 0.94));
    color: var(--ccw-accent-dark);
}

.ccw-category-name {
    display: block;
    font-weight: 650;
    line-height: 1.35;
}

.ccw-category-count {
    min-width: 2rem;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    background: var(--ccw-surface-strong);
    color: var(--ccw-accent-dark);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
}

.ccw-eyebrow {
    color: var(--ccw-muted);
}

.ccw-content {
    min-width: 0;
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(180deg, rgba(33, 72, 109, 0.05), rgba(255, 255, 255, 0) 24%),
        var(--ccw-surface);
}

.ccw-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ccw-search-wrap {
    flex: 0 1 320px;
    width: 100%;
    max-width: 320px;
}

.ccw-search-input {
    width: 100%;
    min-height: 48px;
    padding: 0.82rem 1rem;
    border: 1px solid rgba(33, 72, 109, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ccw-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ccw-search-input::placeholder {
    color: var(--ccw-muted);
}

.ccw-search-input:focus {
    border-color: rgba(33, 72, 109, 0.35);
    box-shadow: 0 0 0 4px rgba(33, 72, 109, 0.08);
    outline: none;
}

.ccw-eyebrow {
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ccw-content-title::after {
    content: "";
    display: block;
    width: 72px;
    height: 3px;
    margin-top: 0.8rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ccw-accent), rgba(33, 72, 109, 0.14));
}

.ccw-results {
    padding: var(--ccw-section-padding);
}

.ccw-grid {
    display: grid;
    grid-template-columns: repeat(var(--ccw-columns), minmax(0, 1fr));
    gap: 1rem;
}

.ccw-card {
    overflow: hidden;
    position: relative;
    border-radius: 18px;
    background: var(--ccw-card-glow);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.ccw-card:hover {
    transform: translateY(-4px);
    border-color: rgba(33, 72, 109, 0.18);
    box-shadow: 0 24px 44px rgba(22, 32, 45, 0.12);
}

.ccw-card-image {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    padding: 0.8rem;
    border-bottom: 1px solid rgba(33, 72, 109, 0.08);
    background: linear-gradient(180deg, #f8fafd, #eef3f8);
}

.ccw-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.35s ease;
}

.ccw-card:hover .ccw-card-image img {
    transform: scale(1.02);
}

.ccw-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.9rem 0.95rem 1rem;
}

.ccw-card-title {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    min-height: 2.55em;
}

.ccw-card-title a {
    color: var(--ccw-text);
    text-decoration: none;
}

.ccw-card-title a:hover,
.ccw-card-title a:focus-visible {
    color: var(--ccw-accent-dark);
    outline: none;
}

.ccw-card-description {
    margin: 0;
    color: var(--ccw-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.ccw-card-price {
    color: var(--ccw-accent-dark);
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.ccw-card-price .price {
    color: inherit;
}

.ccw-card-price del {
    opacity: 0.55;
    font-weight: 600;
}

.ccw-card-price ins {
    text-decoration: none;
}

.ccw-card-actions {
    margin-top: auto;
    padding-top: 0.15rem;
}

.ccw-button,
.ccw-stock-out {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.ccw-button {
    border: 1px solid rgba(33, 72, 109, 0.08);
    background: linear-gradient(135deg, #3f6a90, #2e5579);
    color: #fff;
    box-shadow: 0 10px 20px rgba(33, 72, 109, 0.14);
    letter-spacing: 0.01em;
}

.ccw-button:hover,
.ccw-button:focus-visible {
    background: var(--ccw-accent-dark);
    color: #fff;
    outline: none;
}

.ccw-button.alt {
    background: #23313a;
    box-shadow: 0 12px 22px rgba(35, 49, 58, 0.18);
}

.ccw-stock-out {
    background: #f1f3f5;
    color: #6a7280;
}

.ccw-message,
.ccw-empty-state,
.ccw-loading {
    padding: 2.4rem 1.2rem;
    border: 1px dashed rgba(33, 72, 109, 0.22);
    border-radius: 22px;
    background: linear-gradient(180deg, #fbfcfe, #f2f6fb);
    text-align: center;
    color: var(--ccw-muted);
}

.ccw-message {
    margin: 1rem 0;
}

.ccw-loading::after {
    content: "";
    width: 18px;
    height: 18px;
    margin-left: 0.6rem;
    border: 2px solid rgba(33, 72, 109, 0.2);
    border-top-color: var(--ccw-accent);
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    animation: ccw-spin 0.8s linear infinite;
}

.ccw-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.ccw-page-button {
    min-height: 44px;
    padding: 0.78rem 1.05rem;
    border: 1px solid rgba(33, 72, 109, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--ccw-text);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.ccw-page-button:hover,
.ccw-page-button:focus-visible {
    border-color: rgba(33, 72, 109, 0.35);
    color: var(--ccw-accent-dark);
    transform: translateY(-1px);
    outline: none;
}

.ccw-page-button[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.ccw-page-button,
.ccw-search-input,
.ccw-button,
.ccw-category-button {
    touch-action: manipulation;
}

.ccw-page-status {
    color: var(--ccw-muted);
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(33, 72, 109, 0.05);
}

@keyframes ccw-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 991px) {
    .ccw-catalogo {
        grid-template-columns: 1fr;
        --ccw-section-padding: 1.1rem;
    }

    .ccw-catalogo::before {
        width: 140px;
        height: 140px;
        inset: 1rem 1rem auto auto;
    }

    .ccw-sidebar {
        position: static;
    }

    .ccw-category-list {
        position: relative;
        flex-direction: row;
        overflow-x: auto;
        gap: 0.75rem;
        padding-top: 0.95rem;
        padding-bottom: 1.1rem;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    }

    .ccw-sidebar {
        position: relative;
    }

    .ccw-sidebar::before,
    .ccw-sidebar::after {
        content: "";
        position: absolute;
        inset: auto auto 1rem 0;
        z-index: 2;
        width: 44px;
        height: 72px;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0));
        pointer-events: none;
    }

    .ccw-sidebar::before {
        left: 0;
    }

    .ccw-sidebar::after {
        right: 0;
        left: auto;
        background: linear-gradient(270deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0));
    }

    .ccw-category-button {
        width: auto;
        min-width: 0;
        max-width: 100%;
        flex: 0 0 auto;
        justify-content: flex-start;
        gap: 0.45rem;
        padding: 0.82rem 0.9rem;
        scroll-snap-align: start;
    }

    .ccw-category-name {
        flex: 0 1 auto;
        white-space: nowrap;
    }

    .ccw-category-count {
        min-width: auto;
        padding: 0.18rem 0.42rem;
        line-height: 1;
        flex: 0 0 auto;
    }

    .ccw-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
        align-items: end;
        gap: 0.3rem 0.75rem;
    }

    .ccw-results {
        padding-top: 0.1rem;
    }

    .ccw-content-title::after {
        width: 56px;
        margin-top: 0.35rem;
    }

    .ccw-toolbar > div:first-child {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        min-width: 0;
    }

    .ccw-search-wrap {
        width: 100%;
        max-width: none;
        align-self: end;
        margin: 0;
    }

    .ccw-search-input {
        min-height: 44px;
        padding: 0.72rem 0.9rem;
    }

    .ccw-grid {
        grid-template-columns: repeat(var(--ccw-columns-tablet), minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ccw-catalogo {
        gap: 1rem;
        margin: 1.25rem 0;
        --ccw-section-padding: 1rem;
    }

    .ccw-sidebar,
    .ccw-content,
    .ccw-card {
        border-radius: 20px;
    }

    .ccw-sidebar-header,
    .ccw-toolbar {
        padding-top: 1.1rem;
    }

    .ccw-category-list {
        gap: 0.65rem;
        padding: 0.85rem 1rem 1rem;
        mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    }

    .ccw-category-button {
        width: max-content;
        min-width: 150px;
        max-width: min(78vw, 220px);
        padding: 0.78rem 0.85rem;
        border-radius: 16px;
    }

    .ccw-sidebar::before,
    .ccw-sidebar::after {
        bottom: 0.85rem;
        width: 28px;
        height: 56px;
    }

    .ccw-grid {
        grid-template-columns: repeat(var(--ccw-columns-mobile), minmax(0, 1fr));
        gap: 0.85rem;
    }

    .ccw-toolbar {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
        gap: 0.15rem;
    }

    .ccw-search-wrap {
        max-width: none;
    }

    .ccw-search-input {
        min-height: 42px;
        padding: 0.68rem 0.88rem;
    }

    .ccw-content-title {
        font-size: clamp(1.28rem, 6vw, 1.75rem);
    }

    .ccw-content-title::after {
        margin-top: 0.3rem;
    }

    .ccw-results {
        padding-top: 0;
    }

    .ccw-card-body {
        padding: 0.85rem 0.9rem 0.95rem;
        gap: 0.55rem;
    }

    .ccw-card-title {
        min-height: auto;
        font-size: 0.92rem;
    }

    .ccw-card-image {
        padding: 0.65rem;
    }

    .ccw-card-price {
        font-size: 0.92rem;
    }

    .ccw-button,
    .ccw-stock-out,
    .ccw-page-button {
        min-height: 42px;
    }

    .ccw-pagination {
        gap: 0.75rem;
    }

    .ccw-page-status {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ccw-catalogo {
        --ccw-gap: 0.9rem;
        --ccw-section-padding: 0.9rem;
    }

    .ccw-sidebar-title {
        font-size: 1rem;
    }

    .ccw-eyebrow {
        margin-bottom: 0.35rem;
        font-size: 0.72rem;
        letter-spacing: 0.14em;
    }

    .ccw-content-title::after {
        width: 48px;
        margin-top: 0.28rem;
    }

    .ccw-category-list {
        padding-top: 0.75rem;
        padding-bottom: 0.9rem;
    }

    .ccw-category-button {
        min-width: 150px;
        max-width: 80vw;
        gap: 0.35rem;
    }

    .ccw-category-name {
        font-size: 0.9rem;
    }

    .ccw-category-count {
        min-width: auto;
        padding: 0.14rem 0.36rem;
        font-size: 0.72rem;
    }

    .ccw-results {
        padding-top: 0;
    }

    .ccw-toolbar {
        gap: 0.1rem;
    }

    .ccw-page-button {
        width: 100%;
    }
}
