/* =============================================================================
   ROMBS RATGEBER – Custom Styles
   Designsystem entspricht Shopseite (rombs-gmbh.de). Bootstrap 5 ist Basis.
   ============================================================================= */

/* Inter (self-hosted, DSGVO) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('../fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                   U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                   U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                   U+FEFF, U+FFFD;
}

:root {
    --rombs-primary:    #CC0000;
    --rombs-secondary:  #3B2F2F;
    --rombs-bg:         #FAF8F5;
    --rombs-border:     #E5DED6;
    --rombs-text:       #2C2220;
    --rombs-text-muted: #6b7280;
    --rombs-success:    #3A7D44;
    --rombs-warning:    #D4A017;

    --bs-primary: var(--rombs-primary);
    --bs-primary-rgb: 204, 0, 0;
    --bs-secondary: var(--rombs-secondary);
    --bs-body-color: var(--rombs-text);
    --bs-body-bg: #fff;
    --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Bootstrap-Override: Brand-Farben */
.btn-primary {
    --bs-btn-bg: var(--rombs-primary);
    --bs-btn-border-color: var(--rombs-primary);
    --bs-btn-hover-bg: #a30000;
    --bs-btn-hover-border-color: #a30000;
    --bs-btn-active-bg: #800000;
    --bs-btn-active-border-color: #800000;
}
.btn-outline-primary {
    --bs-btn-color: var(--rombs-primary);
    --bs-btn-border-color: var(--rombs-primary);
    --bs-btn-hover-bg: var(--rombs-primary);
    --bs-btn-hover-border-color: var(--rombs-primary);
}
a { color: var(--rombs-primary); text-decoration: none; }
a:hover { color: #a30000; text-decoration: underline; }

body {
    font-family: var(--bs-body-font-family);
    color: var(--rombs-text);
    background: #fff;
}
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--rombs-secondary); }

/* =============================================================================
   HEADER (1:1 Replikation der Shop-Struktur)
   ============================================================================= */
.header-main { background: #fff; border-bottom: 1px solid var(--rombs-border); }
.header-main .top-bar { min-height: 0; }
.header-row { padding: 0; }

.header-logo-main { padding: 0; }
.header-logo-main-link { display: inline-block; }
.header-logo-main-img,
.header-logo-main img {
    max-height: 80px;
    width: auto;
    display: block;
}
body.is-sticky .header-main .header-logo-main-img,
body.is-sticky .header-main .header-logo-main img {
    max-height: 55px;
    transition: max-height .2s;
}
.header-main .header-logo-main-img,
.header-main .header-logo-main img { transition: max-height .2s; }

/* Sticky */
.header-main.is-sticky-active {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1030;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}
body.has-sticky-spacer { /* Spacer wird per JS gesetzt */ }

/* Action-Buttons im Header (Suche, Account, Cart, Burger) */
.header-actions-btn {
    background: transparent;
    border: 0;
    color: var(--rombs-text);
    padding: .75rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.header-actions-btn:hover { color: var(--rombs-primary); }
.header-actions-btn .icon svg,
.header-actions-btn svg { width: 24px; height: 24px; fill: currentColor; }
.header-actions-btn .icon svg use,
.header-actions-btn svg use { fill: currentColor; }

/* Suche */
.header-search-form .input-group {
    border: 1px solid var(--rombs-border);
    border-radius: 6px;
    overflow: hidden;
}
.header-search-input {
    border: 0;
    box-shadow: none !important;
    padding: .65rem 1rem;
    font-size: .95rem;
}
.header-search-input:focus { border: 0; outline: 0; }
.header-search-btn {
    background: transparent;
    border: 0;
    color: var(--rombs-text);
    padding: .5rem .9rem;
}
.header-search-btn:hover { color: var(--rombs-primary); }
.header-search-btn svg { width: 22px; height: 22px; fill: currentColor; }

/* Cart-Total Anzeige */
.header-cart-total { font-weight: 600; }

/* =============================================================================
   NAV-MAIN (Mega-Menu Layout, ohne echtes Mega aber gleiche Optik)
   ============================================================================= */
.nav-main {
    background: #fff;
    border-bottom: 1px solid var(--rombs-border);
}
.nav-main .navbar { padding: 0; }
.nav-main .main-navigation-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
}
.main-navigation-menu-list > li > a,
.main-navigation-link {
    display: inline-block;
    padding: 1rem 1.1rem;
    color: var(--rombs-secondary);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s;
}
.main-navigation-menu-list > li > a:hover,
.main-navigation-menu-list > li.current-menu-item > a,
.main-navigation-menu-list > li.current-menu-parent > a,
.main-navigation-link:hover {
    color: var(--rombs-primary);
    border-bottom-color: var(--rombs-primary);
}
.main-navigation-menu-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: .5rem 0;
    background: #fff;
    border: 1px solid var(--rombs-border);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    min-width: 220px;
    display: none;
    position: absolute;
    z-index: 1020;
}
.main-navigation-menu-list > li { position: relative; }
.main-navigation-menu-list > li:hover > .sub-menu,
.main-navigation-menu-list > li:focus-within > .sub-menu { display: block; }
.main-navigation-menu-list .sub-menu li a {
    display: block;
    padding: .5rem 1rem;
    color: var(--rombs-text);
}
.main-navigation-menu-list .sub-menu li a:hover {
    background: var(--rombs-bg);
    color: var(--rombs-primary);
    text-decoration: none;
}

/* Mobile: Off-Canvas */
.nav-main-offcanvas {
    position: fixed;
    top: 0; left: -100%;
    width: 88%;
    max-width: 360px;
    height: 100%;
    background: #fff;
    box-shadow: 2px 0 16px rgba(0,0,0,.1);
    z-index: 1050;
    transition: left .25s;
    overflow-y: auto;
}
.nav-main-offcanvas.is-open { left: 0; }
.nav-main-offcanvas-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 1040;
    display: none;
}
.nav-main-offcanvas-backdrop.is-visible { display: block; }
.nav-main-offcanvas .offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--rombs-border);
}
.nav-main-offcanvas .menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-main-offcanvas .menu li a {
    display: block;
    padding: .85rem 1rem;
    color: var(--rombs-text);
    border-bottom: 1px solid var(--rombs-border);
    text-decoration: none;
}
.nav-main-offcanvas .menu li a:hover { background: var(--rombs-bg); color: var(--rombs-primary); }
.nav-main-offcanvas .sub-menu { list-style: none; padding-left: 0; }
.nav-main-offcanvas .sub-menu li a { padding-left: 2rem; font-size: .95rem; }

@media (min-width: 992px) {
    .nav-main-offcanvas, .nav-main-offcanvas-backdrop { display: none !important; }
}

/* =============================================================================
   CONTENT
   ============================================================================= */
.site-main {
    padding: 2rem 0 4rem;
}
.entry-card {
    background: #fff;
    border: 1px solid var(--rombs-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: transform .2s, box-shadow .2s;
}
.entry-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.entry-card .entry-thumbnail img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.entry-card .entry-body { padding: 1.25rem 1.5rem; }
.entry-card .entry-title {
    font-size: 1.25rem;
    margin: 0 0 .5rem;
    line-height: 1.3;
}
.entry-card .entry-title a { color: var(--rombs-secondary); }
.entry-card .entry-title a:hover { color: var(--rombs-primary); text-decoration: none; }
.entry-card .entry-meta {
    font-size: .85rem;
    color: var(--rombs-text-muted);
    margin-bottom: .75rem;
}
.entry-card .entry-excerpt {
    color: var(--rombs-text);
    font-size: .95rem;
    margin-bottom: 1rem;
}
.entry-card .read-more {
    color: var(--rombs-primary);
    font-weight: 600;
}
.entry-card .read-more:hover { text-decoration: underline; }

.single-post .site-main .entry-content,
.page .site-main .entry-content {
    font-size: 1.05rem;
    line-height: 1.7;
}
.single-post .site-main .entry-content h2,
.page .site-main .entry-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.single-post .site-main .entry-content img,
.page .site-main .entry-content img { max-width: 100%; height: auto; border-radius: 6px; }
.single-post .entry-meta { color: var(--rombs-text-muted); margin-bottom: 1.5rem; }
.single-post .entry-thumbnail,
.page .entry-thumbnail { margin: 0 0 2rem; }
.single-post .entry-thumbnail img,
.page .entry-thumbnail img { width: 100%; border-radius: 8px; max-height: 480px; object-fit: cover; }
.entry-thumbnail-caption {
    margin-top: .5rem;
    font-size: .875rem;
    line-height: 1.5;
    color: var(--rombs-text-muted);
    font-style: italic;
    text-align: center;
}
.entry-thumbnail-caption a { color: inherit; text-decoration: underline; }

/* Sidebar */
.sidebar-widget { background: var(--rombs-bg); padding: 1.25rem 1.5rem; border-radius: 8px; margin-bottom: 1.5rem; border: 1px solid var(--rombs-border); }
.sidebar-widget h3, .sidebar-widget .widget-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 1rem;
    color: var(--rombs-secondary);
}
.sidebar-widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar-widget ul li { padding: .35rem 0; border-bottom: 1px dashed var(--rombs-border); }
.sidebar-widget ul li:last-child { border-bottom: 0; }
.sidebar-widget ul li a { color: var(--rombs-text); }
.sidebar-widget ul li a:hover { color: var(--rombs-primary); }

/* Pagination */
.rombs-pagination {
    margin: 2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
}
.rombs-pagination .page-numbers {
    display: inline-flex;
    min-width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 .75rem;
    border: 1px solid var(--rombs-border);
    border-radius: 6px;
    color: var(--rombs-text);
    background: #fff;
}
.rombs-pagination .page-numbers:hover,
.rombs-pagination .page-numbers.current {
    background: var(--rombs-primary);
    border-color: var(--rombs-primary);
    color: #fff;
    text-decoration: none;
}

/* =============================================================================
   FOOTER
   ============================================================================= */
.site-footer {
    background: var(--rombs-secondary);
    color: #fff;
    margin-top: 4rem;
    padding: 3rem 0 1.5rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; opacity: .85; text-decoration: underline; }
.site-footer h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #fff;
    margin-bottom: 1rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { padding: .25rem 0; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.15);
    padding-top: 1rem;
    margin-top: 2rem;
    font-size: .875rem;
    color: rgba(255,255,255,.75);
}
.footer-company-text {
    line-height: 1.6;
    color: rgba(255,255,255,.85);
    max-width: 720px;
}

/* Body-Background fuer Listing-Seiten */
body.blog, body.archive, body.search-results { background: var(--rombs-bg); }

/* Skip-Link */
.skip-link {
    position: absolute;
    left: -9999px;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 9999;
    background: var(--rombs-primary);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: 4px;
}
