/*
Cybermatica Academy Catalog Pro
Tailwind utilities are used in the template. These scoped rules provide:
1) visual refinements not covered by utilities,
2) production fallback if Tailwind CDN is unavailable,
3) isolation from Storefront/WooCommerce legacy floats.
*/

body.cma-catalog-pro-page #primary,
body.cma-catalog-pro-page .content-area,
body.cma-catalog-pro-page #main,
body.cma-catalog-pro-page .site-main,
body.cma-catalog-pro-page article,
body.cma-catalog-pro-page .entry-content,
body.cma-catalog-pro-page .woocommerce,
body.cma-catalog-pro-page .cma-catalog-pro-shell {
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.cma-catalog-pro-page .site-content > .col-full,
body.cma-catalog-pro-page #content > .col-full {
    width: calc(100% - clamp(26px, 5vw, 84px)) !important;
    max-width: 1560px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.cma-catalog-pro-page .woocommerce-breadcrumb {
    max-width: 1560px;
    margin: 16px auto 20px !important;
}

.cma-tw-catalog {
    box-sizing: border-box;
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 12px 0 80px;
    font-family: Inter, "Plus Jakarta Sans", Roboto, system-ui, sans-serif;
    color: #0F172A;
}

.cma-tw-catalog *,
.cma-tw-catalog *::before,
.cma-tw-catalog *::after {
    box-sizing: border-box;
}

.cma-catalog-hero {
    min-height: 440px;
    background-color: #0F172A;
    background-position: center;
    background-size: cover;
    box-shadow: 0 28px 75px rgba(15,23,42,.16);
}

.cma-catalog-hero__overlay {
    background:
        linear-gradient(135deg, rgba(15,23,42,.94), rgba(15,23,42,.63)),
        radial-gradient(circle at 75% 25%, rgba(2,132,199,.35), transparent 32%);
}

.cma-search-shell input[type="search"] {
    min-height: 46px !important;
    width: 100% !important;
    border: 0 !important;
    box-shadow: none !important;
}

.cma-search-suggestions {
    max-height: 360px;
    overflow-y: auto;
}

.cma-suggestion-row {
    display: block;
    padding: 13px 16px;
    border-bottom: 1px solid #E2E8F0;
    color: #0F172A !important;
    text-decoration: none !important;
    transition: background .16s ease;
}

.cma-suggestion-row:last-child {
    border-bottom: 0;
}

.cma-suggestion-row:hover {
    background: #F8FAFC;
}

.cma-suggestion-row strong,
.cma-suggestion-row span {
    display: block;
}

.cma-suggestion-row strong {
    font-size: 13px;
}

.cma-suggestion-row span {
    margin-top: 3px;
    color: #64748B;
    font-size: 11px;
}

.cma-pill-filter input + span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 6px 11px;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    background: #FFF;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    transition: all .16s ease;
}

.cma-pill-filter input:checked + span {
    border-color: #0284C7;
    background: #E0F2FE;
    color: #0369A1;
    box-shadow: 0 0 0 2px rgba(2,132,199,.06);
}

.cma-check-row {
    display: flex;
    cursor: pointer;
    align-items: center;
    gap: 9px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.cma-check-row input {
    width: 16px !important;
    min-width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    margin: 0 !important;
    accent-color: #0284C7;
}

.cma-price-range {
    accent-color: #0284C7;
}

.cma-active-chip {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 7px;
    padding: 4px 9px 4px 10px;
    border: 1px solid #BAE6FD;
    border-radius: 999px;
    background: #F0F9FF;
    color: #0369A1;
    cursor: pointer;
    font-size: 10px;
    font-weight: 850;
}

.cma-active-chip b {
    font-size: 14px;
    line-height: 1;
}

.cma-card-title,
.cma-card-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.cma-card-title {
    -webkit-line-clamp: 2;
}

.cma-card-description {
    -webkit-line-clamp: 2;
}

.cma-course-card img {
    max-width: 100%;
}

.cma-wishlist.is-saved {
    background: #FFF1F2 !important;
    color: #E11D48 !important;
}

.cma-wishlist.is-saved svg {
    fill: currentColor;
}

.cma-card-hidden {
    display: none !important;
}

/* Fallback principal si Tailwind CDN no cargara. */
.cma-tw-catalog > section:nth-of-type(2) {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 24px;
}

.cma-tw-catalog [data-cma-grid] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.cma-course-card {
    min-width: 0;
    height: 100%;
}

@media (max-width: 1199px) {
    .cma-tw-catalog [data-cma-grid] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    .cma-tw-catalog > section:nth-of-type(2) {
        display: block;
    }

    .cma-filter-panel {
        margin-bottom: 22px;
    }
}

@media (max-width: 700px) {
    body.cma-catalog-pro-page .site-content > .col-full,
    body.cma-catalog-pro-page #content > .col-full {
        width: calc(100% - 24px) !important;
    }

    .cma-tw-catalog [data-cma-grid] {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .cma-catalog-hero {
        min-height: 390px;
        border-radius: 22px !important;
    }
}

