/* CARD */
.tt-card {
    flex-direction: column;
    background-color: var(--bg-color);
    border-radius: 0.5rem; /* ~8px */
    box-shadow: var(--box-shadow);
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--paragraph-color);
}

.tt-card--full-height {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.tt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-weight: 500;
    font-size: 1.125rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--heading-color);
}

.tt-card-header .tt-flex {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* The text block should baseline-align internally */
.tt-card .tt-text-block {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;  /* production + company name */
    gap: 0 0.375rem;
}

/* Keep icon centered independently */
.tt-card .tt-align-items-center {
    display: flex;
    align-items: center;
}

/* BODY */
.tt-card-body {
    container-type: inline-size;
    flex: 1 1 auto;
    font-size: 0.95rem;
    color: var(--paragraph-color);
}

/* FOOTER */
.tt-card-footer {
    padding-top: 0.75rem;
    border-top: 1px solid var(--primary-color);
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* COLOURS */
.tt-card--muted {
    border: 1px solid var(--border-muted);
}
.tt-card-header--muted {
    border-bottom: 1px solid var(--border-muted);
}
.tt-card-footer--muted {
    border-top: 1px solid var(--border-muted);
}

.tt-card--primary {
    border: 1px solid var(--primary-color);
}
.tt-card-header--primary {
    border-bottom: 1px solid var(--primary-color);
}

.tt-card--warning {
    border: 1px solid var(--warning-color);
}
.tt-card-header--warning {
    border-bottom: 1px solid var(--warning-color);
}

.tt-card--danger {
    border: 1px solid var(--danger-color);
}
.tt-card-header--danger {
    border-bottom: 1px solid var(--danger-color);
}

.tt-card--success {
    border: 1px solid var(--success-color);
}
.tt-card-header--success {
    border-bottom: 1px solid var(--success-color);
}

.tt-card--info {
    border: 1px solid var(--info-color);
}
.tt-card-header--info {
    border-bottom: 1px solid var(--info-color);
}

.tt-card--accent {
    border: 1px solid var(--accent-color);
}
.tt-card-header--accent {
    border-bottom: 1px solid var(--accent-color);
}

.tt-card-header.tt-card-header--standalone {
    margin-bottom: 0;
    padding-bottom: 0;
}

.tt-card.tt-border-0 {
    border: 1px solid transparent;
    box-shadow: none;
}

/* PRICE */
.tt-product-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--success-text-color);
    background-color: var(--success-color);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    line-height: 1;
    display: inline-block;
}

.tt-product-price sup {
    top: -0.1rem;
    color: var(--paragraph-color);
}

.tt-product-price small {
    font-size: 0.75rem;
    color: var(--paragraph-color);
    font-weight: 400;
    margin-left: 0.25rem;
}

/* Grid/flex containers already space children via gap — cancel card's own margin */
.grid-base > .tt-card,
.grid-base-md > .tt-card,
.tt-page-grid > .tt-card,
.tt-row > .tt-card {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .tt-card {
        padding: var(--space-2xs);
        margin-bottom: var(--space-2xs);
        border-radius: 0.25rem;
    }
    .tt-card-header {
        padding-bottom: var(--space-3xs);
        margin-bottom: var(--space-3xs);
    }
    .tt-card-footer {
        padding-top: var(--space-3xs);
        margin-top: var(--space-3xs);
    }
}
