.cp-widget-wrapper {
    font-family: inherit;
    color: #333;
    position: relative;
}

/* Sticky Header Wrapper */
.cp-sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Tabs */
.cp-tabs {
    display: flex;
    border-bottom: 2px solid #eaeaea;
    margin-bottom: 20px;
    justify-content: center;
    gap: 32px;
}

.cp-tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: -2px;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    outline: none;
}

.cp-tab-btn.active {
    color: var(--tcr-primary-color);
    border-bottom-color: var(--tcr-primary-color);
}

.cp-tab-btn svg {
    fill: #888;
    flex-shrink: 0;
    transition: fill 0.3s ease;
}

.cp-tab-btn.active svg {
    fill: var(--tcr-primary-color);
}

/* Filters */
.cp-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: center;
}

/* Search */
.cp-search {
    flex: 0 0 auto;
    width: 280px;
    position: relative;
    display: flex;
    align-items: center;
}

.cp-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    z-index: 1;
}

.cp-search-icon svg {
    fill: #999;
    display: block;
}

/* Forcing specificty and !important to override theme rules */
input.cp-search-input,
.cp-widget-wrapper input.cp-search-input {
    width: 100%;
    padding: 11px 16px 11px 44px !important;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
    background: #fff;
    color: #333;
}

.cp-search-input::placeholder {
    color: #aaa;
}

.cp-search-input:focus {
    border-color: var(--tcr-primary-color);
}

/* Alphabet */
.cp-alphabet {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.cp-alphabet-swiper {
    overflow: hidden;
}

.cp-letter-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0;
    width: 40px;
    height: 40px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
}

.cp-letter-btn.todos {
    width: auto;
    padding: 0 16px;
    font-weight: 600;
}

.cp-letter-btn:hover:not(.disabled) {
    background: #f0faf5;
    border-color: var(--tcr-primary-color);
    color: var(--tcr-primary-color);
}

.cp-letter-btn.active {
    background: var(--tcr-primary-color);
    color: #fff;
    border-color: var(--tcr-primary-color);
}

.cp-letter-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.swiper-slide {
    width: auto !important;
}

/* Grid */
.cp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.cp-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
}

.cp-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
}

.cp-card-img {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    width: 100%;
}

.cp-card-img img {
    max-height: 64px;
    max-width: 140px;
    width: auto;
    object-fit: contain;
}

.cp-card-placeholder {
    color: #ccc;
}

.cp-card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cp-card-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: #222;
    line-height: 1.4;
}

.cp-card-badge {
    background: #e6f6ec;
    color: var(--tcr-primary-color);
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
    font-weight: 500;
}

.cp-card-footer {
    margin-top: 20px;
    width: 100%;
    border-top: 1px solid #f0f0f0;
    padding-top: 16px;
}

.cp-card-btn {
    background: none;
    border: none;
    color: var(--tcr-primary-color);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
    padding: 4px 8px;
}

.cp-card-btn:hover {
    opacity: 0.75;
}

.cp-card-btn.disabled {
    color: #bbb;
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

.cp-no-results {
    text-align: center;
    padding: 48px 24px;
    color: #888;
    background: #f9f9f9;
    border-radius: 10px;
    font-size: 15px;
}

/* Footer */
.cp-footer {
    margin-top: 16px;
    background: #f4fcf7;
    border: 1px solid #d4edda;
    border-radius: 8px;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.cp-footer-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #444;
    font-size: 14px;
    flex: 1;
}

.cp-footer-text svg {
    fill: var(--tcr-primary-color);
    flex-shrink: 0;
}

.cp-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid var(--tcr-primary-color);
    color: var(--tcr-primary-color);
    padding: 9px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.25s;
    white-space: nowrap;
}

.cp-footer-btn:hover {
    background: var(--tcr-primary-color);
    color: #fff;
}

.cp-footer-btn svg {
    fill: currentColor;
}

/* Modal */
.cp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cp-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cp-modal-content {
    background: #fff;
    border-radius: 14px;
    width: 90%;
    max-width: 480px;
    max-height: 88vh;
    padding: 32px 28px 24px;
    position: relative;
    transform: scale(0.94);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
}

.cp-modal-overlay.active .cp-modal-content {
    transform: scale(1);
}

.cp-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.cp-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

#cp-modal-body {
    overflow-y: auto;
    flex-grow: 1;
    margin-bottom: 20px;
    padding-right: 4px;
}

.cp-modal-img {
    max-height: 64px;
    max-width: 180px;
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
}

.cp-modal-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1a1a1a;
    padding-right: 32px;
}

.cp-modal-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.65;
    margin-bottom: 20px;
}

.cp-modal-planos-title {
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 15px;
    color: #222;
}

.cp-modal-planos-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cp-modal-planos-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #444;
    margin-bottom: 10px;
    line-height: 1.4;
}

.cp-modal-planos-list li svg {
    flex-shrink: 0;
}

.cp-modal-wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid var(--tcr-primary-color);
    color: var(--tcr-primary-color);
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.25s;
    width: 100%;
    box-sizing: border-box;
}

.cp-modal-wa-btn:hover {
    background: var(--tcr-primary-color);
    color: #fff;
}

.cp-modal-wa-btn svg {
    fill: currentColor;
}

/* Responsive */
@media (max-width: 1024px) {
    .cp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .cp-filters {
        flex-wrap: wrap;
    }

    .cp-search {
        width: 100%;
    }

    .cp-alphabet {
        width: 100%;
    }

    .cp-footer {
        flex-direction: column;
        text-align: center;
    }

    .cp-footer-text {
        justify-content: center;
    }
}