/* =========================================================================
   Shoppi — Home 2026
   Header sottile + feed di contenuti shoppable + footer a colonne.
   Caricato DOPO home.css: qui stanno solo le differenze, non una seconda
   copia del design system (i token --primary-color, --accent-red, ecc.
   vengono da home.css).
   ========================================================================= */

/* ---------- 1. Header: meno alto, piu` fermo ----------------------------- */

.top-bar {
    padding: 5px 0;
    font-size: 0.8rem;
}

.top-bar-dropdown>a {
    padding: 4px 10px;
    font-size: 0.8rem;
}

.top-bar-menu {
    gap: 0.35rem;
}

.top-bar-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.top-bar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.top-bar-link--sell {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.ship-to-label {
    opacity: 0.7;
    font-weight: 500;
}

.ship-to-flag {
    width: 18px !important;
    height: 13px !important;
    border-radius: 2px;
}

.ship-to-country {
    font-weight: 700;
}

.header-main {
    padding: 0.6rem 0;
}

.header-bar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.header-bar .logo img {
    max-height: 34px;
}

.header-bar .search-container {
    flex: 1 1 auto;
    max-width: none;
    margin: 0;
}

.header-bar .search-input {
    padding: 10px 120px 10px 44px;
    font-size: 0.92rem;
    border-radius: 10px;
    box-shadow: none;
    border-color: var(--border-light);
    background: var(--white);
}

.header-bar .search-input:focus {
    transform: none;
    box-shadow: 0 0 0 3px rgba(45, 50, 76, 0.08);
}

.header-bar .search-icon {
    left: 16px;
    font-size: 0.95rem;
}

.header-bar .search-button {
    right: 3px;
    padding: 8px 22px;
    border-radius: 8px;
    font-size: 0.88rem;
    box-shadow: none;
    display: block;
}

.header-bar .search-button:hover {
    transform: translateY(-50%);
    box-shadow: none;
}

.header-actions {
    gap: 0.5rem;
    flex: 0 0 auto;
}

.header-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.header-action:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.header-action__icon {
    position: relative;
    display: inline-flex;
}

.header-action__badge {
    position: absolute;
    top: -7px;
    right: -9px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
}

.btn-ghost,
.btn-solid {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-ghost {
    border: 1px solid var(--border-light);
    color: var(--primary-color);
}

.btn-ghost:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-solid {
    background: var(--accent-red);
    color: #fff;
    border: 1px solid var(--accent-red);
}

.btn-solid:hover {
    background: #ff3344;
    color: #fff;
}

/* Barra categorie */
.thematic-menu-bar {
    padding: 0;
    background: var(--white);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.thematic-menu-list {
    gap: 2px;
}

.thematic-menu-link {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 9px 12px;
    border-radius: 0;
    color: var(--text-muted);
}

.thematic-menu-link:hover {
    background: transparent;
    transform: none;
    color: var(--primary-color);
}

.thematic-menu-link--all {
    color: var(--primary-color);
    font-weight: 700;
}

.thematic-menu-link.highlight {
    color: var(--accent-red);
    font-weight: 700;
}

@media (max-width: 991px) {
    .header-bar {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .header-bar .logo {
        order: 1;
    }

    .header-bar .header-actions {
        order: 2;
        margin-left: auto;
    }

    .header-bar .search-container {
        order: 3;
        flex-basis: 100%;
    }

    .header-action__txt {
        display: none;
    }
}

@media (max-width: 575px) {
    /* Su schermo stretto la barra in cima andava a capo e il paese finiva
       sotto ai propri link. Si toglie l'etichetta "Spedisci in" e resta la
       bandiera col nome, che e` l'informazione vera. */
    .top-bar {
        font-size: 0.72rem;
    }

    /* home.css impila questa barra in colonna sotto i 576px, il che con le
       nuove voci diventa un blocco di tre righe prima ancora del logo. */
    .top-bar .container {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.4rem;
    }

    .ship-to-label {
        display: none;
    }

    /* home.css invertiva l'ordine quando la barra era in colonna: tornata in
       riga, il paese resta a sinistra come sul desktop. */
    .top-bar-contact {
        order: 0;
    }

    .top-bar-menu {
        order: 0;
        gap: 0.1rem;
    }

    .top-bar-dropdown>a {
        padding: 4px 6px;
    }
}

/* ---------- 2. Le storie dei negozi ------------------------------------- */

.discovery-categories.is-merchants .story-circle {
    padding: 2px;
}

.story-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.story-initial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--shoppi-purple) 100%);
}

/* ---------- 3. Il feed --------------------------------------------------- */

.section--feed {
    padding-top: 1.75rem;
    padding-bottom: 2.5rem;
}

.feed-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.feed-tabs {
    display: inline-flex;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.feed-tab {
    border: 0;
    background: transparent;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.feed-tab:hover {
    color: var(--primary-color);
}

.feed-tab.is-active {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.feed-count {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.feed-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

@media (min-width: 1200px) {
    .feed-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .feed-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.feed-skeleton {
    height: 420px;
    border-radius: 14px;
    background: linear-gradient(100deg, var(--bg-secondary) 30%, #fafbfc 50%, var(--bg-secondary) 70%);
    background-size: 220% 100%;
    animation: feed-shimmer 1.3s linear infinite;
}

@keyframes feed-shimmer {
    from { background-position: 180% 0; }
    to { background-position: -80% 0; }
}

/* --- la card --- */

.feed-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.feed-card:hover {
    box-shadow: 0 12px 28px rgba(45, 50, 76, 0.1);
    transform: translateY(-2px);
}

.feed-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
}

.feed-card__store {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.feed-card__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 34px;
    background: var(--bg-secondary);
}

.feed-card__avatar--letter {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--shoppi-purple) 100%);
}

.feed-card__store-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.feed-card__store-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-card__meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.feed-card__dot {
    margin: 0 3px;
}

.feed-follow {
    flex: 0 0 auto;
    border: 1px solid var(--border-light);
    background: var(--white);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feed-follow:hover {
    border-color: var(--primary-color);
}

.feed-follow .feed-follow__tick {
    display: none;
    margin-left: 5px;
    font-size: 0.65rem;
}

.feed-follow.is-following {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.feed-follow.is-following .feed-follow__tick {
    display: inline-block;
}

.feed-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--bg-secondary);
    cursor: pointer;
    overflow: hidden;
}

.feed-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.feed-card:hover .feed-card__img {
    transform: scale(1.03);
}

.feed-card__play,
.feed-card__zoom {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    backdrop-filter: blur(4px);
}

.feed-card__play {
    inset: 0;
    margin: auto;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    font-size: 1.05rem;
    padding-left: 4px;
}

.feed-card__zoom {
    right: 10px;
    bottom: 10px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    font-size: 0.72rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.feed-card:hover .feed-card__zoom {
    opacity: 1;
}

.feed-card__body {
    padding: 14px;
    flex: 1 1 auto;
}

.feed-card__title {
    margin: 0 0 12px;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--primary-color);
    cursor: pointer;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-card__eyebrow {
    margin: 0 0 8px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* --- cosa si compra dentro il contenuto --- */

.feed-sells {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feed-sell {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-light);
    border-radius: 10px;
    padding: 6px 8px 6px 6px;
}

.feed-sell__link {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    flex: 1 1 auto;
}

.feed-sell__img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    flex: 0 0 38px;
    background: var(--bg-secondary);
}

.feed-sell__txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.feed-sell__title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-sell__price {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--accent-red);
}

.feed-sell__add {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--white);
    color: var(--primary-color);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feed-sell__add:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
}

.feed-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-top: 1px solid var(--border-light);
}

.feed-card__cta {
    border: 0;
    background: none;
    padding: 0;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.feed-card__cta i {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.feed-card__cta:hover i {
    transform: translateX(3px);
}

.feed-card__wish {
    border: 0;
    background: none;
    padding: 4px;
    color: var(--text-muted);
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.feed-card__wish:hover,
.feed-card__wish.is-wished {
    color: var(--accent-red);
}

.feed-card__wish.is-wished {
    transform: scale(1.1);
}

.feed-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.feed-empty h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.btn-load-more {
    border: 1px solid var(--border-light);
    background: var(--white);
    color: var(--primary-color);
    border-radius: 999px;
    padding: 12px 34px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-load-more:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

/* ---------- 4. Footer a colonne ----------------------------------------- */

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 2rem;
    align-items: start;
}

.footer-logo img {
    max-height: 30px;
    margin-bottom: 14px;
}

.footer-blurb {
    font-size: 0.85rem;
    line-height: 1.6;
    opacity: 0.75;
    max-width: 34ch;
    margin-bottom: 16px;
}

.footer-col h4 {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
    opacity: 0.6;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col li {
    margin-bottom: 9px;
}

.footer-col a {
    font-size: 0.87rem;
    text-decoration: none;
    color: inherit;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.footer-col a:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.75rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}
