/* ===========================================================================
 * tpreis.css — Hauptstylesheet fuer tpreis.de
 *
 * Extrahiert aus dem Inline-Style-Block in main.tpl und erweitert fuer
 * Bootstrap 5. Definiert Farbpalette als CSS Custom Properties, Schriftarten,
 * Basis-Typografie, Produktkarten, Header/Footer und responsive Overrides.
 * =========================================================================== */

/* ===========================================================================
 * CSS Custom Properties — Farbpalette
 * =========================================================================== */

:root {
    --tp-primary: #990000;
    --tp-text-dark: #444444;
    --tp-text-medium: #777777;
    --tp-text-light: #888888;
    --tp-text-muted: #999999;
    --tp-bg-header: #F8F8F8;
    --tp-border-dark: #AAAAAA;
    --tp-border-light: #CCCCCC;
    --tp-btn-bg: #fadea9;
    --tp-price-strike: #CC6633;
    --tp-cookie-bg: rgba(25, 25, 25, 0.9);
    --tp-cookie-accent: #f6a21d;
}

/* ===========================================================================
 * @font-face — Open Sans + Raleway (Variable Fonts)
 * =========================================================================== */

@font-face {
    font-family: 'Open Sans';
    src: url('/assets/fonts/OpenSans-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Raleway';
    src: url('/assets/fonts/Raleway-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ===========================================================================
 * Basis-Typografie — ueberschreibt Bootstrap-Defaults
 * =========================================================================== */

body {
    background: #fff;
    font-family: 'Open Sans', Verdana, Geneva, Arial, sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--tp-text-dark);
}

a {
    color: var(--tp-primary);
    text-decoration: none;
}

a:hover {
    color: var(--tp-primary);
    text-decoration: underline;
}

p {
    margin: 0.4em 0 0.8em;
    padding: 0;
}

img {
    margin: 5px 0;
}

/* ===========================================================================
 * Beibehaltene Klassen — gleiche Optik wie bisher
 * =========================================================================== */

.tit {
    border-bottom: 1px solid var(--tp-border-dark);
    color: var(--tp-text-dark);
    font-size: 1em;
    font-weight: bold;
    min-height: 18px;
    margin-bottom: 10px;
    padding: 3px 5px 0 3px;
}

.shead {
    color: var(--tp-primary);
    font-size: 1em;
    font-weight: 700;
}

.prl {
    color: var(--tp-text-medium);
    font-size: 0.84em !important;
    padding-right: 3px;
    text-align: right;
    white-space: nowrap;
}

.prll {
    color: var(--tp-text-medium);
    font-size: 0.84em !important;
    padding-right: 3px;
    text-align: right;
    white-space: nowrap;
}

.price {
    font-family: Arial, Verdana, Helvetica, sans-serif;
    text-decoration: line-through;
}

.dl {
    color: var(--tp-text-muted);
    font-size: 0.84em;
    padding: 1px 0 3px 0;
}

.df {
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: underline;
}

.dg {
    color: var(--tp-text-light);
    font-size: 0.84em;
    padding-left: 5px;
}

/* ===========================================================================
 * Header
 * =========================================================================== */

.tp-header {
    background-color: var(--tp-bg-header);
    border-bottom: 1px solid var(--tp-primary);
    padding: 8px 0;
}

.tp-header img {
    margin: 0;
    max-width: 212px;
    height: auto;
}

/* ===========================================================================
 * Footer
 * =========================================================================== */

.tp-footer {
    border-top: 1px solid #000;
    padding: 20px;
    text-align: center;
    margin-top: 2rem;
    padding-bottom: 100px;
}

.tp-footer p {
    margin: 0;
    padding: 10px;
}

/* ===========================================================================
 * Produktkarten — Bootstrap-Card-basiert
 * =========================================================================== */

.tp-product-card {
    margin-bottom: 12px;
}

.tp-product-img {
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    min-height: 100px;
}

.tp-btn-shop {
    background-color: var(--tp-btn-bg);
    border: 1px solid var(--tp-border-light);
    border-radius: 0.25rem;
    color: #212529;
    display: inline-block;
    font-weight: 400;
    font-size: 0.8rem;
    padding: 2px 7px;
    text-align: center;
    text-decoration: none;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
                border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    white-space: nowrap;
}

.tp-btn-shop:hover {
    background-color: #f5d590;
    border-color: var(--tp-border-dark);
    color: #212529;
    text-decoration: none;
}

.tp-btn-search {
    background-color: var(--tp-primary);
    border: 1px solid var(--tp-primary);
    color: #fff;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
}

.tp-btn-search:hover {
    background-color: #770000;
    border-color: #770000;
    color: #fff;
}

/* ===========================================================================
 * Suchfeld
 * =========================================================================== */

.tp-search-form .form-control {
    font-size: 0.875rem;
}

/* ===========================================================================
 * Kategorie-Tiles (Startseite)
 * =========================================================================== */

.tp-category-tile {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.tp-category-tile img {
    margin: 0;
    flex-shrink: 0;
}

/* ===========================================================================
 * Cookie-Notice
 * =========================================================================== */

.tp-cookie-notice {
    background-color: var(--tp-cookie-bg);
    color: #efefef;
    padding: 8px 20px;
    font-size: 12px;
    line-height: 1.4;
    font-family: 'Open Sans', sans-serif;
    z-index: 9999;
}

.tp-cookie-notice a {
    color: var(--tp-cookie-accent);
    font-weight: normal;
    font-size: 12px;
}

.tp-cookie-notice a:hover {
    color: var(--tp-cookie-accent);
    text-decoration: underline;
}

.tp-cookie-notice .tp-cookie-title {
    font-weight: bold;
    color: #fff;
}

/* ===========================================================================
 * Legal-Seiten (Impressum, Datenschutz)
 * =========================================================================== */

.impr {
    padding: 30px 0 30px 50px;
    margin: 0;
    line-height: 1.6em !important;
    max-width: 960px !important;
}

.impr h1, .impr h2, .impr h3, .impr h4, .impr h5, .impr h6 {
    margin: 0;
    color: #222;
    font-weight: bold;
    line-height: 1.2em;
}

.impr h1 {
    font: bold 28px/1.2em 'Lato', arial, sans-serif;
    color: #222222;
    line-height: 1.2em !important;
    margin: 1em 0 1em 0;
}

.impr h2 {
    font: bold 24px/1.2em 'Lato', arial, sans-serif;
    color: #666666;
    margin: 1em 0 0.5em 0;
    line-height: 1.4em;
}

.impr h3 {
    font: bold 20px/1.2em 'Lato', arial, sans-serif;
    color: #666666;
    margin: 1em 0 0.5em 0;
    line-height: 1.4em;
}

.impr h4 {
    font: bold 16px/1.5em 'Lato', arial, sans-serif;
    color: #333333;
    margin: 0.3em 0 0.3em 0;
    line-height: 1.4em;
}

.impr p {
    font: 300 16px/1.5em 'Lato', arial, sans-serif;
    color: #444444;
    margin: 0 0 1.2em 1em;
}

.impr strong {
    font-weight: bold;
}

.impr ul {
    margin: 0 0 2em 2em;
    font: bold 14px/1.5em 'Lato', arial, sans-serif;
}

/* ===========================================================================
 * Responsive Overrides
 * =========================================================================== */

/* Tablets und kleiner */
@media (max-width: 991.98px) {
    .tp-product-img {
        min-height: 80px;
    }

    .impr {
        padding: 20px 15px;
    }
}

/* Smartphones */
@media (max-width: 575.98px) {
    .tp-header img {
        max-width: 160px;
    }

    .tp-product-img {
        min-height: 70px;
    }

    .tp-footer {
        padding-bottom: 120px;
    }

    .impr {
        padding: 15px 10px;
    }

    .impr h1 {
        font-size: 22px;
    }

    .impr h2 {
        font-size: 20px;
    }

    .impr p {
        margin: 0 0 1em 0;
        font-size: 14px;
    }
}
