/* ============================================================
 *  Nirwana — fixes.css
 *  Override voor WordPress-rendering issues + mobile fixes
 * ============================================================ */

/* ---------- HEADER LAYOUT FIX (logo + iconen zichtbaar) ---------- */
.header-content {
    height: auto !important;
    min-height: 80px;
    overflow: visible !important;
}
.header-content > .logo {
    flex: 0 0 auto !important;
}
.header-content > nav {
    flex: 1 1 auto !important;
}
.header-content > .nav-right {
    flex: 0 0 auto !important;
    display: flex !important;
}
.logo img {
    height: 96px !important;
    max-height: 96px !important;
    width: auto !important;
    max-width: none !important;
    display: block !important;
}
.custom-logo, .custom-logo-link {
    height: 96px !important;
    max-height: 96px !important;
    width: auto !important;
    max-width: none !important;
    display: block !important;
}
.custom-logo-link img.custom-logo {
    height: 96px !important;
    max-height: 96px !important;
    width: auto !important;
    max-width: none !important;
}
.nav-right a,
.nav-right .cart-wrapper,
.nav-right .cart-trigger {
    display: inline-flex !important;
    align-items: center;
}
.search-icon, .account-icon, .cart-icon {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
}

/* ---------- KILL OLD MOBILE HEADER STACKING (main.css) ---------- */
@media (max-width: 980px) {
    header,
    .header-content {
        flex-direction: row !important;
        align-items: center !important;
        gap: 0 !important;
    }
    header nav {
        width: auto !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
    }
    .nav-right {
        width: auto !important;
        justify-content: flex-end !important;
        flex-direction: row !important;
    }
}

/* ---------- KILL BULLETS overal in nav/footer/menus ---------- */
header nav ul,
header nav ol,
.primary-menu,
.menu-primary-container ul,
.footer-grid-v3 ul,
.cart-dd-items ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
header nav li,
.primary-menu li {
    list-style: none !important;
    display: inline-block;
}
/* Voor de zekerheid: alle UL's in de header zonder bullets */
header ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

/* ---------- CART DROPDOWN: verbergen tot .open ---------- */
.cart-wrapper {
    position: relative;
}
.cart-trigger {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    color: inherit;
}
.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #8B7355;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.cart-dropdown {
    display: none !important;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid #e8e3dc;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    z-index: 1000;
    overflow: hidden;
}
.cart-dropdown.open {
    display: block !important;
}
.cart-dd-head {
    padding: 18px 20px;
    border-bottom: 1px solid #f0ece5;
    background: #faf8f4;
}
.cart-dd-head h4 {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}
.cart-dd-head h4 em {
    font-style: italic;
    color: #8B7355;
}
.cart-dd-items {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 0;
}
.cart-dd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #f5f2ec;
}
.cart-dd-item:last-child {
    border-bottom: none;
}
.cart-dd-thumb img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}
.cart-dd-info {
    flex: 1;
    min-width: 0;
}
.cart-dd-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.3;
}
.cart-dd-meta {
    font-size: 12px;
    color: #888;
}
.cart-dd-price {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
}
.cart-dd-empty {
    padding: 30px 20px;
    text-align: center;
}
.cart-dd-empty p {
    margin: 0 0 6px;
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 500;
}
.cart-dd-empty span {
    font-size: 13px;
    color: #888;
}
.cart-dd-foot {
    padding: 16px 20px;
    border-top: 1px solid #f0ece5;
    background: #faf8f4;
}
.cart-dd-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}
.cart-dd-subtotal strong {
    font-size: 16px;
    color: #1a1a1a;
}
.cart-dd-actions {
    display: flex;
    gap: 8px;
}
.cart-dd-view,
.cart-dd-checkout {
    flex: 1;
    text-align: center;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: opacity 0.2s;
}
.cart-dd-view {
    background: #f0ece5;
    color: #1a1a1a;
}
.cart-dd-checkout {
    background: #1a1a1a;
    color: #fff;
}
.cart-dd-view:hover,
.cart-dd-checkout:hover {
    opacity: 0.85;
}

/* Cart wrapper positioning */
.cart-wrapper {
    position: relative;
}
.cart-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--dark);
    position: relative;
    display: inline-flex;
    align-items: center;
}
.cart-trigger:hover { color: var(--accent); }
.cart-icon { width: 22px; height: 22px; }
.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent);
    color: white;
    border-radius: 999px;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    padding: 0 5px;
}

/* ---------- MOBIELE NAVIGATIE — hamburger ---------- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--dark);
}
.mobile-menu-toggle svg { width: 24px; height: 24px; }

@media (max-width: 980px) {
    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
    }
    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
        z-index: 50;
    }
    header nav.mobile-open {
        display: flex !important;
    }
    header nav a {
        padding: 14px 0 !important;
        border-bottom: 1px solid var(--border);
        font-size: 15px !important;
    }
    header nav a:last-child {
        border-bottom: none;
    }
    .header-content {
        flex-direction: row !important;
        position: relative;
    }
}

@media (max-width: 600px) {
    .header-content {
        padding: 0 16px !important;
    }
    .logo img,
    .logo a {
        max-width: 130px;
    }
    .announcement-bar p {
        font-size: 11px !important;
        padding: 0 12px !important;
    }
    .nav-right {
        gap: 8px !important;
    }
    .cart-dropdown {
        position: fixed !important;
        top: 80px !important;
        right: 8px !important;
        left: 8px !important;
        width: auto !important;
        max-width: none !important;
    }
}

/* ---------- HOMEPAGE HERO mobile ---------- */
@media (max-width: 980px) {
    .hero {
        flex-direction: column !important;
        gap: 30px !important;
        min-height: 0 !important;
        padding: 60px 24px !important;
    }
    .hero h1 {
        font-size: 42px !important;
        line-height: 1.1 !important;
    }
    .hero > div {
        max-width: 100% !important;
        width: 100% !important;
    }
}
@media (max-width: 600px) {
    .hero h1 {
        font-size: 34px !important;
    }
    .hero {
        padding: 50px 20px !important;
    }
    .hero p {
        font-size: 15px !important;
    }
    .hero > div:last-child {
        padding: 30px 20px !important;
    }
}

/* ---------- VAKMANSCHAP grid mobile ---------- */
@media (max-width: 900px) {
    section[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 500px) {
    section[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
}

/* Generic 4-col / 3-col grids on mobile */
@media (max-width: 900px) {
    [style*="grid-template-columns: repeat(4, 1fr)"],
    [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
}
@media (max-width: 600px) {
    [style*="grid-template-columns: repeat(4, 1fr)"],
    [style*="grid-template-columns: repeat(3, 1fr)"],
    [style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
}

/* ---------- LARGE TYPE downsize on mobile ---------- */
@media (max-width: 768px) {
    h1[style*="font-size: 68px"],
    h1[style*="font-size: 78px"],
    h2[style*="font-size: 56px"],
    h2[style*="font-size: 48px"] {
        font-size: 36px !important;
        line-height: 1.15 !important;
    }
    h2[style*="font-size: 42px"],
    h2[style*="font-size: 40px"] {
        font-size: 30px !important;
    }
    section[style*="padding: 100px"],
    section[style*="padding: 80px"] {
        padding: 60px 24px !important;
    }
    section[style*="padding: 60px 40px"] {
        padding: 50px 20px !important;
    }
}

/* ---------- FOOTER mobile ---------- */
@media (max-width: 768px) {
    .footer-grid-v3 {
        grid-template-columns: 1fr 1fr !important;
        padding: 40px 24px !important;
        gap: 32px !important;
    }
    .footer-statement {
        padding: 60px 24px !important;
    }
    .footer-statement h2 {
        font-size: 36px !important;
    }
    .footer-bottom-v3 {
        padding: 20px 24px !important;
        flex-direction: column !important;
        gap: 12px !important;
        text-align: center !important;
    }
    .footer-legal {
        justify-content: center !important;
        gap: 18px !important;
    }
}
@media (max-width: 480px) {
    .footer-grid-v3 {
        grid-template-columns: 1fr !important;
    }
}

/* ---------- HORIZONTAL SCROLL kill ---------- */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}
* {
    box-sizing: border-box;
}
img, svg {
    max-width: 100%;
    height: auto;
}

/* ---------- CATEGORY pages: filter sidebar mobile ---------- */
@media (max-width: 900px) {
    .cat-main {
        flex-direction: column !important;
        display: flex !important;
    }
    .cat-filter-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
    }
    .cat-products-area {
        width: 100% !important;
    }
}

/* ---------- BUTTON / CTA standardization ---------- */
.cta-button {
    display: inline-block;
    background: var(--dark);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background .2s;
}
.cta-button:hover { background: var(--accent); }

/* ============================================================
 *  FULL-BLEED (1.4.3)
 *  Body has no horizontal padding anymore. These elements are
 *  edge-to-edge by default. Inner content stays centered via
 *  max-width on the inner wrappers (.header-content, .footer-grid-v3, etc).
 * ============================================================ */
.announcement-bar,
header,
.hero,
.site-footer,
footer.site-footer,
.footer-v3,
footer.footer-v3,
body > footer {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Category templates: full-bleed sections that previously needed -40px margins */
.cat-hero,
.cat-usp-bullets,
.cat-buying-guide,
.cat-reviews,
.cat-slaaptest-cta {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Single post thumb: was using -20px margins to break out of page-container */
.single-thumb {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ============================================================
   DEFENSIVE: force-style category section subtitles
   These <p> tags were rendering misaligned (left + brown) on
   live WP, likely due to wpautop or browser quirk reorganising
   them out of their intended container. Force them back.
   ============================================================ */
.cat-section-heading {
    text-align: center !important;
}
.cat-section-heading p,
.cat-newsletter p,
.cat-slaaptest-cta p,
.cat-reviews .cat-section-heading p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 600px !important;
    float: none !important;
    position: static !important;
    display: block !important;
    width: auto !important;
}
.cat-section-heading p {
    color: #5a5a5a !important;
}
.cat-newsletter {
    text-align: center !important;
}
.cat-newsletter p {
    color: #5a5a5a !important;
}
.cat-slaaptest-cta {
    text-align: center !important;
}
.cat-slaaptest-cta .content {
    text-align: center !important;
}
.cat-slaaptest-cta p {
    color: rgba(255,255,255,0.85) !important;
}
.cat-slaaptest-cta h2,
.cat-slaaptest-cta .content h2 {
    color: #ffffff !important;
}
.cat-reviews .cat-section-heading p {
    color: rgba(255,255,255,0.7) !important;
}

/* Guide cards subtitle paragraphs should be centered & dark gray */
.cat-guide-card p {
    text-align: center !important;
    color: #5a5a5a !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Bestseller subtitle */
.cat-bestsellers .cat-section-heading p,
.cat-comparison .cat-section-heading p {
    color: #5a5a5a !important;
}
