:root {
    --collection-bg: #f8f6f4;
    --card-bg: #ffffff;
    --text-strong: #1b1f26;
    --text-soft: #6d6770;
    --accent-strong: #e35b8e;
}

.page-products {
    background: var(--collection-bg);
    color: var(--text-strong);
}

.page-products .site-header {
    position: sticky;
    top: 0;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 18, 33, 0.08);
    z-index: 10;
}

.page-products .logo {
    color: #1b1f26;
}

.page-products .nav-links a {
    color: #1b1f26;
}

.page-products .nav-links a:hover {
    color: var(--primary);
}

.page-products .nav-toggle {
    color: #1b1f26;
    border-color: rgba(27, 31, 38, 0.18);
}

.products-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.2rem 0;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2.2rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.search-field {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field input {
    width: 220px;
    padding: 0.55rem 2rem 0.55rem 2.2rem;
    border-radius: 999px;
    border: 1px solid #ece5df;
    background: #f5f1ee;
    font-size: 0.85rem;
    color: var(--text-strong);
}

.search-field input:focus {
    outline: 2px solid rgba(227, 91, 142, 0.2);
    border-color: rgba(227, 91, 142, 0.5);
}

.search-icon {
    position: absolute;
    left: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: #8c8790;
}

.search-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.6;
    fill: none;
}

.icon-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f5f1ee;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6f6b74;
}

.icon-button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.6;
    fill: none;
}

.icon-button.avatar {
    background: #fff;
    border: 1px solid #f0e8e2;
}

.avatar-ring {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: url("../assets/img/brand/user-01.png") center/cover no-repeat;
    display: inline-block;
}

.collection-hero {
    padding: 3.5rem 0 1.8rem;
}

.collection-heading h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    margin-bottom: 0.8rem;
    color: #1e1b22;
}

.collection-heading p {
    max-width: 600px;
    color: var(--text-soft);
    line-height: 1.6;
    font-size: 1rem;
}

.collection-body {
    padding-bottom: 4rem;
}

.collection-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 2.6rem;
    align-items: start;
}

.filters {
    position: sticky;
    top: 6.5rem;
    display: grid;
    gap: 1.5rem;
}

.filter-group {
    margin-bottom: 0;
    background: #ffffff;
    border: 1px solid #efe6df;
    border-radius: 16px;
    padding: 1.2rem 1.3rem;
    box-shadow: 0 12px 24px rgba(20, 24, 38, 0.06);
}

.filter-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent-strong);
    margin-bottom: 1rem;
    font-weight: 700;
}

.filter-list {
    list-style: none;
    display: grid;
    gap: 0.85rem;
}

.filter-option {
    border: none;
    background: none;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0;
}

.filter-option:hover,
.filter-option.is-active {
    color: var(--accent-strong);
    font-weight: 600;
}

.filter-icon {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: #f1e6e8;
    position: relative;
}

.filter-icon::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 3px;
    background: var(--accent-strong);
}

.filter-icon.is-drop::after {
    clip-path: polygon(50% 0%, 75% 30%, 80% 55%, 50% 100%, 20% 55%, 25% 30%);
}

.filter-icon.is-jar::after {
    clip-path: polygon(10% 20%, 90% 20%, 85% 85%, 15% 85%);
}

.filter-icon.is-foam::after {
    clip-path: polygon(15% 50%, 30% 30%, 50% 40%, 70% 25%, 85% 50%, 70% 70%, 50% 80%, 30% 70%);
}

.filter-icon.is-mist::after {
    clip-path: polygon(50% 10%, 60% 30%, 80% 40%, 60% 55%, 55% 85%, 45% 85%, 40% 55%, 20% 40%, 40% 30%);
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.chip {
    border: 1px solid #e8e0da;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    background: #ffffff;
    font-size: 0.85rem;
    color: #5f5a63;
    cursor: pointer;
}

.chip.is-active {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    color: #ffffff;
}

.checkbox-group {
    display: grid;
    gap: 0.6rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #5f5a63;
}

.checkbox input {
    accent-color: var(--accent-strong);
}

.collection-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.meta-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent-strong);
    margin-bottom: 0.4rem;
}

.meta-note {
    color: var(--text-soft);
    font-size: 0.95rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.product-card {
    background: transparent;
    border-radius: 20px;
    box-shadow: none;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: flex-start;
    text-align: left;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-left: 0.1rem;
    align-items: flex-start;
    text-align: left;
}

.product-media {
    border-radius: 18px;
    padding: 0;
    width: 100%;
    aspect-ratio: 4 / 5;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
}

.product-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.4s ease;
}

.product-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(27, 31, 38, 0) 40%, rgba(27, 31, 38, 0.28) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-media .secondary-img {
    opacity: 0;
}

.product-card:hover .primary-img {
    opacity: 0;
}

.product-card:hover .secondary-img {
    opacity: 1;
}

.product-cta {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #efe6df;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    color: #1f1b23;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 2;
    box-shadow: 0 12px 28px rgba(15, 18, 33, 0.18);
}

.product-card:hover .product-cta {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover .product-media::after,
.product-card:focus-within .product-media::after {
    opacity: 1;
}

.product-card:focus-within .primary-img {
    opacity: 0;
}

.product-card:focus-within .secondary-img {
    opacity: 1;
}

.product-card:focus-within .product-cta {
    opacity: 1;
    transform: translateY(0);
}

.product-cta:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 2px;
}

.tone-vanilla {
    background: transparent;
}

.tone-night {
    background: transparent;
}

.tone-forest {
    background: transparent;
}

.tone-mist {
    background: transparent;
}

.tone-amber {
    background: transparent;
}

.tone-mint {
    background: transparent;
}

.tone-blush {
    background: transparent;
}

.tone-slate {
    background: transparent;
}

.product-tag {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9c97a2;
    font-weight: 600;
}

.product-card h3 {
    font-size: 1.08rem;
    margin: 0.35rem 0 0.15rem;
    color: #1f1b23;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: #a79ea7;
    justify-content: flex-start;
}

.product-rating span {
    font-size: 0.8rem;
}

.stars {
    position: relative;
    display: inline-block;
    width: 90px;
    height: 16px;
    line-height: 1;
}

.stars-fill {
    position: absolute;
    inset: 0;
    width: calc(var(--rating) / 5 * 100%);
    overflow: hidden;
}

.stars-base,
.stars-fill {
    display: block;
    height: 100%;
    background-color: #f2dbe5;
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2l2.9 6.1 6.7.9-4.9 4.7 1.2 6.7L12 17.8 6.1 20.4l1.2-6.7L2.4 9l6.7-.9L12 2z'/></svg>");
    -webkit-mask-repeat: repeat-x;
    -webkit-mask-size: 18px 16px;
    -webkit-mask-position: left center;
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2l2.9 6.1 6.7.9-4.9 4.7 1.2 6.7L12 17.8 6.1 20.4l1.2-6.7L2.4 9l6.7-.9L12 2z'/></svg>");
    mask-repeat: repeat-x;
    mask-size: 18px 16px;
    mask-position: left center;
}

.stars-fill {
    background-color: #e4558b;
}

.product-price {
    font-weight: 600;
    color: #1f1b23;
    font-size: 0.95rem;
}

.products-empty {
    text-align: center;
    padding: 3rem 1rem;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 30px rgba(20, 24, 38, 0.08);
    margin-top: 2rem;
}

.collection-footer {
    margin-top: 2.5rem;
    text-align: center;
}

.product-count {
    color: var(--text-soft);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

.load-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.progress {
    width: 140px;
    height: 3px;
    background: #e7ddd7;
    border-radius: 999px;
    overflow: hidden;
}

.progress span {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--accent-strong);
    transition: width 0.3s ease;
}

.load-more-btn {
    padding: 0.7rem 2.2rem;
    border-radius: 12px;
    border: 1px solid #d4c7be;
    background: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}

.load-more-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.products-footer {
    background: #f7f3ef;
    padding: 3rem 0 2rem;
}

.products-footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 2rem;
    align-items: start;
}

.products-footer h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
}

.products-footer p {
    color: #6f6a73;
    font-size: 0.9rem;
    line-height: 1.6;
}

.products-footer .footer-col h4 {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    color: #2a262f;
}

.products-footer .footer-col a {
    display: block;
    color: #6f6a73;
    text-decoration: none;
    margin-bottom: 0.55rem;
    font-size: 0.85rem;
}

.products-footer .footer-col a:hover {
    color: var(--accent-strong);
}

.social-links {
    margin-top: 1rem;
    display: flex;
    gap: 0.6rem;
}

.social-links a {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #6f6a73;
    text-decoration: none;
}

.newsletter-form {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
}

.newsletter-form input {
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    border: 1px solid #e0d7cf;
    background: #ffffff;
    font-size: 0.85rem;
}

.newsletter-form button {
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 10px;
    background: var(--accent-strong);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.products-footer .footer-bottom {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #8a848d;
}

.products-footer .footer-links {
    display: flex;
    gap: 1.2rem;
}

.products-footer .footer-links a {
    color: inherit;
    text-decoration: none;
}

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

@media (max-width: 1024px) {
    .collection-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1.5rem;
    }

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

@media (max-width: 900px) {
    .products-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .nav-left {
        justify-content: space-between;
    }

    .nav-right {
        justify-content: space-between;
    }
}

@media (max-width: 720px) {
    .nav-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .search-field input {
        width: 100%;
    }

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

    .products-footer .footer-bottom {
        flex-direction: column;
        gap: 0.6rem;
        text-align: center;
    }

    .products-footer .footer-grid {
        grid-template-columns: 1fr;
    }
}
