/* ==========================================================
   2ND STITCH HAUS — COLLECTION PAGE
========================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.collection-hero {
    max-width: 920px;
    margin: 0 auto;
    padding: 175px 8% 70px;
    text-align: center;
}

.collection-hero h1 {
    max-width: 780px;
    margin: 20px auto 34px;
    font-size: clamp(58px, 8vw, 100px);
    line-height: .94;
    letter-spacing: -2px;
}

.collection-intro {
    max-width: 620px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.9;
    opacity: .78;
}

.hero-divider {
    width: 90px;
    height: 1px;
    margin: 0 auto;
    background: rgba(81, 43, 28, .2);
}

.collection-stats {
    display: flex;
    justify-content: center;
    gap: clamp(34px, 8vw, 110px);
    padding: 55px 8% 70px;
    text-align: center;
}

.stat { display: grid; gap: 5px; }

.stat strong {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(38px, 4vw, 52px);
    font-weight: 600;
    line-height: 1;
}

.stat span {
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    opacity: .62;
}

.collection-products {
    width: min(1450px, 88%);
    margin: 0 auto;
    padding: 70px 0 150px;
}

.collection-toolbar,
.toolbar-controls,
.filters,
.products-header,
.product-footer {
    display: flex;
    align-items: center;
}

.collection-toolbar {
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 70px;
}

.filters,
.toolbar-controls { gap: 12px; flex-wrap: wrap; }

.filter,
.sort-select,
.search-box {
    min-height: 54px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 999px;
    background: rgba(255, 255, 255, .28);
    color: var(--maroon);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.filter {
    padding: 0 24px;
    font-size: 13px;
    font-weight: 500;
    transition: transform .25s ease, background .25s ease, color .25s ease;
}

.filter:hover,
.filter:focus-visible { background: rgba(255, 255, 255, .55); transform: translateY(-2px); }

.filter.active {
    background: linear-gradient(180deg, #593220, #3d2417);
    color: #fff;
    box-shadow: 0 12px 28px rgba(61, 36, 23, .2);
}

.sort-select {
    padding: 0 38px 0 20px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.search-box {
    display: flex;
    width: min(280px, 100%);
    padding: 0 18px;
    gap: 10px;
    transition: background .25s ease, box-shadow .25s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, .62);
    box-shadow: 0 0 0 4px rgba(81, 43, 28, .08);
}

.search-box span { font-size: 23px; line-height: 1; transform: rotate(-20deg); }

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--maroon);
    font: inherit;
    font-size: 13px;
}

.search-box input::placeholder { color: rgba(81, 43, 28, .58); }

.products-header {
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.products-header .section-tag { margin-bottom: 5px; }

.products-header h2 {
    font-size: clamp(44px, 5vw, 62px);
    line-height: .95;
}

.products-count { max-width: 220px; text-align: right; font-size: 13px; opacity: .7; }

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 32px;
}

.product-card {
    position: relative;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 26px;
    background: rgba(255, 255, 255, .52);
    box-shadow: 0 18px 40px rgba(44, 25, 14, .08);
    transition: transform .35s ease, box-shadow .35s ease;
}

.product-card:hover { transform: translateY(-8px); box-shadow: 0 28px 60px rgba(44, 25, 14, .16); }

.product-link { display: block; height: 100%; }

.product-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: rgba(81, 43, 28, .1);
}

.product-image::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(0, 0, 0, .15), transparent 48%);
    pointer-events: none;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .65s ease;
}

.product-card:hover .product-image img { transform: scale(1.07); }

.badge {
    position: absolute;
    z-index: 1;
    top: 16px;
    left: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.product-info { padding: 20px; }
.product-category { margin-bottom: 7px; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; opacity: .62; }
.product-info h3 { margin-bottom: 9px; font-size: 29px; line-height: 1.05; }
.product-material { min-height: 42px; font-size: 13px; line-height: 1.6; opacity: .72; }

.product-footer {
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(81, 43, 28, .1);
}

.price { font-size: 20px; font-weight: 600; }.original-card-price{display:block;margin-bottom:1px;color:rgba(81,43,28,.5);font-size:11px;font-weight:400;text-decoration:line-through}
.view-btn { font-size: 13px; font-weight: 600; transition: letter-spacing .25s ease; }
.product-card:hover .view-btn { letter-spacing: .8px; }

.empty-state {
    grid-column: 1 / -1;
    padding: 90px 20px;
    border: 1px dashed rgba(81, 43, 28, .28);
    border-radius: 26px;
    text-align: center;
}

.empty-state h3 { margin-bottom: 8px; font-size: 40px; }
.empty-state p { opacity: .72; }

.load-more-wrapper { display: flex; justify-content: center; margin-top: 58px; }
#loadMoreBtn[hidden] { display: none; }

.collection-story {
    width: min(1400px, 84%);
    margin: 0 auto;
    padding: 125px 0 150px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(45px, 7vw, 90px);
    align-items: center;
}

.story-image img { height: min(610px, 58vw); border-radius: 28px; object-fit: cover; }
.story-content h2 { margin: 15px 0 22px; font-size: clamp(50px, 5.5vw, 76px); line-height: .92; }
.story-content p:not(.section-tag) { max-width: 470px; font-size: 17px; opacity: .78; }

.collection-cta {
    position: relative;
    min-height: 720px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 100px 10%;
    overflow: hidden;
    color: #f8f5f0;
    background: url("../assets/images/collectionfooter.webp") center / cover no-repeat;
}

.cta-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.54), rgba(0,0,0,.28) 55%, rgba(0,0,0,.48)); }
.cta-content { position: relative; z-index: 1; width: min(560px, 100%); }
.collection-cta .section-tag { opacity: .88; }
.collection-cta h2 { margin: 18px 0 28px; font-size: clamp(54px, 6.4vw, 86px); line-height: .9; }
.cta-text { max-width: 455px; margin-bottom: 36px; font-size: 17px; color: rgba(255, 255, 255, .88); }
.cta-btn { background: #fff; color: var(--maroon); }
.cta-btn:hover { background: #f7eee5; }

#scrollTop {
    position: fixed;
    z-index: 20;
    right: 24px;
    bottom: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--maroon);
    color: #fff;
    font-size: 24px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    box-shadow: 0 10px 25px rgba(44, 25, 14, .2);
    transition: opacity .25s ease, transform .25s ease;
}

#scrollTop.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

@media (max-width: 850px) {
    .collection-toolbar { align-items: flex-start; flex-direction: column; }
    .toolbar-controls { width: 100%; }
    .search-box { flex: 1; }
    .collection-story { grid-template-columns: 1fr; }
    .story-image { order: 2; }
    .collection-cta { justify-content: flex-start; min-height: 640px; }
}

@media (max-width: 600px) {
    .collection-hero { padding-top: 140px; }
    .collection-stats { gap: 24px; padding-inline: 5%; }
    .stat span { font-size: 8px; letter-spacing: 1.4px; }
    .collection-products { width: min(92%, 480px); }
    .filters { gap: 8px; }
    .filter { min-height: 46px; padding: 0 16px; }
    .sort-select, .search-box { min-height: 48px; }
    .products-header { align-items: flex-end; }
    .products-count { font-size: 11px; }
    .collection-grid { grid-template-columns: 1fr; gap: 22px; }
    .collection-story { width: 88%; padding-block: 90px; }
    .collection-cta { min-height: 580px; padding-inline: 8%; }
}
