/*
Theme Name: Direkt247
Theme URI: https://direkt247.nl
Author: Direkt247
Author URI: https://direkt247.nl
Description: Een professioneel WooCommerce thema voor Direkt247 - Nederlandse e-commerce winkel voor woonartikelen, witgoed en elektrische huishoudelijke apparatuur.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: direkt247
Tags: e-commerce, woocommerce, responsive, custom-menu, custom-logo, featured-images

Direkt247 GmbH - Kwaliteit voor uw huis
*/

/* === Base Reset & Typography === */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --d247-primary: #1e40af;
    --d247-primary-light: #3b82f6;
    --d247-primary-dark: #1e3a8a;
    --d247-secondary: #f59e0b;
    --d247-accent: #10b981;
    --d247-dark: #111827;
    --d247-gray: #6b7280;
    --d247-gray-light: #f3f4f6;
    --d247-white: #ffffff;
    --d247-border: #e5e7eb;
    --d247-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --d247-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --d247-transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--d247-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: var(--d247-white);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--d247-primary);
    text-decoration: none;
    transition: var(--d247-transition);
}

a:hover {
    color: var(--d247-primary-light);
}

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

/* === WooCommerce Overrides === */
.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--d247-primary) !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: var(--d247-primary) !important;
}

.woocommerce .button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce button.button {
    background-color: var(--d247-primary) !important;
    color: var(--d247-white) !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.5rem !important;
    transition: var(--d247-transition) !important;
    border: none !important;
}

.woocommerce .button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.woocommerce button.button:hover {
    background-color: var(--d247-primary-light) !important;
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background-color: var(--d247-secondary) !important;
    color: var(--d247-dark) !important;
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background-color: #d97706 !important;
}

.woocommerce .star-rating span::before {
    color: var(--d247-secondary) !important;
}

.woocommerce .price {
    color: var(--d247-primary) !important;
    font-weight: 700 !important;
}

.woocommerce .price del {
    color: var(--d247-gray) !important;
    font-weight: 400 !important;
}

.woocommerce .price ins {
    color: #dc2626 !important;
    text-decoration: none !important;
}

.woocommerce .onsale {
    background-color: #dc2626 !important;
    color: var(--d247-white) !important;
    border-radius: 0.25rem !important;
    padding: 0.25rem 0.75rem !important;
    min-height: auto !important;
    min-width: auto !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

/* === Screen Reader Text === */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--d247-gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--d247-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--d247-primary-light);
}

/* WooCommerce Pagination */
nav.woocommerce-pagination {
    text-align: center;
    margin-top: 2rem;
}

nav.woocommerce-pagination ul {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    list-style: none;
    padding: 0 !important;
    margin: 0 auto;
    border: none !important;
}

nav.woocommerce-pagination ul li {
    display: inline-block !important;
    float: none !important;
    border: none !important;
    margin: 0;
    padding: 0;
}

nav.woocommerce-pagination ul li a,
nav.woocommerce-pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--d247-text);
    background: var(--d247-gray-light, #f3f4f6);
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

nav.woocommerce-pagination ul li a:hover,
nav.woocommerce-pagination ul li a:focus {
    background: var(--d247-primary);
    color: #fff;
    border-color: var(--d247-primary);
}

nav.woocommerce-pagination ul li span.current {
    background: var(--d247-primary);
    color: #fff;
    border-color: var(--d247-primary);
    font-weight: 700;
}

/* === Mobile Responsive Fixes === */

/* -- Global Mobile -- */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    .max-w-7xl {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* -- Header Mobile -- */
@media (max-width: 1023px) {
    #site-header .flex {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* -- WooCommerce Cart Mobile -- */
@media (max-width: 1023px) {
    /* Hide the desktop table on mobile — the template has dedicated mobile cards */
    table.shop_table.cart,
    .woocommerce-cart table.shop_table,
    .woocommerce-cart-form table.shop_table {
        display: none !important;
    }

    /* Cart totals */
    .woocommerce-cart .cart_totals,
    .woocommerce-cart .cart-collaterals {
        width: 100% !important;
        float: none !important;
        margin-top: 20px !important;
    }

    .woocommerce-cart .cart_totals table {
        width: 100% !important;
    }

    .woocommerce-cart .cart_totals .wc-proceed-to-checkout a {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        padding: 14px 20px !important;
        border-radius: 10px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
    }
}

/* -- WooCommerce Checkout Mobile -- */
@media (max-width: 768px) {
    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        width: 100% !important;
        float: none !important;
    }

    .woocommerce form .form-row input.input-text,
    .woocommerce form .form-row textarea,
    .woocommerce form .form-row select {
        font-size: 16px !important;
    }

    .woocommerce-checkout .col2-set {
        flex-direction: column !important;
        gap: 16px !important;
    }

    .woocommerce-checkout .col2-set .col-1,
    .woocommerce-checkout .col2-set .col-2 {
        width: 100% !important;
        float: none !important;
    }

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

    .woocommerce-checkout #payment {
        border-radius: 12px !important;
        padding: 14px !important;
    }

    .woocommerce-checkout #payment ul.payment_methods {
        padding: 0 !important;
        margin: 0 0 16px 0 !important;
    }

    .woocommerce-checkout #payment ul.payment_methods li {
        margin-bottom: 6px !important;
    }

    .woocommerce-checkout #payment ul.payment_methods li {
        padding: 12px !important;
        gap: 8px !important;
    }

    .woocommerce-checkout #payment ul.payment_methods li label {
        font-size: 14px !important;
    }

    .woocommerce-checkout #payment ul.payment_methods li label img {
        max-height: 22px !important;
    }

    .woocommerce-checkout #payment ul.payment_methods li input[type="radio"] {
        width: 18px !important;
        height: 18px !important;
    }

    .woocommerce-checkout #payment ul.payment_methods li .payment_box {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }

    .woocommerce-checkout #payment .place-order button,
    .woocommerce-checkout #payment #place_order {
        width: 100% !important;
        padding: 14px 20px !important;
        border-radius: 10px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
    }

    .woocommerce-checkout table.shop_table {
        font-size: 13px !important;
    }

    .woocommerce-checkout table.shop_table thead th {
        padding: 8px 10px !important;
        font-size: 11px !important;
    }

    .woocommerce-checkout table.shop_table tbody td,
    .woocommerce-checkout table.shop_table tfoot th,
    .woocommerce-checkout table.shop_table tfoot td {
        padding: 8px 10px !important;
    }

    /* Terms checkbox on mobile */
    .woocommerce-checkout .woocommerce-terms-and-conditions-wrapper label {
        font-size: 12px !important;
    }

    .woocommerce-checkout .woocommerce-privacy-policy-text p {
        font-size: 11px !important;
    }
}

/* -- WooCommerce My Account Mobile -- */
@media (max-width: 768px) {
    .woocommerce-account .woocommerce-MyAccount-navigation {
        width: 100% !important;
        float: none !important;
        margin-bottom: 20px !important;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul li {
        flex: 1 !important;
        min-width: calc(50% - 6px) !important;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul li a {
        display: block !important;
        padding: 10px 14px !important;
        text-align: center !important;
        border-radius: 8px !important;
        background: #f3f4f6 !important;
        color: #374151 !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        text-decoration: none !important;
        transition: all 0.2s ease !important;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
    .woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
        background: var(--d247-primary) !important;
        color: #fff !important;
    }

    .woocommerce-account .woocommerce-MyAccount-content {
        width: 100% !important;
        float: none !important;
    }

    /* Login/Register forms on mobile */
    .woocommerce-account .u-columns.col2-set {
        display: flex !important;
        flex-direction: column !important;
    }

    .woocommerce-account .u-columns .u-column1,
    .woocommerce-account .u-columns .u-column2 {
        width: 100% !important;
        float: none !important;
        padding: 0 !important;
        margin-bottom: 24px !important;
    }

    .woocommerce-account .u-columns .u-column1 h2,
    .woocommerce-account .u-columns .u-column2 h2 {
        font-size: 20px !important;
        font-weight: 700 !important;
        margin-bottom: 16px !important;
    }

    .woocommerce form.woocommerce-form-login,
    .woocommerce form.woocommerce-form-register {
        border: 1px solid #e5e7eb !important;
        border-radius: 12px !important;
        padding: 20px !important;
        background: #fff !important;
    }
}

/* -- Product Cards Mobile -- */
@media (max-width: 640px) {
    .woocommerce ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .woocommerce ul.products li.product {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .woocommerce ul.products li.product .p-4 {
        padding: 10px !important;
    }

    .woocommerce ul.products li.product h2 {
        font-size: 12px !important;
        min-height: auto !important;
    }

    .woocommerce ul.products li.product .text-lg {
        font-size: 14px !important;
    }

    .woocommerce ul.products li.product .text-xs {
        font-size: 10px !important;
    }
}

/* -- Archive/Shop Page Mobile -- */
@media (max-width: 1023px) {
    .woocommerce .flex.flex-col.lg\:flex-row {
        flex-direction: column !important;
    }

    .woocommerce .flex.flex-col.lg\:flex-row aside {
        width: 100% !important;
        margin-bottom: 20px !important;
    }

    .woocommerce .flex.flex-col.lg\:flex-row aside .sticky {
        position: relative !important;
        top: auto !important;
    }
}

/* -- Footer Mobile -- */
@media (max-width: 768px) {
    footer .grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    footer .border-t .flex {
        flex-direction: column !important;
        text-align: center !important;
        gap: 12px !important;
    }

    footer .border-t .flex .flex {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
}

/* -- Legal Pages Mobile -- */
@media (max-width: 640px) {
    .page .prose {
        font-size: 14px !important;
    }

    .page .prose h2 {
        font-size: 20px !important;
        margin-top: 24px !important;
    }

    .page .prose h3 {
        font-size: 18px !important;
    }

    .page .prose ul,
    .page .prose ol {
        padding-left: 20px !important;
    }

    .page .bg-white.rounded-xl {
        padding: 20px !important;
    }

    .page .grid.grid-cols-1.lg\:grid-cols-3 {
        display: block !important;
    }

    .page .lg\:col-span-2 {
        width: 100% !important;
    }

    .page aside {
        display: none !important;
    }
}

/* -- WooCommerce Cart Mobile Buttons -- */
@media (max-width: 1023px) {
    .woocommerce-cart .button,
    .woocommerce-cart button[type="submit"] {
        padding: 12px 20px !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        border: 1px solid #d1d5db !important;
        background: #f9fafb !important;
        color: #374151 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .woocommerce-cart .button:hover,
    .woocommerce-cart button[type="submit"]:hover {
        background: #e5e7eb !important;
    }

    .woocommerce-cart .wc-proceed-to-checkout a.button {
        background: #2563eb !important;
        color: #fff !important;
        border-color: #2563eb !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        padding: 14px 20px !important;
        border-radius: 10px !important;
        text-align: center !important;
    }

    .woocommerce-cart .wc-proceed-to-checkout a.button:hover {
        background: #1d4ed8 !important;
    }

    .woocommerce-cart .coupon input.input-text {
        padding: 10px 14px !important;
        border: 1px solid #d1d5db !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        width: 100% !important;
    }

    /* Cart totals mobile */
    .woocommerce-cart .cart_totals h2 {
        font-size: 18px !important;
        font-weight: 700 !important;
        margin-bottom: 12px !important;
    }

    .woocommerce-cart .cart_totals table td,
    .woocommerce-cart .cart_totals table th {
        padding: 10px 0 !important;
        font-size: 14px !important;
    }

    /* Mobile cart card quantity input */
    .woocommerce-cart .quantity input.qty {
        width: 50px !important;
        height: 36px !important;
        padding: 4px 6px !important;
        text-align: center !important;
        border: 1px solid #d1d5db !important;
        border-radius: 6px !important;
        font-size: 14px !important;
    }
}

/* -- Newsletter Section Mobile -- */
@media (max-width: 640px) {
    section.bg-primary-800 .flex-col.sm\:flex-row {
        flex-direction: column !important;
    }

    section.bg-primary-800 input[type="email"] {
        width: 100% !important;
    }

    section.bg-primary-800 button[type="submit"] {
        width: 100% !important;
    }
}

/* -- WooCommerce General Form Styling -- */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-cart .woocommerce table.shop_table input[type="number"],
.woocommerce-cart .woocommerce table.shop_table input[type="text"] {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    outline: none;
    border-color: var(--d247-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* -- WooCommerce Cart Table Desktop Styling -- */
.woocommerce table.shop_table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.woocommerce table.shop_table thead th {
    background: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #6b7280 !important;
    padding: 12px 16px !important;
}

.woocommerce table.shop_table td {
    padding: 16px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    vertical-align: middle !important;
}

.woocommerce table.shop_table img {
    border-radius: 8px !important;
    width: 64px !important;
    height: 64px !important;
    object-fit: cover !important;
}

/* -- WooCommerce Cart Totals Styling -- */
.woocommerce .cart_totals {
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 24px !important;
}

.woocommerce .cart_totals h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.woocommerce .cart_totals table {
    border: none !important;
}

.woocommerce .cart_totals table td,
.woocommerce .cart_totals table th {
    border: none !important;
    border-bottom: 1px solid #f3f4f6 !important;
    padding: 10px 0 !important;
}

/* -- WooCommerce Checkout Styling -- */
.woocommerce-checkout h3 {
    font-size: 20px !important;
    font-weight: 700 !important;
    margin-bottom: 16px !important;
    color: #111827 !important;
}

/* Checkout form fields — shared styles */
.woocommerce form .form-row {
    margin-bottom: 14px !important;
}

.woocommerce form .form-row label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 4px !important;
}

.woocommerce form .form-row label .required {
    color: #dc2626 !important;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #111827 !important;
    background: #fff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    -webkit-appearance: none !important;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.woocommerce form .form-row .woocommerce-input-wrapper {
    width: 100% !important;
}

.woocommerce form .form-row-wide {
    width: 100% !important;
    clear: both !important;
}

/* Checkout form — mobile: stack everything full-width */
@media (max-width: 768px) {
    .woocommerce-checkout .col2-set {
        display: block !important;
    }

    .woocommerce-checkout .col2-set .col-1,
    .woocommerce-checkout .col2-set .col-2 {
        width: 100% !important;
        float: none !important;
        margin-bottom: 20px !important;
    }

    .woocommerce form .form-row,
    .woocommerce form .form-row-first,
    .woocommerce form .form-row-last,
    .woocommerce form .form-row-wide {
        width: 100% !important;
        float: none !important;
        clear: both !important;
        padding: 0 !important;
    }

    .woocommerce form .form-row input.input-text,
    .woocommerce form .form-row textarea,
    .woocommerce form .form-row select {
        font-size: 16px !important;
        padding: 12px 14px !important;
    }

    .woocommerce form .form-row label {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }
}

/* Checkout form — desktop: two-column layout */
@media (min-width: 769px) {
    .woocommerce-checkout .col2-set {
        display: flex !important;
        gap: 32px !important;
    }

    .woocommerce-checkout .col2-set .col-1,
    .woocommerce-checkout .col2-set .col-2 {
        flex: 1 !important;
        width: 50% !important;
    }

    .woocommerce form .form-row-first,
    .woocommerce form .form-row-last {
        width: 48% !important;
    }

    .woocommerce form .form-row-first {
        float: left !important;
    }

    .woocommerce form .form-row-last {
        float: right !important;
    }
}

/* Order review table */
.woocommerce-checkout #order_review {
    margin-top: 0 !important;
}

.woocommerce-checkout table.shop_table {
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    margin-bottom: 24px !important;
    border-collapse: separate !important;
}

.woocommerce-checkout table.shop_table thead {
    background: #f9fafb !important;
}

.woocommerce-checkout table.shop_table thead th {
    padding: 12px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.woocommerce-checkout table.shop_table tbody td {
    padding: 12px 16px !important;
    font-size: 14px !important;
    color: #374151 !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.woocommerce-checkout table.shop_table tfoot th,
.woocommerce-checkout table.shop_table tfoot td {
    padding: 12px 16px !important;
    font-size: 14px !important;
    border-top: 1px solid #e5e7eb !important;
}

.woocommerce-checkout table.shop_table tfoot tr.order-total th,
.woocommerce-checkout table.shop_table tfoot tr.order-total td {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

/* Payment section */
.woocommerce-checkout #payment {
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 24px !important;
}

.woocommerce-checkout #payment ul.payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding-bottom: 20px !important;
}

.woocommerce-checkout #payment ul.payment_methods li {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
    padding: 14px 16px !important;
    list-style: none !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 10px !important;
    background: #fff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.woocommerce-checkout #payment ul.payment_methods li:hover {
    border-color: #3b82f6 !important;
    background: #f8faff !important;
}

.woocommerce-checkout #payment ul.payment_methods li label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #111827 !important;
    background: transparent !important;
    line-height: 1.4 !important;
    flex: 1 !important;
}

.woocommerce-checkout #payment ul.payment_methods li input[type="radio"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #d1d5db !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    position: relative !important;
    cursor: pointer !important;
    margin: 0 !important;
    transition: all 0.2s ease !important;
}

.woocommerce-checkout #payment ul.payment_methods li input[type="radio"]:checked {
    border-color: #2563eb !important;
    background: #2563eb !important;
}

.woocommerce-checkout #payment ul.payment_methods li input[type="radio"]:checked::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 8px !important;
    height: 8px !important;
    background: #fff !important;
    border-radius: 50% !important;
}

/* Highlight the entire li when its radio is checked */
.woocommerce-checkout #payment ul.payment_methods li:has(input[type="radio"]:checked) {
    border-color: #2563eb !important;
    background: #eff6ff !important;
}

/* Payment method icon */
.woocommerce-checkout #payment ul.payment_methods li label img {
    max-height: 28px !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

/* Single payment method — radio is hidden, label still needs proper display */
.woocommerce-checkout #payment ul.payment_methods li input[type="radio"][style*="display: none"] + label {
    padding: 14px 16px !important;
}

/* Payment method description box */
.woocommerce-checkout #payment ul.payment_methods li .payment_box {
    width: 100% !important;
    margin: 6px 0 0 0 !important;
    padding: 10px 14px !important;
    background: #f9fafb !important;
    border-radius: 8px !important;
    border: none !important;
    font-size: 13px !important;
    color: #6b7280 !important;
    line-height: 1.6 !important;
}

.woocommerce-checkout #payment ul.payment_methods li .payment_box p {
    margin: 0 !important;
    color: #6b7280 !important;
    font-size: 13px !important;
}

/* Place order button */
.woocommerce-checkout #payment .place-order {
    padding-top: 20px !important;
}

.woocommerce-checkout #payment .place-order button,
.woocommerce-checkout #payment #place_order {
    width: 100% !important;
    padding: 16px 24px !important;
    background: #2563eb !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.woocommerce-checkout #payment .place-order button:hover,
.woocommerce-checkout #payment #place_order:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

/* Terms and conditions checkbox */
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 16px !important;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper .form-row {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important;
    accent-color: #2563eb !important;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper label {
    font-size: 13px !important;
    color: #6b7280 !important;
    line-height: 1.5 !important;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper a {
    color: #2563eb !important;
    text-decoration: underline !important;
}

/* Privacy policy text */
.woocommerce-checkout .woocommerce-privacy-policy-text p {
    font-size: 12px !important;
    color: #9ca3af !important;
    margin-bottom: 12px !important;
}

/* Checkout coupon form */
.woocommerce-checkout .checkout_coupon {
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 16px !important;
    margin-bottom: 24px !important;
    display: flex !important;
    gap: 8px !important;
}

.woocommerce-checkout .checkout_coupon input.input-text {
    flex: 1 !important;
}

.woocommerce-checkout .checkout_coupon button {
    padding: 10px 20px !important;
    background: #f3f4f6 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    color: #374151 !important;
}

.woocommerce-checkout .checkout_coupon button:hover {
    background: #e5e7eb !important;
}

/* -- Login / Register Form Styling -- */
.woocommerce form.woocommerce-form-login,
.woocommerce form.woocommerce-form-register {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    background: #fff;
}

.woocommerce form.woocommerce-form-login .form-row,
.woocommerce form.woocommerce-form-register .form-row {
    margin-bottom: 16px;
}

.woocommerce form.woocommerce-form-login .woocommerce-button,
.woocommerce form.woocommerce-form-register .woocommerce-button {
    width: 100%;
    display: block;
    text-align: center;
}

/* -- WooCommerce My Account Styling -- */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin-bottom: 2px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 10px 16px;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: #eff6ff;
    color: var(--d247-primary);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: var(--d247-primary);
    color: #fff;
}

/* -- WooCommerce Notices -- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border-radius: 10px !important;
    padding: 14px 18px !important;
    margin-bottom: 16px !important;
    font-size: 14px !important;
}

.woocommerce-error {
    border-top-color: #dc2626 !important;
    background: #fef2f2 !important;
}

.woocommerce-error li {
    color: #991b1b !important;
}

/* -- Quantity Input Styling -- */
.woocommerce .quantity .qty {
    width: 60px !important;
    height: 40px !important;
    padding: 0 8px !important;
    text-align: center !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* -- Disable WooCommerce default remove button ugly styling -- */
.woocommerce a.remove {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #fee2e2 !important;
    color: #dc2626 !important;
    font-size: 16px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.woocommerce a.remove:hover {
    background: #dc2626 !important;
    color: #fff !important;
}

/* -- Select2 Styling (used in checkout) -- */
.select2-container--default .select2-selection--single {
    height: 44px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 30px !important;
    padding-left: 0 !important;
    color: #374151 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px !important;
    right: 8px !important;
}

/* -- Prevent horizontal overflow on mobile -- */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

@media (max-width: 768px) {
    .woocommerce table.shop_table {
        width: 100% !important;
        table-layout: auto !important;
    }
}

/* -- WooCommerce Add to Cart button on single product mobile -- */
@media (max-width: 640px) {
    .woocommerce div.product form.cart {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .woocommerce div.product form.cart .quantity {
        width: auto !important;
    }

    .woocommerce div.product form.cart button.single_add_to_cart_button {
        flex: 1 !important;
        padding: 12px 20px !important;
        border-radius: 10px !important;
        font-size: 15px !important;
    }

    /* Single product gallery mobile */
    .woocommerce div.product div.images {
        width: 100% !important;
        float: none !important;
        margin-bottom: 20px !important;
    }

    .woocommerce div.product div.summary {
        width: 100% !important;
        float: none !important;
    }

    .woocommerce div.product .product_title {
        font-size: 22px !important;
    }

    .woocommerce div.product p.price {
        font-size: 20px !important;
    }

    /* Related products mobile */
    .woocommerce .related ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* WooCommerce tabs on single product */
    .woocommerce div.product .woocommerce-tabs ul.tabs {
        display: flex !important;
        flex-wrap: wrap !important;
        padding: 0 !important;
        margin: 0 0 20px 0 !important;
        list-style: none !important;
        border-bottom: 2px solid #e5e7eb !important;
    }

    .woocommerce div.product .woocommerce-tabs ul.tabs li {
        margin: 0 !important;
        border: none !important;
        background: none !important;
        padding: 0 !important;
    }

    .woocommerce div.product .woocommerce-tabs ul.tabs li a {
        display: block !important;
        padding: 10px 14px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #6b7280 !important;
    }

    .woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
        color: var(--d247-primary) !important;
        border-bottom: 2px solid var(--d247-primary) !important;
        margin-bottom: -2px !important;
    }
}

/* -- WooCommerce Order Detail Tables Mobile -- */
@media (max-width: 640px) {
    .woocommerce-account table.woocommerce-orders-table,
    .woocommerce table.woocommerce-table--order-details {
        display: block !important;
        overflow-x: auto !important;
        font-size: 13px !important;
    }

    .woocommerce-account table.woocommerce-orders-table td,
    .woocommerce-account table.woocommerce-orders-table th {
        padding: 8px !important;
        white-space: nowrap !important;
    }
}

/* -- Hide comments site-wide (disabled) -- */
.comments-area,
#comments,
.comment-respond,
.nocomments,
#respond {
    display: none !important;
}

/* === Page Content / Prose Styling (overrides Tailwind CSS reset) === */
/* Tailwind CDN resets ALL heading sizes, list styles, margins etc.
   We must use !important on everything to restore proper typography. */

.prose {
    line-height: 1.75 !important;
    color: #374151 !important;
    font-size: 15px !important;
}

.prose h2,
.prose .wp-block-heading:where(h2) {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1e40af !important;
    margin-top: 2.5rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.3 !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 2px solid #dbeafe !important;
    letter-spacing: -0.01em !important;
}

.prose h2:first-child,
.prose .wp-block-heading:first-child {
    margin-top: 0 !important;
}

.prose h3,
.prose .wp-block-heading:where(h3) {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    color: #1e3a8a !important;
    margin-top: 2rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.4 !important;
}

.prose h4,
.prose .wp-block-heading:where(h4) {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.5rem !important;
}

.prose p {
    margin-top: 0 !important;
    margin-bottom: 1.15rem !important;
    line-height: 1.8 !important;
    color: #374151 !important;
}

.prose ul,
.prose ol,
.prose .wp-block-list {
    margin-top: 0.5rem !important;
    margin-bottom: 1.25rem !important;
    padding-left: 1.75rem !important;
}

.prose ul,
.prose ul.wp-block-list {
    list-style-type: disc !important;
}

.prose ol,
.prose ol.wp-block-list {
    list-style-type: decimal !important;
}

.prose li {
    margin-bottom: 0.6rem !important;
    line-height: 1.7 !important;
    padding-left: 0.35rem !important;
    color: #374151 !important;
    display: list-item !important;
}

.prose li::marker {
    color: #1e40af !important;
}

.prose li strong {
    color: #111827 !important;
    font-weight: 700 !important;
}

.prose strong {
    font-weight: 700 !important;
    color: #111827 !important;
}

.prose a {
    color: #1e40af !important;
    text-decoration: underline !important;
    text-decoration-color: #bfdbfe !important;
    text-underline-offset: 2px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.prose a:hover {
    color: #3b82f6 !important;
    text-decoration-color: #3b82f6 !important;
}

.prose blockquote {
    border-left: 4px solid #1e40af !important;
    padding: 1rem 1.25rem !important;
    margin: 1.5rem 0 !important;
    background: #f8fafc !important;
    border-radius: 0 8px 8px 0 !important;
    color: #4b5563 !important;
    font-style: italic !important;
}

.prose img {
    border-radius: 8px !important;
    margin: 1.5rem 0 !important;
}

.prose table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 1.5rem 0 !important;
}

.prose table th,
.prose table td {
    border: 1px solid #e5e7eb !important;
    padding: 10px 14px !important;
    text-align: left !important;
}

.prose table th {
    background: #f9fafb !important;
    font-weight: 600 !important;
    color: #111827 !important;
}

.prose hr {
    border: none !important;
    border-top: 1px solid #e5e7eb !important;
    margin: 2rem 0 !important;
}

/* Responsive prose sizing */
@media (max-width: 640px) {
    .prose {
        font-size: 14px !important;
    }
    .prose h2,
    .prose .wp-block-heading:where(h2) {
        font-size: 1.25rem !important;
        margin-top: 2rem !important;
    }
    .prose h3,
    .prose .wp-block-heading:where(h3) {
        font-size: 1.1rem !important;
    }
    .prose ul,
    .prose ol,
    .prose .wp-block-list {
        padding-left: 1.25rem !important;
    }
}

@media (min-width: 640px) {
    .prose {
        font-size: 16px !important;
    }
    .prose h2,
    .prose .wp-block-heading:where(h2) {
        font-size: 1.65rem !important;
    }
    .prose h3,
    .prose .wp-block-heading:where(h3) {
        font-size: 1.3rem !important;
    }
}

/* === WooCommerce "View Cart" Button Fix === */
/* Prevent the "View cart" link from overlapping product card text */
.woocommerce ul.products li.product .added_to_cart {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 8px !important;
    padding: 8px 12px !important;
    background: #eff6ff !important;
    color: var(--d247-primary) !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    float: none !important;
    clear: both !important;
}

.woocommerce ul.products li.product .added_to_cart:hover {
    background: var(--d247-primary) !important;
    color: #fff !important;
}

/* Fix the add to cart button text in product loop */
.woocommerce ul.products li.product a.button.add_to_cart_button {
    display: none !important;
}

/* Keep the custom cart icon button visible */
.woocommerce ul.products li.product a.ajax_add_to_cart {
    display: inline-flex !important;
}

/* Ensure the "View Cart" doesn't overlap on mobile */
@media (max-width: 640px) {
    .woocommerce ul.products li.product .added_to_cart {
        font-size: 11px !important;
        padding: 6px 8px !important;
        margin-top: 6px !important;
    }

    /* Fix product card info section overflow */
    .woocommerce ul.products li.product .p-4,
    .woocommerce ul.products li.product > div:last-child {
        overflow: hidden !important;
    }
}

/* === Front-page Product Card "View Cart" Fix === */
.d247-product-card .added_to_cart {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 8px !important;
    padding: 8px 12px !important;
    background: #eff6ff !important;
    color: var(--d247-primary) !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    position: relative !important;
    float: none !important;
    clear: both !important;
}

.d247-product-card .added_to_cart:hover {
    background: var(--d247-primary) !important;
    color: #fff !important;
}

@media (max-width: 640px) {
    .d247-product-card .added_to_cart {
        font-size: 11px !important;
        padding: 6px 8px !important;
    }
}
