/* Silverman Collections — front-end styles. All classes prefixed .sssc- */

:root {
    --sssc-green: #449E90;
    --sssc-green-dark: #2F6E64;
    --sssc-purple: #90449E;
}

/* ── Hub ─────────────────────────────────────────────────── */
/* scroll-margin-top keeps the group heading clear of the sticky site header
   when arriving via a #collections-* jump link. Raise it if the header grows. */
.sssc-hub-group {
    margin: 0 0 40px;
    scroll-margin-top: 100px;
}
.sssc-hub-group-title {
    font-size: 1.4rem;
    color: var(--sssc-green-dark);
    margin: 0 0 16px;
    border-bottom: 2px solid var(--sssc-green);
    padding-bottom: 6px;
}
.sssc-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.sssc-tile {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
    transition: transform .15s ease, box-shadow .15s ease;
}
.sssc-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.sssc-tile-image {
    display: block;
    width: 100%;
    padding-top: 62%;
    background-size: cover;
    background-position: center;
    background-color: #eef4f3;
}
.sssc-tile-body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.sssc-tile-name { font-weight: 600; color: var(--sssc-green-dark); }
.sssc-tile-count { font-size: .8rem; color: #6b7280; }
.sssc-tile-blurb { font-size: .85rem; color: #4b5563; }

/* ── Collection tracks page ─────────────────────────────── */
.sssc-collection-tracks { margin: 24px 0; }
.sssc-player { margin-bottom: 24px; }
.sssc-track-list { list-style: none; margin: 0; padding: 0; }
.sssc-track-item {
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sssc-track-title { color: var(--sssc-green-dark); font-weight: 600; text-decoration: none; }
.sssc-track-title:hover { text-decoration: underline; }
.sssc-track-teaser { font-size: .85rem; color: #6b7280; }

/* ── Related tracks (single product) ────────────────────── */
.sssc-related { margin: 32px 0; }
.sssc-related-heading { font-size: 1.1rem; color: var(--sssc-green-dark); margin: 0 0 14px; }
.sssc-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}
.sssc-related-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
    transition: transform .15s ease, box-shadow .15s ease;
}
.sssc-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.sssc-related-thumb img { width: 100%; height: auto; display: block; }
.sssc-related-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.sssc-related-title { font-weight: 400; color: var(--sssc-green-dark); font-size: 1rem; text-align: center; }
.sssc-related-teaser { font-size: .78rem; color: #6b7280; }

/* Centred via text-align on a block, not justify-content on a flex row: this
   element sits inside theme/Elementor product markup, and the stylesheet is
   enqueued without dependencies so it loads before the theme's. A `display`
   override from further down the cascade would silently kill flex centring;
   text-align survives it, and inline-flex chips still line up neatly. */
.sssc-collection-link {
    margin: 22px 0 0;
    text-align: center;
    font-size: .95rem;
    line-height: 2.5;
}
.sssc-collection-link-text { color: #6b7280; }

.sssc-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
    margin: 0 1px;
    padding: 4px 14px 4px 5px;
    /* Matches the site's button language: 2px solid, 8px radius.
       --sssc-green-dark is #2F6E64. */
    border: 2px solid var(--sssc-green-dark);
    border-radius: 8px;
    background: #fff;
    color: var(--sssc-green-dark);
    text-decoration: none;
    font-size: .9rem;
    line-height: 1.3;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.sssc-chip:hover,
.sssc-chip:focus-visible {
    background: var(--sssc-green-dark);
    color: #fff;
    box-shadow: 0 2px 8px rgba(47, 110, 100, .25);
}
/* Whole 16:9 tile, not a square crop — see the note in shortcode_related().
   `height: auto` is spelled out because themes commonly force it on img. */
.sssc-chip .sssc-chip-image {
    width: 46px;
    min-width: 46px;
    height: 26px;
    /* Outer 8px radius minus the 2px border — keeps the corners concentric. */
    border-radius: 6px;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
    box-shadow: none;
}
.sssc-chip .sssc-chip-icon {
    width: 15px;
    height: 15px;
    min-width: 15px;
    display: block;
    margin-left: 6px;
    opacity: .75;
}
.sssc-chip:hover .sssc-chip-icon,
.sssc-chip:focus-visible .sssc-chip-icon { opacity: 1; }
.sssc-chip-name { white-space: nowrap; }

/* A chip per collection gets wide on a phone; let them wrap onto their own
   lines rather than forcing a horizontal scroll. */
@media (max-width: 480px) {
    .sssc-collection-link { line-height: 2.1; }
    .sssc-chip { font-size: .85rem; padding: 3px 12px 3px 4px; gap: 6px; }
    .sssc-chip .sssc-chip-image { width: 40px; min-width: 40px; height: 23px; }
}
