/* ==================================================
   Pritto Product Archive V1
   White-space-first catalog cards
   ================================================== */

/* Product cards stay visually open — no heavy card container. */
.woocommerce.archive ul.products li.product,
.post-type-archive-product ul.products li.product {
    background: var(--pritto-product-surface);
    border: 0;
    box-shadow: none;
}

/* Product imagery should merge naturally into the white page. */
.woocommerce.archive ul.products li.product .ct-image-container,
.woocommerce.archive ul.products li.product img,
.post-type-archive-product ul.products li.product .ct-image-container,
.post-type-archive-product ul.products li.product img {
    background: var(--pritto-product-surface);
}

/* Product title */
.woocommerce.archive ul.products li.product .woocommerce-loop-product__title,
.post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
    margin-top: 14px;
    margin-bottom: 8px;
    color: var(--pritto-heading);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.38;
    letter-spacing: -0.01em;
}

/* Pritto catalog metadata */
.pritto-archive-meta {
    margin-top: 0;
}

.pritto-archive-low {
    margin-bottom: 6px;
    color: var(--pritto-text);
    font-size: 14px;
    line-height: 1.35;
}

.pritto-archive-low-label {
    color: var(--pritto-muted);
    font-weight: 400;
}

.pritto-archive-low strong {
    color: var(--pritto-heading);
    font-size: 16px;
    font-weight: 600;
}

/* Item # + save heart */
.pritto-archive-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 28px;
}

.pritto-archive-item {
    color: var(--pritto-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
}

/* Archive uses the existing Save Product system,
   but visually shows only the heart. */
.pritto-archive-save .pritto-save-product {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    min-height: 30px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--pritto-muted);
}

.pritto-archive-save .pritto-save-product:hover,
.pritto-archive-save .pritto-save-product.is-saved {
    background: transparent;
    color: var(--pritto-primary);
}

.pritto-archive-save .pritto-heart {
    font-size: 21px;
    line-height: 1;
}

/* Keep the label accessible while visually showing only the heart. */
.pritto-archive-save .pritto-save-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Very restrained interaction — no ecommerce-card effect. */
@media (any-hover: hover) {
    .woocommerce.archive ul.products li.product .woocommerce-loop-product__title,
    .post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
        transition: color var(--pritto-transition);
    }

    .woocommerce.archive ul.products li.product:hover .woocommerce-loop-product__title,
    .post-type-archive-product ul.products li.product:hover .woocommerce-loop-product__title {
        color: var(--pritto-primary);
    }
}

/* ==================================================
   Pritto Archive Card Refinement V2
   ================================================== */

/* Product title */
.woocommerce.archive ul.products li.product .woocommerce-loop-product__title,
.post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
    margin: 0 0 7px;
    color: var(--pritto-heading);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.38;
    letter-spacing: -0.01em;

    /* Keep grid rows visually consistent when names are long. */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* Keep title neutral — green is reserved for actions/states. */
.woocommerce.archive ul.products li.product:hover .woocommerce-loop-product__title,
.post-type-archive-product ul.products li.product:hover .woocommerce-loop-product__title {
    color: var(--pritto-heading);
}


/* Low As */
.pritto-archive-low {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin: 0 0 7px;
    font-size: 13px;
    line-height: 1.35;
}

.pritto-archive-low-label {
    color: var(--pritto-muted);
    font-weight: 400;
}

.pritto-archive-low strong {
    color: var(--pritto-heading);
    font-size: 15px;
    font-weight: 600;
}


/* Item # + Saved heart */
.pritto-archive-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 26px;
}

.pritto-archive-item {
    color: var(--pritto-muted);
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.4;
}

/* Heart stays visually quiet until interaction / saved state. */
.pritto-archive-save .pritto-save-product {
    min-width: 26px;
    min-height: 26px;
    color: var(--pritto-muted);
    opacity: 0.78;
    transition:
        color var(--pritto-transition),
        opacity var(--pritto-transition);
}

.pritto-archive-save .pritto-save-product:hover,
.pritto-archive-save .pritto-save-product.is-saved {
    color: var(--pritto-primary);
    opacity: 1;
}

.pritto-archive-save .pritto-heart {
    font-size: 19px;
}


/* Mobile */
@media (max-width: 767px) {
    .woocommerce.archive ul.products li.product .woocommerce-loop-product__title,
    .post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
        font-size: 15px;
    }
}

/* ==================================================
   Pritto Archive Header & Child Categories V1
   ================================================== */

.pritto-archive-header {
    margin: 0 0 34px;
}

/* Archive title */
.pritto-archive-title {
    margin: 0 0 26px;
    color: var(--pritto-heading);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}


/* --------------------------------------------------
   Child category cards
   -------------------------------------------------- */

.pritto-child-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: flex-start;
}

/* Compact visual cards, not large ecommerce boxes */
.pritto-category-card {
    display: block;
    width: 150px;
    color: var(--pritto-heading);
    text-decoration: none;
}

.pritto-category-card:hover {
    color: var(--pritto-heading);
}

/* Image area */
.pritto-category-card img,
.pritto-category-placeholder {
    display: block;
    width: 150px;
    height: 150px;

    object-fit: contain;

    background: #FFFFFF;
    border: 1px solid var(--pritto-border);
    border-radius: var(--pritto-radius-md);

    transition:
        border-color var(--pritto-transition),
        box-shadow var(--pritto-transition);
}

/* Very subtle interaction */
.pritto-category-card:hover img,
.pritto-category-card:hover .pritto-category-placeholder {
    border-color: var(--pritto-border-strong);
    box-shadow: 0 5px 18px rgba(18, 61, 53, 0.05);
}

/* Category label */
.pritto-category-name {
    display: block;
    margin-top: 10px;

    color: var(--pritto-heading);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;

    text-align: center;
}

/* Shop All remains visually equal to other categories */
.pritto-category-card-all .pritto-category-name {
    font-weight: 600;
}


/* --------------------------------------------------
   Responsive
   -------------------------------------------------- */

@media (max-width: 767px) {

    .pritto-archive-header {
        margin-bottom: 28px;
    }

    .pritto-archive-title {
        margin-bottom: 20px;
        font-size: 26px;
    }

    .pritto-child-categories {
        gap: 14px;
    }

    .pritto-category-card {
        width: calc(50% - 7px);
    }

    .pritto-category-card img,
    .pritto-category-placeholder {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

/* ==================================================
   Pritto Archive Filter Toolbar V1
   ================================================== */

/* Native Blocksy archive toolbar */
.woocommerce.archive .woo-listing-top,
.post-type-archive-product .woo-listing-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    width: 100%;
    margin-top: 12px;
    margin-bottom: 30px;
    padding: 0 0 16px;

    border-bottom: 1px solid var(--pritto-border);
}

/* Filters control */
.pritto-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 44px;
    padding: 0 16px;

    appearance: none;
    border: 1px solid var(--pritto-border-strong);
    border-radius: var(--pritto-radius-sm);
    background: #FFFFFF;

    color: var(--pritto-heading);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;

    cursor: pointer;

    transition:
        border-color var(--pritto-transition),
        color var(--pritto-transition),
        background-color var(--pritto-transition);
}

.pritto-filter-toggle:hover {
    border-color: var(--pritto-primary);
    color: var(--pritto-primary);
}

.pritto-filter-toggle:focus-visible {
    outline: 2px solid var(--pritto-primary);
    outline-offset: 2px;
}

.pritto-filter-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* Keep native Woo / Blocksy sorting on the right */
.woocommerce.archive .woo-listing-top .woocommerce-ordering,
.post-type-archive-product .woo-listing-top .woocommerce-ordering {
    margin: 0;
}


/* Mobile */
@media (max-width: 767px) {

    .woocommerce.archive .woo-listing-top,
    .post-type-archive-product .woo-listing-top {
        gap: 12px;
        margin-bottom: 24px;
        padding-bottom: 14px;
    }

    .pritto-filter-toggle {
        min-height: 42px;
        padding: 0 14px;
    }

    .woocommerce.archive .woo-listing-top .woocommerce-ordering,
    .post-type-archive-product .woo-listing-top .woocommerce-ordering {
        flex: 1;
        max-width: 210px;
    }
}

/* ==================================================
   Pritto Archive Filter Panel V1
   ================================================== */

/* Allow the filter panel to occupy a second row
   inside Blocksy's existing archive toolbar. */
.woocommerce.archive .woo-listing-top,
.post-type-archive-product .woo-listing-top {
    flex-wrap: wrap;
}

/* Collapsed state */
.pritto-filter-panel[hidden] {
    display: none !important;
}

/* Expanded panel */
.pritto-filter-panel {
    order: 3;
    flex: 0 0 100%;

    width: 100%;
    margin: 0;
    padding: 0;
}

/* Inner panel */
.pritto-filter-panel-inner {
    width: 100%;

    margin-top: 2px;
    padding: 22px 0 6px;

    background: #FFFFFF;
    border-top: 1px solid var(--pritto-border);
}

/* Small heading */
.pritto-filter-panel-heading {
    margin: 0 0 14px;

    color: var(--pritto-heading);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

/* Temporary content for V1 */
.pritto-filter-panel-placeholder {
    color: var(--pritto-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* Active filter button */
.pritto-filter-toggle[aria-expanded="true"] {
    border-color: var(--pritto-primary);
    color: var(--pritto-primary);
    background: var(--pritto-primary-soft);
}


/* Mobile */
@media (max-width: 767px) {

    .pritto-filter-panel-inner {
        padding-top: 18px;
    }

    .pritto-filter-panel-heading {
        margin-bottom: 12px;
    }
}

/* ==================================================
   Pritto Archive Filter Content V1
   ================================================== */

.pritto-filter-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 32px 56px;
    max-width: 760px;
}

.pritto-filter-group {
    margin: 0;
}

.pritto-filter-group-title {
    margin: 0 0 12px;

    color: var(--pritto-heading);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.pritto-filter-options {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.pritto-filter-option {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin: 0;

    color: var(--pritto-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;

    cursor: pointer;
}

/* Clean native-style checkbox with Pritto selected state */
.pritto-filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;

    accent-color: var(--pritto-primary);

    cursor: pointer;
}

.pritto-filter-option:hover {
    color: var(--pritto-heading);
}

.pritto-filter-option input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--pritto-primary);
    outline-offset: 2px;
}


/* Mobile */
@media (max-width: 767px) {

    .pritto-filter-groups {
        grid-template-columns: 1fr;
        gap: 26px;
        max-width: none;
    }
}

/* ==================================================
   Pritto Archive Filter Query V1
   ================================================== */

.pritto-filter-actions {
    display: flex;
    align-items: center;
    gap: 18px;

    margin-top: 24px;
    padding-top: 20px;

    border-top: 1px solid var(--pritto-border);
}

.pritto-filter-apply {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 0 18px;

    border: 1px solid var(--pritto-primary);
    border-radius: var(--pritto-radius-sm);
    background: var(--pritto-primary);

    color: #FFFFFF;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color var(--pritto-transition),
        border-color var(--pritto-transition);
}

.pritto-filter-apply:hover {
    border-color: var(--pritto-primary-hover);
    background: var(--pritto-primary-hover);
    color: #FFFFFF;
}

.pritto-filter-apply:focus-visible {
    outline: 2px solid var(--pritto-primary);
    outline-offset: 2px;
}

.pritto-filter-clear {
    color: var(--pritto-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;

    transition: color var(--pritto-transition);
}

.pritto-filter-clear:hover {
    color: var(--pritto-primary);
}

@media (max-width: 767px) {

    .pritto-filter-actions {
        margin-top: 20px;
        padding-top: 18px;
    }
}

/* ==================================================
   Pritto Catalog System V2
   Shared Shop, category, and product-search language
   ================================================== */

body.post-type-archive-product .site-main,
body.tax-product_cat .site-main,
body.search-results.post-type-archive-product .site-main,
body.search-no-results.post-type-archive-product .site-main {
    background: #fff;
}

body.search.post-type-archive-product .hero-section {
    display: none;
}

body.search-no-results.post-type-archive-product .woocommerce-info {
    max-width: 620px;
    margin: 0;
    padding: 24px 26px;
    border: 1px solid #d8e3de;
    border-radius: 18px;
    background: #f5f9f7;
    color: #52645e;
    font-size: 15px;
}

body.search-no-results.post-type-archive-product .woocommerce-info::before {
    display: none;
}

body.post-type-archive-product #main > .ct-container,
body.tax-product_cat #main > .ct-container,
body.search-results.post-type-archive-product #main > .ct-container,
body.search-no-results.post-type-archive-product #main > .ct-container {
    width: auto;
    max-width: none;
    margin-inline: 5vw;
    padding-top: 62px;
    padding-bottom: 96px;
}

.pritto-archive-header {
    max-width: 1296px;
    margin: 0 0 42px;
}

.pritto-archive-eyebrow {
    display: block;
    margin-bottom: 15px;
    color: #0c3329;
    font-size: 11px;
    font-weight: 700;
    line-height: normal;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.pritto-archive-title {
    margin: 0;
    color: #13231e;
    font-family: var(--pritto-font-family);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}

.pritto-archive-description {
    max-width: 620px;
    margin-top: 18px;
    color: #6f7d78;
    font-size: 16px;
    line-height: 1.55;
}

.pritto-archive-description p {
    margin: 0;
}

.pritto-archive-search {
    width: min(620px, 100%);
    min-height: 60px;
    margin-top: 30px;
    padding: 7px 7px 7px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #d8e3de;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(7, 45, 36, .055);
}

.pritto-archive-search input[type="search"] {
    min-width: 0;
    min-height: 44px;
    flex: 1;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #13231e;
    font-size: 15px;
}

.pritto-archive-search input[type="search"]:focus {
    outline: 0;
}

.pritto-archive-search button {
    min-height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    gap: 24px;
    border: 0;
    border-radius: 13px;
    background: #0c3329;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.pritto-catalog-nav {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pritto-catalog-nav a {
    min-height: 40px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    border: 1px solid #d8e3de;
    border-radius: 999px;
    background: #fff;
    color: #24342f;
    font-size: 13px;
    font-weight: 600;
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.pritto-catalog-nav a:hover {
    border-color: #b8cec5;
    background: #f1f7f4;
    color: #0c3329;
}

.pritto-catalog-nav a span {
    color: #789087;
}

body.tax-product_cat .pritto-child-categories {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

body.tax-product_cat .pritto-category-card {
    width: 158px !important;
    max-width: 158px !important;
    display: flex;
    flex: 0 0 158px;
    flex-direction: column;
    align-self: flex-start !important;
    transform: none;
}

body.tax-product_cat .pritto-category-card img,
body.tax-product_cat .pritto-category-placeholder {
    width: 158px;
    height: 158px;
    border: 1px solid #e0e8e4;
    border-radius: 22px;
    background: #f5f9f7;
    object-fit: cover;
}

body.tax-product_cat .pritto-category-card:hover {
    transform: none;
    box-shadow: none;
}

body.tax-product_cat .pritto-category-name {
    margin-top: 11px;
    color: #24342f;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

body.post-type-archive-product .woo-listing-top,
body.tax-product_cat .woo-listing-top,
body.search-results.post-type-archive-product .woo-listing-top,
body.search-no-results.post-type-archive-product .woo-listing-top {
    margin-top: 0;
    margin-bottom: 34px;
    padding-bottom: 18px;
}

body.post-type-archive-product ul.products,
body.tax-product_cat ul.products,
body.search-results.post-type-archive-product ul.products {
    gap: 54px 28px;
}

body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product,
body.search-results.post-type-archive-product ul.products li.product {
    background: #fff;
}

body.post-type-archive-product ul.products li.product .ct-image-container,
body.tax-product_cat ul.products li.product .ct-image-container,
body.search-results.post-type-archive-product ul.products li.product .ct-image-container {
    overflow: hidden;
    border: 1px solid #e4ebe8;
    border-radius: 22px;
    background: #fff;
}

body.post-type-archive-product ul.products li.product img,
body.tax-product_cat ul.products li.product img,
body.search-results.post-type-archive-product ul.products li.product img {
    background: #fff;
    transition: transform 300ms ease;
}

@media (any-hover: hover) {
    body.post-type-archive-product ul.products li.product:hover img,
    body.tax-product_cat ul.products li.product:hover img,
    body.search-results.post-type-archive-product ul.products li.product:hover img {
        transform: scale(1.018);
    }
}

@media (max-width: 689px) {
    body.post-type-archive-product #main > .ct-container,
    body.tax-product_cat #main > .ct-container,
    body.search-results.post-type-archive-product #main > .ct-container,
    body.search-no-results.post-type-archive-product #main > .ct-container {
        margin-inline: 20px;
        padding-top: 48px;
        padding-bottom: 72px;
    }

    .pritto-archive-header {
        margin-bottom: 34px;
    }

    .pritto-archive-title {
        font-size: 32px;
    }

    .pritto-archive-description {
        margin-top: 15px;
        font-size: 15px;
    }

    .pritto-archive-search {
        min-height: 56px;
        margin-top: 24px;
        padding: 6px 6px 6px 15px;
        border-radius: 16px;
    }

    .pritto-archive-search button {
        min-height: 42px;
        padding-inline: 15px;
    }

    .pritto-catalog-nav {
        margin-top: 24px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .pritto-catalog-nav::-webkit-scrollbar {
        display: none;
    }

    .pritto-catalog-nav a {
        flex: 0 0 auto;
    }

    body.tax-product_cat .pritto-child-categories {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    body.tax-product_cat .pritto-category-card {
        width: auto !important;
        max-width: none !important;
        flex-basis: auto;
    }

    body.tax-product_cat .pritto-category-card img,
    body.tax-product_cat .pritto-category-placeholder {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products,
    body.search-results.post-type-archive-product ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 38px 14px;
    }

    body.post-type-archive-product ul.products li.product .ct-image-container,
    body.tax-product_cat ul.products li.product .ct-image-container,
    body.search-results.post-type-archive-product ul.products li.product .ct-image-container {
        border-radius: 16px;
    }

    .woocommerce.archive ul.products li.product .woocommerce-loop-product__title,
    .post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
        font-size: 14px;
    }

    .pritto-archive-low,
    .pritto-archive-item {
        font-size: 12px;
    }

    .pritto-archive-low strong {
        font-size: 13px;
    }
}

