.wpct-modules {
    --wpct-blue: #2b8fe0;
    --wpct-blue-light: #67aae1;
    --wpct-blue-dark: #1a4d80;
    --wpct-ink: #12294a;
    --wpct-text: #1a2a45;
    --wpct-muted: #64748b;
    --wpct-line: #e6edf6;
    --wpct-bg: #f4f8fd;
    /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; */
    color: var(--wpct-text);
    box-sizing: border-box;
}

.wpct-modules *,
.wpct-modules *::before,
.wpct-modules *::after {
    box-sizing: inherit;
}

/* .wpct-modules-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 660px;
    margin: 0 auto 28px;
    height: 60px;
    padding: 6px 6px 6px 12px;
    background: #fff;
    border: 1.5px solid #cfe0f5;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(26, 77, 128, .08);
    transition: border-color .25s ease, box-shadow .25s ease;
}
.wpct-modules-badge {
    position: absolute;
    top: 7px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    z-index: 2;
    background: #FFFFFF;
    border: 1.5px solid #FFFFFF;
    color: var(--wpct-blue);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.wpct-modules-search-badge svg { width: 20px; height: 20px; }

.wpct-modules-search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--wpct-text);
    outline: none;
}
.wpct-modules-search-input::placeholder { color: #9aa6b6; }

.wpct-modules-search-submit {
    flex: 0 0 auto;
    width: 66px;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--wpct-blue);
    color: #fff;
    transition: background .2s ease;
    pointer-events: none;
}
.wpct-modules-search-submit svg { width: 20px; height: 20px; }

.wpct-modules-search:focus-within {
    border-color: var(--wpct-blue);
    box-shadow: 0 0 0 4px rgba(43, 143, 224, .14), 0 10px 28px rgba(26, 77, 128, .12);
} */

.wpct-modules-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 660px;
    margin: 0 auto 120px;
    height: 60px;
    /* Removed padding on the search bar itself to let the submit button bleed to the edge */
    padding: 0 0 0 12px;
    background: #fff;
    border: 1.5px solid #cfe0f5;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(26, 77, 128, .08);
    transition: border-color .25s ease, box-shadow .25s ease;
    overflow: hidden; /* Added to keep the submit button rounded corners aligned */
}

/* Updated selector to match the class name used in the badge <span> */
.wpct-modules-search-badge {
    display: inline-flex;
    align-items: center;
    color: var(--wpct-blue);
}

.wpct-modules-search-badge svg { width: 20px; height: 20px; }

.wpct-modules-search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: none !important;
    background: transparent;
    font-size: 16px;
    color: var(--wpct-text);
    outline: none;
    box-shadow: none; /* Added to ensure no inner box shadow */
}
.wpct-modules-search-input::placeholder { color: #9aa6b6; }

.wpct-modules-search-submit {
    flex: 0 0 auto;
    width: 66px;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* background: var(--wpct-blue); */ /* Removed background from the container */
    color: #fff;
    transition: background .2s ease;
    pointer-events: auto; /* Changed to auto so the button is clickable */
}

/* Style the button itself within the submit container */
.wpct-modules-search-submit button {
    width: 100%;
    height: 100%;
    border: none;
    background: var(--wpct-blue);
    border-radius: 0 999px 999px 0; /* Rounds only the right side */
    color: #fff;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease;
}

.wpct-modules-search-submit button:hover {
    background: #0056c7; /* Darker blue on hover */
}

.wpct-modules-search-submit svg { width: 20px; height: 20px; }

.wpct-modules-search:focus-within {
    border-color: var(--wpct-blue);
    box-shadow: 0 0 0 4px rgba(0, 97, 224, .14), 0 10px 28px rgba(26, 77, 128, .12); /* Updated shadow color */
}

.wpct-modules-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    align-items: start;
}

.wpct-modules-sidebar {
    position: sticky;
    top: 102px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--wpct-line);
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(5, 35, 85, 0.08),
        0 10px 24px rgba(5, 35, 85, 0.12);
}

.wpct-modules-cat-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--wpct-muted);
    padding: 6px 10px 12px;
}
.wpct-modules-cat-title .wpct-modules-filter-icon {
    width: 18px;
    height: 18px;
    color: var(--wpct-blue);
}

.wpct-modules-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 6px 12px 12px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--wpct-ink);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.wpct-modules-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}
.wpct-modules-filter-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: var(--wpct-blue);
    transition: color .18s ease;
}

.wpct-modules-filter:hover {
    background: var(--wpct-bg);
    color: var(--wpct-blue-dark);
}

.wpct-modules-filter.is-active {
    background: var(--wpct-blue);
    color: #fff;
    box-shadow: 0 6px 16px rgba(43, 143, 224, .3);
}
.wpct-modules-filter.is-active .wpct-modules-filter-icon {
    color: #fff;
}

.wpct-modules-count {
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 30px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 10px;
    background: #eaf3fd;
    color: var(--wpct-blue);
    font-size: 13px;
    font-weight: 700;
}

.wpct-modules-filter.is-active .wpct-modules-count {
    background: var(--wpct-blue-dark);
    color: #fff;
}

.wpct-modules-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.wpct-modules-showing {
    font-size: 14px;
    font-weight: 600;
    color: var(--wpct-muted);
}

.wpct-modules-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
@media (max-width: 1100px) {
    .wpct-modules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .wpct-modules-grid { grid-template-columns: 1fr; }
}

.wpct-modules-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--wpct-line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(20, 30, 60, 0.04), 0 8px 20px rgba(20, 30, 60, 0.06);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.wpct-modules-card:hover {
    transform: translateY(-6px);
    border-color: #bcdcf6;
    box-shadow: 0 20px 40px rgba(20, 30, 60, 0.14), 0 0 0 1px #bcdcf6;
}

.wpct-modules-thumb {
    position: relative;
    margin: 14px 14px 0;
    aspect-ratio: 17/8;
    border-radius: 14px;
    background: var(--wpct-bg);
    overflow: hidden;
}

.wpct-modules-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wpct-modules-noimg {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e7f0fb, #f4f8fd);
}

.wpct-modules-badge {
 position: absolute;
 top: 7px;
right: 10px;
padding: 4px 10px;
border-radius: 999px;
z-index: 2;
background: #FFFFFF;
border: 1.5px solid #FFFFFF;
color: var(--wpct-blue);
font-size: 12px;
font-weight: 600;
letter-spacing: .3px;
text-transform: uppercase;
}

.wpct-modules-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 20px 22px;
    flex: 1 1 auto;
}

.wpct-modules-price {
    align-self: flex-start;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(43, 143, 224, .12);
    color: var(--wpct-blue);
    font-size: 13px;
    font-weight: 700;
}

.wpct-modules-price.is-free {
    background: #eef1f5;
    color: var(--wpct-muted);
}

.wpct-modules-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--wpct-ink);
}

.wpct-modules-desc p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--wpct-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wpct-modules-desc.is-open p {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

.wpct-modules-more {
    align-self: flex-start;
    margin-top: 2px;
    padding: 0;
    border: none;
    background: none !important;
    color: var(--wpct-blue) !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.wpct-modules-more:hover {
    text-decoration: underline;
}

.wpct-modules-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 10px;
}

.wpct-modules-btn {
    flex: 1 1 0;
    text-align: center;
    text-decoration: none;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.wpct-modules-btn-details {
    background: var(--wpct-blue);
    color: #fff !important;
}

.wpct-modules-btn-details:hover {
    background: var(--wpct-blue-dark);
    color: #fff;
}

.wpct-modules-btn-buy {
    background: #fff;
    border: 1px solid var(--wpct-line);
    color: var(--wpct-blue) !important;
}

.wpct-modules-btn-buy:hover {
    background: var(--wpct-blue);
    color: #fff !important;
    border-color: var(--wpct-blue);
}

.wpct-modules-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--wpct-muted);
    font-style: italic;
}

@media (max-width: 782px) {
    .wpct-modules-layout {
        grid-template-columns: 1fr;
    }

    .wpct-modules-sidebar {
        position: static;
    }
}