@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* Titoli card in homepage - scoped al post-feed per non toccare i titoli h1 delle pagine/articoli */
.post-feed .post-title,
.post-feed .post-title-link {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    font-size: 1.85rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

/* Excerpt card: max 3 righe */
.tftr-excerpt {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
    color: #666 !important;
    margin-top: 0.4rem !important;
}

/* Nascondi autore e articoli correlati su pagine statiche */
.page-template .author-wrapper,
.page-template .author-name,
.page-template [class*="author"],
.page-template [class*="related"],
.page-template [class*="also"] {
    display: none !important;
}

/* Nascondi sezione featured posts vuota */
.featured-posts {
    display: none !important;
}

/* Hero logo homepage - clippa il PNG per rimuovere whitespace interno */
.tftr-hero {
    overflow: hidden;
    height: 250px;
    position: relative;
    margin: 0;
    padding: 0;
}
.gh-main {
    --header-spacing: 0px;
    padding-top: 0 !important;
    margin-top: 0 !important;
}
.content-area,
.site-main,
.site-content,
.gh-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
.content-area > *:first-child,
.site-main > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
.tftr-filter-bar {
    padding-top: 8px !important;
    margin-top: 0 !important;
}
.tftr-hero-logo {
    position: absolute;
    width: 100%;
    height: auto;
    top: 50%;
    transform: translateY(-50%);
}

/* ══════════════════════════════════════
   TFTR Filter Bar
   ══════════════════════════════════════ */

.tftr-filter-bar {
    padding: 24px 0 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.tftr-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Selects */
.tftr-select {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    border: 1px solid #d5d5d5;
    border-radius: 5px;
    padding: 8px 30px 8px 12px;
    font-size: 13px;
    font-family: inherit;
    color: #1a1a1a;
    cursor: pointer;
    min-width: 110px;
    transition: border-color 0.15s;
}

.tftr-select:focus {
    outline: none;
    border-color: #1a1a1a;
}

.tftr-select:hover {
    border-color: #999;
}

/* Brand searchable dropdown */
.tftr-brand-wrapper {
    position: relative;
    min-width: 180px;
}

#filter-brand-input {
    width: 100%;
    border: 1px solid #d5d5d5;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    color: #1a1a1a;
    box-sizing: border-box;
    transition: border-color 0.15s;
    background: #fff;
}

#filter-brand-input::placeholder {
    color: #aaa;
}

#filter-brand-input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.tftr-brand-dropdown {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d5d5d5;
    border-radius: 5px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.tftr-brand-dropdown.is-hidden {
    display: none;
}

.tftr-brand-option {
    padding: 9px 12px;
    font-size: 13px;
    cursor: pointer;
    color: #1a1a1a;
    transition: background 0.1s;
}

.tftr-brand-option:hover {
    background: #f5f5f5;
}

.tftr-brand-option.is-selected {
    background: #f0f0f0;
    font-weight: 600;
}

.tftr-no-results {
    color: #aaa;
    cursor: default;
    font-style: italic;
}

/* Bottoni gender Women/Men */
.tftr-gender-btn {
    background: none;
    border: 1px solid #d5d5d5;
    border-radius: 5px;
    padding: 8px 16px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    color: #1a1a1a;
    transition: all 0.15s;
    letter-spacing: 0.03em;
}
.tftr-gender-btn:hover {
    border-color: #1a1a1a;
}
.tftr-gender-btn.is-active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

/* Reset button */
#tftr-reset {
    background: none;
    border: 1px solid #d5d5d5;
    border-radius: 5px;
    padding: 8px 14px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    color: #777;
    display: none;
    transition: all 0.15s;
}

#tftr-reset:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

/* Results count */
#tftr-count {
    font-size: 12px;
    color: #aaa;
    margin-top: 10px;
    width: 100%;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Card image 2:3 portrait ratio */
.u-placeholder.tftr-portrait {
    padding-bottom: 150%;
}

/* Loading spinner */
#tftr-loading {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    color: #aaa;
    font-size: 14px;
    letter-spacing: 0.05em;
}

/* Empty state */
.tftr-empty {
    text-align: center;
    padding: 80px 20px;
    color: #aaa;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dark-mode .tftr-select,
    .dark-mode #filter-brand-input {
        background-color: #1a1a1a;
        border-color: #444;
        color: #fff;
    }
    .dark-mode .tftr-brand-dropdown {
        background: #1a1a1a;
        border-color: #444;
    }
    .dark-mode .tftr-brand-option {
        color: #fff;
    }
    .dark-mode .tftr-brand-option:hover,
    .dark-mode .tftr-brand-option.is-selected {
        background: #2a2a2a;
    }
    .dark-mode #tftr-reset {
        border-color: #444;
        color: #aaa;
    }
    .dark-mode .tftr-filter-bar {
        border-bottom-color: rgba(255,255,255,0.08);
    }
}
