/* =========================================
   GENERAL
   ========================================= */

.cpc-product,
.cpc-category-content,
.cpc-search {
    width: 100%;
}

.single-catalog_product main.wp-block-group,
.single-catalog_product .wp-block-post-content {
    width: 100%;
    max-width: none;
}

.single-catalog_product .cpc-product,
.cpc-category-content,
.cpc-search {
    width: calc(100% - 48px);
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
}

header.wp-block-template-part {
    position: sticky;
    top: 0;
    z-index: 9999;
}

/* =========================================
   PRODUCT CATEGORY NAVIGATION
   ========================================= */

.cpc-category-nav {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 5px;
    box-sizing: border-box;
    overflow: visible;
}
.cpc-header-inner {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

.cpc-site-header {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    
}
.cpc-header-sticky {
    position: sticky !important;
    top: 0 !important;
    z-index: 99999 !important;
    width: 100% !important;
    box-sizing: border-box !important;
   
}

body.admin-bar .cpc-header-sticky {
    top: 32px !important;
}

@media (max-width: 782px) {
    body.admin-bar .cpc-header-sticky {
        top: 46px !important;
    }
}
.cpc-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.cpc-header-logo {
    padding: 20px;
    box-sizing: border-box;
}

.cpc-header-search {
    margin-left: auto;
    margin-right: 20px;
    box-sizing: border-box;
}
.cpc-header-navigation {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.cpc-category-nav-menu,
.cpc-category-nav-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cpc-category-nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    box-sizing: border-box;
}

.cpc-category-nav-item {
    position: relative;
    min-width: 0;
    flex-shrink: 1;
}

.cpc-category-nav-item-row {
    display: flex;
    align-items: center;
}

.cpc-category-nav-link {
    display: block;
    min-width: 0;
    max-width: 100%;
    padding: 8px 10px;
    color: inherit;
    font: inherit;
    font-size: clamp(11px, 1vw, 16px);
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cpc-category-nav-toggle {
    padding: 4px;
    margin-left: -4px;
    color: white;
    background: none;
    border: 0;
    cursor: pointer;
}

.cpc-category-nav-chevron {
    display: block;
    width: 6px;
    height: 6px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
}

.cpc-category-nav-submenu-wrap {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    min-width: 220px;
    display: none;
}

.cpc-category-nav-submenu {
    padding: 6px;
    background: var(--wp--preset--color--base, #fff);
    color: var(--wp--preset--color--contrast, #222);
    border: 1px solid #ddd;
}

.cpc-category-nav-item:hover > .cpc-category-nav-submenu-wrap,
.cpc-category-nav-item:focus-within > .cpc-category-nav-submenu-wrap,
.cpc-category-nav-item.is-open > .cpc-category-nav-submenu-wrap {
    display: block;
}

.cpc-category-nav-submenu .cpc-category-nav-link {
    white-space: nowrap;
    color: inherit;
    font-size: clamp(11px, 0.95vw, 15px);
}

.cpc-category-nav-mobile-toggle {
    display: none;
}


/* =========================================
   TABLET / MOBILE NAV
   ========================================= */

@media (max-width: 850px) {

    .cpc-category-nav {
        text-align: center;
    }

    .cpc-category-nav-mobile-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 38px;
        height: 38px;

        padding: 8px;
        margin: 0 auto;

        color: white;
        background: none;
        border: 0;

        cursor: pointer;
    }

    .cpc-category-nav-mobile-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: currentColor;
    }

    .cpc-category-nav-menu-wrap {
        display: none;
        width: 100%;
        margin-top: 8px;
        text-align: left;
    }

    .cpc-category-nav.is-mobile-open
    .cpc-category-nav-menu-wrap {
        display: block;
    }

    .cpc-category-nav-menu {
        display: block;
        width: 100%;
    }

    .cpc-category-nav-item-row {
        width: 100%;
		color:white;
    }

    .cpc-category-nav-link {
        flex: 1;
		font-size: 12px;
    }

    /*
     * All child menus are always visible
     * once the hamburger menu is open.
     */
    .cpc-category-nav-submenu-wrap {
        position: static;
        display: block;
        min-width: 0;
        width: 100%;
    }

    .cpc-category-nav-submenu {
        padding-left: 18px;
        border: 0;
        background: transparent;
    }

    /*
     * Child toggle buttons are unnecessary
     * on mobile because all levels are open.
     */
    .cpc-category-nav-toggle {
        display: none;
    }
}

/* =========================================
   BREADCRUMBS
   ========================================= */

.cpc-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 14px;
    line-height: 1.5;
}

.cpc-breadcrumbs a {
    text-decoration: none;
}

.cpc-breadcrumb-separator {
    opacity: .5;
}

/* =========================================
   PRODUCT PAGE
   ========================================= */

.cpc-product-main {
    display: grid;
    grid-template-columns: minmax(500px, 750px) minmax(350px, 1fr);
    gap: 64px;
    align-items: start;
    width: 100%;
}

.cpc-product-gallery,
.cpc-product-info {
    width: 100%;
    min-width: 0;
}

.cpc-product-main-image {
    display: block;
    width: 100%;
    max-width: 750px;
    max-height: 750px;
    margin: 0 auto;
    object-fit: contain;
}

.cpc-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 250px;
    background: #f5f5f5;
    color: #666;
}

.cpc-product-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.cpc-product-thumbnail {
    display: block;
    width: 82px;
    height: 82px;
    padding: 4px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
}

.cpc-product-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cpc-product-thumbnail:hover {
    border-color: #999;
}
.cpc-product-results {
	padding: 10px;
}
.cpc-product-thumbnail.is-active {
    border-width: 2px;
    border-color: currentColor;
}

.cpc-product-brand {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    opacity: .7;
}

.cpc-product-title {
    margin: 0 0 24px;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.1;
}

.cpc-product-identifiers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 30px;
    margin-bottom: 26px;
    line-height: 1.5;
}

.cpc-product-long-description,
.cpc-product-short-description {
    margin-top: 24px;
    margin-bottom: 28px;
    font-size: 18px;
    line-height: 1.65;
}

.cpc-button {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid currentColor;
    text-decoration: none;
	color: white;
	background:var(--wp--preset--color--custom-color-1);
}

.cpc-product-section {
    width: 100%;
    margin-top: 50px;
    padding-top: 32px;
    border-top: 1px solid #ddd;
}

.cpc-feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 36px;
    padding-left: 22px;
}

/* =========================================
   CATEGORY PAGE
   ========================================= */

.cpc-category-header {
    margin-bottom: 40px;
}

.cpc-category-title {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
}

.cpc-category-description {
    max-width: 900px;
    line-height: 1.6;
}

.cpc-subcategory-section {
    margin-bottom: 50px;
}

.cpc-section-title {
    margin: 0 0 20px;
}

.cpc-subcategory-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.cpc-subcategory-card {
    display: flex;
    align-items: center;
    min-height: 80px;
    padding: 20px;
    border: 1px solid #ddd;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
	justify-content: center;
}

/* =========================================
   SEARCH
   ========================================= */

.cpc-search {
    position: relative;
}

.cpc-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-bottom: 40px;
}

.cpc-search-input-wrap {
    position: relative;
	background:white;
}

.cpc-search-input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    border: 1px solid #bbb;
    background: #fff;
    font: inherit;
    font-size: 17px;
}

.cpc-search-input:focus {
    outline: 2px solid currentColor;
    outline-offset: 1px;
}

.cpc-search-submit {
    min-height: 52px;
    padding: 12px 26px;
    border: 1px solid currentColor;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.cpc-search-filters {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cpc-search-filters label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 220px;
    font-size: 14px;
    font-weight: 600;
}

.cpc-search-filters select {
    min-height: 42px;
    padding: 7px 10px;
    border: 1px solid #bbb;
    background: #fff;
    font: inherit;
}

.cpc-search-autocomplete {
    position: absolute;
    z-index: 9999;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    max-height: 520px;
    overflow-y: auto;
    border: 1px solid #ccc;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.cpc-search-autocomplete[hidden] {
    display: none;
}

.cpc-autocomplete-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    color: inherit;
    text-decoration: none;
}

.cpc-autocomplete-item:last-child {
    border-bottom: 0;
}

.cpc-autocomplete-item:hover,
.cpc-autocomplete-item:focus {
    background: #f5f5f5;
}

.cpc-autocomplete-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
}

.cpc-autocomplete-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cpc-autocomplete-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
}

.cpc-autocomplete-title,
.cpc-autocomplete-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cpc-autocomplete-title {
    font-weight: 600;
}

.cpc-autocomplete-meta {
    font-size: 13px;
    opacity: .7;
}

.cpc-search-empty {
    padding: 40px;
    border: 1px solid #ddd;
    text-align: center;
}

/* =========================================
   PRODUCT GRID - SHARED BY CATEGORY + SEARCH
   ========================================= */

.cpc-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.cpc-product-count {
    opacity: .7;
}

.cpc-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.cpc-product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #fff;
}

.cpc-product-card-image-link {
    display: block;
    aspect-ratio: 1 / 1;
    padding: 20px;
    overflow: hidden;
}

.cpc-product-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .2s ease;
}

.cpc-product-card-image-link:hover .cpc-product-card-image {
    transform: scale(1.03);
}

.cpc-product-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
}

.cpc-product-card-brand {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    opacity: .65;
}
.cpc-product {
	padding:10px;
}
.cpc-product-card-title {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.25;
}

.cpc-product-card-title a {
    color: inherit;
    text-decoration: none;
}

.cpc-product-card-sku {
    margin-bottom: 12px;
    font-size: 13px;
    opacity: .7;
}

.cpc-product-card-description {
    margin-bottom: 20px;
    line-height: 1.5;
}

.cpc-product-card-button {
    display: block;
    margin-top: auto;
    padding: 10px 15px;
    border: 1px solid currentColor;
    text-align: center;
    text-decoration: none;
}

.cpc-pagination {
    margin-top: 40px;
    text-align: center;
}

.cpc-pagination .page-numbers {
    display: inline-block;
    margin: 3px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media ( max-width: 1100px ) {
    .cpc-product-main {
        grid-template-columns: minmax(400px, 600px) minmax(300px, 1fr);
        gap: 40px;
    }

    .cpc-product-main-image {
        max-width: 600px;
        max-height: 600px;
    }

    .cpc-product-grid,
    .cpc-subcategory-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media ( max-width: 850px ) {
    .single-catalog_product .cpc-product,
    .cpc-category-content,
    .cpc-search {
        width: calc(100% - 32px);
    }

    .cpc-product-main {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .cpc-product-main-image {
        max-width: 750px;
        max-height: 750px;
    }

    .cpc-feature-list {
        grid-template-columns: 1fr;
    }

    .cpc-product-grid,
    .cpc-subcategory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media ( max-width: 550px ) {
    .single-catalog_product .cpc-product,
    .cpc-category-content,
    .cpc-search {
        width: calc(100% - 24px);
    }

    .cpc-product-identifiers {
        grid-template-columns: 1fr;
    }

    .cpc-product-thumbnail {
        width: 64px;
        height: 64px;
    }

    .cpc-product-grid,
    .cpc-subcategory-grid {
        grid-template-columns: 1fr;
    }

    .cpc-results-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .cpc-search-form {
        grid-template-columns: 1fr;
    }

    .cpc-search-submit {
        width: 100%;
    }

    .cpc-search-filters {
        flex-direction: column;
    }

    .cpc-search-filters label {
        width: 100%;
        min-width: 0;
    }

    .cpc-autocomplete-item {
        grid-template-columns: 50px minmax(0, 1fr);
    }

    .cpc-autocomplete-image {
        width: 50px;
        height: 50px;
    }
}
/* =========================================
   COMPACT HEADER SEARCH
   ========================================= */

.cpc-search-compact {
    width: min(520px, calc(100% - 20px));
    max-width: 520px;
    padding: 5px;
    margin-left: auto;
    margin-right: 20px;
    box-sizing: border-box;
    justify-self: end;
}

.cpc-search-form-compact {
    width: 100%;
    margin: 0;
}

.cpc-search-form-compact .cpc-search-input-wrap {
    position: relative;

    width: 100%;
}

.cpc-search-form-compact .cpc-search-input {
    box-sizing: border-box;

    width: 100%;
    min-height: 42px;

    padding:
        8px
        46px
        8px
        14px;

    color: inherit;
    background: transparent;

    border: 1px solid currentColor;
    border-radius: inherit;

    font: inherit;
}

.cpc-search-form-compact .cpc-search-input::placeholder {
    color: currentColor;
    opacity: .6;
}

.cpc-search-form-compact .cpc-search-input:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}


/* SEARCH ICON */

.cpc-search-icon-button {
    position: absolute;

    top: 50%;
    right: 6px;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    padding: 0;

    color: inherit;
    background: transparent;

    border: 0;
    border-radius: 50%;

    cursor: pointer;

    transform: translateY(-50%);
}

.cpc-search-icon-button svg {
    display: block;

    width: 20px;
    height: 20px;

    fill: currentColor;
}

.cpc-search-icon-button:hover,
.cpc-search-icon-button:focus {
    background:
        color-mix(
            in srgb,
            currentColor 8%,
            transparent
        );
}

.cpc-search-icon-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 1px;
}


/* =========================================
   AUTOCOMPLETE
   ========================================= */

.cpc-search-form-compact .cpc-search-autocomplete {
    position: absolute;

    z-index: 9999;

    top: calc(100% + 6px);
    left: 0;

    width: 100%;
    min-width: 360px;

    overflow: hidden;

    color:
        var(
            --wp--preset--color--contrast,
            inherit
        );

    background:
        var(
            --wp--preset--color--base,
            #fff
        );

    border: 1px solid
        color-mix(
            in srgb,
            currentColor 20%,
            transparent
        );

    border-radius: 4px;

    box-shadow:
        0 8px 24px
        rgba(0, 0, 0, .12);
}

.cpc-search-form-compact
.cpc-search-autocomplete[hidden] {
    display: none;
}

.cpc-search-form-compact
.cpc-autocomplete-item {
    display: grid;

    grid-template-columns:
        50px
        minmax(0, 1fr);

    gap: 12px;

    align-items: center;

    padding: 10px 12px;

    color: inherit;
    background: inherit;

    text-decoration: none;

    border-bottom: 1px solid
        color-mix(
            in srgb,
            currentColor 10%,
            transparent
        );
}

.cpc-search-form-compact
.cpc-autocomplete-item:last-child {
    border-bottom: 0;
}

.cpc-search-form-compact
.cpc-autocomplete-item:hover,
.cpc-search-form-compact
.cpc-autocomplete-item:focus {
    background:
        color-mix(
            in srgb,
            currentColor 7%,
            transparent
        );
}

.cpc-search-form-compact
.cpc-autocomplete-image {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 50px;
    height: 50px;
}

.cpc-search-form-compact
.cpc-autocomplete-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

.cpc-search-form-compact
.cpc-autocomplete-content {
    display: flex;

    flex-direction: column;

    min-width: 0;

    gap: 3px;
}

.cpc-search-form-compact
.cpc-autocomplete-title {
    overflow: hidden;

    font: inherit;
    font-weight: 600;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.cpc-search-form-compact
.cpc-autocomplete-meta {
    overflow: hidden;

    font-size: .8em;

    opacity: .65;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================================
   MOBILE
   ========================================= */

@media ( max-width: 850px ) {

    .cpc-search-compact {
        width: min(520px, calc(100% - 40px));
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
        justify-self: center;
    }

    .cpc-search-form-compact
    .cpc-search-autocomplete {
        min-width: 0;
    }
	.cpc-header-top {
    flex-direction: column;
    align-items: center;
}
}