/* ============================================================
   fotoo.it — Tema minimale v2
   Base: Bootstrap 5.3
   ============================================================ */

/* --- Variabili --- */
:root {
    --ft-bg:          #ffffff;
    --ft-surface:     #f7f7f7;
    --ft-border:      #e8e8e8;
    --ft-text:        #1a1a1a;
    --ft-text-muted:  #888888;
    --ft-accent:      #2c2c2c;
    --ft-accent-hover:#000000;
    --ft-radius:      6px;
    --ft-shadow:      0 1px 4px rgba(0,0,0,.08);
    --ft-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- Reset / Base --- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--ft-font);
    background: var(--ft-bg);
    color: var(--ft-text);
    font-size: 13px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ft-accent); text-decoration: none; }
a:hover { color: var(--ft-accent-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   NAVBAR
   ============================================================ */
.ft-navbar {
    background: var(--ft-bg);
    border-bottom: 1px solid var(--ft-border);
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.ft-navbar__logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--ft-text);
}
.ft-navbar__logo span { color: var(--ft-text-muted); font-weight: 300; }

.ft-navbar__nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ft-navbar__nav a {
    font-size: 0.875rem;
    color: var(--ft-text-muted);
    transition: color .15s;
}
.ft-navbar__nav a:hover { color: var(--ft-text); text-decoration: none; }

.ft-navbar__nav .ft-btn { margin-left: .5rem; }

.ft-navbar__cart {
    position: relative;
    display: flex;
    align-items: center;
    color: var(--ft-text-muted);
    transition: color .15s;
}
.ft-navbar__cart:hover { color: var(--ft-text); text-decoration: none; }
.ft-navbar__cart-count {
    position: absolute;
    top: -7px;
    right: -10px;
    background: var(--ft-accent);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 3px;
}

/* ============================================================
   RICERCA — blocco principale
   ============================================================ */
.ft-search-hero {
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    background: var(--ft-bg);
}

.ft-search-hero__title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: .25rem;
    letter-spacing: -0.3px;
}

.ft-search-hero__sub {
    font-size: 0.9rem;
    color: var(--ft-text-muted);
    margin-bottom: 1.5rem;
}

.ft-search-bar {
    display: flex;
    max-width: 620px;
    margin: 0 auto;
    background: var(--ft-surface);
    border: 1px solid var(--ft-border);
    border-radius: 40px;
    overflow: hidden;
    transition: box-shadow .2s;
}
.ft-search-bar:focus-within {
    box-shadow: 0 0 0 3px rgba(44,44,44,.12);
    border-color: var(--ft-accent);
}

.ft-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: .75rem 1.25rem;
    font-size: 0.95rem;
    color: var(--ft-text);
    outline: none;
}
.ft-search-bar input::placeholder { color: var(--ft-text-muted); }

.ft-search-bar button {
    border: none;
    background: var(--ft-accent);
    color: #fff;
    padding: .75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
    border-radius: 0 40px 40px 0;
}
.ft-search-bar button:hover { background: var(--ft-accent-hover); }

/* Filtri rapidi sotto la search bar */
.ft-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin-top: 1rem;
}

.ft-tag {
    font-size: 0.8rem;
    color: var(--ft-text-muted);
    border: 1px solid var(--ft-border);
    border-radius: 20px;
    padding: .25rem .75rem;
    cursor: pointer;
    transition: all .15s;
    background: var(--ft-bg);
}
.ft-tag:hover, .ft-tag.active {
    background: var(--ft-accent);
    color: #fff;
    border-color: var(--ft-accent);
}

/* ============================================================
   GRIGLIA FOTO
   ============================================================ */
.ft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.ft-card {
    background: var(--ft-bg);
    border: 1px solid var(--ft-border);
    border-radius: var(--ft-radius);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    cursor: pointer;
}
.ft-card:hover {
    box-shadow: var(--ft-shadow);
    transform: translateY(-2px);
}

.ft-card__thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--ft-surface);
}
.ft-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.ft-card:hover .ft-card__thumb img { transform: scale(1.04); }

.ft-card__body {
    padding: .75rem 1rem;
}
.ft-card__title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 .2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ft-card__meta {
    font-size: 0.78rem;
    color: var(--ft-text-muted);
}
.ft-card__price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ft-accent);
    margin-top: .4rem;
}

/* ============================================================
   PULSANTI
   ============================================================ */
.ft-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.2rem;
    border-radius: var(--ft-radius);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}

.ft-btn--primary {
    background: var(--ft-accent);
    color: #fff;
    border-color: var(--ft-accent);
}
.ft-btn--primary:hover {
    background: var(--ft-accent-hover);
    color: #fff;
    text-decoration: none;
}

.ft-btn--outline {
    background: transparent;
    color: var(--ft-accent);
    border-color: var(--ft-border);
}
.ft-btn--outline:hover {
    border-color: var(--ft-accent);
    text-decoration: none;
}

.ft-btn--ghost {
    background: transparent;
    color: var(--ft-text-muted);
    border-color: transparent;
    padding-left: .5rem;
    padding-right: .5rem;
}
.ft-btn--ghost:hover { color: var(--ft-text); text-decoration: none; }

/* ============================================================
   FORM
   ============================================================ */
.ft-form-group { margin-bottom: 1.25rem; }

.ft-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ft-text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .4rem;
}

.ft-input {
    width: 100%;
    padding: .65rem 1rem;
    border: 1px solid var(--ft-border);
    border-radius: var(--ft-radius);
    font-size: 0.95rem;
    background: var(--ft-bg);
    color: var(--ft-text);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    appearance: none;
}
.ft-input:focus {
    border-color: var(--ft-accent);
    box-shadow: 0 0 0 3px rgba(44,44,44,.1);
}
.ft-input::placeholder { color: var(--ft-text-muted); }

/* ============================================================
   ADMIN PAGE WRAPPER
   ============================================================ */
.admin-page {
    background: #eef0f6;
    padding: 32px 56px 48px;
    min-height: calc(100vh - 56px);
    overflow-x: hidden;
}
@media (max-width: 1200px) { .admin-page { padding: 24px 32px 40px; } }
@media (max-width:  768px) { .admin-page { padding: 16px 16px 24px; } }

/* ============================================================
   PANNELLO / CARD GENERICA
   ============================================================ */
.ft-panel {
    background: #fff;
    border: none;
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.ft-section-title {
    font-size: .65rem;
    font-weight: 700;
    color: #9aa0bb;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #f0f2f5;
}

/* ============================================================
   UPLOAD AREA
   ============================================================ */
.ft-dropzone {
    border: 2px dashed var(--ft-border);
    border-radius: var(--ft-radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    color: var(--ft-text-muted);
}
.ft-dropzone:hover, .ft-dropzone.drag-over {
    border-color: var(--ft-accent);
    background: var(--ft-surface);
    color: var(--ft-text);
}
.ft-dropzone__icon { font-size: 2rem; margin-bottom: .75rem; opacity: .4; }
.ft-dropzone__text { font-size: 0.9rem; }
.ft-dropzone__sub { font-size: 0.78rem; margin-top: .25rem; }

/* ============================================================
   NOTIFICHE / ALERT
   ============================================================ */
.ft-alert {
    padding: .85rem 1.1rem;
    border-radius: var(--ft-radius);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border-left: 3px solid;
}
.ft-alert--info    { background: #f0f4ff; border-color: #4a7cf6; color: #1a3a8f; }
.ft-alert--success { background: #f0faf4; border-color: #2ecc71; color: #1a6b3c; }
.ft-alert--error   { background: #fff0f0; border-color: #e74c3c; color: #8b1a1a; }
.ft-alert--warning { background: #fffbf0; border-color: #f39c12; color: #7a4f00; }

/* ============================================================
   FOOTER
   ============================================================ */
.ft-footer {
    border-top: 1px solid var(--ft-border);
    padding: 1.5rem;
    margin-top: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--ft-text-muted);
}

.ft-footer__links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.ft-footer__links a { color: var(--ft-text-muted); }
.ft-footer__links a:hover { color: var(--ft-text); text-decoration: none; }

/* ============================================================
   UTILITY
   ============================================================ */
.ft-divider {
    border: none;
    border-top: 1px solid var(--ft-border);
    margin: 1.5rem 0;
}

.ft-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .2rem .55rem;
    border-radius: 20px;
    background: var(--ft-surface);
    color: var(--ft-text-muted);
    border: 1px solid var(--ft-border);
}
.ft-badge--accent { background: var(--ft-accent); color: #fff; border-color: var(--ft-accent); }

/* ============================================================
   CARD — badge overlay
   ============================================================ */
.ft-card { position: relative; }

.ft-card__badges {
    position: absolute;
    top: .5rem;
    left: .5rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    z-index: 2;
}
.ft-card__badge {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #fff;
}
.ft-card__badge--free     { background: var(--ft-accent); }
.ft-card__badge--discount { background: #e53e3e; }
.ft-card__badge--private  { background: rgba(0,0,0,.65); }

.ft-card__photo-count {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    font-size: .7rem;
    color: #fff;
    background: rgba(0,0,0,.55);
    padding: .25rem .5rem;
    opacity: 0;
    transition: opacity .2s;
    z-index: 2;
}
.ft-card:hover .ft-card__photo-count { opacity: 1; }
.ft-card__thumb { position: relative; }

/* ============================================================
   RESULTS BAR (search)
   ============================================================ */
.ft-results-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1.5rem;
    border-bottom: 1px solid var(--ft-border);
    background: var(--ft-surface);
}

/* colonna sinistra */
.ft-results-bar__count {
    font-weight: 600;
    font-size: .9rem;
    white-space: nowrap;
    justify-self: start;
}

/* colonna centrale — si posiziona automaticamente al centro */
.ft-results-bar__search-wrap,
.ft-results-bar__form {
    display: flex;
    gap: .4rem;
    width: 460px;
    max-width: 100%;
}

/* colonna destra */
.ft-results-bar__all,
.ft-results-bar__links {
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    font-size: .82rem;
    white-space: nowrap;
}

.ft-results-bar__input {
    flex: 1;
    border: 1px solid var(--ft-border);
    border-radius: var(--ft-radius);
    padding: .45rem .85rem;
    font-size: .875rem;
    outline: none;
    background: var(--ft-bg);
    color: var(--ft-text);
    transition: border-color .15s;
}
.ft-results-bar__input:focus { border-color: var(--ft-accent); background: var(--ft-surface); }

@media (max-width: 768px) {
    .ft-results-bar {
        grid-template-columns: 1fr auto;
        flex-wrap: wrap;
    }
    .ft-results-bar__count { grid-column: 1 / -1; }
    .ft-results-bar__search-wrap,
    .ft-results-bar__form { width: 100%; }
    .ft-results-bar__all,
    .ft-results-bar__links { justify-self: start; }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.ft-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .3rem;
    padding: 1.25rem 1.5rem;
    flex-wrap: wrap;
}
.ft-pagination a,
.ft-pagination .current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    height: 2.1rem;
    padding: 0 .5rem;
    border-radius: 5px;
    font-size: .82rem;
    text-decoration: none;
    border: 1px solid var(--ft-border);
    color: var(--ft-text);
    background: var(--ft-surface);
    transition: background .15s, color .15s;
}
.ft-pagination a:hover { background: var(--ft-bg); }
.ft-pagination .current {
    background: var(--ft-accent);
    color: #fff;
    border-color: var(--ft-accent);
    font-weight: 600;
}

/* ============================================================
   TOGGLE VISTA LISTA / GRIGLIA
   ============================================================ */
.ft-view-toggle { display: flex; gap: .2rem; }
.ft-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--ft-border);
    border-radius: var(--ft-radius);
    background: var(--ft-bg);
    color: var(--ft-text-muted);
    cursor: pointer;
    padding: 0;
    transition: background .15s, color .15s, border-color .15s;
}
.ft-view-btn:hover { background: var(--ft-surface); color: var(--ft-text); }
.ft-view-btn.active { background: var(--ft-accent); color: #fff; border-color: var(--ft-accent); }

/* Vista lista */
.ft-grid--list {
    grid-template-columns: 1fr !important;
    gap: .5rem;
    padding: .75rem 1.5rem;
}
.ft-grid--list .ft-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    min-height: 110px;
}
.ft-grid--list .ft-card__thumb {
    aspect-ratio: unset;
    height: 110px;
}
.ft-grid--list .ft-card__thumb img { height: 100%; object-fit: cover; }
.ft-grid--list .ft-card__body {
    padding: .75rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Card in evidenza */
.ft-card--featured { grid-column: span 2; }
.ft-card--featured .ft-card__thumb { aspect-ratio: 21 / 9; }
.ft-card--featured .ft-card__title { font-size: 1.05rem; }
.ft-card__featured-label {
    position: absolute;
    top: .6rem;
    left: .6rem;
    background: var(--ft-accent);
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    padding: .2rem .5rem;
    border-radius: var(--ft-radius);
    letter-spacing: .04em;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    .ft-card--featured { grid-column: span 1; }
    .ft-card--featured .ft-card__thumb { aspect-ratio: 16 / 9; }
    .ft-grid--list .ft-card { grid-template-columns: 110px 1fr; }
    .ft-grid--list .ft-card__thumb { height: 90px; }
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.ft-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem;
    padding: .6rem 1.5rem;
    background: var(--ft-surface);
    border-bottom: 1px solid var(--ft-border);
}

.ft-filter-group {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.ft-filter-label {
    font-size: .75rem;
    color: var(--ft-text-muted);
    white-space: nowrap;
    margin: 0;
}

.ft-filter-select {
    font-size: .8rem;
    border: 1px solid var(--ft-border);
    border-radius: var(--ft-radius);
    padding: .25rem .5rem;
    background: var(--ft-bg);
    color: var(--ft-text);
    cursor: pointer;
}
.ft-filter-select:focus { outline: none; border-color: var(--ft-accent); }

.ft-filter-sep {
    width: 1px;
    height: 18px;
    background: var(--ft-border);
    margin: 0 .2rem;
}

.ft-filter-toggle {
    display: flex;
    align-items: center;
    gap: .3rem;
    cursor: pointer;
    margin: 0;
}
.ft-filter-toggle input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--ft-accent);
}
.ft-filter-toggle__label {
    font-size: .8rem;
    color: var(--ft-text);
    white-space: nowrap;
    user-select: none;
}

.ft-filter-reset {
    font-size: .78rem;
    color: var(--ft-text-muted);
    margin-left: auto;
    white-space: nowrap;
    border: 1px solid var(--ft-border);
    border-radius: var(--ft-radius);
    padding: .2rem .5rem;
    transition: color .15s, border-color .15s;
}
.ft-filter-reset:hover { color: var(--ft-text); border-color: var(--ft-text-muted); text-decoration: none; }

@media (max-width: 768px) {
    .ft-filter-bar { padding: .6rem 1rem; gap: .5rem; }
    .ft-filter-sep { display: none; }
    .ft-filter-reset { margin-left: 0; }
}

/* Empty state */
.ft-empty {
    padding: 4rem 1.5rem;
    text-align: center;
    color: var(--ft-text-muted);
}

/* Results footer (pagination + per-page) */
.ft-results-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--ft-border);
}

/* ============================================================
   PHOTOGRAPHER GRID
   ============================================================ */
.ft-photographer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
}

.ft-photographer-card {
    background: var(--ft-bg);
    border: 1px solid var(--ft-border);
    border-radius: var(--ft-radius);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.ft-photographer-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.ft-photographer-card__photo {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--ft-surface);
}
.ft-photographer-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.ft-photographer-card:hover .ft-photographer-card__photo img {
    transform: scale(1.04);
}

.ft-photographer-card__body {
    padding: .75rem;
}

.ft-photographer-card__name {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    color: var(--ft-text);
    margin-bottom: .6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ft-photographer-card__name:hover { color: var(--ft-accent); text-decoration: none; }

.ft-photographer-card__actions {
    display: flex;
    gap: .4rem;
    align-items: center;
}

.ft-photographer-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ft-border);
    border-radius: var(--ft-radius);
    font-size: .78rem;
    padding: .3rem .65rem;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
    background: var(--ft-surface);
    color: var(--ft-text);
}
.ft-photographer-card__btn:hover { text-decoration: none; }

.ft-photographer-card__btn--primary {
    flex: 1;
    background: var(--ft-accent);
    color: #fff;
    border-color: var(--ft-accent);
}
.ft-photographer-card__btn--primary:hover { background: var(--ft-accent-hover); border-color: var(--ft-accent-hover); color: #fff; }

.ft-photographer-card__btn--icon {
    padding: .3rem .5rem;
    color: var(--ft-text-muted);
}
.ft-photographer-card__btn--icon:hover { color: var(--ft-text); background: var(--ft-border); }

/* Per-page selector */
.ft-per-page {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    color: var(--ft-text-muted);
    padding: .75rem 1.5rem;
    border-top: 1px solid var(--ft-border);
    flex-wrap: wrap;
}
.ft-per-page__label { margin-right: .25rem; }
.ft-per-page a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 5px;
    border: 1px solid var(--ft-border);
    font-size: .82rem;
    text-decoration: none;
    color: var(--ft-text);
    background: var(--ft-surface);
    transition: background .15s;
}
.ft-per-page a:hover,
.ft-per-page a.active { background: var(--ft-accent); color: #fff; border-color: var(--ft-accent); }

/* ============================================================
   PHOTO CARD (griglia evento)
   ============================================================ */
.ft-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .4rem;
    padding: 1rem 1.5rem;
}
@keyframes ft-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}
.ft-photo-card {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 6px;
    background: linear-gradient(90deg, #ebebeb 25%, #d8d8d8 50%, #ebebeb 75%);
    background-size: 1200px 100%;
    animation: ft-shimmer 1.5s infinite linear;
    cursor: pointer;
}
.ft-photo-card--in-cart { outline: 2px solid var(--ft-accent); }

.ft-photo-card__link {
    display: block;
    width: 100%; height: 100%;
}
.ft-photo-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: transform .25s, opacity .45s ease;
}
.ft-photo-card img.ft-loaded {
    opacity: 1;
}
.ft-photo-card:hover img { transform: scale(1.04); }

.ft-photo-card__overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    transition: background .2s;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: .4rem .5rem;
    pointer-events: none;
}
.ft-photo-card:hover .ft-photo-card__overlay { background: rgba(0,0,0,.32); }

.ft-photo-card__code {
    font-size: .65rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.9);
    opacity: 0;
    transition: opacity .2s;
}
.ft-photo-card:hover .ft-photo-card__code { opacity: 1; }

.ft-photo-card__cart {
    pointer-events: all;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 5px;
    color: #fff;
    font-size: .75rem;
    padding: .25rem .55rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s, background .15s;
    line-height: 1.4;
}
.ft-photo-card:hover .ft-photo-card__cart { opacity: 1; }
.ft-photo-card__cart:hover,
.ft-photo-card__cart.active { background: var(--ft-accent); border-color: var(--ft-accent); }

/* Bottone carrello dentro GLightbox (via data-description) */
.gslide-description { background: rgba(0,0,0,.75) !important; padding: 0 !important; }
.gdesc-inner { padding: 0 !important; }

.ft-glb-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: .75rem 1rem;
}
.ft-glb-btn {
    padding: .7rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s;
    letter-spacing: .01em;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.ft-glb-btn:hover { opacity: .85; }
.ft-glb-btn--cart    { background: #2563eb; color: #fff; }
.ft-glb-btn--free    { background: #16a34a; color: #fff; }
.ft-glb-btn--in-cart { background: #555; color: #fff; }
.ft-glb-code { font-size: .72rem; color: #aaa; }

@media (max-width: 600px) {
    .ft-photo-grid { grid-template-columns: repeat(2, 1fr); padding: .5rem; }
}

/* ── Photo item wrapper (card + barra azione) ─────────────────── */
.ft-photo-item { display: flex; flex-direction: column; }
.ft-photo-item .ft-photo-card { flex: 1; border-radius: 6px 6px 0 0; }
.ft-photo-item.ft-photo-card--in-cart .ft-photo-card { outline: 2px solid var(--ft-accent); }

.ft-photo-card__bar {
    background: var(--ft-surface);
    border: 1px solid var(--ft-border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: .28rem .45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .35rem;
}
.ft-photo-card__bar-code {
    font-size: .68rem;
    color: var(--ft-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ft-photo-card__bar-btn {
    font-size: .72rem;
    font-weight: 600;
    padding: .22rem .55rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: #2563eb;
    color: #fff;
    white-space: nowrap;
    line-height: 1.4;
    transition: opacity .15s;
    flex-shrink: 0;
}
.ft-photo-card__bar-btn:hover { opacity: .85; }
.ft-bar-btn--free    { background: #16a34a; }
.ft-bar-btn--in-cart { background: #6c757d; }

/* ── Mobile / touch: bottone carrello sempre visibile ─────────── */
@media (hover: none) {
    /* Griglia: overlay scuro e bottone sempre visibili senza hover */
    .ft-photo-card .ft-photo-card__overlay {
        background: rgba(0,0,0,.32);
    }
    .ft-photo-card .ft-photo-card__cart {
        opacity: 1;
    }
    /* GLightbox: pannello descrizione sempre visibile, bottone grande */
    .gslide-description {
        display: block !important;
    }
    .ft-glb-bar {
        justify-content: center;
        padding: .6rem .5rem;
    }
    .ft-glb-btn {
        min-width: 130px;
        padding: .65rem 1.2rem;
        font-size: .95rem;
    }
}

/* ============================================================
   EVENT HEADER
   ============================================================ */
.ft-event-header {
    background: var(--ft-surface);
    border-bottom: 1px solid var(--ft-border);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.ft-event-header__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}
.ft-event-header__date {
    font-size: .82rem;
    color: var(--ft-text-muted);
    white-space: nowrap;
}
.ft-event-header__photographer {
    font-size: .82rem;
    color: var(--ft-text-muted);
    text-decoration: none;
}
.ft-event-header__photographer:hover { color: var(--ft-text); text-decoration: underline; }
.ft-event-header__price {
    font-size: .85rem;
    font-weight: 600;
    color: var(--ft-accent);
    margin-left: auto;
    white-space: nowrap;
}
.ft-event-header__price--free { color: #16a34a; }
.ft-event-header__listino {
    font-size: .78rem;
    color: var(--ft-text-muted);
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
}
.ft-event-header__listino:hover { color: var(--ft-text); }

/* ============================================================
   IMAGE GALLERY (event detail)
   ============================================================ */
.ft-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .4rem;
    padding: 1rem 1.5rem;
}
.ft-gallery__item {
    display: block;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 6px;
    position: relative;
    cursor: pointer;
    background: var(--ft-bg);
    text-decoration: none;
}
.ft-gallery__item:hover { opacity: .88; }
.ft-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s;
}
.ft-gallery__item:hover .ft-gallery__img { transform: scale(1.03); }
.image_gallery_fotoo { display: block; }
.ft-gallery__code {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: .66rem;
    padding: .2rem .4rem;
    opacity: 0;
    transition: opacity .2s;
}
.ft-gallery__item:hover .ft-gallery__code { opacity: 1; }

/* Cart highlight */
.ft-gallery__item--in-cart { outline: 2px solid var(--ft-accent); }

/* PhotoSwipe action buttons (inside lightbox) */
.ft-pswp-actions {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    gap: .5rem;
    padding: .75rem 1rem;
    background: rgba(0,0,0,.7);
    z-index: 400;
    justify-content: center;
}
.ft-pswp-btn {
    padding: .55rem 1.4rem;
    border: none;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
}
.ft-pswp-btn:hover { opacity: .85; }
.ft-pswp-btn--cart    { background: var(--ft-accent); color: #fff; }
.ft-pswp-btn--free    { background: #16a34a; color: #fff; }
.ft-pswp-btn--prints  { background: #555; color: #fff; }

@media (max-width: 680px) {
    .ft-gallery { grid-template-columns: repeat(2, 1fr); padding: .5rem; }
    .ft-event-header { gap: .75rem; padding: .75rem 1rem; }
}

/* ============================================================
   COOKIE BAR — Garante-compliant (Provvedimento 10/06/2021)
   ============================================================ */
.ft-cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #111;
    color: #c8c8c8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 2rem;
    font-size: .82rem;
    border-top: 1px solid #2a2a2a;
    box-shadow: 0 -4px 24px rgba(0,0,0,.35);
}

.ft-cookie-bar__content { flex: 1; min-width: 0; }

.ft-cookie-bar__text {
    margin: 0;
    line-height: 1.6;
    color: #b0b0b0;
}
.ft-cookie-bar__text strong { color: #e0e0e0; font-weight: 600; }
.ft-cookie-bar__text a {
    color: #888;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}
.ft-cookie-bar__text a:hover { color: #fff; }

.ft-cookie-bar__actions {
    display: flex;
    flex-shrink: 0;
    gap: .6rem;
}

/* Entrambi i pulsanti hanno stessa dimensione — requisito Garante */
.ft-cookie-bar__btn {
    padding: .5rem 1.2rem;
    font-size: .82rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}
.ft-cookie-bar__btn--reject {
    background: transparent;
    color: #aaa;
    border-color: #444;
}
.ft-cookie-bar__btn--reject:hover {
    background: #2a2a2a;
    color: #fff;
    border-color: #666;
}
.ft-cookie-bar__btn--accept {
    background: var(--ft-accent);
    color: #fff;
    border-color: var(--ft-accent);
}
.ft-cookie-bar__btn--accept:hover { opacity: .88; }

@media (max-width: 680px) {
    .ft-cookie-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem 1.25rem;
    }
    .ft-cookie-bar__actions { flex-direction: column-reverse; gap: .5rem; }
    .ft-cookie-bar__btn { width: 100%; text-align: center; padding: .65rem; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .ft-navbar { padding: 0 1rem; }
    .ft-navbar__nav { gap: 1rem; }
    .ft-search-hero { padding: 2rem 1rem 1.5rem; }
    .ft-search-hero__title { font-size: 1.3rem; }
    .ft-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; padding: 1rem; }
    .ft-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .ft-grid { grid-template-columns: repeat(2, 1fr); }
    .ft-navbar__nav .ft-btn span { display: none; }
}

/* ── OAuth Social Login ─────────────────────────────────────────────── */
.ft-oauth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1rem 0;
    font-size: .8rem;
    color: var(--ft-text-muted);
}
.ft-oauth-divider::before,
.ft-oauth-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid #e5e5e5;
}

.ft-oauth-btns {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    margin-bottom: .5rem;
}

.ft-oauth-btn {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1rem;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    color: #222;
    background: #fff;
    transition: background .15s, border-color .15s, box-shadow .15s;
    cursor: pointer;
}
.ft-oauth-btn:hover {
    background: #f5f7fa;
    border-color: #c0c8d4;
    color: #111;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.ft-oauth-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
