/* ======================
   GRID & KARTY
====================== */

.had-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

/* Archiv genotypu hada – karty vedle sebe */
.archive.tax-genotyp-hada .had-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}



/* KARTA */
.had-card {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e9e9e9;
    box-shadow: 0 4px 18px rgba(0,0,0,.05);
    display: flex;
    flex-direction: column;
}

.had-card__body {
    flex-grow: 1;     /* tělo se natáhne, aby tlačítko bylo vždy dole */
}

/* OBRÁZEK */
.had-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f6f6f6;
    overflow: hidden;
}

.had-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.had-card__img--ph {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f2f2f2, #e9e9e9); 
}

/* BADGE */
.had-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #198754;
    color: #fff;
}

.had-card__badge.is-reserved {
    background: #f0a500;
}

.had-card__badge.is-sold {
    background: #c0392b;
}

/* OBSAH */
.had-card__body {
    padding: 16px 18px 8px;
}

.had-card__title {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.had-card__desc {
    color: #555;
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 16px;
line-height: 1.55;

     display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;   /* počet řádků */
    overflow: hidden;
}

/* META */
.had-card__meta {
    margin: 0 10px 10px 28px;
    padding: 0;
    color: #4b5563;
    font-size: 14px;
    list-style: disc;
}

.had-card__meta strong {
    color: #111;
}

/* CENA */
.had-card__price {
 display: inline-block;
    margin: 0 auto 20px;
    padding: 10px 20px;
    background: #f3f4f6;        /* světlá šedá */
    color: #111;
    border-radius: 50px;
    font-weight: 700;
    font-size: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;  /* jemná linka */
}

/* TLAČÍTKA */
.had-card__actions {
    padding: 0 18px 18px;
    display: flex;
    justify-content: center;
}

.had-btn {
    display: inline-block;
    min-width: 160px;
    padding: 12px 24px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
}

/* Normální tlačítko */
.had-btn--primary {
    background: #198754;
    color: #fff;
    transition: 0.2s ease-in-out;
}

.had-btn--primary:hover {
    opacity: .9;
}

/* Rezervováno / prodáno */
.had-btn--disabled {
    background: #f0a500;
    color: #6b7280;
    cursor: default;
}

/* PRODÁNO – ČERVENÁ */
.had-card.is-sold .had-btn,
.had-btn.had-btn--sold {
    background-color: #d62828 !important;
    color: #ffffff !important;
    cursor: default;
}

/* REZERVOVÁNO – ORANŽOVÁ */
.had-card.is-reserved .had-btn,
.had-btn.had-btn--reserved {
    background-color: #f0a500 !important;
    color: #ffffff !important;
    cursor: default;
}

/* STAV KARTY */
.had-card.is-reserved,
.had-card.is-sold {
   /* opacity: .85; */
}

.had-card.is-sold .had-card__img {
/*    filter: grayscale(100%); */
}

/* TOOLBAR (řazení) */
.had-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 16px;
}

/* PAGINACE */
.had-pagination {
    margin: 24px 0;
    display: flex;
    justify-content: center;
}

.had-pagination .page-numbers {
    margin: 0 4px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
}

.had-pagination .current {
    background: #111;
    color: #fff;
    border-color: #111;
}

.had-back-btn {
    display: inline-block;
    margin: 0 0 20px 0;
    padding: 10px 18px;
    background: #111;
    color: #fff !important;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease-in-out;
}

.had-back-btn:hover {
    opacity: 0.85;
}



.archive.tax-genotyp-hada h1 {
    text-align: center;
    width: 100%;
}