/* Collection page — Dawn layout padding (Conway Kitchen) */
.tks-collection-grid-padding {
    padding-top: 27px;
    padding-bottom: 27px;
}

@media screen and (min-width: 750px) {
    .tks-collection-grid-padding {
        padding-top: 36px;
        padding-bottom: 36px;
    }
}

/* Fallback only when Dawn theme CSS has not loaded */
body:not(.store-theme-active) #collectionMain .collection-hero {
    padding: 2rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body:not(.store-theme-active) #collectionMain .collection-hero__title {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

body:not(.store-theme-active) #collectionMain .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

body.store-theme-active #collectionMain,
body.store-theme-active #MainContent {
    max-width: none;
    padding: 0;
    margin: 0;
}

body.store-theme-active .product-count.light {
    margin-bottom: 1rem;
    color: rgba(var(--color-foreground), 0.75);
}

body.store-theme-active .card__media img {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Collection grid — title + price live outside card__inner (Dawn card--standard) */
body.store-theme-active .card.card--standard > .card__content .card__information,
body.store-theme-active .card.card--standard > .card__content .card-information,
body.store-theme-active .card.card--standard > .card__content .tks-card-price,
body.store-theme-active .card.card--standard > .card__content .price__regular,
body.store-theme-active .card.card--standard > .card__content .price-item {
    display: block !important;
    visibility: visible !important;
}

body.store-theme-active .card.card--standard > .card__content .price-item--regular {
    display: inline-block !important;
    color: rgb(var(--color-foreground, 18 18 18));
}

body.store-theme-active .card.card--standard > .card__content .card__heading {
    margin: 0 0 0.25rem;
}

body.store-theme-active .pagination-wrapper {
    margin-top: 4rem;
    padding-bottom: 1rem;
}

body.store-theme-active .tks-collection-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

body.store-theme-active .tks-sort-wrap .select__select,
body.store-theme-active .tks-sort-wrap select {
    min-width: 12rem;
    padding: 0.6rem 2rem 0.6rem 1rem;
    border: 1px solid rgba(var(--color-foreground, 18 18 18), 0.2);
    background: rgb(var(--color-background, 255 255 255));
    font: inherit;
}

@media screen and (min-width: 990px) {
    body.store-theme-active .pagination-wrapper {
        margin-top: 5rem;
    }
}

body.store-theme-active .pagination__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

body.store-theme-active .pagination__list > li {
    flex: 1 0 4.4rem;
    max-width: 4.4rem;
    list-style: none;
}

body.store-theme-active .pagination__list > li:not(:last-child) {
    margin-right: 1rem;
}

body.store-theme-active .pagination__item {
    color: rgb(var(--color-foreground, 18 18 18));
    display: inline-flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 4.4rem;
    width: 100%;
    padding: 0;
    text-decoration: none;
    line-height: 1;
}

body.store-theme-active a.pagination__item.link {
    text-decoration: none;
}

body.store-theme-active .pagination__item--current {
    color: rgba(var(--color-foreground, 18 18 18), 0.55);
}

body.store-theme-active .pagination__item--current:after {
    content: "";
    display: block;
    width: 2rem;
    height: 0.1rem;
    position: absolute;
    bottom: 0.8rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: currentColor;
}

body.store-theme-active .pagination__item .icon-caret {
    height: 0.6rem;
    width: auto;
}

body.store-theme-active .pagination__item--next .icon-caret {
    transform: rotate(90deg);
}

body.store-theme-active .pagination__item--prev .icon-caret {
    transform: rotate(-90deg);
}

body.store-theme-active .pagination__item-arrow:hover:after {
    display: none;
}

body.store-theme-active .tks-pagination-compact__list {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
}

body.store-theme-active .tks-pagination-compact__list > li {
    flex: 1 1 auto;
    max-width: none;
    margin: 0 !important;
}

body.store-theme-active .tks-pagination-compact__status {
    flex: 0 0 auto;
    text-align: center;
}

body.store-theme-active .tks-pagination-compact__label {
    display: inline-block;
    min-width: 5rem;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(18, 18, 18, 0.78);
    line-height: 1.2;
}

body.store-theme-active .tks-pagination-compact .pagination__item {
    width: auto;
    min-width: 6.5rem;
    height: auto;
    min-height: 2.875rem;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(18, 18, 18, 0.14);
    border-radius: 999px;
    font-size: 0.9375rem;
    font-weight: 500;
    background: #fff;
    box-sizing: border-box;
}

body.store-theme-active .tks-pagination-compact a.pagination__item.link:hover {
    border-color: rgba(18, 18, 18, 0.28);
    background: #fafafa;
}

body.store-theme-active .tks-pagination-compact .pagination__item--disabled {
    opacity: 0.38;
    cursor: not-allowed;
    background: #f3f3f3;
}

body.store-theme-active .tks-pagination-compact .pagination__item--current:after {
    display: none;
}

/* Collection facets sidebar — legacy demo filters (hidden; original site has no sidebar) */
body.store-theme-active .tks-facets {
    display: none;
}

body.store-theme-active .product-grid-container {
    width: 100%;
}

body.store-theme-active .tks-facets .facets__form {
    width: 100%;
}

body.store-theme-active .tks-facets .facets__wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

body.store-theme-active .tks-facets .facets__disclosure {
    border-top: 1px solid rgba(var(--color-foreground, 18 18 18), 0.08);
    padding-top: 1rem;
}

body.store-theme-active .tks-facets .facets__summary {
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

body.store-theme-active .tks-facets .facets-container,
body.store-theme-active .tks-facets .facets__form,
body.store-theme-active .tks-facets .facets__wrapper,
body.store-theme-active .tks-facets .facets__disclosure,
body.store-theme-active .tks-facets .facets__summary {
    text-align: left;
}

body.store-theme-active .tks-collection-toolbar .product-count,
body.store-theme-active .tks-collection-toolbar .tks-sort-wrap {
    display: flex;
    align-items: center;
}

body.store-theme-active .tks-collection-toolbar .tks-sort-wrap select {
    margin: 0;
}

body.store-theme-active .tks-facets .facet-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    cursor: pointer;
    font-size: 0.9rem;
}

body.store-theme-active .tks-facets .facet-checkbox input {
    accent-color: rgb(var(--color-foreground, 18 18 18));
}

body.store-theme-active .tks-facets .facet-checkbox__count {
    margin-left: auto;
    opacity: 0.55;
    font-size: 0.85em;
}

body.store-theme-active .tks-facets .facets__clear {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

body.store-theme-active .tks-facets .facets__price {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

body.store-theme-active .tks-facets .field__input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(var(--color-foreground, 18 18 18), 0.2);
    font: inherit;
}

body.store-theme-active .tks-mobile-facets > summary {
    list-style: none;
    cursor: pointer;
    margin-bottom: 1rem;
}

body.store-theme-active .tks-mobile-facets > summary::-webkit-details-marker {
    display: none;
}

@media screen and (min-width: 990px) {
    body.store-theme-active .tks-mobile-facets > summary {
        display: none;
    }
}

/* Registry demo pages */
.tks-registry-steps {
    margin: 1.5rem 0 2rem;
    padding-left: 1.25rem;
}

.tks-registry-steps li {
    margin-bottom: 0.75rem;
}

.tks-registry-panels {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

@media screen and (min-width: 750px) {
    .tks-registry-panels {
        grid-template-columns: 1fr 1fr;
    }
}

.tks-registry-panel {
    border: 1px solid rgba(var(--color-foreground, 18 18 18), 0.12);
    padding: 1.25rem 1.5rem;
    border-radius: 4px;
}

.tks-registry-form .field {
    margin-bottom: 1rem;
}

.tks-registry-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
}

.tks-registry-form input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(var(--color-foreground, 18 18 18), 0.2);
    font: inherit;
}

.tks-registry-msg {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(var(--color-foreground, 18 18 18), 0.05);
}

/* Home fallback featured collections */
.tks-fallback-collections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.tks-fallback-collection {
    display: block;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.tks-fallback-collection img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.tks-fallback-collection span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Active facet pills */
.active-facets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

.active-facets__button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--color-foreground, 18 18 18), 0.15);
    text-decoration: none;
    font-size: 0.85rem;
    color: inherit;
}

.active-facets__button svg {
    width: 10px;
    height: 10px;
}

.active-facets__button-remove {
    font-size: 0.85rem;
}

.facets__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    text-align: left;
    width: 100%;
}

.facets__summary > span:first-child {
    flex: 1 1 auto;
    text-align: left;
}

.facets__reset {
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

/* Empty collection — single column, hide sidebar */
body.store-theme-active .facets-vertical.tks-collection-empty-layout {
    grid-template-columns: 1fr;
}

body.store-theme-active .facets-vertical.tks-collection-empty-layout .tks-facets {
    display: none;
}

body.store-theme-active .facets-vertical.tks-collection-empty-layout .product-grid-container {
    grid-column: 1 / -1;
}

/* Mobile filter pill + toolbar alignment */
@media screen and (max-width: 989px) {
    body.store-theme-active .tks-mobile-facets > summary {
        display: inline-flex;
        align-items: center;
        padding: 0.55rem 1rem;
        border: 1px solid rgba(var(--color-foreground, 18 18 18), 0.2);
        border-radius: 999px;
        font-weight: 600;
        margin-bottom: 0.75rem;
    }

    body.store-theme-active .tks-collection-toolbar {
        align-items: center;
    }

    body.store-theme-active .tks-collection-toolbar .product-count {
        margin-bottom: 0;
    }
}

/* Collection quick add + card layout fixes */
body.store-theme-active .product-card-wrapper,
body.store-theme-active .card-wrapper {
    height: 100%;
}

body.store-theme-active .card.card--standard {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Keep Dawn ratio + absolute card__media; do not override position (badge overlays image) */
body.store-theme-active .card.card--standard.card--media .card__inner .card__information {
    display: none !important;
}

body.store-theme-active .product-grid .card__media img {
    height: 100%;
    object-fit: contain;
}

body.store-theme-active .product-grid .grid__item {
    display: flex;
    flex-direction: column;
}

body.store-theme-active .product-grid .grid__item .card-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

body.store-theme-active .card.card--standard > .card__content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    grid-template-rows: unset;
    padding-top: 0.75rem;
}

body.store-theme-active .card.card--standard > .card__content .card__heading.h5 {
    min-height: calc(2 * 1.3em);
}

body.store-theme-active .card.card--standard > .card__content .card__information {
    grid-row: auto;
    padding: 0 0 0.35rem;
    flex: 0 0 auto;
}

/* Empty collection state */
.tks-collection-empty__inner {
    text-align: center;
    padding: 3rem 1rem;
    max-width: 36rem;
    margin: 0 auto;
}

.tks-collection-empty__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

@media screen and (max-width: 749px) {
    body.store-theme-active .tks-collection-hero-section .collection-hero {
        padding: 0;
        min-height: 0;
    }

    body.store-theme-active .tks-collection-hero-section .collection-hero__inner {
        padding: 0 1rem;
    }

    body.store-theme-active .collection-hero__title {
        margin: 0.85rem 0 0.65rem;
        font-size: clamp(1.875rem, 7vw, 2.25rem);
        font-weight: 600;
        line-height: 1.15;
        letter-spacing: -0.02em;
    }

    body.store-theme-active .tks-collection-grid-padding {
        padding-top: 0.5rem;
        padding-bottom: 1.25rem;
    }

    body.store-theme-active .tks-pagination-compact__list {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        width: 100%;
        max-width: 24rem;
        margin: 0 auto;
    }

    body.store-theme-active .tks-pagination-compact__list > li {
        flex: 1 1 auto;
        max-width: none;
        margin: 0 !important;
    }

    body.store-theme-active .tks-pagination-compact__status {
        flex: 0 0 auto;
        text-align: center;
    }

    body.store-theme-active .tks-pagination-compact__label {
        display: inline-block;
        min-width: 4.5rem;
        font-size: 0.9375rem;
        font-weight: 600;
        color: rgba(18, 18, 18, 0.78);
        line-height: 1.2;
    }

    body.store-theme-active .tks-pagination-compact .pagination__item {
        width: auto;
        min-width: 5.5rem;
        height: auto;
        min-height: 2.75rem;
        padding: 0.55rem 0.85rem;
        border: 1px solid rgba(18, 18, 18, 0.14);
        border-radius: 999px;
        font-size: 0.875rem;
        font-weight: 500;
        background: #fff;
        box-sizing: border-box;
    }

    body.store-theme-active .tks-pagination-compact a.pagination__item.link:hover {
        border-color: rgba(18, 18, 18, 0.28);
        background: #fafafa;
    }

    body.store-theme-active .tks-pagination-compact .pagination__item--disabled {
        opacity: 0.38;
        cursor: not-allowed;
        background: #f3f3f3;
    }

    body.store-theme-active .tks-pagination-compact .pagination__item--current:after {
        display: none;
    }

    body.store-theme-active .pagination-wrapper {
        margin-top: 2rem;
        padding-bottom: 1.5rem;
    }
}
