/* Alligator Catalog — eredita font/colori dal tema, nessun override */

.algtk-catalog {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(var(--algtk-cols, 3), 1fr);
}

.algtk-catalog--cols-1 { --algtk-cols: 1; }
.algtk-catalog--cols-2 { --algtk-cols: 2; }
.algtk-catalog--cols-3 { --algtk-cols: 3; }
.algtk-catalog--cols-4 { --algtk-cols: 4; }

@media (max-width: 900px) {
    .algtk-catalog--cols-3,
    .algtk-catalog--cols-4 { --algtk-cols: 2; }
}

@media (max-width: 600px) {
    .algtk-catalog { --algtk-cols: 1; }
}

.algtk-catalog__card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0px 0px 8px 0px #00000033;
    transition: box-shadow 0.2s;
}

.algtk-catalog__card:hover {
    box-shadow: 0px 0px 16px 0px #00000040;
}

.algtk-catalog__thumb-link {
    display: block;
}

.algtk-catalog__thumb img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.algtk-catalog__body {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.algtk-catalog__badge {
    display: inline-block;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 3px;
    background: currentColor;
    width: fit-content;
}

/* Il badge usa il colore testo del tema come sfondo, testo bianco */
.algtk-catalog__badge {
    background: #1a1a1a;
    color: #fff;
}

.algtk-catalog__card--abbonamento .algtk-catalog__badge {
    background: #2563eb;
    color: #fff;
}

.algtk-catalog__title {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.3;
    /* font-family, color: eredita dal tema */
}

.algtk-catalog__title a {
    text-decoration: none;
    color: inherit;
}

.algtk-catalog__title a:hover {
    text-decoration: underline;
}

.algtk-catalog__meta {
    margin: 0;
    font-size: 0.875em;
    opacity: 0.65;
    /* color: eredita dal tema */
}

.algtk-catalog__price {
    margin: 0;
    font-weight: 600;
    font-size: 0.95em;
    /* color: eredita dal tema */
}

.algtk-catalog__cta {
    margin-top: auto;
    align-self: flex-start;
    text-decoration: none;
}

.algtk-catalog-empty {
    font-style: italic;
    opacity: 0.6;
}

/* -------------------------------------------------------------------------
   Layout lista
   ------------------------------------------------------------------------- */

.algtk-catalog-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.algtk-catalog-list__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0px 0px 8px 0px #00000033;
    transition: box-shadow 0.2s;
}

.algtk-catalog-list__row:hover {
    box-shadow: 0px 0px 16px 0px #00000040;
}

.algtk-catalog-list__info {
    flex: 1;
    min-width: 0;
}

.algtk-catalog-list__title {
    margin: 0 0 1rem;
    font-size: 1.5em;
    line-height: 1.3;
}

.algtk-catalog-list__title a {
    text-decoration: none;
    color: inherit;
}

.algtk-catalog-list__title a:hover {
    text-decoration: underline;
}

.algtk-catalog-list__excerpt {
    margin: 0;
    font-size: 1em;
    opacity: 0.65;
}

.algtk-catalog-list__aside {
    display: flex;
    align-items: center;
    gap: 48px;
    flex-shrink: 0;
}

.algtk-catalog-list__price-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

.algtk-catalog-list__price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.algtk-catalog-list__from {
    font-size: 14px;
    font-weight: 400;
}

.algtk-catalog-list__price {
    font-weight: 700;
    font-size: 28px;
    white-space: nowrap;
}

.algtk-catalog-list__commission {
    font-size: 0.75em;
    opacity: 0.6;
    white-space: nowrap;
}

.algtk-catalog-list__cta {
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .algtk-catalog-list__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .algtk-catalog-list__aside {
        width: 100%;
        justify-content: space-between;
    }

    .algtk-catalog-list__price-wrap {
        align-items: flex-start;
    }
}
