/* ==========================================================================
   fertichs – shop.css
   Produktkatalog + Einzelprodukt-Seite
   Sections: 1 Grid  2 Karte  3 Preis  4 Einzelprodukt  5 Add-to-Cart
             6 Download  7 Paginierung  8 Responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Shop-Grid
   -------------------------------------------------------------------------- */

.fertichs-breadcrumb {
    color: #646970;
    font-size: .9em;
    margin-bottom: 24px;
}

.fertichs-breadcrumb a {
    color: #2271b1;
    text-decoration: none;
}

.fertichs-breadcrumb a:hover {
    text-decoration: underline;
}

.fertichs-shop-empty {
    color: #646970;
    padding: 40px 0;
    text-align: center;
}

.fertichs-shop-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
    margin: 0 0 32px;
}

/* --------------------------------------------------------------------------
   2. Produktkarte
   -------------------------------------------------------------------------- */

/* Font-Reset: YOOtheme und andere Page-Builder überschreiben font-family global */
.fertichs-shop-grid,
.fertichs-product-card,
.fertichs-product-card *,
.fertichs-pdp,
.fertichs-pdp * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif !important;
}

.fertichs-product-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s ease;
}

.fertichs-product-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, .1);
}

.fertichs-product-card__image-wrap {
    display: block;
    overflow: hidden;
    position: relative;
}

.fertichs-product-card__image {
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
    transition: transform .3s ease;
    width: 100%;
}

.fertichs-product-card:hover .fertichs-product-card__image {
    transform: scale(1.03);
}

.fertichs-product-card__badges--overlay {
    bottom: 0;
    left: 0;
    padding: 8px 12px;
    position: absolute;
}

.fertichs-product-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 12px 20px 0;
}

.fertichs-product-card__body {
    flex: 1;
    padding: 20px;
}

.fertichs-product-card__excerpt {
    color: #50575e;
    font-size: .9em;
    line-height: 1.5;
    margin: 8px 0 0;
}

.fertichs-product-card__footer {
    align-items: center;
    border-top: 1px solid #f0f0f1;
    display: flex;
    gap: 12px;
    overflow: visible;
    justify-content: space-between;
    margin-top: auto;
    padding: 16px 20px;
}

.fertichs-product-card__footer .fertichs-btn {
    flex-shrink: 0;
    font-size: 13px !important;
    padding: 8px 18px !important;
    white-space: nowrap;
    overflow: visible;
}

.fertichs-product-card__footer {
    overflow: visible;
}

.fertichs-product-card__title {
    font-size: 1.1em;
    margin: 0;
}

.fertichs-product-card__title a {
    color: #1d2327;
    text-decoration: none;
}

.fertichs-product-card__title a:hover {
    color: #2271b1;
}

/* --------------------------------------------------------------------------
   3. Preis-Box
   -------------------------------------------------------------------------- */

.fertichs-price {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.fertichs-price-box {
    background: #f9f9f9;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    margin: 24px 0;
    max-width: 360px;
    padding: 20px;
}

.fertichs-price-box__tax {
    color: #646970;
    font-size: .85em;
    margin: 6px 0 16px;
}

.fertichs-price__old {
    color: #646970;
    font-size: .9em;
    text-decoration: line-through;
}

.fertichs-price__regular {
    color: #1d2327;
    font-size: 1.25em;
    font-weight: 700;
}

.fertichs-price__sale {
    color: #d63638;
    font-size: 1.25em;
    font-weight: 700;
}

.fertichs-tax-note {
    color: #646970;
    display: block;
    font-size: .8em;
    margin-top: 4px;
    width: 100%;
}

/* --------------------------------------------------------------------------
   4. Einzelprodukt-Layout
   -------------------------------------------------------------------------- */

.fertichs-product-single {
    max-width: 780px;
}

.fertichs-product-single__description {
    line-height: 1.7;
    margin-top: 32px;
}

.fertichs-product-single__description img {
    height: auto;
    max-width: 100%;
}

.fertichs-product-single__excerpt {
    color: #50575e;
    font-size: 1.05em;
    line-height: 1.6;
    margin: 8px 0 0;
}

.fertichs-product-single__title {
    font-size: 1.8em;
    margin: 0 0 8px;
}

/* --------------------------------------------------------------------------
   5. Add-to-Cart-Bereich
   -------------------------------------------------------------------------- */

.fertichs-atc {
    margin-top: 12px;
}

.fertichs-atc-form {
    margin: 0;
}

.fertichs-btn {
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: inline-block;
    font-size: 1em;
    font-weight: 600;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    transition: background .15s ease, opacity .15s ease;
}

.fertichs-btn--atc {
    background: #16a34a;
    color: #fff;
    width: 100%;
    border-radius: 8px;
}

.fertichs-btn--atc:hover {
    background: #15803d;
    color: #fff;
}

.fertichs-btn--primary {
    background: #16a34a;
    color: #fff;
    border-radius: 8px;
}

.fertichs-btn--primary:hover {
    background: #15803d;
    color: #fff;
}

/* --------------------------------------------------------------------------
   6. Download-Bereich
   -------------------------------------------------------------------------- */

.fertichs-download-box {
    background: #edfaef;
    border: 1px solid #00a32a;
    border-radius: 4px;
    padding: 16px;
}

.fertichs-download-box--no-file {
    background: #f9f9f9;
    border-color: #dcdcde;
    color: #646970;
}

.fertichs-download-box__hint {
    color: #1d2327;
    font-weight: 600;
    margin: 0 0 12px;
}

.fertichs-btn--download {
    background: #00a32a;
    color: #fff;
    display: inline-block;
}

.fertichs-btn--download:hover {
    background: #007017;
    color: #fff;
}

/* --------------------------------------------------------------------------
   7. Paginierung
   -------------------------------------------------------------------------- */

.fertichs-pagination {
    margin: 32px 0;
    text-align: center;
}

.fertichs-pagination .page-numbers {
    border: 1px solid #dcdcde;
    border-radius: 3px;
    color: #2271b1;
    display: inline-block;
    margin: 0 2px;
    padding: 6px 12px;
    text-decoration: none;
}

.fertichs-pagination .page-numbers.current {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.fertichs-pagination .page-numbers:hover:not(.current) {
    background: #f0f0f1;
}

/* --------------------------------------------------------------------------
   8. Responsive (max-width: 768px)
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .fertichs-price-box {
        max-width: 100%;
    }

    .fertichs-product-single__title {
        font-size: 1.4em;
    }

    .fertichs-shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .fertichs-shop-grid {
        grid-template-columns: 1fr;
    }
}
