
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: white;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', system-ui, sans-serif;
    overflow-x: hidden;
    color: #1a2a44;
}

.collection-hero {
    padding: 140px 6% 20px;
    text-align: center;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #6b7a90;
    margin-bottom: 14px;
}

.breadcrumb a {
    color: #2d79ba;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span[aria-hidden] {
    margin: 0 8px;
}

.collection-hero h1 {
    font-family: 'Source Serif 4', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 2.6rem;
    color: #1C2B4B;
}

.collection-blurb {
    max-width: 560px;
    margin: 10px auto 0;
    color: #5a6b85;
    font-size: 1.05rem;
}

.collection-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.collection-tabs__btn {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a2a44;
    background: #eaf4ff;
    border: 2px solid transparent;
    border-radius: 999px;
    padding: 9px 20px;
    min-height: 44px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.collection-tabs__btn:hover {
    background: #d6eaff;
}

.collection-tabs__btn.is-active {
    background: #1C2B4B;
    border-color: #1C2B4B;
    color: #ffffff;
}

.collection-toolbar {
    position: sticky;
    top: 85px;
    z-index: 50;
    background: #ffffff;
    border-bottom: 1px solid rgba(28, 43, 75, 0.08);
    padding: 14px 6%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.collection-toolbar[hidden] {
    display: none;
}

.collection-search {
    flex: 0 0 auto;
    min-width: 0;
}

.collection-search input {
    width: 240px;
    max-width: 100%;
    padding: 10px 18px;
    border: 2px solid #a7c7e7;
    border-radius: 999px;
    font-family: 'Poppins', sans-serif;

    font-size: 16px;
    min-height: 44px;
    outline: none;
    transition: border-color 0.2s ease;
}

.collection-search input:focus {
    border-color: #2d79ba;
}

.collection-jumpnav-wrap {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.collection-jumpnav {
    display: flex;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;

    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.collection-jumpnav::-webkit-scrollbar {
    display: none;
}

.collection-jumpnav.is-scrollable {
    mask-image: linear-gradient(to right, black calc(100% - 32px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 32px), transparent 100%);
}

.jumpnav-scrollbar {
    display: none;
    position: relative;
    align-items: center;
    height: 18px;
}

.jumpnav-scrollbar.is-visible {
    display: flex;
}

.jumpnav-scrollbar__track {
    position: relative;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: #eaf4ff;
    overflow: hidden;
    cursor: pointer;
}

.jumpnav-scrollbar__thumb {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    min-width: 24px;
    border-radius: 999px;

    background: linear-gradient(90deg, rgba(167, 199, 231, 0), #a7c7e7 85%);
}

.jumpnav-scrollbar__butterfly {
    position: absolute;
    top: 54%;
    left: 2%;
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(28, 43, 75, 0.25));
    animation: jumpnav-flutter 1.6s ease-in-out infinite;
}

@keyframes jumpnav-flutter {
    0%, 100% { transform: translate(-50%, -50%) rotate(-8deg); }
    50%      { transform: translate(-50%, -65%) rotate(8deg); }
}

.jumpnav__chip {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #d6eaff;
    color: #1a2a44;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    box-sizing: border-box;
    transition: background 0.2s ease, color 0.2s ease;
}

.jumpnav__chip:hover {
    background: #a7c7e7;
}

.collection-results {
    padding: 30px 6% 60px;
    display: flex;
    flex-direction: column;
    gap: 46px;
}

.subcollection {
    scroll-margin-top: 120px;
}

.subcollection__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid #ffe1e6;
    padding-bottom: 10px;
}

.subcollection__header h2 {
    font-family: 'Source Serif 4', serif;
    font-style: italic;
    font-size: 1.5rem;
    color: #1C2B4B;
}

.subcollection__title {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Concave Links Gold / Silver toggle — shows the finish you'll switch to */
.gold-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b5b1e;
    background: linear-gradient(135deg, #fdf1c8, #e8c874);
    border: 2px solid transparent;
    border-radius: 999px;
    padding: 5px 14px;
    min-height: 32px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.gold-toggle-btn::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f7d774, #b8902e);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.gold-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
    border-color: #e8c874;
}

.gold-toggle-btn:active {
    transform: scale(0.96);
}

.gold-toggle-btn:focus-visible {
    outline: none;
    border-color: #2d79ba;
}

.gold-toggle-btn.is-gold {
    color: #1a2a44;
    background: linear-gradient(135deg, #f2f5f8, #cfd8e3);
}

.gold-toggle-btn.is-gold::before {
    background: linear-gradient(135deg, #ffffff, #9aa9bb);
}

.gold-toggle-btn.is-gold:hover {
    border-color: #a7c7e7;
}

.subcollection__price {
    background: #FCF5BE;
    color: #6b5b1e;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.charm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 14px;
}

.charm-grid__empty {
    grid-column: 1 / -1;
    padding: 24px 0;
    text-align: center;
    color: #5a6b85;
    font-style: italic;
}

.charm-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.charm-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
}

.charm-tile.is-addable {
    cursor: pointer;
}

.charm-tile.is-addable:active {
    transform: scale(0.96);
}

.charm-tile[hidden] {
    display: none;
}

.charm-tile--silver {
    background: linear-gradient(135deg, #f2f5f8, #cfd8e3);
}

.charm-tile--gold {
    background: linear-gradient(135deg, #fdf1c8, #e8c874);
}

.charm-tile--neutral {
    background: linear-gradient(135deg, #ffe1e6, #ffc9d6);
}

.charm-glyph {
    font-size: 1.9rem;
    line-height: 1;
}

.charm-tile.has-photo {
    background: #ffffff;
    border: 1px solid rgba(28, 43, 75, 0.08);
    padding: 10px 8px 8px;
}

.charm-photo {
    width: 100%;
    max-height: 68%;
    object-fit: contain;
}

.charm-label {
    flex-shrink: 0;
    width: 100%;
    height: 2.3em;
    font-size: 0.74rem;
    line-height: 1.15;
    font-weight: 600;
    color: #1a2a44;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.charm-tile.is-sold-out {
    filter: grayscale(1);
    opacity: 0.55;
}

.charm-tile.is-sold-out:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sold-out-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #d1293d;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

.charm-tile__add-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border-radius: 999px;
    background: #1C2B4B;
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.charm-tile.is-addable:hover .charm-tile__add-badge {
    background-color: #a7c7e7;
    color: #1C2B4B;
    transform: scale(1.1);
}

.charm-tile__add-badge.has-qty {
    background: #90e0a0;
    color: #1a2a44;
    font-size: 0.7rem;
    font-weight: 700;
}

.charm-tile.is-addable:hover .charm-tile__add-badge.has-qty {
    background-color: #90e0a0;
    color: #1a2a44;
}

.collection-empty,
.collection-no-results {
    text-align: center;
    padding: 60px 6% 100px;
    color: #5a6b85;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .collection-hero {
        padding: 120px 5% 16px;
    }

    .collection-hero h1 {
        font-size: 2rem;
    }

    .charm-grid {
        grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 567px) {
    .collection-search input {
        width: 100%;
    }

    .collection-toolbar {
        flex-direction: column;
        align-items: stretch;
    }


    .collection-jumpnav-wrap,
    .collection-jumpnav {
        width: 100%;
        max-width: 100%;
    }
}

html.dark-mode body {
    background-color: #0f172a;
    color: #e5e7eb;
}

html.dark-mode .collection-hero h1 {
    color: #e5e7eb;
}

html.dark-mode .collection-blurb,
html.dark-mode .breadcrumb {
    color: #9aa9c2;
}

html.dark-mode .collection-toolbar {
    background: #16233d;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

html.dark-mode .subcollection__header h2 {
    color: #e5e7eb;
}

html.dark-mode .gold-toggle-btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

html.dark-mode .gold-toggle-btn:focus-visible {
    border-color: #a7c7e7;
}

html.dark-mode .charm-label {
    color: #16233d;
}

html.dark-mode .collection-tabs__btn {
    background: #16233d;
    color: #e5e7eb;
}

html.dark-mode .collection-tabs__btn:hover {
    background: #223458;
}

html.dark-mode .collection-tabs__btn.is-active {
    background: #a7c7e7;
    border-color: #a7c7e7;
    color: #0f172a;
}

/* --- Hover lift on the category tabs and jump-nav chips --- */
.collection-tabs__btn,
.jumpnav__chip {
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.collection-tabs__btn:hover,
.jumpnav__chip:hover,
.collection-tabs__btn:focus-visible,
.jumpnav__chip:focus-visible {
    transform: translateY(-2px);
}

.breadcrumb a {
    transition: color 0.2s ease;
}
