/* Archivio CSS
 * ============================================
 * Jerilicious — icon grid & breadcrumb
 * Styled to match the mint / lavender / gold /
 * wine / teal Jerilicious theme. Shares custom
 * properties already defined by style.css and
 * fanatically.css (both are always loaded
 * alongside this file — see header.php).
 * ============================================
 */

/* ── Icon grid ───────────────────────────────────────────────── */
/* --thumb-size and --gap are set by the integration mode inline \3c style>
   in index.php, which reads thumbnail_size from config.php. */

.image-grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size), 1fr));
    list-style: none;
    margin: 1.25rem 0 1.25rem !important;
    padding: 0;
}

.image-item {
    align-items: center;
    display: flex;
    justify-content: center;
}

.image-item figure {
    align-items: center;
    background: var(--paper, #fdfcf9);
    border: 1px solid var(--border, rgba(182, 147, 94, 0.28));
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(36, 31, 43, 0.1);
    display: flex;
    height: var(--thumb-size);
    justify-content: center;
    margin: 0;
    overflow: hidden;
    padding: 3px;
    position: relative;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    width: var(--thumb-size);
}

.image-item figure::before {
    background: linear-gradient(90deg, var(--wine), var(--gold), var(--teal));
    content: '';
    height: 2px;
    left: 0;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: opacity 0.25s ease;
}

.image-item figure:hover {
    border-color: var(--gold);
    box-shadow: 0 10px 24px rgba(36, 31, 43, 0.16);
    transform: translateY(-3px);
}

.image-item figure:hover::before {
    opacity: 1;
}

.image-item img {
    display: block;
    height: auto;
    max-height: calc(var(--thumb-size) - 8px);
    max-width: calc(var(--thumb-size) - 8px);
    object-fit: contain;
    width: auto;
}

/* ── Breadcrumb ──────────────────────────────────────────────── */

/* .breadcrumb is a <nav>, so it inherits the site-wide glass-pill `nav`
   styling (background/border/radius/shadow) from style.css. That rule's
   padding (1.1rem 1.5rem) is sized for the main site nav's larger link
   buttons — override it here with a slimmer pill sized for plain text. */
.breadcrumb {
    font-family: 'Jost', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    margin: 0 0 1.1rem;
    padding: 0.5rem 1.15rem;
    text-transform: uppercase;
}

.breadcrumb ol {
    color: var(--ink-light, var(--text-light, #9c8aa8));
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    align-items: center;
    display: flex;
}

.breadcrumb li + li::before {
    color: var(--gold);
    content: "›";
    flex-shrink: 0;
    margin: 0 0.5rem;
    opacity: 0.7;
}

.breadcrumb a {
    background: none;
    border: none;
    border-radius: 0;
    color: var(--ink-light, var(--text-light, #9c8aa8));
    display: inline;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    padding: 0;
    text-decoration: none;
    text-transform: inherit;
    transition: color 0.2s ease;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
    background: none;
    border-color: transparent;
    color: var(--gold);
    outline: none;
    transform: none;
}

.breadcrumb a:visited {
    color: var(--ink-light, var(--text-light, #9c8aa8));
}

.breadcrumb [aria-current="page"] {
    color: var(--ink, var(--text-dark, #3a2c33));
    font-weight: 600;
}

/* ── Category / subcategory lists ────────────────────── */
/* .category-list is the home-page list of top-level categories.
   .subcategory-list is the same thing one level down (rendered inside a
   "Folders" <section class="subcategory-section">). Both were previously
   unstyled and fell back to a plain browser bullet list — replaced here
   with the same divider-row treatment used for owned/joined listings
   elsewhere on the site, so navigation lists read consistently everywhere. */

.category-list,
.subcategory-list {
    list-style: none;
    margin: 1.25rem 0;
    padding: 0;
}

.category-list li,
.subcategory-list li {
    border-bottom: 1px solid var(--border, rgba(182, 147, 94, 0.2));
    padding: 0.7rem 0;
}

.category-list li:last-child,
.subcategory-list li:last-child {
    border-bottom: none;
}

.category-list a,
.subcategory-list a {
    border-bottom: 1px dotted rgba(182, 147, 94, 0.45);
    color: var(--wine, #8a5a70);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.category-list a:hover,
.subcategory-list a:hover {
    border-bottom-color: var(--gold);
    border-bottom-style: solid;
    color: var(--gold);
}

.category-list a:visited,
.subcategory-list a:visited {
    color: var(--wine, #8a5a70);
}

.count {
    color: var(--ink-light, var(--text-light, #9c8aa8));
    font-family: 'Jost', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    margin-left: 0.4rem;
    text-transform: uppercase;
}

.subcategory-section {
    margin: 1.5rem 0;
}

/* ── Sort controls ────────────────────────────────── */

.sort-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.4rem 0;
}

.sort-label {
    color: var(--ink-light, var(--text-light, #9c8aa8));
    font-family: 'Jost', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sort-btn {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: var(--white-glass, rgba(253, 252, 249, 0.45));
    border: 1px solid var(--border, rgba(182, 147, 94, 0.28));
    border-radius: 50px;
    color: var(--ink-soft, var(--text-mid, #5f5772));
    display: inline-block;
    font-family: 'Jost', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    padding: 0.35rem 0.85rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.22s ease;
}

.sort-btn:hover {
    background: linear-gradient(120deg, #cdf6e6 0%, #efeaf9 100%);
    border-color: var(--gold);
    color: var(--ink, var(--text-dark, #3a2c33));
    transform: translateY(-2px);
}

.sort-btn.active {
    background: var(--white-soft, rgba(253, 252, 249, 0.78));
    border-color: var(--gold);
    color: var(--ink, var(--text-dark, #3a2c33));
    font-weight: 600;
}

.sort-btn:visited {
    color: var(--ink-soft, var(--text-mid, #5f5772));
}

/* ── Pagination ───────────────────────────────────── */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin: 1.5em 0;
}

.pagination-btn,
.pagination-page {
    align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: var(--white-glass, rgba(253, 252, 249, 0.45));
    border: 1px solid var(--border, rgba(182, 147, 94, 0.28));
    border-radius: 50px;
    color: var(--ink-soft, var(--text-mid, #5f5772));
    display: inline-flex;
    font-family: 'Jost', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    justify-content: center;
    letter-spacing: 0.1em;
    min-width: 32px;
    padding: 0.35rem 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-btn:hover,
.pagination-page:hover {
    background: linear-gradient(120deg, #cdf6e6 0%, #efeaf9 100%);
    border-color: var(--gold);
    color: var(--ink, var(--text-dark, #3a2c33));
    transform: translateY(-2px);
}

.pagination-page.current {
    background: var(--white-soft, rgba(253, 252, 249, 0.78));
    border-color: var(--gold);
    color: var(--ink, var(--text-dark, #3a2c33));
    font-weight: 600;
}

.pagination-btn:visited,
.pagination-page:visited {
    color: var(--ink-soft, var(--text-mid, #5f5772));
}

.pagination-ellipsis {
    color: var(--ink-light, var(--text-light, #9c8aa8));
    padding: 0.35rem 0.2rem;
}

/* ── Feedback messages ────────────────────────────── */

.empty-message,
.error-message {
    color: var(--ink-light, var(--text-light, #9c8aa8));
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    font-style: italic;
    margin: 1.5rem 0;
    text-align: center;
}

.error-message {
    color: #8a3030;
}

/* ── Site description ──────────────────────── */
/* Optional intro copy from the site_description config key, shown on the
   home page between the title and the category list. Same gap as the
   Fanatically wrapper classes had: unstyled, so it fell back to the
   browser default text size instead of matching the site's body copy. */

.site-description {
    color: var(--ink-soft, var(--text-mid, #5f5772));
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.18rem;
    line-height: 1.75;
    margin-bottom: 1.4rem;
}

.site-description p {
    font-size: inherit;
    margin: 0 0 1rem;
}

.site-description p:last-child {
    margin-bottom: 0;
}
