/*
Theme Name: JMJB by DeMenso Sverige
Description: JMJB by DeMenso Sverige is a premium, high-performance WordPress theme engineered with precision by DeMenso Sverige. Grounded in the core philosophy of European Values // Svensk Tradition, this theme reflects a commitment to unwavering reliability, elite aesthetics, and Scandinavian engineering excellence.
Purpose-built for professional training platforms and high-end digital stores, JMJB provides a seamless blend of blazing speed and total creative control. The theme is meticulously optimized for Accessibility (WCAG), ensuring your digital presence is inclusive, robust, and user-friendly from the very first line of code. Its lightweight, modern architecture makes it the definitive choice for sophisticated e-commerce (B2B/B2C) and dynamic lifestyle brands.
Embracing the essence of Swedish minimalism, JMJB features a bold, clutter-free interface that allows your content and products to take center stage with unparalleled clarity. Build your digital legacy with Scandinavian expertise and a focus on longevity.
We invite you to contact the DeMenso Sverige team to tailor this elite tool to your specific business objectives and brand identity. Visit us at www.demenso.se and let’s create something exceptional together.
Author: DeMenso Sverige
Author URI: https://demenso.se
Version: 1.3.4
Text Domain: jmjb
Tags: accessibility-ready, ecommerce-ready, custom-colors, custom-logo, translation-ready, dark-mode, high-performance, clean-design, flex-layout, premium-quality
*/

/*
 * Breakpoints (Etap 2 – spójność na mobile):
 * – mobile:    max-width: 767px
 * – tablet:   max-width: 1023px
 * – desktop:  min-width: 768px / min-width: 1024px (wg kontekstu)
 * – mały desktop (opcjonalnie): min-width: 640px (footer, kontakt)
 */

/* Jeden punkt definicji: kolory, typografia, kontenery (spójność – DESKTOP-AUDIT) */
:root {
    /* Odstępy i przyciski */
    --dm-space-above-footer: 2rem;
    --dm-text-sm: 0.875rem;
    --dm-text-base: 1rem;
    --dm-btn-padding-y: 0.75rem;
    --dm-btn-padding-x: 1.5rem;
    --dm-btn-min-height: 44px;
    --dm-container-max: 80rem;
    --dm-transition: 0.3s ease;
    /* Etap 2: --dm-* to źródło prawdy; --color-* = aliasy (kompatybilność wsteczna) */
    --color-gold: var(--dm-gold);
    --color-gold-hover: var(--dm-gold-hover);
    --color-dark-800: var(--dm-gray-800);
    --color-gray-800: var(--dm-gray-800);
    --color-gray-400: var(--dm-gray-400);
    --color-gray-500: #9ca3af;
    /* bez odpowiednika --dm-* (inny odcień niż --dm-gray-500) */
    --color-gray-700: var(--dm-gray-700);
    --color-existing-border: var(--dm-dark-800);
    /* Wspólne dla shop/contact/header (--dm-*) */
    --dm-gold: #D4AF37;
    --dm-gold-dark: #b5952f;
    --dm-gold-hover: #b5952f;
    --dm-black: #000000;
    --dm-dark-800: #1f1f1f;
    --dm-dark-850: #1a1a1a;
    --dm-dark-bg: #121212;
    --dm-dark-1000: #0a0a0a;
    --dm-dark-border: #1f2937;
    --dm-gray-300: #d1d5db;
    --dm-gray-400: #d1d5db;
    --dm-gray-500: #6b7280;
    --dm-gray-700: #374151;
    --dm-gray-800: #1f2937;
    --dm-white: #ffffff;
    --dm-font: 'Inter', system-ui, -apple-system, sans-serif;
    --dm-gray-text: #d1d5db;
    /* single-product.php i inne (spójność) */
    --dm-dark-900: #121212;
    --dm-gray-200: #e5e7eb;
    /* Kolory semantyczne i pozostałe – zmiana w jednym miejscu */
    --dm-red: #dc2626;
    --dm-red-light: #f87171;
    --dm-red-strong: #ef4444;
    --dm-dark-700: #111827;
    --dm-dark-950: #0F0F0F;
    --dm-dark-slate: #252f3f;
    --dm-hero-bg-text: #141414;
    --dm-blue-tint: #bfdbfe;
    --dm-border-mid: #333333;
    --dm-gray-600: #888888;
}

/* Basic Reset */
body {
    margin: 0;
    padding: 0;
    background-color: var(--dm-black);
    color: var(--dm-white);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Kontener treści – boczne jak koszyk (1.25rem → 2rem od 1024px) */
.dm-container {
    max-width: var(--dm-container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (min-width: 1024px) {
    .dm-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* =========================================
   Header & Mobile Menu (no Tailwind)
   ========================================= */

/* Hamburger: visible only on mobile */
.dm-hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 0.375rem;
    color: inherit;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
}
.dm-hamburger-btn:hover {
    color: var(--dm-gold);
}
@media (max-width: 767px) {
    .dm-hamburger-btn {
        display: inline-flex;
    }
}

/* User menu & cart trigger: visible only on desktop */
.dm-user-menu,
.dm-cart-trigger {
    display: none;
}
@media (min-width: 768px) {
    .dm-user-menu,
    .dm-cart-trigger {
        display: flex;
    }
}

/* Mobile nav Walker: submenu */
.dm-mobile-submenu {
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    width: 100%;
    max-height: 0;
    opacity: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}
.dm-mobile-submenu.is-open,
.dm-mobile-submenu.active {
    max-height: 500px;
    opacity: 1;
    margin-top: 1.5rem;
}
.dm-mobile-chevron.rotate-90 {
    transform: rotate(90deg);
}

/* Mobile nav Walker: item & link row */
.dm-menu-item-has-children {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.dm-menu-link-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Mobile nav Walker: link */
.dm-menu-link {
    font-size: 1.875rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.025em;
    transition: color 0.2s;
    color: var(--dm-white);
    white-space: normal;
    word-break: break-word;
    max-width: 80vw;
    margin-left: auto;
    margin-right: auto;
    text-decoration: none;
}
.dm-menu-link:hover {
    color: var(--dm-gold);
}
.dm-menu-link--sub {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dm-gray-400); /* Improved contrast for WCAG AA */
    letter-spacing: 0.05em;
}
.dm-menu-link--sub:hover {
    color: var(--dm-white);
}

/* Mobile nav Walker: toggle & chevron */
.dm-mobile-submenu-toggle {
    padding: 0.5rem;
    color: var(--dm-gold);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}
.dm-mobile-submenu-toggle:hover {
    color: var(--dm-white);
}
.dm-mobile-chevron {
    display: block;
    transition: transform 0.3s;
}

/* Full-screen mobile menu overlay (template-parts/mobile-menu.php) */
.dm-mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: var(--dm-dark-1000);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out, visibility 0.5s;
}
.dm-mobile-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
@media (min-width: 768px) {
    .dm-mobile-menu-overlay {
        display: none !important;
    }
}

.dm-mobile-menu__bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.03;
}
.dm-mobile-menu__watermark {
    font-size: 40vh;
    font-weight: 900;
    color: var(--dm-white);
    transform: rotate(-90deg);
    white-space: nowrap;
    user-select: none;
}

.dm-mobile-menu__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    color: var(--dm-white);
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}
.dm-mobile-menu__close:hover {
    color: var(--dm-gold);
}

.dm-mobile-menu__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
    position: relative;
    z-index: 10;
    width: 100%;
}
.dm-mobile-menu__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    gap: 2rem;
}

.dm-mobile-menu-fallback {
    color: #fff;
    text-align: center;
}

.dm-mobile-menu-link {
    font-size: 1.875rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.025em;
    transition: color 0.2s;
    color: var(--dm-white);
    text-decoration: none;
}
.dm-mobile-menu-link:hover,
.dm-mobile-menu-link--active {
    color: var(--dm-gold);
}

/* Jedna wielkość przycisków – zalogowany i niezalogowany */
.dm-mobile-menu__actions {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    background-color: var(--dm-dark-1000);
    position: relative;
    z-index: 20;
    width: 100%;
    box-sizing: border-box;
}
.dm-mobile-menu__actions--guest .dm-mobile-menu__auth-row {
    gap: 0.65rem;
    min-width: 0;
}

.dm-mobile-menu__auth-row {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}
.dm-mobile-menu__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.45rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    text-align: center;
    font-size: 0.575rem;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    min-width: 0;
}
.dm-mobile-menu__btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.dm-mobile-menu__btn--primary {
    flex: 1;
    background-color: var(--dm-gold);
    color: var(--dm-black);
}
.dm-mobile-menu__btn--primary:hover {
    background-color: var(--dm-gold-hover);
}
.dm-mobile-menu__btn--outline {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--dm-white);
}
.dm-mobile-menu__btn--outline:hover {
    border-color: var(--dm-gold);
}

.dm-mobile-menu__cart-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--dm-white);
    padding: 0.4rem 0.5rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    position: relative;
    flex-shrink: 0;
}
.dm-mobile-menu__cart-btn svg {
    width: 16px;
    height: 16px;
}
.dm-mobile-menu__cart-btn:hover {
    background-color: var(--dm-gold);
    border-color: var(--dm-gold);
}
.dm-mobile-menu__cart-count {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    background: var(--dm-red);
    color: var(--dm-white);
    font-size: 0.5rem;
    font-weight: 700;
    min-width: 0.9rem;
    height: 0.9rem;
    padding: 0 0.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--dm-dark-1000);
    box-sizing: border-box;
}

.dm-mobile-menu__social {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding-bottom: 2rem;
    position: relative;
    z-index: 20;
}
.dm-mobile-menu__social-link {
    color: var(--dm-gray-500);
    transition: color 0.2s, transform 0.2s;
}
.dm-mobile-menu__social-link:hover {
    color: var(--dm-gold);
    transform: scale(1.1);
}

/* =========================================
   Footer Styles
   ========================================= */

/* Odstęp przed stopką (wszystkie szablony – jeden punkt definicji) */
.dm-checkout-page {
    padding-bottom: 6rem;
}

.site-footer {
    background-color: var(--dm-black);
    border-top: 1px solid var(--dm-gray-800);
    padding-top: 4rem;
    padding-bottom: 1.5rem;
    color: var(--dm-white);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Mobile / tablet: mniejsza „dziura” między treścią a stopką; odstęp tylko ze stopki */
@media (max-width: 1023px) {
    .site-footer {
        padding-top: 1.5rem !important;
    }
    .dm-checkout-page {
        padding-bottom: 2rem !important;
    }
    .site-main .dm-container,
    .site-main.dm-container,
    .dm-contact-page .dm-container {
        padding-bottom: 2rem !important;
    }
    /* Strona sklepu (main = .dm-container): wymuszenie 2rem, nadpisuje inline padding-bottom: 6rem */
    body.page-template-template-shop-php .site-main.dm-container,
    body.woocommerce-shop .site-main.dm-container {
        padding-bottom: 2rem !important;
    }
    .site-main .dm-container .dm-grid,
    .site-main .dm-grid,
    .dm-contact-page .dm-grid {
        padding-bottom: 2rem !important;
    }
    /* Ostatnie sekcje bez margin-bottom – odstęp nad stopką tylko z .site-footer padding-top */
    .site-main > *:last-child,
    .site-main > *:last-child > *:last-child,
    .site-main section:last-of-type,
    .site-main .dm-container:last-child,
    .site-main .dm-grid:last-child {
        margin-bottom: 0 !important;
    }
    /* Sklep: brak dużego marginesu nad paginacją – odstęp jak na Kontakt */
    .dm-shop-pagination {
        margin-top: 0 !important;
    }
    /* Kontakt: tekst zgody RODO w tym samym rozmiarze co w stopce (newsletter) */
    .dm-contact-page .dm-checkbox-wrap .dm-checkbox-label,
    .dm-contact-page .dm-checkbox-wrap .dm-checkbox-label span {
        font-size: 0.875rem !important;
    }
    /* Etap 1: ujednolicenie odstępu nad stopką – Koszyk */
    .dm-cart-port-page {
        padding-bottom: 2rem !important;
    }
    /* Etap 1: ujednolicenie odstępu nad stopką – Moje konto */
    body.woocommerce-account .site-main {
        padding-bottom: 2rem !important;
    }
}

/* Etap 5: Hero na mobile – jedna definicja (sklep, archiwum, kontakt, kasa, moje konto) */
@media (max-width: 767px) {
    .dm-hero {
        padding-top: 2.5rem;
    }
    .dm-hero__bg-text {
        display: none;
    }
    .dm-hero__content {
        height: auto !important;
        padding-bottom: 4rem;
    }
    .dm-hero__text-col {
        padding-bottom: 0.5rem;
    }
}

.woocommerce img,
.woocommerce-page img {
    height: 100%;
}

.footer-container {
    max-width: var(--dm-container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (min-width: 1024px) {
    .footer-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Main Grid: Newsletter & Social */
.footer-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    border-bottom: 1px solid var(--dm-gray-800);
    padding-bottom: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-main-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Gdy newsletter ukryty – social zostaje w drugiej kolumnie (w tym samym miejscu) */
    .footer-main-grid--no-newsletter .social-column {
        grid-column: 2;
    }
}

/* Newsletter Section */
.footer-heading {
    font-size: 1.5rem;
    /* text-2xl */
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 0;
    color: var(--dm-white);
}

.text-gold {
    color: var(--dm-gold);
}

.footer-desc {
    color: var(--dm-gray-400);
    margin-bottom: 1.5rem;
    max-width: 28rem;
    line-height: 1.5;
}

.footer-credit {
    margin-top: 0;
    font-size: 0.875rem;
    color: var(--dm-gray-400);
}

.footer-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .form-input-group {
        flex-direction: row;
    }
}

.input-wrapper {
    position: relative;
    flex-grow: 1;
}

.input-icon {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    padding-left: 0.75rem;
    display: flex;
    align-items: center;
    pointer-events: none;
    color: var(--color-gray-500);
}

.footer-input {
    width: 100%;
    background-color: var(--dm-dark-800);
    border: 1px solid var(--dm-gray-700);
    /* Standardized Border */
    border-radius: 0.5rem;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    /* Keep left padding for icon */
    color: var(--dm-white);
    font-size: 13px;
    /* Standard 13px */
    outline: none;
    transition: all 0.2s;
}

.footer-input::placeholder {
    color: var(--color-gray-500); /* Placeholder can be slightly dimmer */
    opacity: 1;
}

.footer-input:focus {
    border-color: var(--dm-gold);
}

/* Error styles for newsletter form */
.footer-input.dm-input-error {
    border-color: var(--dm-red-light);
    outline: 2px solid var(--dm-red-light);
    outline-offset: 2px;
}

.footer-input.dm-input-error:focus {
    outline-color: var(--dm-red-light);
}

/* Checkbox + label zgody newslettera – jedyna stylizacja w stopce */
.site-footer .dm-checkbox-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.25rem;
}
.site-footer .dm-checkbox-wrap > label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}
.site-footer .dm-checkbox-label {
    color: var(--dm-white) !important;
    font-size: 0.875rem !important;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.625;
    text-transform: none;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.site-footer .dm-checkbox {
    margin-top: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    border-radius: 0.25rem;
    border: 1px solid var(--dm-gray-700);
    background-color: var(--dm-gray-800);
    accent-color: var(--dm-gold);
    cursor: pointer;
}
.site-footer .dm-checkbox-label a {
    text-decoration: underline;
    color: inherit;
}
.site-footer .dm-checkbox-label a:hover {
    color: var(--dm-gold);
}

/* Footer newsletter – btn-spinner, błędy, komunikat (bez inline) */
.footer-btn .btn-spinner {
    display: none;
    animation: dm-spin 1s linear infinite;
}
@keyframes dm-spin {
    to { transform: rotate(360deg); }
}
.site-footer .dm-error-newsletter-consent {
    display: block;
    margin-top: 0.25rem;
}
.dm-newsletter-message {
    margin-top: 10px;
    font-size: 0.9em;
    display: none;
}

/* Hero – placeholder bez inline */
.dm-hero__mobile-placeholder {
    display: none;
}

/* Index (fallback) – bez inline */
.dm-index-main {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
}

/* Tekst zgody – jedna klasa w stopce i na Kontakt, ten sam wygląd */
.dm-checkbox-label-text {
    font-size: 0.875rem;
    line-height: 1.625;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.site-footer .dm-checkbox-label-text {
    color: var(--dm-white);
}
.dm-contact-page .dm-checkbox-label-text {
    color: var(--dm-white);
}
.dm-checkbox-label-text a {
    text-decoration: underline;
    color: inherit;
}
.dm-checkbox-label-text a:hover {
    color: var(--dm-gold);
}

/* Slot na błąd email newsletter – rezerwuje miejsce, brak rozjechania layoutu */
.site-footer .newsletter-email-error-slot {
    min-height: 1.25rem;
    margin-top: 0.25rem;
}

.site-footer .newsletter-email-error-slot .dm-error-message {
    margin-top: 0;
}

/* Miejsce na błąd zgody – stała wysokość, brak skoku przy zaznaczeniu checkboxa */
.site-footer .dm-checkbox-wrap .dm-error-message {
    min-height: 1.25rem;
}

.site-footer .dm-checkbox:focus-visible {
    outline: 2px solid var(--dm-gold);
    outline-offset: 0;
}

.dm-error-message {
    display: none;
    color: var(--dm-red-light);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.dm-error-message:not(:empty) {
    display: block;
}

.footer-btn {
    background-color: var(--dm-gold);
    color: var(--dm-black);
    font-weight: 700;
    padding: 0rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

/* Stopka: tylko style.css – żadna inna strona/plugin nie nadpisuje */
.site-footer .footer-btn,
.site-footer .footer-btn .btn-text,
.site-footer .footer-btn .btn-icon,
.site-footer .footer-btn *,
#colophon .footer-btn,
#colophon .footer-btn *,
body.woocommerce-checkout .site-footer .footer-btn,
body.woocommerce-checkout .site-footer .footer-btn *,
body.woocommerce-checkout #colophon .footer-btn,
body.woocommerce-checkout #colophon .footer-btn * {
    color: var(--dm-black) !important;
}

.footer-btn:hover:not(:disabled) {
    background-color: var(--dm-gold-hover);
}

.footer-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Etap 4: ujednolicone przyciski CTA na mobile (stopka, kontakt, koszyk) */
@media (max-width: 767px) {
    .footer-btn,
    .dm-submit-btn,
    .dm-gold-btn {
        padding: 0.75rem 1.5rem !important;
        min-height: 44px;
        font-size: 0.9375rem !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.025em !important;
    }
    .footer-btn *,
    .dm-submit-btn *,
    .dm-gold-btn * {
        font-size: inherit !important;
        text-transform: inherit !important;
        letter-spacing: inherit !important;
    }
}

/* Desktop: ujednolicone przyciski CTA (stopka, kontakt, koszyk) – ten sam styl tekstu */
@media (min-width: 768px) {
    .footer-btn,
    .dm-submit-btn,
    .dm-gold-btn {
        font-size: 1rem !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.025em !important;
        padding: 0.75rem 1.5rem !important;
    }
    .footer-btn *,
    .dm-submit-btn *,
    .dm-gold-btn * {
        font-size: inherit !important;
        text-transform: inherit !important;
        letter-spacing: inherit !important;
    }
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.woocommerce form .form-row .required {
    color: var(--dm-white) !important;
}

.footer-checkbox {
    margin-top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid var(--dm-gray-700);
    background-color: var(--dm-gray-800);
    accent-color: var(--dm-gold);
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.75rem;
    color: var(--dm-white);
    line-height: 1.625;
    cursor: pointer;
    user-select: none;
    text-transform: none;
}

.checkbox-label a {
    color: inherit;
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: var(--dm-gold);
}

/* Zgoda RODO – kontakt i kasa (stopka = w sekcji .site-footer) */
.dm-checkbox-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.dm-checkbox-wrap > label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.dm-checkbox {
    margin-top: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    border-radius: 0.25rem;
    border: 1px solid var(--dm-gray-700);
    background-color: var(--dm-gray-800);
    accent-color: var(--dm-gold);
    cursor: pointer;
}

/* Zgoda RODO – tylko kontakt i kasa (stopka ma styl w sekcji .site-footer) */
.dm-contact-page .dm-checkbox-label,
.woocommerce-checkout .dm-checkout-page .dm-checkbox-label {
    color: var(--dm-white);
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.625;
    text-transform: none;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.dm-contact-page .dm-checkbox-label a,
.woocommerce-checkout .dm-checkout-page .dm-checkbox-label a {
    text-decoration: underline;
    color: inherit;
}
.dm-contact-page .dm-checkbox-label a:hover,
.woocommerce-checkout .dm-checkout-page .dm-checkbox-label a:hover {
    color: var(--dm-gold);
}

/* Kontakt: checkbox zgody w tym samym stylu co w stopce (newsletter) – wrap, label, input */
.dm-contact-page .dm-checkbox-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.25rem;
}
.dm-contact-page .dm-checkbox-wrap > label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}
.dm-contact-page .dm-checkbox-label {
    color: var(--dm-white) !important;
    font-size: 0.875rem !important;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.625;
    text-transform: none;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
/* Tekst zgody w Kontakt – ten sam rozmiar co w stopce; span wewnątrz labela i wyższa specyficzność na mobile */
.dm-contact-page .dm-form-card .dm-checkbox-wrap .dm-checkbox-label,
.dm-contact-page .dm-form-card .dm-checkbox-wrap .dm-checkbox-label span {
    font-size: 0.875rem !important;
    line-height: 1.625;
}
.dm-contact-page .dm-checkbox {
    margin-top: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    max-width: 1.25rem;
    max-height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
    flex-shrink: 0;
    border-radius: 0.25rem;
    border: 1px solid var(--dm-gray-700);
    background-color: var(--dm-gray-800);
    accent-color: var(--dm-gold);
    cursor: pointer;
}
.dm-contact-page .dm-checkbox:focus-visible {
    outline: 2px solid var(--dm-gold);
    outline-offset: 0;
}
.dm-contact-page .dm-checkbox-wrap .dm-error-message {
    min-height: 1.25rem;
}

/* Social Section */
.social-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .social-column {
        align-items: flex-end;
    }
}

.social-title {
    font-size: 1.125rem;
    /* text-lg */
    font-weight: 700;
    color: var(--dm-white);
    margin-bottom: 1.5rem;
    margin-top: 0;
}

.social-icons-wrapper {
    display: flex;
    gap: 1rem;
}

.social-icon-link {
    background-color: var(--dm-gray-800);
    padding: 0.75rem;
    border-radius: 9999px;
    /* rounded-full */
    color: var(--dm-gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-icon-link:hover {
    color: var(--dm-white);
    background-color: var(--dm-gold-hover);
    /* gold-600 approx */
}

.social-icon-link svg {
    transition: transform 0.3s;
}

.social-icon-link:hover svg {
    transform: scale(1.1);
}

.social-desc {
    font-size: 0.875rem;
    /* text-sm */
    color: var(--dm-gray-400);
    margin-top: 1.5rem;
    max-width: 20rem;
}

@media (min-width: 768px) {
    .social-desc {
        text-align: right;
    }
}

/* Bottom Footer */
.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

.footer-logo-wrapper {
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .footer-logo-wrapper {
        margin-bottom: 0;
    }
}

.custom-logo {
    height: 4rem;
    width: auto;
    object-fit: contain;
}

/* Footer logo: responsive base (width overrides from theme options via theme-enqueue.php) */
.footer-logo-wrapper .custom-logo {
    max-width: 100%;
    height: auto;
}

.footer-logo-wrapper img {
    height: 4rem;
    width: auto;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
}

/* Fallback when no footer logo: site name as text */
.footer-site-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dm-white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (min-width: 768px) {
    .footer-logo-wrapper img {
        margin-left: 0;
        margin-right: 0;
    }
}

.copyright-section {
    text-align: center;
}

@media (min-width: 768px) {
    .copyright-section {
        text-align: right;
    }
}

.copyright-text {
    color: var(--dm-gray-400);
    font-size: 0.875rem;
    margin: 0;
}

.footer-links-menu {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    list-style: none;
    padding: 0;
}

@media (min-width: 768px) {
    .footer-links-menu {
        justify-content: flex-end;
    }
}

.footer-links-menu li a {
    color: var(--dm-gray-400);
    /* or gray-600 */
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links-menu li a:hover {
    color: var(--dm-gold);
}

/* =========================================
   WooCommerce Cart Styles (Strict Grid)
   ========================================= */
/* Uwaga: .dm-cart-page / .dm-cart-container używane przez woocommerce/cart/cart.php
   (domyślny szablon WC). Gdy strona używa template-cart.php (Koszyk), ładowany jest
   cart.css i klasy .dm-cart-port-page, .dm-container – ten blok wtedy nie ma zastosowania. */

/* Page Wrapper */
.dm-cart-page {
    background-color: var(--dm-black);
    min-height: 100vh;
    padding: 120px 20px 60px 20px;
    /* Top padding for header clearance */
    color: var(--dm-white);
}

.dm-cart-container {
    max-width: var(--dm-container-max);
    margin: 0 auto;
}

.dm-cart-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--dm-gray-800);
    color: var(--dm-white);
}

/* MAIN GRID SYSTEM */
.dm-cart-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 1024px) {
    .dm-cart-grid {
        grid-template-columns: 2fr 1fr;
        /* 2/3 - 1/3 ratio */
    }
}

/* LEFT COLUMN: TABLE */
.dm-cart-table-wrapper {
    background-color: var(--dm-gray-800);
    /* dark-800 */
    border: 1px solid var(--dm-gray-700);
    /* gray-700 */
    border-radius: 8px;
    overflow: hidden;
}

.dm-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.dm-cart-table th {
    background-color: var(--dm-dark-700);
    /* dark-900 */
    padding: 16px 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--dm-gray-400); /* Improved contrast for WCAG AA */
    font-weight: 600;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--dm-gray-700);
}

.dm-cart-table td {
    padding: 24px 20px;
    border-bottom: 1px solid var(--dm-gray-700);
    vertical-align: middle;
}

.dm-cart-table tr:last-child td {
    border-bottom: none;
}

.dm-cart-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Product Info */
.dm-cart-item-flex {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dm-cart-thumb img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
    background-color: var(--dm-black);
}

.dm-cart-item-title {
    color: var(--dm-white);
    font-weight: 500;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    margin-bottom: 4px;
}

.dm-cart-qty-text {
    font-size: 0.875rem;
    color: var(--dm-gray-400); /* Improved contrast for WCAG AA */
}

.product-price {
    font-weight: 500;
    color: var(--dm-gray-400);
    /* gray-300 */
    font-size: 1rem;
}

/* Remove Icon */
.dm-cart-remove {
    color: var(--dm-red-strong);
    transition: color 0.2s;
    display: inline-block;
    padding: 8px;
}

.dm-cart-remove:hover {
    color: var(--dm-red-light);
}


/* RIGHT COLUMN: SIDEBAR */
.dm-cart-sidebar {
    position: relative;
}

.dm-cart-summary-box {
    background-color: var(--dm-gray-800);
    border: 1px solid var(--dm-gray-700);
    border-radius: 8px;
    padding: 24px;
    position: sticky;
    top: 100px;
    /* Clearance */
}

.dm-cart-summary-box h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dm-white);
    margin-top: 0;
    margin-bottom: 24px;
}

.dm-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    color: var(--dm-gray-400);
}

.dm-summary-total-row {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--dm-gray-700);
    margin-bottom: 24px;
    align-items: center;
}

.dm-label-lg {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dm-gold);
}

.dm-val-lg {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dm-gold);
}

/* Checkout Button */
.dm-btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: var(--dm-gold);
    color: var(--dm-black);
    font-weight: 700;
    padding: 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 15px -3px rgba(212, 175, 55, 0.2);
}

.dm-btn-checkout:hover {
    background-color: var(--dm-gold-dark);
    box-shadow: 0 10px 15px -3px rgba(212, 175, 55, 0.3);
}

/* =========================================
   WCAG 2.2 AA Accessibility Utilities
   ========================================= */

/* Screen Reader Only Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Global Focus Indicators for Keyboard Navigation */
:focus-visible {
    outline: 2px solid var(--dm-gold);
    /* Gold */
    outline-offset: 2px;
}

/* Ensure skip links are visible on focus */
.skip-link {
    position: absolute;
    top: -9999px;
    left: 1rem;
    z-index: 9999;
    padding: 1rem;
    background: var(--dm-black);
    color: var(--dm-gold);
    text-decoration: none;
    font-weight: bold;
}

.skip-link:focus {
    top: 1rem;
    outline: 2px solid var(--dm-gold);
}

.woocommerce-address-fields__field-wrapper.dm-fields-wrapper p {
    margin-bottom: 1.25rem !important;
}

/* =========================================
   HERO SECTION (Migrated from template-shop.php)
   ========================================= */
/* =========================================
   HERO SECTION (Unified)
   ========================================= */
.dm-hero {
    position: relative;
    height: 300px;
    background-color: var(--dm-black);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--dm-gray-800);
    margin-bottom: 0;
}

/* Modifier: Large Hero (Shop/Archives) */
.dm-hero--large {
    height: 500px;
    border-bottom: none;
}

@media (min-width: 768px) {
    .dm-hero--large {
        min-height: 600px;
        height: auto;
    }
}

.dm-hero__bg-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.dm-hero__bg-text span {
    font-size: 120px;
    font-weight: 900;
    color: var(--dm-hero-bg-text);
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -0.05em;
    transform: none;
    /* Reset transform for default hero */
}

@media (min-width: 768px) {
    .dm-hero__bg-text span {
        font-size: 180px;
    }
}

/* Large Hero Bg Text */
.dm-hero--large .dm-hero__bg-text span {
    font-size: 15vw;
    transform: translateY(-2rem);
}

.dm-hero__content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    max-width: var(--dm-container-max);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Center by default */
}

/* Large Hero Content */
.dm-hero--large .dm-hero__content {
    justify-content: space-between;
}

@media (min-width: 768px) {
    .dm-hero--large .dm-hero__content {
        flex-direction: row;
        padding: 0 2rem;
    }
}

.dm-hero__text-col {
    /* Default: No special styling, just a wrapper */
    text-align: center;
    max-width: 100%;
}

.dm-hero--large .dm-hero__text-col {
    order: 2;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .dm-hero--large .dm-hero__text-col {
        order: 1;
        margin-top: 0;
        text-align: left;
        align-items: flex-start;
        width: 50%;
        max-width: 600px;
    }
}

.dm-hero__title {
    font-size: 2.25rem;
    /* 4xl matching My Account */
    font-weight: 700;
    color: var(--dm-gold);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    line-height: 1.1;
    position: relative;
    z-index: 20;
}

@media (min-width: 768px) {
    .dm-hero__title {
        font-size: 3.75rem;
        /* 6xl matching My Account */
    }
}

/* Large Hero Title Override */
.dm-hero--large .dm-hero__title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

@media (min-width: 768px) {
    .dm-hero--large .dm-hero__title {
        font-size: 4.5rem;
    }
}

.dm-hero__separator {
    display: none;
}

.dm-hero--large .dm-hero__separator {
    height: 4px;
    width: 6rem;
    background-color: var(--dm-gold);
    margin-top: 1rem;
    border-radius: 9999px;
}

@media (min-width: 768px) {
    .dm-hero--large .dm-hero__separator {
        display: block;
    }
}

.dm-hero__separator {
    height: 4px;
    width: 6rem;
    background-color: var(--dm-gold);
    margin-top: 1rem;
    border-radius: 9999px;
    display: none;
}

@media (min-width: 768px) {
    .dm-hero__separator {
        display: block;
    }
}

.dm-hero__desc {
    color: var(--dm-gray-400); /* Improved contrast for WCAG AA */
    margin: 0;
    font-size: 0.875rem;
    max-width: 32rem;
    line-height: 1.6;
}

/* Hero large (sklep/archiwum): większy tekst opisu i odstęp od góry */
.dm-hero--large .dm-hero__desc {
    margin-top: 1.5rem;
    font-size: 1.125rem;
}

@media (min-width: 768px) {
    .dm-hero--large .dm-hero__desc {
        margin-top: 1.75rem;
        font-size: 1.25rem;
    }
}

.dm-hero__visual-col {
    order: 1;
    position: relative;
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

@media (min-width: 768px) {
    .dm-hero__visual-col {
        order: 2;
        width: 50%;
        height: 100%;
        min-height: 600px;
    }
}

.dm-hero__circle {
    position: absolute;
    width: 280px;
    height: 280px;
    background-color: var(--dm-gold);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
}

@media (min-width: 768px) {
    .dm-hero__circle {
        width: 450px;
        height: 450px;
    }
}

.dm-hero__image {
    position: relative;
    z-index: 10;
    height: 100%;
    width: 100%;
    object-fit: contain;
    object-position: bottom center;
    mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
}

.dm-hero__fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6rem;
    background: linear-gradient(to top, var(--dm-black), transparent);
    z-index: 5;
}

/* =========================================
   FILTER BOX STYLES (Refactored)
   ========================================= */
.dm-filter-box {
    background-color: var(--dm-dark-1000) !important;
    border: 1px solid var(--dm-border-mid);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@media (min-width: 1024px) {
    .dm-filter-box {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.dm-filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

@media (min-width: 1024px) {
    .dm-filter-item {
        flex-grow: 0;
    }
}

/* Specific widths for desktop balance */
@media (min-width: 1024px) {
    .dm-filter-item--search {
        flex-grow: 1;
        max-width: 400px;
    }

    .dm-filter-item--price {
        flex-shrink: 0;
    }

    .dm-filter-item--sort {
        width: 200px;
    }
}

.dm-filter-label-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dm-white);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dm-filter-label-row svg {
    color: var(--dm-gold);
}

.dm-input,
.dm-select {
    background-color: var(--dm-black);
    border: 1px solid var(--dm-gray-700);
    border-radius: 0.25rem;
    padding: 0.5rem 0.75rem;
    color: var(--dm-white);
    font-size: 0.875rem;
    outline: none;
    height: 2.75rem;
    width: 100%;
}

.dm-input:focus,
.dm-select:focus {
    border-color: var(--dm-gold);
}

.dm-price-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =========================================
   MINI CART PRODUCT CARD
   ========================================= */

/* Use high specificity to override WooCommerce defaults: .woocommerce ul.cart_list li img */
ul.cart_list li.dm-mc-item {
    display: flex !important;
    /* Force flex */
    gap: 16px !important;
    padding: 16px !important;
    border-bottom: 1px solid var(--dm-gray-800) !important;
    align-items: flex-start !important;
}

ul.cart_list li.dm-mc-item:last-child {
    border-bottom: none !important;
}

/* Thumbnail - High Specificity */
.woocommerce ul.cart_list li.dm-mc-item .dm-mc-thumb {
    width: 64px !important;
    height: 64px !important;
    flex-shrink: 0;
    margin: 0 !important;
    /* Reset woo margins */
}

.woocommerce ul.cart_list li.dm-mc-item .dm-mc-thumb img {
    width: 64px !important;
    height: 64px !important;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--dm-border-mid);
    margin: 0 !important;
    float: none !important;
    /* Override woo float */
}

/* Details and Title */
.dm-mc-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 64px;
    /* Match image height */
}

.dm-mc-title {
    font-size: 0.9375rem;
    /* 15px */
    font-weight: 600;
    color: var(--dm-gray-200);
    /* Gray-200 */
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

/* Bottom Row: Qty & Price/Remove */
.dm-mc-bottom-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto;
    /* Push to bottom */
}

/* Quantity Controls */
.dm-qty-wrapper {
    display: flex;
    align-items: center;
}

.dm-qty-controls {
    display: flex;
    align-items: center;
    background-color: var(--dm-dark-950);
    border: 1px solid var(--dm-border-mid);
    border-radius: 4px;
    /* Slightly tighter radius */
    height: 24px;
    /* Reduced from 32px */
    padding: 0 2px;
}

.dm-qty-btn {
    background: transparent;
    border: none;
    color: var(--dm-gray-400); /* Improved contrast for WCAG AA */
    cursor: pointer;
    width: 20px;
    /* Reduced width */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background-color 0.2s;
    border-radius: 3px;
    padding: 0;
}

.dm-qty-btn:hover {
    color: var(--dm-white);
    background-color: var(--dm-gray-800);
}

.dm-qty-btn svg {
    width: 10px;
    /* Smaller icons */
    height: 10px;
}

/* High specificity to prevent overrides */
ul.cart_list li.dm-mc-item .dm-qty-val {
    font-size: 0.7rem !important;
    font-weight: 600;
    color: var(--dm-white);
    min-width: 20px;
    text-align: center;
    line-height: 1;
}

/* Price Group */
.dm-mc-price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.dm-mc-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dm-gold);
}

.dm-mc-remove {
    font-size: 0.75rem;
    color: var(--dm-gray-500);
    text-decoration: none;
    display: flex !important;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.dm-mc-remove:hover {
    color: var(--dm-red-strong);
    /* Red-500 on hover */
}


/* Footer Buttons */
.woocommerce-mini-cart__buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dm-mc-btn-view,
.dm-mc-btn-checkout {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px !important;
    font-size: 0.75rem !important;
    /* 12px */
    font-weight: 700 !important;
    border-radius: 4px !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    height: auto !important;
    line-height: 1 !important;
    transition: all 0.2s;
    text-decoration: none !important;
}

.dm-mc-btn-view {
    background-color: transparent !important;
    border: 1px solid var(--dm-gray-700) !important;
    color: var(--dm-gray-400) !important; /* Improved contrast for WCAG AA */
}

.dm-mc-btn-view:hover {
    border-color: var(--dm-white) !important;
    color: var(--dm-white) !important;
}

.dm-mc-btn-checkout {
    background-color: var(--dm-gold) !important;
    border: 1px solid var(--dm-gold) !important;
    color: var(--dm-black) !important;
}

.dm-mc-btn-checkout:hover {
    background-color: var(--dm-gold-dark) !important;
    border-color: var(--dm-gold-dark) !important;
}

.dm-mc-btn-checkout svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}

.dm-mc-btn-checkout:hover svg {
    transform: translateX(2px);
}

/* Hide WooCommerce messages on My Account page */
.woocommerce-account .woocommerce-message,
.woocommerce-account .woocommerce-info {
    display: none !important;
}

/* =========================================
   My Account & Address Form Accessibility Fixes
   ========================================= */
.woocommerce-account .woocommerce form .form-row label,
.woocommerce-address-fields__field-wrapper .form-row label {
    font-size: 13px !important;
    /* Standardized Size */
    color: var(--dm-gray-400) !important; /* Improved contrast for WCAG AA */
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    display: block;
}

.woocommerce-account .woocommerce form .form-row,
.woocommerce-address-fields__field-wrapper .form-row {
    margin-bottom: 1.5rem !important;
    /* SIGNIFICANT spacing to prevent overlap */
    display: block !important;
}

.woocommerce-account .woocommerce form .form-row input.input-text,
.woocommerce-account .woocommerce form .form-row textarea {
    background-color: var(--dm-dark-800) !important;
    /* Standardized Dark */
    border: 1px solid var(--dm-gray-700) !important;
    /* Standardized Border */
    color: var(--dm-white) !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem 1rem !important;
    font-size: 13px !important;
    min-height: 48px;
    /* Ensure height consistency */
}

.woocommerce-account .woocommerce form .form-row input.input-text:focus,
.woocommerce-account .woocommerce form .form-row textarea:focus {
    border-color: var(--dm-gold) !important;
    outline: none;
}

.woocommerce-account .woocommerce form .form-row input.input-text::placeholder,
.woocommerce-account .woocommerce form .form-row textarea::placeholder {
    color: var(--color-gray-500) !important;
    opacity: 1;
}

.woocommerce form .show-password-input::before,
.woocommerce-page form .show-password-input::before {
    filter: invert(1) !important;
}

/* =========================================
   Select2 & Select Styling - CONSOLIDATED
   ========================================= */

/* Main Select2 Container - Override ALL styles including .dm-fields-wrapper */
.woocommerce-account .select2-container--default .select2-selection--single,
.woocommerce-account .select2-container .select2-selection--single,
.woocommerce-account .dm-fields-wrapper .select2-container .select2-selection--single,
.dm-fields-wrapper .select2-container .select2-selection--single {
    background-color: var(--dm-dark-800) !important;
    border: 1px solid var(--dm-gray-700) !important;
    border-radius: 0.5rem !important;
    height: 48px !important;
    padding: 0 1rem !important;
    font-size: 13px !important;
    color: var(--dm-white) !important;
    line-height: 46px !important;
    box-shadow: none !important;
}

/* Select2 Rendered Text - Override ALL */
.woocommerce-account .select2-container--default .select2-selection--single .select2-selection__rendered,
.woocommerce-account .select2-container .select2-selection--single .select2-selection__rendered,
.woocommerce-account .dm-fields-wrapper .select2-container .select2-selection--single .select2-selection__rendered,
.dm-fields-wrapper .select2-container .select2-selection--single .select2-selection__rendered {
    color: var(--dm-white) !important;
    line-height: 46px !important;
    padding: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    font-size: 13px !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Select2 Focus State */
.woocommerce-account .select2-container--default .select2-selection--single:focus,
.woocommerce-account .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--dm-gold) !important;
    outline: none !important;
}

/* Select2 Arrow */
.woocommerce-account .select2-container--default .select2-selection--single .select2-selection__arrow,
.woocommerce-account .select2-container .select2-selection--single .select2-selection__arrow {
    height: 48px !important;
    top: 0 !important;
    right: 1rem !important;
}

.woocommerce-account .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--color-gray-500) transparent transparent transparent !important;
    border-width: 6px 5px 0 5px !important;
}

.woocommerce-account .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--color-gray-500) transparent !important;
    border-width: 0 5px 6px 5px !important;
}

/* Dropdown Menu */
.woocommerce-account .select2-dropdown {
    background-color: var(--dm-dark-800) !important;
    border: 1px solid var(--dm-gray-700) !important;
    border-radius: 0.5rem !important;
    color: var(--dm-white);
    z-index: 9999;
    margin-top: 4px;
}

.woocommerce-account .select2-container--default .select2-results__option {
    padding: 0.75rem 1rem !important;
    font-size: 13px !important;
    color: var(--dm-white) !important;
}

.woocommerce-account .select2-container--default .select2-stats {
    display: none;
}

.woocommerce-account .select2-container--default .select2-results__option--highlighted[aria-selected],
.woocommerce-account .select2-container--default .select2-results__option--highlighted[data-selected] {
    background-color: var(--dm-gold) !important;
    color: var(--dm-black) !important;
}

.woocommerce-account .select2-container--default .select2-results__option[aria-selected=true],
.woocommerce-account .select2-container--default .select2-results__option[data-selected=true] {
    background-color: var(--dm-gray-700) !important;
    color: var(--dm-white) !important;
}

/* Regular Select Elements (non-Select2) */
.woocommerce-account .woocommerce form .form-row select {
    background-color: var(--dm-dark-800) !important;
    border: 1px solid var(--dm-gray-700) !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem 1rem !important;
    font-size: 13px !important;
    color: var(--dm-white) !important;
    min-height: 48px !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    padding-right: 2.5rem !important;
}

.woocommerce-account .woocommerce form .form-row select:focus {
    border-color: var(--dm-gold) !important;
    outline: none !important;
}

/* =========================================
   CashBill / Payment gateway styling (V3 - Fix Layout & Contrast)
   ========================================= */

/* 1. Main Container - Reset & Structure */
.tpay-pbl-container,
#tpay-payment-container,
.tpay-panel,
.payment_box.payment_method_tpay {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* =========================================
   CASHBILL PAYMENT GATEWAY STYLING
   ========================================= */

/* CashBill Main Container - Reset & Structure */
.cashbill-container,
.cashbill-pbl-container,
#cashbill-payment-container,
.cashbill-panel,
.payment_box.payment_method_cashbill,
.payment_box.payment_method_cashbillpbl,
.payment_box[class*="payment_method_cashbill"] {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* CashBill Bank Grid Layout */
.cashbill-group-holder,
.cashbill-pbl-container,
.cashbill-channels,
[class*="cashbill"] .channels-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 767px) {
    .cashbill-group-holder,
    .cashbill-pbl-container,
    .cashbill-channels,
    [class*="cashbill"] .channels-container {
        grid-template-columns: 1fr !important;
    }
}

/* CashBill Bank Tiles */
.cashbill-item,
.cashbill-bank-box,
.cashbill-channel,
[class*="cashbill"] .channel-item,
[class*="cashbill"] label {
    background-color: var(--dm-gray-800) !important;
    border: 1px solid var(--dm-gray-700) !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px 8px !important;
    min-height: 110px !important;
    margin: 0 !important;
    width: auto !important;
    float: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out;
    position: relative !important;
}

/* CashBill Hover State */
.cashbill-item:hover,
.cashbill-bank-box:hover,
.cashbill-channel:hover,
[class*="cashbill"] .channel-item:hover,
[class*="cashbill"] label:hover {
    border-color: var(--dm-gold) !important;
    background-color: var(--dm-dark-slate) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* CashBill Active/Selected State */
.cashbill-item.active,
.cashbill-item.selected,
.cashbill-bank-box.active,
.cashbill-channel.active,
.cashbill-channel.selected,
[class*="cashbill"] .channel-item.active,
[class*="cashbill"] label:has(input:checked) {
    border-color: var(--dm-gold) !important;
    background-color: var(--dm-gold) !important;
    color: var(--dm-black) !important;
    box-shadow: 0 0 0 1px var(--dm-gold) !important;
}

/* CashBill Text Visibility */
.cashbill-item-label,
.cashbill-bank-name,
.cashbill-channel-name,
[class*="cashbill"] .channel-name,
.cashbill-item span,
.cashbill-item div {
    color: var(--dm-gray-200) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    text-align: center !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
}

.cashbill-item:hover .cashbill-item-label,
.cashbill-item.active .cashbill-item-label,
.cashbill-channel:hover .cashbill-channel-name,
.cashbill-channel.selected .cashbill-channel-name {
    color: var(--dm-white) !important;
}

.cashbill-item.active .cashbill-item-label,
.cashbill-channel.selected .cashbill-channel-name,
[class*="cashbill"] label:has(input:checked) span {
    color: var(--dm-black) !important;
}

/* CashBill Logo Visibility */
.cashbill-item img,
.cashbill-logo,
.cashbill-channel img,
[class*="cashbill"] .channel-logo {
    filter: brightness(0) invert(1) !important;
    opacity: 0.9 !important;
    max-width: 80% !important;
    height: 35px !important;
    width: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    display: block !important;
}

.cashbill-item:hover img,
.cashbill-item.active img,
.cashbill-channel:hover img,
.cashbill-channel.selected img {
    opacity: 1 !important;
}

.cashbill-item.active img,
.cashbill-channel.selected img,
[class*="cashbill"] label:has(input:checked) img {
    filter: none !important;
}

/* CashBill Payment Box Reset */
.woocommerce-checkout #payment .payment_box.payment_method_cashbill,
.woocommerce-checkout #payment .payment_box.payment_method_cashbillpbl,
.woocommerce-checkout #payment .payment_box[class*="payment_method_cashbill"] {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.woocommerce-checkout #payment .payment_box.payment_method_cashbill::before,
.woocommerce-checkout #payment .payment_box.payment_method_cashbillpbl::before,
.woocommerce-checkout #payment .payment_box[class*="payment_method_cashbill"]::before {
    display: none !important;
}

/* Hide Radio Buttons inside CashBill tiles */
.cashbill-item input[type="radio"],
.cashbill-channel input[type="radio"],
[class*="cashbill"] .channel-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* CashBill Terms/Conditions Text */
.cashbill-accept-conditions p,
.cashbill-accept-conditions a,
[class*="cashbill"] .terms p,
[class*="cashbill"] .terms a {
    color: var(--dm-white) !important;
}

/* 2. Responsive Grid Layout - Fix "Scattered" look */
.tpay-group-holder,
.tpay-pbl-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    /* Auto-fit columns */
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 767px) {
    .tpay-group-holder,
    .tpay-pbl-container {
        grid-template-columns: 1fr !important;
    }
}

/* Force override gateway internal clear/floats that break grid */
.tpay-group-holder::after,
.tpay-group-holder::before {
    content: none !important;
    display: none !important;
}

/* 3. Bank Tiles - High Contrast & Stability */
.tpay-item,
.tpay-bank-box,
.tpay-group-holder .tpay-item {
    background-color: var(--dm-gray-800) !important;
    /* Dark Gray */
    border: 1px solid var(--dm-gray-700) !important;
    /* Visible border ensures they don't look 'lost' */
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px 8px !important;
    /* More vertical padding */
    min-height: 110px !important;
    margin: 0 !important;
    /* Reset margin */
    width: auto !important;
    /* let grid handle width */
    float: none !important;
    /* Disable floats */
    cursor: pointer !important;
    transition: all 0.2s ease-in-out;
    position: relative !important;
}

/* Hover State */
.tpay-item:hover,
.tpay-bank-box:hover {
    border-color: var(--dm-gold) !important;
    /* Gold */
    background-color: var(--dm-dark-slate) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* Active/Selected State */
.tpay-item.active,
.tpay-bank-box.active {
    border-color: var(--dm-gold) !important;
    background-color: var(--dm-dark-slate) !important;
    box-shadow: 0 0 0 1px var(--dm-gold) !important;
}

/* 4. Text Visibility - Fix "Invisible Links" */
.tpay-item-label,
.tpay-bank-name,
.tpay-item span,
.tpay-item div {
    color: var(--dm-gray-200) !important;
    /* Light Gray text */
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    text-align: center !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
}

.tpay-item:hover .tpay-item-label,
.tpay-item.active .tpay-item-label {
    color: var(--dm-white) !important;
}

/* 5. Logo Visibility - Fix "Dark Icons on Dark BG" */
/* Invert standard black logos to make them white */
.tpay-item img,
.tpay-logo {
    filter: brightness(0) invert(1) !important;
    /* Turn black logos WHITE */
    opacity: 0.9 !important;
    max-width: 80% !important;
    height: 35px !important;
    /* Fixed height for consistency */
    width: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    display: block !important;
}

/* Exceptions for color logos if needed */
.tpay-item:hover img,
.tpay-item.active img {
    opacity: 1 !important;
}

/* 6. Clean up WooCommerce Payment Container */
.woocommerce-checkout #payment .payment_box.payment_method_tpay {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.woocommerce-checkout #payment .payment_box.payment_method_tpay::before {
    display: none !important;
}

/* Hide Radio Buttons inside tiles if they exist (cleaner UI) */
.tpay-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* General Payment Box Reset – tło jak w modalu quick view */
.woocommerce-checkout #payment .payment_box {
    background-color: var(--dm-dark-bg) !important;
    color: var(--dm-gray-400) !important;
    border: 1px solid var(--dm-gray-800) !important;
}

.woocommerce-checkout #payment .payment_box::before {
    border-bottom-color: var(--dm-dark-bg) !important;
    /* Triangle arrow */
}

.tpay-accept-conditions p,
.tpay-accept-conditions a {
    color: var(--dm-white) !important;
}

/* =========================================
   CHECKOUT – stylowanie strony kasy (V2)
   ========================================= */

/* 1. Main Wrappers */
.dm-checkout-wrapper {
    color: var(--dm-white);
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
}

.dm-checkout-wrapper form.checkout {
    display: block !important;
    gap: 2rem;
}

/* 2. Customer Sections Layout */
.woocommerce-billing-fields__field-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile 1 col */
    gap: 1rem;
}

@media (min-width: 768px) {
    .woocommerce-billing-fields__field-wrapper {
        grid-template-columns: 1fr 1fr;
        /* Desktop 2 cols */
    }

    /* Full width fields */
    #billing_address_1_field,
    #billing_address_2_field,
    #order_comments_field,
    #billing_email_field {
        grid-column: 1 / -1;
    }
}

.woocommerce form .form-row {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

/* 3. Inputs Styling - Explicit for Checkout to match My Account */
.woocommerce-checkout input.input-text,
.woocommerce-checkout textarea,
.woocommerce-checkout select,
.woocommerce-checkout .select2-container .select2-selection--single {
    background-color: var(--dm-black) !important;
    border: 1px solid var(--dm-gray-700) !important;
    color: var(--dm-white) !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    min-height: 48px !important;
    line-height: 1.5 !important;
    outline: none !important;
    box-shadow: none !important;
}

.woocommerce-checkout input.input-text:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--dm-gold) !important;
    box-shadow: 0 0 0 1px var(--dm-gold) !important;
}

/* Labels – tylko formularz kasy (nie stopka z newsletterem) */
.woocommerce-checkout .dm-checkout-page label {
    color: var(--dm-gray-400) !important;
    font-size: 13px !important;
    margin-bottom: 8px !important;
    display: block !important;
    font-weight: 500 !important;
}

/* 3. Inputs Styling */
input.input-text,
textarea,
select {
    background-color: var(--dm-black) !important;
    border: 1px solid var(--dm-gray-700) !important;
    color: var(--dm-white) !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    outline: none !important;
}

input.input-text:focus,
textarea:focus,
select:focus {
    border-color: var(--dm-gold) !important;
    box-shadow: 0 0 0 1px var(--dm-gold) !important;
}

/* Label tylko w formularzu kasy / payment (nie stopka) */
.woocommerce-checkout .dm-checkout-page label,
.woocommerce-checkout #payment label,
.woocommerce form .form-row > label {
    color: var(--dm-gray-400) !important;
    font-size: 13px !important;
}

.required {
    color: var(--dm-gold) !important;
    text-decoration: none;
}

/* 4. PAYMENT METHOD GRID (THE MAGIC FIX) */

/* Remove default WooCommerce grey box/border */
#payment,
.woocommerce-checkout-payment {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Requires Template Structure: ul > li > (input + label + div.payment_box) */

/* The Container Grid: 2 cols so "Przelew | Za pobraniem" then "Płatność natychmiastowa" (CashBill) on own row */
#payment ul.payment_methods {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 !important;
    margin: 0 0 24px 0 !important;
    border: none !important;
    list-style: none !important;
}

/* CashBill tile and its content on full-width row below */
#payment ul.payment_methods li.payment_method_cashbill label,
#payment ul.payment_methods li.payment_method_cashbillpbl label,
#payment ul.payment_methods li[class*="payment_method_cashbill"] label {
    grid-column: 1 / -1 !important;
}
#payment ul.payment_methods li.payment_method_cashbill div.payment_box,
#payment ul.payment_methods li.payment_method_cashbillpbl div.payment_box,
#payment ul.payment_methods li[class*="payment_method_cashbill"] div.payment_box {
    grid-column: 1 / -1 !important;
}

/* The List Item - Vanish it so children participate in Grid */
#payment ul.payment_methods li {
    display: contents !important;
}

/* The Label - Acts as the Visual Tile/Tab (tło jak modal) */
#payment ul.payment_methods li label {
    order: 1;
    /* Tabs come first */
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--dm-dark-bg) !important;
    border: 1px solid var(--dm-gray-800) !important;
    border-radius: 12px !important;
    padding: 16px 8px !important;
    min-height: 90px;
    cursor: pointer;
    text-align: center;
    font-weight: 600 !important;
    color: var(--dm-gray-200) !important;
    transition: all 0.2s;
    width: auto !important;
    margin: 0 !important;
}

/* Hover Tab (odcień w tej samej palecie co modal) */
#payment ul.payment_methods li label:hover {
    border-color: var(--dm-gray-500) !important;
    background-color: var(--dm-dark-850) !important;
}

/* Selected Tab (Using Input Checked Sibling Selector for Label) */
#payment ul.payment_methods li input[type="radio"]:checked+label {
    border-color: var(--dm-gold) !important;
    background-color: var(--dm-white) !important;
    color: var(--dm-black) !important;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.2);
}

/* Hide the Radio Button completely */
#payment ul.payment_methods li input[type="radio"] {
    position: absolute;
    opacity: 0;
    z-index: -1;
}

/* Checkout: linki w kolorze złotym (polityka prywatności itd.) */
.woocommerce-checkout #payment a,
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper a,
.woocommerce-checkout .dm-terms-wrapper a {
    color: var(--dm-gold) !important;
    text-decoration: underline;
}
.woocommerce-checkout #payment a:hover,
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper a:hover,
.woocommerce-checkout .dm-terms-wrapper a:hover {
    color: var(--dm-gold-hover) !important;
}

/* Link „polityka prywatności” – złoty, po najechaniu biały */
a.dm-privacy-link {
    color: var(--dm-gold) !important;
    text-decoration: underline;
}
a.dm-privacy-link:hover {
    color: var(--dm-white) !important;
}

/* Bezpośrednio po klasie WooCommerce, gdyby ktoś usunął .dm-privacy-link */
a.woocommerce-privacy-policy-link {
    color: var(--dm-gold) !important;
    text-decoration: underline;
}
a.woocommerce-privacy-policy-link:hover {
    color: var(--dm-white) !important;
}

/* The Content Box - Full Width below tabs (kolor tła = modal) */
#payment ul.payment_methods li div.payment_box {
    order: 2;
    /* Content comes second */
    grid-column: 1 / -1;
    /* Fill row */
    background-color: var(--dm-dark-bg) !important;
    border: 1px solid var(--dm-gray-800) !important;
    border-radius: 12px !important;
    padding: 24px !important;
    margin-top: 12px !important;
    color: var(--dm-gray-200) !important;
    position: relative;
    width: 100% !important;
    box-shadow: none !important;
}

/* Triangle removal */
#payment ul.payment_methods li div.payment_box::before {
    display: none !important;
}

/* 5. CashBill / payment gateway – dynamic bank grid */

/* Reset parent wrappers - disable any grid/flex they have */
.tpay-group-holder,
.tpay-pbl-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Main Container - Force 5-Column Grid at Full Width */
.tpay-pbl {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 12px !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 0 1.5rem 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    clear: both !important;
}

/* Ensure the payment box takes full width */
.payment_method_tpaypbl .payment_box,
.dm-tab-panel .payment_box {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

/* Push terms/conditions text below the grid */
.tpay-pbl+*,
.tpay-pbl~p,
.tpay-pbl~div:not(.tpay-pbl) {
    clear: both !important;
    margin-top: 1rem !important;
}

@media (max-width: 767px) {
    .tpay-pbl {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* The Bank Item (label.tpay-item) */
label.tpay-item {
    background: var(--dm-gray-800) !important;
    border: 1px solid var(--dm-gray-700) !important;
    border-radius: 8px !important;
    padding: 12px 8px !important;
    color: var(--dm-gray-200) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 70px !important;
    height: auto !important;
    cursor: pointer !important;
    box-shadow: none !important;
    text-decoration: none !important;
    margin: 0 !important;
    width: auto !important;
    float: none !important;
    transition: all 0.2s ease !important;
}

/* Hover/Selected State */
label.tpay-item:hover,
label.tpay-item:has(input:checked) {
    background-color: var(--dm-gold) !important;
    color: var(--dm-black) !important;
    border-color: var(--dm-gold) !important;
}

/* Hide the radio input inside */
label.tpay-item input[type="radio"] {
    display: none !important;
}

/* Reset all inner divs */
label.tpay-item>div,
label.tpay-item>div>div {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Hide Logos */
.tpay-group-logo-holder,
.tpay-group-logo {
    display: none !important;
}

/* Show Only Bank Name - Clean Text */
label.tpay-item .name {
    display: block !important;
    width: 100% !important;
    color: inherit !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    text-align: center !important;
}

/* 6. FOOTER / TOTAL / BUTTONS */
/* Hide Default Order Review Table Content but keep Total logic invisible if needed */
.woocommerce-checkout-review-order-table {
    display: none !important;
}

/* The "Total" line we added manually needs styling */
.dm-checkout-total {
    font-size: 32px;
    font-weight: 700;
    color: var(--dm-gold);
}

/* Terms Checkbox Row */
.form-row.validate-required.woocommerce-validated {
    width: 100% !important;
    margin-bottom: 24px !important;
}

/* Blue Alert Box Styling */
.dm-info-box {
    background: rgba(30, 58, 138, 0.2);
    border: 1px solid rgba(30, 58, 138, 0.5);
    color: var(--dm-blue-tint);
    padding: 16px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

/* Submit Button */
#place_order {
    width: 100% !important;
    background-color: var(--dm-gold) !important;
    color: var(--dm-black) !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    padding: 18px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

#place_order:hover {
    background-color: var(--dm-gold-hover) !important;
}

/* Secure Badge */
.secured-badge {
    margin-top: 20px;
    text-align: center;
    opacity: 0.5;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Hide WooCommerce Success Messages (e.g. Added to Cart) */
.woocommerce-message {
    display: none !important;
}

/* Ensure Address Fields align side-by-side */
.woocommerce-billing-fields__field-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.woocommerce-billing-fields__field-wrapper .form-row {
    padding: 0 10px;
    width: 100%;
    margin-bottom: 20px;
    /* Space between rows */
}

.woocommerce-billing-fields__field-wrapper .form-row-first,
.woocommerce-billing-fields__field-wrapper .form-row-last {
    width: 50% !important;
    float: left;
    display: block;
}

@media (max-width: 600px) {

    .woocommerce-billing-fields__field-wrapper .form-row-first,
    .woocommerce-billing-fields__field-wrapper .form-row-last {
        width: 100% !important;
        float: none;
    }
}

/* =========================================
   QUICK VIEW MODAL STYLES (Mobile Fix)
   ========================================= */

.dm-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dm-modal.open {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.dm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: -1;
}

.dm-modal__content {
    background: var(--dm-dark-bg);
    border: 1px solid var(--dm-gray-800);
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    /* Fit within screen height */
    overflow-y: auto;
    /* Enable internal scrolling */
    display: flex;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    /* Hide scrollbar within modal */
    scrollbar-width: none;
}

.dm-modal__content::-webkit-scrollbar {
    display: none;
}

.dm-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--dm-gray-700);
    color: var(--dm-gray-400); /* Improved contrast for WCAG AA */
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.dm-modal__close:hover {
    background: var(--dm-gold);
    color: var(--dm-black);
    border-color: var(--dm-gold);
}

/* Layout Columns */
.dm-modal__img-col {
    width: 45%;
    background: var(--dm-black);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--dm-gray-800);
}

.dm-modal__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.dm-modal__info-col {
    width: 55%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

/* Content Styles */
.dm-modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dm-white);
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.dm-modal__price {
    font-size: 1.25rem;
    color: var(--dm-gold);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.dm-modal-label {
    color: var(--dm-gray-400); /* Improved contrast for WCAG AA */
    font-size: 0.875rem;
    font-weight: 400;
    margin-right: 0.5rem;
}

.dm-modal__desc {
    color: var(--dm-gray-400);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.dm-modal__cat {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dm-gold);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    /* Removed background/padding as requested */
    background: transparent;
    padding: 0;
    align-self: flex-start;
    margin-bottom: 1.5rem;
}

.dm-modal__divider {
    height: 1px;
    background: var(--dm-gray-800);
    margin: auto 0 1.5rem 0;
    /* Pushes logic down if content is short */
    width: 100%;
}

.dm-modal__actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.dm-btn-add-cart {
    background: var(--dm-gold);
    color: var(--dm-black);
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.dm-btn-add-cart:hover {
    background: var(--dm-gold-hover);
}

.dm-btn-eye {
    border: 1px solid var(--dm-gray-700);
    color: var(--dm-gray-400); /* Improved contrast for WCAG AA */
    padding: 0 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.dm-btn-eye:hover {
    border-color: var(--dm-gold);
    color: var(--dm-gold);
}

/* RESPONSIVE (MOBILE) */
@media (max-width: 767px) {
    .dm-modal {
        padding: 0 !important;
        align-items: flex-start !important;
        /* Start from top so it fills */
    }

    .dm-modal__content {
        flex-direction: column;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        overflow: hidden !important;
        /* Parent doesn't scroll, child does */
    }

    .dm-modal__img-col {
        width: 100%;
        height: 40%;
        /* Slightly larger for impact */
        border-right: none;
        border-bottom: 1px solid var(--dm-gray-800);
        flex-shrink: 0;
        padding: 0 !important;
        /* Full Bleed */
        position: relative;
        background: var(--dm-black);
    }

    .dm-modal__img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        /* Keep contain to show full product, or cover if they really want crop. 'Po całości' usually means no padding. */
        margin: 0;
    }

    .dm-modal__info-col {
        width: 100%;
        height: 60%;
        /* Rest of screen */
        padding: 1.5rem;
        flex: 1;
        overflow-y: auto;
        /* SCROLLABLE DESCRIPTION */
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4rem;
        /* Space for bottom interaction or just padding */
    }

    .dm-modal__title {
        font-size: 1.25rem;
    }

    .dm-modal__close {
        top: 1rem;
        right: 1rem;
        background: rgba(0, 0, 0, 0.5);
        border: none;
        color: var(--dm-white);
        width: 40px;
        height: 40px;
    }
}

/* =========================================
   CATEGORY TABS (Standardized & Mobile Scrollable)
   ========================================= */

.dm-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    /* No wrap */
    overflow-x: auto;
    /* Scrollable */
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
    border-bottom: 1px solid var(--dm-gray-800);

    /* Mobile Defaults */
    gap: 1rem;
    margin: 1.25rem 0 1.5rem 0;
    padding-bottom: 0;

    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.dm-tabs::-webkit-scrollbar {
    display: none;
}

.dm-tab-link {
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;

    /* Mobile Defaults – padding linków (odstęp od dołu) */
    font-size: 0.9rem;
    padding-bottom: 1.25rem;
    color: var(--dm-gray-400); /* Improved contrast for WCAG AA */
    white-space: nowrap;
    /* Prevent wrapping */
    flex-shrink: 0;
}

.dm-tab-link.active {
    color: var(--dm-gold);
    border-bottom-color: transparent;
}

.dm-tab-link:hover {
    color: var(--dm-white);
}

@media (min-width: 768px) {
    .dm-tabs {
        justify-content: center;
        /* Center on Desktop */
        flex-wrap: wrap;
        /* Wrap on desktop */
        gap: 2rem;
        margin: 3rem 0 2rem 0;
        padding-bottom: 1rem;
        overflow-x: visible;
        /* Disable scroll */
    }

    .dm-tab-link {
        font-size: 1.125rem;
        padding-bottom: 10px;
    }
}

/* PRODUCT CARD (Global Standard) */
.dm-card {
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
    overflow: hidden;
    height: 100%;
    /* No border by default, or maybe inherited? */
}

.dm-card__body {
    background-color: var(--dm-dark-1000);
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.dm-card__title {
    color: var(--dm-white);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.dm-card__desc {
    color: var(--dm-gray-400); /* Improved contrast for WCAG AA */
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    flex-grow: 1;
}


/* Button style is already .dm-grid-btn */
/* =========================================
   Login Form Styling - Match Contact Form
   ========================================= */

/* Login Form Labels */
.woocommerce-form-login label,
.login label,
.woocommerce form.login label,
.woocommerce-page form.login label {
    font-size: 13px !important;
    color: var(--dm-gray-400) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    display: block;
}

/* Login Form Inputs */
.woocommerce-form-login input.input-text,
.woocommerce-form-login input[type="text"],
.woocommerce-form-login input[type="email"],
.woocommerce-form-login input[type="password"],
.login input.input-text,
.login input[type="text"],
.login input[type="email"],
.login input[type="password"],
.woocommerce form.login input.input-text,
.woocommerce form.login input[type="text"],
.woocommerce form.login input[type="email"],
.woocommerce form.login input[type="password"] {
    background-color: var(--dm-dark-800) !important;
    border: 1px solid var(--dm-gray-700) !important;
    color: var(--dm-white) !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem 1rem !important;
    font-size: 13px !important;
    min-height: 48px !important;
    width: 100% !important;
}

.woocommerce-form-login input.input-text:focus,
.woocommerce-form-login input[type="text"]:focus,
.woocommerce-form-login input[type="email"]:focus,
.woocommerce-form-login input[type="password"]:focus,
.login input.input-text:focus,
.login input[type="text"]:focus,
.login input[type="email"]:focus,
.login input[type="password"]:focus {
    border-color: var(--dm-gold) !important;
    outline: none !important;
}

/* Login Form Placeholders */
.woocommerce-form-login input::placeholder,
.login input::placeholder {
    color: var(--color-gray-500) !important;
    opacity: 1;
}

/* Login Form Rows Spacing */
.woocommerce-form-login .form-row,
.login .form-row,
.woocommerce form.login .form-row {
    margin-bottom: 1.5rem !important;
}

/* =========================================
   Omnibus Lowest Price Label
   ========================================= */
.dm-omnibus-label {
    display: block;
    font-size: 0.85rem;
    color: var(--dm-gray-600);
    margin-top: 8px;
    margin-bottom: 12px;
    font-weight: 400;
}

.dm-omnibus-label .woocommerce-Price-amount {
    color: var(--dm-gold);
    font-weight: 600;
}

/* =========================================
   Single Product Price Styling
   ========================================= */
.dm-price-val {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.dm-price-current {
    font-weight: 800;
    color: var(--dm-gold);
}

.dm-price-regular {
    font-size: 0.85rem;
    color: var(--color-gray-500);
    text-decoration: line-through;
}