/*
 * Creative Woo Professional Shop
 * The product card layout intentionally preserves the original plugin design.
 */

.cwps-shop,
.cwpg-wrapper {
    --cwps-dark: #263238;
    --cwps-primary: #335c5c;
    --cwps-primary-deep: #1f3940;
    --cwps-gold: #9f7946;
    --cwps-cream: #fffdf9;
    --cwps-border: rgba(154, 125, 85, 0.16);
    width: 100%;
    margin: 0 auto;
    font-family: inherit;
}

.cwps-shop *,
.cwps-shop *::before,
.cwps-shop *::after,
.cwpg-wrapper *,
.cwpg-wrapper *::before,
.cwpg-wrapper *::after {
    box-sizing: border-box;
}

.cwpg-header {
    text-align: center;
    margin-bottom: 34px;
}

.cwpg-header h2 {
    font-size: clamp(24px, 4vw, 38px);
    line-height: 1.15;
    margin: 0 0 10px;
    font-weight: 850;
    color: #263238;
    letter-spacing: -0.4px;
}

.cwpg-header p {
    margin: 0 auto;
    max-width: 720px;
    font-size: 15px;
    color: #6b6f76;
    line-height: 1.7;
}

.cwps-shop-header {
    position: relative;
    padding: 8px 16px 0;
}

.cwps-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 11px;
    color: #725637;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.cwps-kicker::before,
.cwps-kicker::after {
    content: "";
    width: 26px;
    height: 1px;
    background: rgba(159, 121, 70, 0.55);
}

/* Professional shop filters */
.cwps-filter-form {
    position: relative;
    margin-bottom: 25px;
    padding: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 0 0, rgba(111, 159, 154, 0.13), transparent 33%),
        linear-gradient(135deg, #ffffff 0%, #fffdf9 100%);
    border: 1px solid rgba(154, 125, 85, 0.18);
    border-radius: 22px;
    box-shadow: 0 14px 38px rgba(38, 50, 56, 0.08);
}

.cwps-filter-form::after {
    content: "";
    position: absolute;
    right: -65px;
    bottom: -85px;
    width: 210px;
    height: 210px;
    border: 1px solid rgba(51, 92, 92, 0.08);
    border-radius: 50%;
    box-shadow: 0 0 0 28px rgba(51, 92, 92, 0.025), 0 0 0 56px rgba(51, 92, 92, 0.018);
    pointer-events: none;
}

.cwps-filter-heading {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.cwps-filter-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #725637;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 1.35px;
    text-transform: uppercase;
}

.cwps-filter-heading h3 {
    margin: 0;
    color: #263238;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.2;
    font-weight: 850;
}

.cwps-mobile-filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(51, 92, 92, 0.22);
    border-radius: 11px;
    background: #fff;
    color: #294d4d;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.cwps-filter-fields {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(210px, 1.6fr) repeat(3, minmax(140px, 1fr)) minmax(180px, 1.1fr);
    gap: 15px;
    align-items: end;
}

.cwps-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.cwps-field > span:first-child,
.cwps-sort > span {
    color: #4e595e;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: 0.45px;
    text-transform: uppercase;
}

.cwps-field input[type="search"],
.cwps-field input[type="number"],
.cwps-field select,
.cwps-sort select {
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid rgba(38, 50, 56, 0.14);
    border-radius: 12px;
    outline: none;
    background: rgba(255, 255, 255, 0.94);
    color: #263238;
    font: inherit;
    font-size: 14px;
    box-shadow: 0 7px 18px rgba(38, 50, 56, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cwps-field input:focus,
.cwps-field select:focus,
.cwps-sort select:focus {
    border-color: rgba(51, 92, 92, 0.55);
    box-shadow: 0 0 0 4px rgba(51, 92, 92, 0.09);
}

.cwps-input-icon {
    position: relative;
    display: block;
}

.cwps-input-icon svg {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    fill: none;
    stroke: #718084;
    stroke-width: 1.8;
    stroke-linecap: round;
    pointer-events: none;
}

.cwps-field .cwps-input-icon input {
    padding-left: 42px;
}

.cwps-check-field {
    min-height: 75px;
}

.cwps-checks {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
}

.cwps-checks label {
    position: relative;
    flex: 1 1 auto;
    cursor: pointer;
}

.cwps-checks input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cwps-checks span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid rgba(38, 50, 56, 0.13);
    border-radius: 11px;
    background: #fff;
    color: #566064;
    font-size: 12px;
    font-weight: 800;
    transition: all 0.2s ease;
}

.cwps-checks input:checked + span {
    border-color: #335c5c;
    background: #335c5c;
    color: #fff;
    box-shadow: 0 9px 20px rgba(51, 92, 92, 0.2);
}

.cwps-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 3px;
}

.cwps-apply-btn,
.cwps-reset-btn {
    min-height: 46px;
    border-radius: 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cwps-apply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 170px;
    padding: 0 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #294d4d 0%, #1f3940 55%, #14262d 100%);
    color: #fff;
    box-shadow: 0 12px 25px rgba(31, 57, 64, 0.22);
}

.cwps-apply-btn svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cwps-reset-btn {
    padding: 0 18px;
    border: 1px solid rgba(38, 50, 56, 0.13);
    background: #fff;
    color: #596267;
}

.cwps-apply-btn:hover,
.cwps-reset-btn:hover {
    transform: translateY(-2px);
}

.cwps-results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 19px;
    padding: 0 2px;
}

.cwps-result-count {
    color: #687176;
    font-size: 14px;
    font-weight: 700;
}

.cwps-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cwps-sort select {
    width: auto;
    min-width: 185px;
    height: 42px;
    padding-right: 34px;
}

.cwps-results-shell {
    position: relative;
    min-height: 120px;
}

.cwps-results-shell.is-loading [data-cwps-grid],
.cwps-results-shell.is-loading [data-cwps-pagination] {
    opacity: 0.38;
    pointer-events: none;
}

.cwps-loading[hidden] {
    display: none !important;
}

.cwps-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    padding-top: 70px;
    color: #294d4d;
    font-size: 14px;
    font-weight: 850;
}

.cwps-spinner {
    width: 21px;
    height: 21px;
    border: 2px solid rgba(51, 92, 92, 0.2);
    border-top-color: #335c5c;
    border-radius: 50%;
    animation: cwpsSpin 0.75s linear infinite;
}

@keyframes cwpsSpin {
    to { transform: rotate(360deg); }
}

/* Original product grid/card design */
.cwpg-grid {
    display: grid;
    grid-template-columns: repeat(var(--cwps-columns, 4), minmax(0, 1fr));
    gap: 24px;
}

.cwpg-card {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #fffdf9 100%);
    border: 1px solid rgba(154, 125, 85, 0.16);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 12px 32px rgba(38, 50, 56, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.35s ease;
}

.cwpg-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(212, 180, 131, 0.48), rgba(255,255,255,0), rgba(61, 100, 100, 0.32));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.cwpg-card:hover::before { opacity: 1; }

.cwpg-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 55px rgba(38, 50, 56, 0.14), 0 0 0 1px rgba(61, 100, 100, 0.14);
    border-color: rgba(61, 100, 100, 0.26);
}

.cwpg-image-box {
    position: relative;
    width: 100%;
    height: 268px;
    background: #faf7f2;
    overflow: hidden;
    border-bottom: 1px solid rgba(154, 125, 85, 0.14);
}

.cwpg-image-box a {
    display: block;
    width: 100%;
    height: 100%;
}

.cwpg-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: none !important;
    transition: filter 0.35s ease;
}

.cwpg-card:hover .cwpg-image-box img {
    transform: none !important;
    filter: saturate(1.03) contrast(1.02);
}

.cwpg-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    background: rgba(255,255,255,0.94);
    color: #335c5c;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    box-shadow: 0 9px 22px rgba(38, 50, 56, 0.13);
    backdrop-filter: blur(10px);
}

.cwpg-content {
    padding: 20px 19px 19px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    z-index: 1;
}

.cwpg-sku {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 10px;
    padding: 6px 12px;
    background: #f4efe7;
    color: #725637;
    border: 1px solid rgba(159, 121, 70, 0.16);
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.12px;
}

.cwpg-title {
    font-size: 18px;
    line-height: 1.28;
    font-weight: 850;
    color: #263238;
    margin: 0 0 13px;
    letter-spacing: -0.12px;
}

.cwpg-title a {
    color: inherit;
    text-decoration: none !important;
    transition: color 0.25s ease;
}

.cwpg-title a:hover { color: #335c5c; }

.cwpg-price-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 19px;
    flex-wrap: wrap;
}

.cwpg-price {
    font-size: 22px;
    line-height: 1;
    font-weight: 900;
    color: #263238;
}

.cwpg-price del {
    opacity: 0.5;
    font-size: 14px;
    margin-right: 5px;
    color: #8b8f93;
}

.cwpg-price ins {
    text-decoration: none;
    color: #263238;
}

.cwpg-unit {
    font-size: 13px;
    font-weight: 750;
    color: #747b82;
}

.cwpg-button-wrap { margin-top: auto; }

.cwpg-quote-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    border-radius: 13px;
    background: linear-gradient(135deg, #294d4d 0%, #1f3940 52%, #14262d 100%);
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 850;
    letter-spacing: 0.18px;
    text-decoration: none !important;
    transition: all 0.32s ease;
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 12px 26px rgba(31, 57, 64, 0.25), 0 0 15px rgba(51, 92, 92, 0.20);
    animation: cwpgButtonGlow 2.6s ease-in-out infinite;
}

.cwpg-quote-btn::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    background: linear-gradient(120deg, #294d4d, #6f9f9a, #1f3940, #294d4d);
    background-size: 260% 260%;
    opacity: 0.55;
    filter: blur(12px);
    animation: cwpgSoftAura 3.4s linear infinite;
}

.cwpg-quote-btn::after {
    content: "";
    position: absolute;
    top: -22%;
    left: -78%;
    width: 45%;
    height: 145%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.62), transparent);
    transform: skewX(-24deg);
    animation: cwpgLightSweep 2.9s ease-in-out infinite;
}

.cwpg-quote-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #213f3f 0%, #172f36 52%, #101f25 100%);
    color: #ffffff !important;
    box-shadow: 0 16px 34px rgba(31, 57, 64, 0.32), 0 0 22px rgba(111, 159, 154, 0.32);
}

@keyframes cwpgButtonGlow {
    0%, 100% { box-shadow: 0 12px 26px rgba(31, 57, 64, 0.22), 0 0 12px rgba(51, 92, 92, 0.18); }
    50% { box-shadow: 0 15px 32px rgba(31, 57, 64, 0.32), 0 0 24px rgba(111, 159, 154, 0.34); }
}

@keyframes cwpgSoftAura {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes cwpgLightSweep {
    0% { left: -82%; opacity: 0; }
    22% { opacity: 1; }
    52% { left: 132%; opacity: 1; }
    100% { left: 132%; opacity: 0; }
}

.cwpg-empty {
    padding: 28px;
    background: #fffdf9;
    border: 1px solid rgba(154, 125, 85, 0.18);
    color: #5f5041;
    border-radius: 18px;
    text-align: center;
    font-weight: 800;
    box-shadow: 0 12px 32px rgba(38, 50, 56, 0.08);
}

.cwps-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 34px;
}

.cwps-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid rgba(38, 50, 56, 0.13);
    border-radius: 11px;
    background: #fff;
    color: #4d595d;
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 7px 18px rgba(38, 50, 56, 0.05);
    transition: all 0.2s ease;
}

.cwps-pagination a.page-numbers:hover,
.cwps-pagination .page-numbers.current {
    border-color: #294d4d;
    background: #294d4d;
    color: #fff;
    box-shadow: 0 10px 22px rgba(41, 77, 77, 0.22);
}

@media (max-width: 1200px) {
    .cwps-filter-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .cwps-field-search { grid-column: span 2; }
    .cwpg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
    .cwpg-image-box { height: 255px; }
}

@media (max-width: 991px) {
    .cwps-filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cwps-field-search { grid-column: 1 / -1; }
    .cwpg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .cwpg-image-box { height: 245px; }
    .cwpg-title { font-size: 17px; }
    .cwpg-price { font-size: 21px; }
}

@media (max-width: 767px) {
    .cwps-filter-form { padding: 18px; border-radius: 18px; }
    .cwps-filter-heading { margin-bottom: 0; }
    .cwps-mobile-filter-toggle { display: inline-flex; }
    .cwps-filter-fields { grid-template-columns: 1fr; padding-top: 18px; }
    .cwps-shop.cwps-js .cwps-filter-fields { display: none; }
    .cwps-shop.cwps-js .cwps-filter-form.is-open .cwps-filter-fields { display: grid; }
    .cwps-field-search,
    .cwps-filter-actions { grid-column: auto; }
    .cwps-filter-actions { justify-content: stretch; }
    .cwps-apply-btn { flex: 1; }
    .cwps-results-toolbar { align-items: flex-end; }
    .cwps-sort { flex-direction: column; align-items: flex-start; gap: 6px; }
    .cwps-sort select { min-width: 170px; }
}

@media (max-width: 575px) {
    .cwpg-header { margin-bottom: 22px; }
    .cwpg-header h2 { font-size: 24px; }
    .cwpg-header p { font-size: 13px; line-height: 1.6; }
    .cwps-filter-heading h3 { font-size: 17px; }
    .cwps-filter-form { padding: 15px; }
    .cwps-results-toolbar { gap: 12px; }
    .cwps-result-count { max-width: 45%; font-size: 11.5px; line-height: 1.4; }
    .cwps-sort > span { font-size: 9px; }
    .cwps-sort select { min-width: 145px; height: 38px; padding-left: 10px; font-size: 11px; }
    .cwpg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .cwpg-card { border-radius: 14px; box-shadow: 0 8px 22px rgba(38, 50, 56, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
    .cwpg-card:hover { transform: translateY(-3px); }
    .cwpg-image-box { height: 160px; }
    .cwpg-content { padding: 13px 11px 12px; }
    .cwpg-sku { font-size: 9.5px; padding: 5px 7px; margin-bottom: 8px; line-height: 1.15; }
    .cwpg-title { font-size: 13px; line-height: 1.28; margin-bottom: 9px; font-weight: 850; }
    .cwpg-price-row { gap: 3px; margin-bottom: 12px; }
    .cwpg-price { font-size: 16px; }
    .cwpg-price del { font-size: 11px; margin-right: 3px; }
    .cwpg-unit { font-size: 10px; }
    .cwpg-quote-btn { min-height: 39px; font-size: 12px; border-radius: 10px; }
    .cwps-pagination { gap: 5px; margin-top: 24px; }
    .cwps-pagination .page-numbers { min-width: 36px; min-height: 36px; padding: 0 9px; font-size: 11px; }
    .cwps-page-label { display: none; }
}

@media (max-width: 380px) {
    .cwpg-grid { gap: 10px; }
    .cwpg-image-box { height: 145px; }
    .cwpg-content { padding: 12px 10px 11px; }
    .cwpg-sku { font-size: 9px; padding: 5px 7px; }
    .cwpg-title { font-size: 12.5px; }
    .cwpg-price { font-size: 15px; }
    .cwpg-quote-btn { min-height: 37px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .cwpg-card,
    .cwpg-quote-btn,
    .cwps-apply-btn,
    .cwps-reset-btn,
    .cwps-pagination .page-numbers {
        transition: none;
    }

    .cwpg-quote-btn,
    .cwpg-quote-btn::before,
    .cwpg-quote-btn::after,
    .cwps-spinner {
        animation: none;
    }
}

/*
 * Category-locked shortcode safeguard.
 * This prevents themes, builders or cached template fragments from revealing
 * the Smart Filters panel on a fixed-category collection.
 */
.cwps-shop.cwps-no-filters > .cwps-filter-form,
.cwps-shop.cwps-fixed-category > .cwps-filter-form {
    display: none !important;
}
