﻿/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Roboto:wght@400&family=Lato:wght@500&display=swap');

/*
Theme Name: B4 Manga
Description: Custom Theme build for B4 Manga's exclusive use not shared with the public.
Author: B4 Manga Inc
Version: 1.0.1
License: Proprietary

CSS VARIABLE ARCHITECTURE:
This theme uses CSS custom properties (variables) for modular styling.
All variables are defined in the :root selector below and can be
easily modified for customization. Variables are organized by:

🌐 GLOBAL VARIABLES:
- Typography (fonts, sizes, weights, spacing)
- Colors (primary, secondary, text, backgrounds)
- Spacing and layout values
- Transitions and animations

🧩 SECTION-SPECIFIC VARIABLES:
- Header (branding, navigation, exit portal)
- Footer (background, text, links)  
- Sidebar/Widgets (colors, spacing)
- Main content (backgrounds, borders)
- Buttons and forms
- Cards and content blocks

These variables will be surfaced in the WordPress Customizer
for dynamic styling control.
*/

/* ==========================================================================
   CSS Custom Properties (Variables)
   ========================================================================== */

:root {
    --page-title-color: var(--color-text-primary); /* Default dark text for content areas */
    --page-header-title-color: #ffffff; /* White text for page headers on dark backgrounds */
    --post-header-title-color: var(--color-text-primary); /* Dark text for blog post headers */
    /* ==========================================================================
       🌐 GLOBAL VARIABLES
       ========================================================================== */
    
    /* Typography */

    /* WooCommerce button radius fix ensures consistency when core styles are disabled */
    .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) #respond input#submit,
    .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button,
    .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button,
    .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) input.button,
    :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce #respond input#submit,
    :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce a.button,
    :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce button.button,
    :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce input.button {
        border-radius: 999px;
        color: #ffffff;
    }

    --font-family-primary: 'Open Sans', sans-serif !important;
    --font-family-heading: 'Open Sans', sans-serif !important;
    --font-family-secondary: 'Helvetica', Arial, sans-serif !important;
    --font-family-text: 'Roboto', sans-serif !important;
    --font-family-accent: 'Lato', sans-serif !important;
    --font-family-menu: var(--font-family-heading) !important;
    
    /* Font Awesome Icons */
    --icon-user: '\f007';
    --icon-user-circle: '\f2bd';
    --icon-plus: '\f067';
    --icon-submit: '\f055';
    --icon-shopping-cart: '\f07a';
    --icon-search: '\f002';
    --icon-sign-out-alt: '\f2f5';
    --icon-home: '\f015';
    --icon-menu: '\f0c9';
    --icon-close: '\f00d';
    --icon-times: '\f00d';
    --icon-arrow-right: '\f061';
    --icon-arrow-left: '\f060';
    --icon-heart: '\f004';
    --icon-star: '\f005';
    --icon-comment: '\f075';
    --icon-download: '\f019';
    --icon-external-link: '\f35d';
    
    /* Font Sizes - Per Design Specification */
    --font-size-primary: 18px !important;        /* Open Sans Primary Font */
    --font-size-secondary: 16px !important;      /* Helvetica Secondary Font */
    --font-size-text: 14px !important;           /* Roboto Body Text Font */
    --font-size-accent: 14px !important;         /* Lato Accent Font */
    --font-size-base: var(--font-size-secondary) !important;
    --font-size-small: var(--font-size-text) !important;
    --font-size-large: var(--font-size-primary) !important;
    --font-size-h1: 2.5rem !important;
    --font-size-h2: 2rem !important;
    --font-size-h3: 1.5rem !important;
    --font-size-h4: 1.25rem !important;
    --font-size-h5: 1.125rem !important;
    --font-size-h6: 1rem !important;
    
    /* Font Weights */
    --font-weight-light: 300 !important;
    --font-weight-normal: 400 !important;
    --font-weight-medium: 500 !important;
    --font-weight-semibold: 600 !important;
    --font-weight-bold: 700 !important;
    
    /* Line Heights */
    --line-height-base: 1.6 !important;
    --line-height-tight: 1.2 !important;
    --line-height-relaxed: 1.8 !important;
    
    /* Letter Spacing */
    --letter-spacing-tight: -0.025em !important;
    --letter-spacing-normal: 0 !important;
    --letter-spacing-wide: 0.025em !important;
    --letter-spacing-wider: 0.05em !important;
    --letter-spacing-widest: 0.1em !important;
    
    /* Global Colors - Per Design Specification */
    --color-primary: #000000 !important;                 /* Primary Color */
    --color-primary-dark: #000000 !important;            /* Primary Dark (same as primary) */
    --color-secondary: #2F2F2F !important;              /* Secondary Color */
    --color-accent: #EC2024 !important;                 /* Accent/Hover Color */
    --color-success: #10b981 !important;
    --color-warning: #f59e0b !important;
    --color-error: #EC2024 !important;
    
    /* Text Colors - Per Design Specification */
    --color-text-primary: #121212 !important;           /* Main Text Color */
    --color-text-secondary: #666666 !important;
    --color-text-muted: #999999 !important;
    --color-text-light: #cccccc !important;
    --color-text-inverse: #ffffff !important;           /* White Text */
    
    /* Background Colors - Per Design Specification */
    --color-bg-primary: #f8f8f8;             /* Main Content Background */
    --color-bg-secondary: #EEEEEE;          /* Inner Page/Post Container Background */
    --color-bg-tertiary: #e7e7e7;           /* Sidebar Background */
    --color-bg-dark: #2c2c2c;              /* Footer Background - Matte Black */
    --color-bg-overlay: rgba(0, 0, 0, 0.7);
    
    /* Border Colors */
    --color-border-light: #e1e1e1;
    --color-border-medium: #d1d5db;
    --color-border-dark: #6b7280;
    
    /* Link Styling (Global - No Underlines) */
    --link-color: var(--color-text-primary);
    --link-color-hover: var(--color-accent);
    --link-color-active: var(--color-accent);
    --link-decoration: none;
    --link-decoration-hover: none;
    
     /* ==========================================================================
         📄 PAGE/POST BACKGROUNDS
         ========================================================================== */
    
     --page-header-bg-color: #0f0f0f;        /* Page Header Background - Dark Black */
     --page-body-bg-color: var(--main-body-bg-color);
     --post-header-bg-color: var(--main-body-bg-color);
     --post-body-bg-color: var(--main-body-bg-color);
     --header-padding: 48px;
    
    /* ==========================================================================
       🧩 SECTION-SPECIFIC VARIABLES
       ========================================================================== */
    
    /* Header */
    --header-bg-color: #ffffff;
    --header-border-color: var(--color-border-light);
    --header-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --header-height: 60px;
    --header-z-index: 100;
    
    /* Main Body Background (Independent from Header) */
    --main-body-bg-color: #f8f8f8;
    
    /* Site Branding */
    --branding-bg-color: #EC2024;
    --branding-text-color: var(--color-text-inverse);
    --branding-logo-width: 160px !important;
    --branding-logo-height: 40px !important;
    --branding-width: 200px;
    --branding-padding: 6px;
    
    /* Navigation */
    --nav-bg-color: var(--header-bg-color);
    --nav-text-color: var(--color-text-primary);
    --nav-text-color-hover: #EC2024;
    --nav-text-color-active: #EC2024;
    --nav-font-size: 0.9rem;
    --nav-font-weight: var(--font-weight-bold);
    --nav-letter-spacing: var(--letter-spacing-wide);
    --nav-padding: 0.75rem 1rem;
    --nav-gap: 2rem;
    
    /* Footer - Per Design Specification */
    --footer-bg-color: #0f0f0f;                    /* Dark Black Footer */
    --footer-text-color: #ffffff;                  /* White Text & Links */
    --footer-link-color: #ffffff;                  /* White Link Color */
    --footer-link-color-hover: var(--color-accent); /* #EC2024 Hover Color */
    --footer-padding: 32px 0;
    
    /* Sidebar/Widgets - Per Design Specification */
    --sidebar-bg-color: var(--color-bg-tertiary);  /* #e7e7e7 */
    --sidebar-width: 300px;
    --widget-text-color: var(--color-text-primary);
    --widget-link-color: var(--color-text-primary);
    --widget-link-color-hover: var(--color-secondary);
    --widget-title-color: var(--color-text-primary);
    --widget-border-color: var(--color-secondary);
    --widget-spacing: 40px;
    
    /* Main Content Area */
    --main-bg-color: var(--main-body-bg-color);
    --main-text-color: var(--color-text-primary);
    --main-border-color: var(--color-border-light);
    --main-padding: 30px 0;
    --main-gap: 30px;
    
    /* Buttons - Brand Unified Design */
    --button-bg-color: #000000 !important;
    --button-text-color: #ffffff !important;
    --button-bg-color-hover: #EC2024 !important;
    --button-text-color-hover: #ffffff !important;
    --button-border-radius: 999px !important;
    --button-padding: 0.5rem 1rem !important;
    --button-font-weight: 600 !important;
    --button-font-size: 0.875rem !important;
    --button-line-height: 1.4 !important;
    --button-letter-spacing: 0.025em !important;
    --button-border-width: 0px !important;
    --button-transition: background 0.2s, color 0.2s, transform 0.2s !important;
    
    /* Button Primary - Per Design Specification */
    --button-primary-bg: #000000 !important;           /* Black Background */
    --button-primary-text: #ffffff !important;         /* White Text */
    --button-primary-bg-hover: #EC2024 !important;     /* Red Hover Background */
    --button-primary-text-hover: #ffffff !important;   /* White Text on Hover */
    --button-primary-border: none !important;
    --button-primary-border-hover: none !important;
    
    /* Button Primary-Light - Per Design Specification */
    --button-light-bg: #ffffff !important;             /* White Background */
    --button-light-text: #000000 !important;           /* Black Text */
    --button-light-bg-hover: #EC2024 !important;       /* Red Hover Background */
    --button-light-text-hover: #ffffff !important;     /* White Text on Hover */
    --button-light-border: none !important;
    --button-light-border-hover: none !important;
    
    /* Button Secondary - Per Design Specification */
    --button-secondary-bg: #EC2024 !important;         /* Red Background */
    --button-secondary-text: #ffffff !important;       /* White Text */
    --button-secondary-bg-hover: #000000 !important;   /* Black Hover Background */
    --button-secondary-text-hover: #ffffff !important; /* White Text on Hover */
    --button-secondary-border: none !important;
    --button-secondary-border-hover: none !important;
    
    /* Button Outline */
    --button-outline-bg: transparent !important;
    --button-outline-text: #000000 !important;
    --button-outline-bg-hover: #EC2024 !important;
    --button-outline-text-hover: #ffffff !important;
    --button-outline-border: 2px solid #000000 !important;
    --button-outline-border-hover: 2px solid #EC2024 !important;
    
    /* Button Ghost */
    --button-ghost-bg: transparent !important;
    --button-ghost-text: var(--color-text-primary) !important;
    --button-ghost-bg-hover: var(--color-bg-secondary) !important;
    --button-ghost-border: transparent !important;
    --button-ghost-border-hover: none !important;
    
    /* Button Danger */
    --button-danger-bg: var(--color-danger) !important;
    --button-danger-text: var(--color-text-inverse) !important;
    --button-danger-bg-hover: #EC2024 !important;
    --button-danger-border: var(--color-danger) !important;
    --button-danger-border-hover: #EC2024 !important;
    
    /* Button Success */
    --button-success-bg: var(--color-success) !important;
    --button-success-text: var(--color-text-inverse) !important;
    --button-success-bg-hover: #060606 !important;
    --button-success-border: var(--color-success) !important;
    --button-success-border-hover: #060606 !important;
    
    /* Button Sizes */
    --button-small-padding: 0.5rem 1rem !important;
    --button-small-font-size: var(--font-size-small) !important;
    --button-large-padding: 1rem 2rem !important;
    --button-large-font-size: var(--font-size-large) !important;
    --button-xlarge-padding: 1.25rem 2.5rem !important;
    --button-xlarge-font-size: var(--font-size-large) !important;

    /* Forms - Match Search Box Design */
    --input-bg-color: var(--color-bg-primary) !important;
    --input-text-color: var(--color-text-primary) !important;
    --input-border-color: var(--color-border-medium) !important;
    --input-border-color-focus: var(--color-primary) !important;
    --input-border-radius: 16px !important;                /* Match search box radius */
    --input-padding: 0.75rem 1rem !important;              /* Reasonable size (not as big as search) */
    --input-border-width: 2px !important;                  /* Match search box border */
    --input-font-size: var(--font-size-base) !important;   /* Consistent font size */
    --input-transition: border-color var(--transition-normal) !important;
    
    /* Cards and Content Blocks */
    --card-bg-color: var(--color-bg-secondary);
    --card-border-color: #e9ecef;
    --card-border-radius: 16px;
    --card-padding: 2rem;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.1);
    
    /* Hero Section */
    --hero-bg-gradient-start: #060606;
    --hero-bg-gradient-end: #060606;
    --hero-text-color: var(--color-text-inverse);
    --hero-title-size: 3rem;
    --hero-padding: 4rem 0;
    
    /* Transitions */
    --transition-fast: 0.15s ease !important;
    --transition-normal: 0.3s ease !important;
    --transition-slow: 0.5s ease !important;
    
    /* Spacing */
    --spacing-xs: 0.5rem !important;
    --spacing-sm: 1rem !important;
    --spacing-md: 1.5rem !important;
    --spacing-lg: 2rem !important;
    --spacing-xl: 3rem !important;
    --spacing-2xl: 4rem !important;
    
    /* Container */
    --container-max-width: 1280px !important;
    --container-padding: 0 20px !important;
    
    /* Responsive Breakpoints (for reference) */
    --breakpoint-mobile: 480px;
    --breakpoint-tablet: 768px;
    --breakpoint-desktop: 1024px;
    --breakpoint-wide: 1200px;
}



/* ==========================================================================
   WooCommerce: Single Product spacing relative to header/footer
   Adds breathing room above and below content only on single product pages
   without affecting the shop archive or other pages.
   ========================================================================== */
.single-product .main-container.shop-layout {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

/* Shop archive pages should be flush with header - remove all padding/margin from wrapper */
.post-type-archive-product .main-container.shop-layout,
.tax-product_cat .main-container.shop-layout,
.tax-product_tag .main-container.shop-layout,
.tax-product_brand .main-container.shop-layout {
    margin: 0;
    padding: 0;
    padding-top: 0; /* Ensure no top padding on desktop */
}

@media (max-width: 768px) {
    .post-type-archive-product .main-container.shop-layout,
    .tax-product_cat .main-container.shop-layout,
    .tax-product_tag .main-container.shop-layout,
    .tax-product_brand .main-container.shop-layout {
        padding-top: var(--header-height); /* Account for sticky header on mobile */
    }
}

.post-type-archive-product .container,
.tax-product_cat .container,
.tax-product_tag .container,
.tax-product_brand .container {
    margin: 0 !important;
    padding: 0 !important;
}

/* Breadcrumb spacing and appearance on single product */
.single-product .woocommerce-breadcrumb {
    display: block;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}
.single-product .woocommerce-breadcrumb a {
    color: var(--color-text-secondary);
}
.single-product .woocommerce-breadcrumb a:hover,
.single-product .woocommerce-breadcrumb a:focus {
    color: var(--color-primary);
}

/* Breadcrumbs inside Woo content container */
.woocommerce .woocommerce-breadcrumb {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

/* Archive pages: show breadcrumbs directly under the Shop/category title */
.post-type-archive-product .shop-header .woocommerce-breadcrumb,
.tax-product_cat .shop-header .woocommerce-breadcrumb,
.tax-product_tag .shop-header .woocommerce-breadcrumb {
    margin: 0; /* inline with title */
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}
.post-type-archive-product .shop-header .woocommerce-breadcrumb a,
.tax-product_cat .shop-header .woocommerce-breadcrumb a,
.tax-product_tag .shop-header .woocommerce-breadcrumb a {
    color: var(--color-text-secondary);
}
.post-type-archive-product .shop-header .woocommerce-breadcrumb a:hover,
.post-type-archive-product .shop-header .woocommerce-breadcrumb a:focus,
.tax-product_cat .shop-header .woocommerce-breadcrumb a:hover,
.tax-product_cat .shop-header .woocommerce-breadcrumb a:focus,
.tax-product_tag .shop-header .woocommerce-breadcrumb a:hover,
.tax-product_tag .shop-header .woocommerce-breadcrumb a:focus {
    color: var(--color-primary);
}

/* Position breadcrumbs to the right of the Shop/category title */
.post-type-archive-product .shop-header,
.tax-product_cat .shop-header,
.tax-product_tag .shop-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap; /* allow wrapping on small screens */
}
.post-type-archive-product .shop-header .woocommerce-products-header__title,
.tax-product_cat .shop-header .woocommerce-products-header__title,
.tax-product_tag .shop-header .woocommerce-products-header__title {
    margin: 0; /* remove extra space so it lines up nicely */
}

.page-shop-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #ffffff !important;
}
.post-type-archive-product .shop-header .term-description,
.post-type-archive-product .shop-header .woocommerce-products-header__description,
.tax-product_cat .shop-header .term-description,
.tax-product_cat .shop-header .woocommerce-products-header__description,
.tax-product_tag .shop-header .term-description,
.tax-product_tag .shop-header .woocommerce-products-header__description {
    flex-basis: 100%;
    margin-top: var(--spacing-sm);
}

@media (max-width: 768px) {
    .post-type-archive-product .shop-header,
    .tax-product_cat .shop-header,
    .tax-product_tag .shop-header {
        align-items: flex-start;
    }
    .post-type-archive-product .shop-header .woocommerce-breadcrumb,
    .tax-product_cat .shop-header .woocommerce-breadcrumb,
    .tax-product_tag .shop-header .woocommerce-breadcrumb {
        margin-top: 0.25rem;
    }
}

/* ==========================================================================
   WooCommerce: Shop archive layout with sidebar
   ========================================================================== */
.post-type-archive-product .shop-layout-grid,
.tax-product_cat .shop-layout-grid,
.tax-product_tag .shop-layout-grid,
.tax-product_brand .shop-layout-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px; /* visible space between sidebar and content */
    align-items: start;
    margin: 40px;
}

.post-type-archive-product .shop-sidebar,
.tax-product_cat .shop-sidebar,
.tax-product_tag .shop-sidebar,
.tax-product_brand .shop-sidebar {
    flex-shrink: 0;
    width: 260px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.post-type-archive-product .shop-content,
.tax-product_cat .shop-content,
.tax-product_tag .shop-content,
.tax-product_brand .shop-content {
    flex: 1;
    min-width: 0;
    margin-top: 20px;
    margin-bottom: 20px;
    padding-left: 8px;
}

/* Header container (blue area) - now spans full width above grid */
.post-type-archive-product .shop-header,
.tax-product_cat .shop-header,
.tax-product_tag .shop-header,
.tax-product_brand .shop-header {
    background: var(--page-header-bg-color);
    color: var(--page-header-title-color);
    padding: var(--spacing-lg);
    margin: 0;
    margin-bottom: 0;
    width: 100%;
}

.post-type-archive-product .shop-header .woocommerce-products-header__title,
.tax-product_cat .shop-header .woocommerce-products-header__title,
.tax-product_tag .shop-header .woocommerce-products-header__title,
.tax-product_brand .shop-header .woocommerce-products-header__title {
    color: var(--page-header-title-color);
    margin: 0;
}

/* Shop hero slider section */
.shop-hero-section {
    width: 100%;
    margin: 0;
    padding: 0;
}

.shop-hero-slider {
    width: 100%;
    max-width: 100%;
}

.shop-hero-section .hero-slider {
    width: 100%;
}

/* Main content container (yellow) and inner constrained container (orange) */
.post-type-archive-product .shop-main,
.tax-product_cat .shop-main,
.tax-product_tag .shop-main,
.tax-product_brand .shop-main {
    background: var(--main-bg-color);
    padding: var(--spacing-lg);
    border-radius: 0 0 14px 14px; /* connects with header above */
    margin-top: 0; /* no gap to header */
}

.post-type-archive-product .shop-inner,
.tax-product_cat .shop-inner,
.tax-product_tag .shop-inner,
.tax-product_brand .shop-inner {
    width: 100%;
    max-width: none; /* allow full content column width */
    margin: 0;       /* align to the edges of the red container */
}

/* Shop controls row (results + sorter) */
.post-type-archive-product .shop-controls,
.tax-product_cat .shop-controls,
.tax-product_tag .shop-controls,
.tax-product_brand .shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    margin: 0 0 var(--spacing-md) 0;
}

.post-type-archive-product .shop-controls .woocommerce-result-count,
.tax-product_cat .shop-controls .woocommerce-result-count,
.tax-product_tag .shop-controls .woocommerce-result-count,
.tax-product_brand .shop-controls .woocommerce-result-count { margin: 0; }
.post-type-archive-product .shop-controls .woocommerce-ordering,
.tax-product_cat .shop-controls .woocommerce-ordering,
.tax-product_tag .shop-controls .woocommerce-ordering,
.tax-product_brand .shop-controls .woocommerce-ordering { margin: 0; }

/* Products grid inside archive body */
.post-type-archive-product .products-grid,
.tax-product_cat .products-grid,
.tax-product_tag .products-grid,
.tax-product_brand .products-grid {
    display: block; /* flex is applied on the UL inside */
}

/* Reset default UL indentation inside Woo loop so grid aligns flush */
.post-type-archive-product .products-grid ul.products,
.tax-product_cat .products-grid ul.products,
.tax-product_tag .products-grid ul.products,
.tax-product_brand .products-grid ul.products {
    list-style: none;
    margin: 0;
    padding-left: 0; /* remove browser default indent */
}

/* Make the UL the actual grid container so products are grid items */
.post-type-archive-product .products-grid > ul.products,
.tax-product_cat .products-grid > ul.products,
.tax-product_tag .products-grid > ul.products,
.tax-product_brand .products-grid > ul.products {
    /* switch from flex to CSS Grid for precise column control */
    display: grid;
    /* unified gap variable for column spacing */
    --products-gap: var(--spacing-md);
    gap: var(--products-gap);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* WooCommerce adds float-clearing pseudo-elements which become grid items; disable them */
.post-type-archive-product .products-grid > ul.products::before,
.post-type-archive-product .products-grid > ul.products::after,
.tax-product_cat .products-grid > ul.products::before,
.tax-product_cat .products-grid > ul.products::after,
.tax-product_tag .products-grid > ul.products::before,
.tax-product_tag .products-grid > ul.products::after,
.tax-product_brand .products-grid > ul.products::before,
.tax-product_brand .products-grid > ul.products::after {
    content: none !important;
    display: none !important;
}

/* Reset Woo default floats/margins so grid controls layout */
.post-type-archive-product .products-grid > ul.products li.product,
.tax-product_cat .products-grid > ul.products li.product,
.tax-product_tag .products-grid > ul.products li.product,
.tax-product_brand .products-grid > ul.products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}

/* Ensure product card fills the grid cell */
.post-type-archive-product .products-grid > ul.products li.product .product-card,
.tax-product_cat .products-grid > ul.products li.product .product-card,
.tax-product_tag .products-grid > ul.products li.product .product-card,
.tax-product_brand .products-grid > ul.products li.product .product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Ensure product images scale nicely inside cards */
.post-type-archive-product .products-grid li.product img,
.tax-product_cat .products-grid li.product img,
.tax-product_tag .products-grid li.product img,
.tax-product_brand .products-grid li.product img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== Responsive column counts (CSS Grid) ===== */
@media (min-width: 900px) {
    /* Tablets / small desktops: 3 columns */
    .post-type-archive-product .products-grid > ul.products,
    .tax-product_cat .products-grid > ul.products,
    .tax-product_tag .products-grid > ul.products,
    .tax-product_brand .products-grid > ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        --products-gap: var(--spacing-lg);
    }
}

@media (min-width: 1200px) {
    /* Larger desktops: 5 columns */
    .post-type-archive-product .products-grid > ul.products,
    .tax-product_cat .products-grid > ul.products,
    .tax-product_tag .products-grid > ul.products,
    .tax-product_brand .products-grid > ul.products {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        --products-gap: var(--spacing-md);
    }
}

/* Keep notices wrapper from creating layout gaps when empty */
.post-type-archive-product .shop-controls .woocommerce-notices-wrapper:empty,
.tax-product_cat .shop-controls .woocommerce-notices-wrapper:empty,
.tax-product_tag .shop-controls .woocommerce-notices-wrapper:empty,
.tax-product_brand .shop-controls .woocommerce-notices-wrapper:empty { display: none; }

/* ======================================================================
   Single Product: Related / Upsells / Cross-sells grid (1 row intent)
   - Desktop: 4 columns
   - Tablet/Notebook: 3–4 columns
   - Mobile: 1–2 columns
   ====================================================================== */

/* Base UL reset and grid setup */
.single-product .related ul.products,
.single-product .upsells ul.products,
.single-product .cross-sells ul.products,
.woocommerce-cart .cross-sells ul.products {
    list-style: none;
    margin: 0;
    padding-left: 0;
        display: grid;
        --products-gap: var(--spacing-md);
        gap: var(--products-gap);
        grid-template-columns: repeat(2, minmax(0, 1fr));
}

.woocommerce-cart .cross-sells ul.products {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Remove Woo float-clearing pseudo elements to avoid phantom grid items */
.single-product .related ul.products::before,
.single-product .related ul.products::after,
.single-product .upsells ul.products::before,
.single-product .upsells ul.products::after,
.single-product .cross-sells ul.products::before,
.single-product .cross-sells ul.products::after,
.woocommerce-cart .cross-sells ul.products::before,
.woocommerce-cart .cross-sells ul.products::after {
    content: none !important;
    display: none !important;
}

/* Item resets so grid controls layout */
.single-product .related ul.products li.product,
.single-product .upsells ul.products li.product,
.single-product .cross-sells ul.products li.product,
.woocommerce-cart .cross-sells ul.products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}

/* Product card should fill grid cell height */
.single-product .related ul.products li.product .product-card,
.single-product .upsells ul.products li.product .product-card,
.single-product .cross-sells ul.products li.product .product-card,
.woocommerce-cart .cross-sells ul.products li.product .product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Ensure images scale to container */
.single-product .related ul.products li.product img,
.single-product .upsells ul.products li.product img,
.single-product .cross-sells ul.products li.product img,
.woocommerce-cart .cross-sells ul.products li.product img {
    width: 100%;
    height: auto;
    display: block;
}

/* Breakpoints: 3, 4 columns */
@media (min-width: 900px) {
    .single-product .related ul.products,
    .single-product .upsells ul.products,
    .single-product .cross-sells ul.products,
    .woocommerce-cart .cross-sells ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        --products-gap: var(--spacing-lg);
    }
}

@media (min-width: 1200px) {
    .single-product .related ul.products,
    .single-product .upsells ul.products,
    .single-product .cross-sells ul.products,
    .woocommerce-cart .cross-sells ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .post-type-archive-product .shop-layout-grid,
    .tax-product_cat .shop-layout-grid,
    .tax-product_tag .shop-layout-grid,
    .tax-product_brand .shop-layout-grid {
        grid-template-columns: 260px 1fr;
        column-gap: 0;
    }
    .post-type-archive-product .shop-layout-grid::before,
    .tax-product_cat .shop-layout-grid::before,
    .tax-product_tag .shop-layout-grid::before,
    .tax-product_brand .shop-layout-grid::before { width: 260px; }
}

@media (max-width: 768px) {
    .post-type-archive-product .shop-layout-grid,
    .tax-product_cat .shop-layout-grid,
    .tax-product_tag .shop-layout-grid,
    .tax-product_brand .shop-layout-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        margin: 0;
    }
    /* Hide sidebar on mobile */
    .shop-sidebar { display: none; }
    
    .post-type-archive-product .shop-content,
    .tax-product_cat .shop-content,
    .tax-product_tag .shop-content,
    .tax-product_brand .shop-content {
        margin: 0;
        padding-left: 0;
    }
    
    .post-type-archive-product .shop-header,
    .tax-product_cat .shop-header,
    .tax-product_tag .shop-header,
    .tax-product_brand .shop-header {
        padding: var(--spacing-md);
    }
}

/* ======================================================================
   Single Serie: Shop section grid (mirror archive/shop grid behavior)
   ====================================================================== */
.serie-shop-section .products {
    display: grid;
    --products-gap: var(--spacing-lg);
    gap: var(--products-gap);
    margin: 0 0 40px 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.serie-shop-section .products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    display: flex;
}
.serie-shop-section .products li.product img {
    width: 100%;
    height: auto;
    display: block;
}

.serie-shop-section .products li.product .product-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.serie-shop-section .products li.product .product-card-content {
    flex: 1 1 auto;
    padding: clamp(1rem, 3vw, 1.25rem);
}

.serie-shop-section .products li.product .product-card-actions {
    padding: 0 clamp(1rem, 3vw, 1.25rem) clamp(1rem, 3vw, 1.5rem);
    margin-top: auto;
}

.serie-shop-section .products li.product .woocommerce-loop-product__title {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    line-height: 1.35;
    min-height: 2.6em;
}

.serie-shop-section .products li.product .price {
    font-size: clamp(1rem, 2.4vw, 1.3rem);
    margin-top: 0.65rem;
}

.serie-shop-section .products li.product .add_to_cart_button,
.serie-shop-section .products li.product .product_type_simple,
.serie-shop-section .products li.product .product_type_variable,
.serie-shop-section .products li.product .product_type_grouped,
.serie-shop-section .products li.product .product_type_external,
.serie-shop-section .products li.product .added_to_cart {
    padding: 0.65rem 1rem;
    border-radius: 999px;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@media (min-width: 600px) {
    .serie-shop-section .products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        --products-gap: var(--spacing-md);
    }
}
@media (min-width: 768px) {
    .serie-shop-section .products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        --products-gap: var(--spacing-lg);
    }
}
@media (min-width: 1024px) {
    .serie-shop-section .products {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* Sidebar widgets: structure and look */
.shop-sidebar {
    position: static; /* avoid vertical gap and stretching issues */
    align-self: start; /* pin to top of grid */
    padding-top: 30px; /* sidebar container has no extra padding */
    border-radius: 0;
}

.shop-sidebar .widget {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0 0 var(--spacing-md) 0;
    box-shadow: none;
}

.shop-sidebar .widget + .widget {
    margin-top: var(--spacing-md);
}

.shop-sidebar .widget-title,
.shop-sidebar .widgettitle {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    font-size: 1.05rem;
    color: var(--color-text-primary);
    margin: 0 0 var(--spacing-sm) 0;
}

/* remove decorative divider to keep sidebar minimal */
.shop-sidebar .widget-title::after,
.shop-sidebar .widgettitle::after { content: none; }

/* Lists inside widgets */
.shop-sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-sidebar .widget ul li {
    padding: 0.4rem 0;
}

.shop-sidebar .widget ul li:last-child {
    border-bottom: 0;
}

.shop-sidebar .widget a {
    color: var(--link-color);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.shop-sidebar .widget a:hover,
.shop-sidebar .widget a:focus {
    color: var(--link-color-hover);
}

/* Search widget: pill input with submit button */
.shop-sidebar .widget_search .search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid var(--color-border-light);
    border-radius: 999px;
    padding: 0.25rem 0.25rem 0.25rem 0.75rem;
}

.shop-sidebar .widget_search .search-form .search-field {
    flex: 1 1 auto;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    padding: 0.5rem 0.25rem;
    box-shadow: none !important;
}

.shop-sidebar .widget_search .search-form .search-submit {
    margin: 0;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
}

/* WooCommerce specific lists inside sidebar */
.shop-sidebar .product-categories .count {
    color: var(--color-text-muted);
}

.shop-sidebar .product_list_widget li {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 0.75rem;
    align-items: center;
}

.shop-sidebar .product_list_widget li img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
}


/* ==========================================================================
   Global Link Styling (No Underlines)
   ========================================================================== */

a {
    color: var(--link-color);
    text-decoration: var(--link-decoration);
    transition: color var(--transition-normal);
}

a:hover,
a:focus {
    color: var(--link-color-hover);
    text-decoration: var(--link-decoration-hover);
}

a:active {
    color: var(--link-color-active);
}

/* Ensure WordPress admin bar is not affected */
#wpadminbar a,
#wpadminbar a:hover,
#wpadminbar a:focus,
#wpadminbar a:active {
    text-decoration: underline !important;
}

/* ==========================================================================
   Link Overrides for Bootstrap and Framework Components
   ========================================================================== */

/* Override Bootstrap and framework link styles */
.btn a,
.card a,
.list-group a,
.nav a,
.navbar a,
.dropdown a,
.pagination a,
.breadcrumb a,
.alert a,
.badge a,
.toast a,
.modal a,
.offcanvas a,
.accordion a,
.carousel a,
.collapse a,
.popover a,
.tooltip a,
.tab-content a,
.tab-pane a,
.progress a,
.spinner a,
.table a,
.form-control a,
.input-group a,
.form-select a,
.form-check a,
.form-switch a,
.form-range a,
.form-floating a,
.was-validated a,
.is-valid a,
.is-invalid a {
    color: var(--link-color) !important;
    text-decoration: var(--link-decoration) !important;
    transition: color var(--transition-normal) !important;
}

.btn a:hover,
.btn a:focus,
.card a:hover,
.card a:focus,
.list-group a:hover,
.list-group a:focus,
.nav a:hover,
.nav a:focus,
.navbar a:hover,
.navbar a:focus,
.dropdown a:hover,
.dropdown a:focus,
.pagination a:hover,
.pagination a:focus,
.breadcrumb a:hover,
.breadcrumb a:focus,
.alert a:hover,
.alert a:focus,
.badge a:hover,
.badge a:focus,
.toast a:hover,
.toast a:focus,
.modal a:hover,
.modal a:focus,
.offcanvas a:hover,
.offcanvas a:focus,
.accordion a:hover,
.accordion a:focus,
.carousel a:hover,
.carousel a:focus,
.collapse a:hover,
.collapse a:focus,
.popover a:hover,
.popover a:focus,
.tooltip a:hover,
.tooltip a:focus,
.tab-content a:hover,
.tab-content a:focus,
.tab-pane a:hover,
.tab-pane a:focus,
.progress a:hover,
.progress a:focus,
.spinner a:hover,
.spinner a:focus,
.table a:hover,
.table a:focus,
.form-control a:hover,
.form-control a:focus,
.input-group a:hover,
.input-group a:focus,
.form-select a:hover,
.form-select a:focus,
.form-check a:hover,
.form-check a:focus,
.form-switch a:hover,
.form-switch a:focus,
.form-range a:hover,
.form-range a:focus,
.form-floating a:hover,
.form-floating a:focus,
.was-validated a:hover,
.was-validated a:focus,
.is-valid a:hover,
.is-valid a:focus,
.is-invalid a:hover,
.is-invalid a:focus {
    color: var(--link-color-hover) !important;
    text-decoration: var(--link-decoration-hover) !important;
}

/* Override specific Bootstrap link classes */
.link-primary,
.link-secondary,
.link-success,
.link-danger,
.link-warning,
.link-info,
.link-light,
.link-dark,
.link-body-emphasis,
.link-underline,
.link-underline-opacity-0,
.link-underline-opacity-10,
.link-underline-opacity-25,
.link-underline-opacity-50,
.link-underline-opacity-75,
.link-underline-opacity-100,
.link-offset-1,
.link-offset-2,
.link-offset-3 {
    color: var(--link-color) !important;
    text-decoration: var(--link-decoration) !important;
}

.link-primary:hover,
.link-primary:focus,
.link-secondary:hover,
.link-secondary:focus,
.link-success:hover,
.link-success:focus,
.link-danger:hover,
.link-danger:focus,
.link-warning:hover,
.link-warning:focus,
.link-info:hover,
.link-info:focus,
.link-light:hover,
.link-light:focus,
.link-dark:hover,
.link-dark:focus,
.link-body-emphasis:hover,
.link-body-emphasis:focus,
.link-underline:hover,
.link-underline:focus,
.link-underline-opacity-0:hover,
.link-underline-opacity-0:focus,
.link-underline-opacity-10:hover,
.link-underline-opacity-10:focus,
.link-underline-opacity-25:hover,
.link-underline-opacity-25:focus,
.link-underline-opacity-50:hover,
.link-underline-opacity-50:focus,
.link-underline-opacity-75:hover,
.link-underline-opacity-75:focus,
.link-underline-opacity-100:hover,
.link-underline-opacity-100:focus,
.link-offset-1:hover,
.link-offset-1:focus,
.link-offset-2:hover,
.link-offset-2:focus,
.link-offset-3:hover,
.link-offset-3:focus {
    color: var(--link-color-hover) !important;
    text-decoration: var(--link-decoration-hover) !important;
}

/* Global override for any remaining links - Exclude WordPress admin areas, buttons, and main navigation */
* a:not(#wpadminbar a):not(#wpadminbar *):not(.btn):not(.button):not(.b4-post-card-btn):not(.wp-block-button__link):not(.main-navigation a):not(.serie-volume-button):not(.serie-shop-button):not(.serie-news-button):not(.book-title-card-btn):not(.myaccount-book-title-card-btn):not(.serie-button):not(.serie-follow):not(.serie-social-list a):not(.serie-genres a):not(.serie-creators-list a):not(.story-genre-filter-list a):not(.title-series-filter-list a):not(.b4manga-share__link):not(.product_meta a):not(.bt-meta a):not(.chapter-index a):not(.reader-paywall a):not(.paywall-btn):not(.reader-help-btn):not(.reader-bookmark-btn):not(.reader-back-btn):not(.reader-menu-btn):not(.series-btn):not(.footer-menu-link):not(.footer-social-links a):not(.footer-social-link):not(.footer-newsletter-link):not(.footer-newsletter-modal a):not(.woocommerce-tabs a):not(.woocommerce-MyAccount-navigation a):not(.b4-account-orders__item a):not(.b4-order-modal__action-button):not(.b4-account-button):not(.b4-account-table__link):not(.b4-account-orders__link):not(.b4-account-nav a):not([class^="about-"]):not([class*=" about-"]):not(.btn-read-chapter-full),
*:link:not(#wpadminbar *):not(.btn):not(.button):not(.b4-post-card-btn):not(.wp-block-button__link):not(.main-navigation a):not(.serie-volume-button):not(.serie-shop-button):not(.serie-news-button):not(.book-title-card-btn):not(.myaccount-book-title-card-btn):not(.serie-button):not(.serie-follow):not(.serie-social-list a):not(.serie-genres a):not(.serie-creators-list a):not(.story-genre-filter-list a):not(.title-series-filter-list a):not(.b4manga-share__link):not(.product_meta a):not(.bt-meta a):not(.chapter-index *):not(.reader-paywall *):not(.paywall-btn):not(.reader-help-btn):not(.reader-bookmark-btn):not(.reader-back-btn):not(.reader-menu-btn):not(.series-btn):not(.footer-menu-link):not(.footer-social-links a):not(.footer-social-link):not(.footer-newsletter-link):not(.woocommerce-tabs *):not(.woocommerce-MyAccount-navigation *):not(.b4-account-orders__item *):not(.b4-order-modal__action-button):not(.b4-account-button):not(.b4-account-table__link):not(.b4-account-orders__link):not(.b4-account-nav *):not([class^="about-"]):not([class*=" about-"]):not(.btn-read-chapter-full),
*:visited:not(#wpadminbar *):not(.btn):not(.button):not(.b4-post-card-btn):not(.wp-block-button__link):not(.main-navigation a):not(.serie-volume-button):not(.serie-shop-button):not(.serie-news-button):not(.book-title-card-btn):not(.myaccount-book-title-card-btn):not(.serie-button):not(.serie-follow):not(.serie-social-list a):not(.serie-genres a):not(.serie-creators-list a):not(.story-genre-filter-list a):not(.title-series-filter-list a):not(.b4manga-share__link):not(.product_meta a):not(.bt-meta a):not(.chapter-index *):not(.reader-paywall *):not(.paywall-btn):not(.reader-help-btn):not(.reader-bookmark-btn):not(.reader-back-btn):not(.reader-menu-btn):not(.series-btn):not(.footer-menu-link):not(.footer-social-links a):not(.footer-social-link):not(.footer-newsletter-link):not(.woocommerce-tabs *):not(.woocommerce-MyAccount-navigation *):not(.b4-account-orders__item *):not(.b4-order-modal__action-button):not(.b4-account-button):not(.b4-account-table__link):not(.b4-account-orders__link):not(.b4-account-nav *):not([class^="about-"]):not([class*=" about-"]):not(.btn-read-chapter-full) {
    /* color: var(--link-color) !important; */
    text-decoration: var(--link-decoration) !important;
    transition: color var(--transition-normal) !important;
}

* a:hover:not(#wpadminbar a):not(#wpadminbar *):not(.btn):not(.button):not(.b4-post-card-btn):not(.wp-block-button__link):not(.main-navigation a):not(.serie-volume-button):not(.serie-shop-button):not(.serie-news-button):not(.book-title-card-btn):not(.myaccount-book-title-card-btn):not(.serie-button):not(.serie-follow):not(.serie-social-list a):not(.serie-genres a):not(.serie-creators-list a):not(.story-genre-filter-list a):not(.title-series-filter-list a):not(.b4manga-share__link):not(.product_meta a):not(.bt-meta a):not(.chapter-index a):not(.reader-paywall a):not(.paywall-btn):not(.reader-help-btn):not(.reader-bookmark-btn):not(.reader-back-btn):not(.reader-menu-btn):not(.series-btn):not(.footer-menu-link):not(.footer-social-links a):not(.footer-social-link):not(.footer-newsletter-link):not(.footer-newsletter-modal a):not(.woocommerce-tabs a):not(.woocommerce-MyAccount-navigation a):not(.b4-account-orders__item a):not(.b4-order-modal__action-button):not(.b4-account-button):not(.b4-account-table__link):not(.b4-account-orders__link):not(.b4-account-nav a):not([class^="about-"]):not([class*=" about-"]):not(.btn-read-chapter-full),
* a:focus:not(#wpadminbar a):not(#wpadminbar *):not(.btn):not(.button):not(.b4-post-card-btn):not(.wp-block-button__link):not(.main-navigation a):not(.serie-volume-button):not(.serie-shop-button):not(.serie-news-button):not(.book-title-card-btn):not(.myaccount-book-title-card-btn):not(.serie-button):not(.serie-follow):not(.serie-social-list a):not(.serie-genres a):not(.serie-creators-list a):not(.story-genre-filter-list a):not(.title-series-filter-list a):not(.b4manga-share__link):not(.product_meta a):not(.bt-meta a):not(.chapter-index a):not(.reader-paywall a):not(.paywall-btn):not(.reader-help-btn):not(.reader-bookmark-btn):not(.reader-back-btn):not(.reader-menu-btn):not(.series-btn):not(.footer-menu-link):not(.footer-social-links a):not(.footer-social-link):not(.footer-newsletter-link):not(.woocommerce-tabs a):not(.woocommerce-MyAccount-navigation a):not(.b4-account-orders__item a):not(.b4-order-modal__action-button):not(.b4-account-button):not(.b4-account-table__link):not(.b4-account-orders__link):not(.b4-account-nav a):not([class^="about-"]):not([class*=" about-"]),
*:link:hover:not(#wpadminbar *):not(.btn):not(.button):not(.b4-post-card-btn):not(.wp-block-button__link):not(.main-navigation a):not(.serie-volume-button):not(.serie-shop-button):not(.serie-news-button):not(.book-title-card-btn):not(.myaccount-book-title-card-btn):not(.serie-button):not(.serie-follow):not(.serie-social-list a):not(.serie-genres a):not(.serie-creators-list a):not(.story-genre-filter-list a):not(.title-series-filter-list a):not(.b4manga-share__link):not(.product_meta a):not(.bt-meta a):not(.chapter-index *):not(.reader-paywall *):not(.paywall-btn):not(.reader-help-btn):not(.reader-bookmark-btn):not(.reader-back-btn):not(.reader-menu-btn):not(.series-btn):not(.footer-menu-link):not(.footer-social-links a):not(.footer-social-link):not(.footer-newsletter-link):not(.woocommerce-tabs *):not(.woocommerce-MyAccount-navigation *):not(.b4-account-orders__item *):not(.b4-order-modal__action-button):not(.b4-account-button):not(.b4-account-table__link):not(.b4-account-orders__link):not(.b4-account-nav *):not([class^="about-"]):not([class*=" about-"]),
*:link:focus:not(#wpadminbar *):not(.btn):not(.button):not(.b4-post-card-btn):not(.wp-block-button__link):not(.main-navigation a):not(.serie-volume-button):not(.serie-shop-button):not(.serie-news-button):not(.book-title-card-btn):not(.myaccount-book-title-card-btn):not(.serie-button):not(.serie-follow):not(.serie-social-list a):not(.serie-genres a):not(.serie-creators-list a):not(.story-genre-filter-list a):not(.title-series-filter-list a):not(.b4manga-share__link):not(.product_meta a):not(.bt-meta a):not(.chapter-index *):not(.reader-paywall *):not(.paywall-btn):not(.reader-help-btn):not(.reader-bookmark-btn):not(.reader-back-btn):not(.reader-menu-btn):not(.series-btn):not(.footer-menu-link):not(.footer-social-links a):not(.footer-social-link):not(.footer-newsletter-link):not(.woocommerce-tabs *):not(.woocommerce-MyAccount-navigation *):not(.b4-account-orders__item *):not(.b4-order-modal__action-button):not(.b4-account-button):not(.b4-account-table__link):not(.b4-account-orders__link):not(.b4-account-nav *):not([class^="about-"]):not([class*=" about-"]),
*:visited:hover:not(#wpadminbar *):not(.btn):not(.button):not(.b4-post-card-btn):not(.wp-block-button__link):not(.main-navigation a):not(.serie-volume-button):not(.serie-shop-button):not(.serie-news-button):not(.book-title-card-btn):not(.myaccount-book-title-card-btn):not(.serie-button):not(.serie-follow):not(.serie-social-list a):not(.serie-genres a):not(.serie-creators-list a):not(.story-genre-filter-list a):not(.title-series-filter-list a):not(.b4manga-share__link):not(.product_meta a):not(.bt-meta a):not(.chapter-index *):not(.reader-paywall *):not(.paywall-btn):not(.reader-help-btn):not(.reader-bookmark-btn):not(.reader-back-btn):not(.reader-menu-btn):not(.series-btn):not(.footer-menu-link):not(.footer-social-links a):not(.footer-social-link):not(.footer-newsletter-link):not(.woocommerce-tabs *):not(.woocommerce-MyAccount-navigation *):not(.b4-account-orders__item *):not(.b4-order-modal__action-button):not(.b4-account-button):not(.b4-account-table__link):not(.b4-account-orders__link):not(.b4-account-nav *):not([class^="about-"]):not([class*=" about-"]),
*:visited:focus:not(#wpadminbar *):not(.btn):not(.button):not(.b4-post-card-btn):not(.wp-block-button__link):not(.main-navigation a):not(.serie-volume-button):not(.serie-shop-button):not(.serie-news-button):not(.book-title-card-btn):not(.myaccount-book-title-card-btn):not(.serie-button):not(.serie-follow):not(.serie-social-list a):not(.serie-genres a):not(.serie-creators-list a):not(.story-genre-filter-list a):not(.title-series-filter-list a):not(.b4manga-share__link):not(.product_meta a):not(.bt-meta a):not(.chapter-index *):not(.reader-paywall *):not(.paywall-btn):not(.reader-help-btn):not(.reader-bookmark-btn):not(.reader-back-btn):not(.reader-menu-btn):not(.series-btn):not(.footer-menu-link):not(.footer-social-links a):not(.footer-social-link):not(.footer-newsletter-link):not(.woocommerce-tabs *):not(.woocommerce-MyAccount-navigation *):not(.b4-account-orders__item *):not(.b4-order-modal__action-button):not(.b4-account-button):not(.b4-account-table__link):not(.b4-account-orders__link):not(.b4-account-nav *):not([class^="about-"]):not([class*=" about-"]) {
    /* color: var(--link-color-hover) !important; */
    text-decoration: var(--link-decoration-hover) !important;
}

* a:active:not(#wpadminbar a):not(#wpadminbar *):not(.btn):not(.button):not(.b4-post-card-btn):not(.wp-block-button__link):not(.main-navigation a):not(.serie-social-list a):not(.serie-genres a):not(.story-genre-filter-list a):not(.title-series-filter-list a):not(.b4manga-share__link):not(.product_meta a):not(.bt-meta a):not(.chapter-index a):not(.reader-paywall a):not(.paywall-btn):not(.reader-help-btn):not(.reader-bookmark-btn):not(.reader-back-btn):not(.reader-menu-btn):not(.series-btn):not(.footer-menu-link):not(.footer-social-links a):not(.footer-social-link):not(.footer-newsletter-link):not(.footer-newsletter-modal a):not(.serie-follow):not(.woocommerce-tabs a):not(.woocommerce-MyAccount-navigation a):not(.b4-account-orders__item a):not(.b4-order-modal__action-button):not(.b4-account-button):not(.b4-account-table__link):not(.b4-account-orders__link):not(.b4-account-nav a):not(.myaccount-book-title-card-btn):not([class^="about-"]):not([class*=" about-"]),
*:link:active:not(#wpadminbar *):not(.btn):not(.button):not(.b4-post-card-btn):not(.wp-block-button__link):not(.main-navigation a):not(.serie-social-list a):not(.serie-genres a):not(.story-genre-filter-list a):not(.title-series-filter-list a):not(.b4manga-share__link):not(.product_meta a):not(.bt-meta a):not(.chapter-index *):not(.reader-paywall *):not(.paywall-btn):not(.reader-help-btn):not(.reader-bookmark-btn):not(.reader-back-btn):not(.reader-menu-btn):not(.series-btn):not(.footer-menu-link):not(.footer-social-links a):not(.footer-social-link):not(.footer-newsletter-link):not(.serie-follow):not(.woocommerce-tabs *):not(.woocommerce-MyAccount-navigation *):not(.b4-account-orders__item *):not(.b4-order-modal__action-button):not(.b4-account-button):not(.b4-account-table__link):not(.b4-account-orders__link):not(.b4-account-nav *):not(.myaccount-book-title-card-btn):not([class^="about-"]):not([class*=" about-"]),
*:visited:active:not(#wpadminbar *):not(.btn):not(.button):not(.b4-post-card-btn):not(.wp-block-button__link):not(.main-navigation a):not(.serie-social-list a):not(.serie-genres a):not(.story-genre-filter-list a):not(.title-series-filter-list a):not(.b4manga-share__link):not(.product_meta a):not(.bt-meta a):not(.chapter-index *):not(.reader-paywall *):not(.paywall-btn):not(.reader-help-btn):not(.reader-bookmark-btn):not(.reader-back-btn):not(.reader-menu-btn):not(.series-btn):not(.footer-menu-link):not(.footer-social-links a):not(.footer-social-link):not(.footer-newsletter-link):not(.serie-follow):not(.woocommerce-tabs *):not(.woocommerce-MyAccount-navigation *):not(.b4-account-orders__item *):not(.b4-order-modal__action-button):not(.b4-account-button):not(.b4-account-table__link):not(.b4-account-orders__link):not(.b4-account-nav *):not(.myaccount-book-title-card-btn):not([class^="about-"]):not([class*=" about-"]) {
    color: var(--link-color-active) !important;
}
/* ==========================================================================
   Reset and Base Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-text);      /* Roboto for body text */
    font-size: var(--font-size-text);          /* 14px for body text */
    font-weight: 400;                          /* Normal weight for body */
    line-height: var(--line-height-base);
    color: var(--color-text-primary);
    background-color: var(--main-body-bg-color);
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    overflow-x: hidden;
}

/* ==========================================================================
   Typography Specifications - Per Design Requirements
   ========================================================================== */

/* Primary Font: Open Sans, 600, 18px */
.primary-font,
.header-utility-item,
.nav-link,
button.primary-font {
    font-family: var(--font-family-primary);   /* Open Sans */
    font-weight: 600;
    font-size: var(--font-size-primary);       /* 18px */
}

/* Secondary Font: Helvetica, 400, 16px */
.secondary-font,
input,
select,
textarea {
    font-family: var(--font-family-secondary); /* Helvetica */
    font-weight: 400;
    font-size: var(--font-size-secondary);     /* 16px */
}

/* Body Text Font: Roboto, 400, 14px - Already applied to body */

/* Accent Font: Lato, 500, 14px */
.accent-font,
.meta-text,
.caption,
.small-text {
    font-family: var(--font-family-accent);    /* Lato */
    font-weight: 500;
    font-size: var(--font-size-accent);        /* 14px */
}

/* Headings use Open Sans */
h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
    font-family: var(--font-family-primary);   /* Open Sans */
    font-weight: var(--font-weight-bold);
}

/* ==========================================================================
   Font Awesome Icons Utilities
   ========================================================================== */

.b4manga-icon {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.icon-small {
    font-size: 0.875em;
}

.icon-large {
    font-size: 1.25em;
}

.icon-xl {
    font-size: 1.5em;
}

.icon-spin {
    animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.container {
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
}

/* ==========================================================================
   GLOBAL BUTTON STYLES
   ========================================================================== */

/* Base Button */
.btn,
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--button-padding);
    font-family: var(--font-family-primary);
    font-size: var(--button-font-size);
    font-weight: var(--button-font-weight);
    line-height: var(--button-line-height);
    letter-spacing: var(--button-letter-spacing);
    text-decoration: none;
    text-align: center;
    border: var(--button-border-width) solid transparent;
    border-radius: var(--button-border-radius);
    cursor: pointer;
    transition: var(--button-transition);
    user-select: none;
    vertical-align: middle;
    white-space: nowrap;
    
    /* Default styling */
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    border-color: var(--button-bg-color);
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
.wp-block-button__link:hover {
    background-color: var(--button-bg-color-hover);
    border-color: var(--button-bg-color-hover);
    color: var(--button-text-color);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: none;
}

.btn:focus,
button:focus,
input[type="submit"]:focus,
input[type="button"]:focus,
input[type="reset"]:focus,
.wp-block-button__link:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn:active,
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active,
.wp-block-button__link:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn:disabled,
button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled,
input[type="reset"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Button Variants */
.btn-primary {
    background-color: var(--button-primary-bg);
    color: var(--button-primary-text);
}

.btn-primary:hover {
    background-color: var(--button-primary-bg-hover);
    color: var(--button-primary-text);
}

.btn-light {
    background-color: var(--button-light-bg);
    color: var(--button-light-text);
    border: var(--button-light-border);
}

.btn-light:hover {
    background-color: var(--button-light-bg-hover);
    color: var(--button-light-text-hover);
    border: var(--button-light-border-hover);
}

.btn-secondary {
    background-color: var(--button-secondary-bg);
    color: var(--button-secondary-text);
    border-color: var(--button-secondary-border);
}

.btn-secondary:hover {
    background-color: var(--button-secondary-bg-hover);
    border-color: var(--button-secondary-border-hover);
    color: var(--button-secondary-text);
}

.btn-outline {
    background-color: var(--button-outline-bg);
    color: var(--button-outline-text);
    border: var(--button-outline-border);
}

.btn-outline:hover {
    background-color: var(--button-outline-bg-hover);
    color: var(--button-outline-text-hover);
    border: var(--button-outline-border-hover);
}

.btn-ghost {
    background-color: var(--button-ghost-bg);
    color: var(--button-ghost-text);
    border-color: var(--button-ghost-border);
}

.btn-ghost:hover {
    background-color: var(--button-ghost-bg-hover);
    color: var(--button-ghost-text);
    border-color: var(--button-ghost-border-hover);
}

.btn-danger {
    background-color: var(--button-danger-bg);
    color: var(--button-danger-text);
    border-color: var(--button-danger-border);
}

.btn-danger:hover {
    background-color: var(--button-danger-bg-hover);
    color: var(--button-danger-text);
    border-color: var(--button-danger-border-hover);
}

.btn-success {
    background-color: var(--button-success-bg);
    color: var(--button-success-text);
    border-color: var(--button-success-border);
}

.btn-success:hover {
    background-color: var(--button-success-bg-hover);
    color: var(--button-success-text);
    border-color: var(--button-success-border-hover);
}

/* Button Sizes */
.btn-small {
    padding: var(--button-small-padding);
    font-size: var(--button-small-font-size);
}

.btn-large {
    padding: var(--button-large-padding);
    font-size: var(--button-large-font-size);
}

.btn-xlarge {
    padding: var(--button-xlarge-padding);
    font-size: var(--button-xlarge-font-size);
}

/* Button Block (Full Width) */
.btn-block {
    display: flex;
    width: 100%;
}

/* Button Groups */
.btn-group {
    display: inline-flex;
    align-items: center;
}

.btn-group .btn,
.btn-group button {
    border-radius: 0;
    border-right-width: 0;
}

.btn-group .btn:first-child,
.btn-group button:first-child {
    border-top-left-radius: var(--button-border-radius);
    border-bottom-left-radius: var(--button-border-radius);
}

.btn-group .btn:last-child,
.btn-group button:last-child {
    border-top-right-radius: var(--button-border-radius);
    border-bottom-right-radius: var(--button-border-radius);
    border-right-width: var(--button-border-width);
}

/* WordPress Specific Button Overrides */
.wp-block-button .wp-block-button__link {
    padding: var(--button-padding);
    border-radius: var(--button-border-radius);
}

.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: var(--button-outline-bg);
    color: var(--button-outline-text);
    border: var(--button-border-width) solid var(--button-outline-border);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--button-outline-bg-hover);
    color: var(--button-outline-text-hover);
}

/* Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: btn-spin 1s linear infinite;
}

@keyframes btn-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Button Adjustments */
@media (max-width: 768px) {
    .btn,
    button,
    input[type="submit"],
    input[type="button"],
    input[type="reset"] {
        padding: var(--button-small-padding);
        font-size: var(--button-small-font-size);
    }
    
    .btn-large,
    .btn-xlarge {
        padding: var(--button-padding);
        font-size: var(--button-font-size);
    }
}

/* ==========================================================================
   Policy Detail Pages
   ========================================================================= */

.policy-single {
    width: 100%;
    display: flex;
    justify-content: center;
    background: var(--post-body-bg-color, #fff);
    padding: 0;
}

.policy-single__layout {
    display: flex;
    gap: 2.5rem;
    width: 100%;
    max-width: 1200px;
    padding: 3rem 1.5rem;
    margin: 0 auto;
    align-items: flex-start;
    box-sizing: border-box;
}

.policy-single__content {
    flex: 1 1 0;
    max-width: 840px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.policy-single__sidebar {
    flex: 0 0 320px;
    max-width: 320px;
    width: 100%;
    position: sticky;
    top: 96px;
    align-self: flex-start;
    
}

.policy-article {
    background: var(--color-bg-primary, #ffffff);
    border-radius: 18px;
    border: 1px solid var(--color-border-light, #e6e6e6);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.policy-header {
    padding: 32px 36px 24px;
    border-bottom: 1px solid var(--color-border-light, #e6e6e6);
}

.policy-title {
    margin: 0;
    font-size: clamp(2rem, 2.4vw, 2.625rem);
    line-height: 1.2;
    color: var(--color-text-primary, #060606);
}

.policy-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
    font-size: 0.95rem;
    color: #4a4a4a;
}

.policy-updated {
    font-weight: 600;
}

.policy-categories {
    padding-left: 18px;
    position: relative;
}

.policy-categories::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary, #ec2024);
}

.policy-summary {
    margin-top: 18px;
    color: #5a5a5a;
    font-size: 1.05rem;
    line-height: 1.6;
}

.policy-summary p {
    margin: 0;
}

.policy-body {
    padding: 28px 36px 36px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-primary, #1f1f1f);
    background: #fff !important;
}

.policy-body h2,
.policy-body h3,
.policy-body h4 {
    margin-top: 32px;
    color: var(--color-text-primary, #060606);
}

.policy-body h2:first-child,
.policy-body h3:first-child,
.policy-body h4:first-child {
    margin-top: 0;
}

.policy-body ul,
.policy-body ol {
    padding-left: 24px;
    margin: 18px 0;
}

.policy-body li + li {
    margin-top: 8px;
}

.policy-sidebar__inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.policy-index__section:first-child {
    margin-top: 18px;
}

.policy-sidebar__inner .widget-title {
    margin-bottom: 1.5rem;
}

.policy-mobile-index {
    display: none;
    margin: 1.5rem 0 28px;
}

.policy-mobile-index__label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #555;
}

.policy-mobile-index__select {
    width: 100%;
    margin-top: 32px;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--color-border-light, #e6e6e6);
    font-size: 1rem;
    background: #ffffff;
    color: var(--color-text-primary, #1f1f1f);
}

.policy-mobile-index__select:focus {
    outline: 2px solid var(--color-primary, #ec2024);
    outline-offset: 3px;
}

.policy-index__section + .policy-index__section {
    margin-top: 24px;
}

.policy-index__heading {
    margin: 0 0 12px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #555;
}

.policy-index__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.policy-index__item {
    line-height: 1.4;
}

.policy-index__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.98rem;
    color: var(--color-text-primary, #1f1f1f);
    transition: color var(--transition-normal, 0.3s ease);
}

.policy-index__link::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-border-medium, #d1d5db);
    transition: background var(--transition-normal, 0.3s ease);
}

.policy-index__link:hover::before,
.policy-index__link:focus::before {
    background: var(--color-primary, #ec2024);
}

.policy-index__item.is-current .policy-index__link {
    color: var(--color-primary, #ec2024);
    font-weight: 600;
}

.policy-index__item.is-current .policy-index__link::before {
    background: var(--color-primary, #ec2024);
}

.policy-index__empty {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
}

.page-template-page-about .entry-header,
.page-template-page-about-php .entry-header,
.page-template-template-about-page .entry-header {
    display: none !important;
}

.about-page {
    background: #ededed;
    color: var(--color-text-primary, #0a0a0a);
}

.about-shell {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.75rem;
    box-sizing: border-box;
}

.about-hero {
    padding: clamp(3.5rem, 6vw, 4.75rem) 0;
}

.about-hero__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(2rem, 6vw, 4rem);
}

.about-hero__visual {
    flex: 0 0 320px;
    max-width: 360px;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-hero__logo {
    width: 100%;
    height: auto;
    display: block;
}

.about-hero__content {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.about-hero__strap {
    margin: 0;
    font-size: 1.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ec2024;
}

.about-hero__panels {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-hero__block {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.about-hero__block-title {
    margin: 0;
    font-size: clamp(1.85rem, 3vw, 2.35rem);
    font-weight: 700;
    color: var(--color-text-primary, #0a0a0a);
}

.about-hero__text {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--color-text-secondary, #444444);
}

.about-hero__text p {
    margin: 0 0 1rem;
}

.about-hero__text p:last-child {
    margin-bottom: 0;
}

.about-extra {
    padding: 0 0 clamp(3.5rem, 6vw, 4.75rem);
    background: #f1f1f1;
}

.about-extra__content {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: clamp(2.25rem, 4vw, 3rem);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.about-extra__content > :first-child {
    margin-top: 0;
}

.about-extra__content > :last-child {
    margin-bottom: 0;
}

.about-faq {
    position: relative;
    padding: clamp(5rem, 7vw, 6.5rem) 0;
    background: transparent;
    color: #ffffff;
    overflow: hidden;
}

.about-faq__backdrop {
    position: absolute;
    inset: 0;
    background: #1b1b1b;
    clip-path: polygon(0 12%, 100% 0, 100% 88%, 0 100%);
    z-index: 0;
}

.about-faq__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(2.5rem, 5vw, 3.25rem);
    text-align: center;
}

.about-faq__title {
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 2.6rem);
    font-weight: 700;
}

.about-faq__card {
    width: 100%;
    max-width: 920px;
    background: #ffffff;
    color: #141414;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    padding: clamp(2rem, 4.5vw, 3rem);
    text-align: left;
}

.about-faq__item + .about-faq__item {
    margin-top: 1.9rem;
    padding-top: 1.9rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.about-faq__item-title {
    margin: 0 0 0.85rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ec2024;
}

.about-faq__item-body {
    font-size: 1rem;
    line-height: 1.75;
    color: #2e2e2e;
}

.about-faq__item-body p {
    margin: 0;
}

.about-faq__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2.4rem;
    border-radius: 999px;
    background: #ffffff;
    color: #000000 !important;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-faq__button:hover,
.about-faq__button:focus {
    background: #ec2024;
    color: #ffffff !important;
}

.about-faq__empty {
    margin: 0;
    font-size: 1rem;
}

.about-contact {
    padding: clamp(4rem, 6vw, 5.5rem) 0;
    background: #ededed !important;
}

.about-contact__inner {
    max-width: 920px;
    margin: 0 auto;
    padding: clamp(2.75rem, 5vw, 3.5rem);
    border-radius: 22px;
    text-align: center;
    color: #111111 !important;
}

.about-contact__title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.9rem, 3vw, 2.45rem);
    font-weight: 700;
}

.about-contact__text {
    margin: 0 auto 2rem;
    max-width: 840px;
    font-size: 1.35rem;
    line-height: 1.75;
    color: #111111;
}

.about-contact__actions {
    display: flex;
    justify-content: center;
}

.about-contact__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2.75rem;
    border-radius: 999px;
    background: #000000;
    color: #ffffff !important;
    font-weight: 600;
    text-decoration: none;
}

.about-contact__button:hover,
.about-contact__button:focus {
    background: #ec2024;
    color: #ffffff !important;
}

@media (max-width: 1024px) {
    .about-hero__logo {
        display: none;
    }
    .about-hero__content {
        text-align: center;
        align-items: center;
    }

    .about-hero__text {
        text-align: center;
        font-size: 1.05rem;
    }

    .about-hero__visual {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .about-hero__visual {
        flex: 0 0 auto;
        width: 100%;
        max-width: 320px;
    }

    .about-faq__card {
        padding: 2rem;
    }

    .about-contact__text {
        display: none;
    }

    .about-contact__button {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .about-faq__backdrop {
        clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
    }

    .about-faq__card {
        padding: 1.75rem;
    }

    .about-faq__item + .about-faq__item {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
}

@media (max-width: 600px) {
    .about-hero {
        padding: 2rem;
        border-radius: 20px;
    }

    .about-page__content,
    .about-card,
    .about-faq {
        padding: 2rem;
        border-radius: 18px;
    }

    .about-faq__grid {
        grid-template-columns: 1fr;
    }

    .about-contact {
        padding: 2rem;
        border-radius: 22px;
    }

    .about-contact__button {
        width: 100%;
    }
}

@media (max-width: 1200px) {
    .policy-single__layout {
        padding: 2.5rem 1rem;
    }
}

@media (max-width: 1024px) {
    .policy-single__layout {
        flex-direction: column;
    }

    .policy-single__sidebar {
        display: none;
    }

    .policy-sidebar__inner .widget-title {
        display: none;
    }

    .policy-mobile-index {
        display: block;
    }

    .policy-single__layout {
        padding: 2rem 0.75rem;
    }
}

@media (max-width: 900px) {
    .policy-single__layout {
        flex-direction: column;
        gap: 1.75rem;
    }

    .policy-single__sidebar,
    .policy-single__content {
        max-width: 100%;
    }
}

@media (max-width: 720px) {
    .policy-article {
        border-radius: 14px;
    }

    .policy-header,
    .policy-body {
        padding: 24px;
    }

    .policy-summary {
        font-size: 1rem;
    }
}

.policy-index-page {
    width: 100%;
    display: flex;
    justify-content: center;
    background: var(--post-body-bg-color, #ffffff);
}

.policy-index-page__inner {
    width: 100%;
    max-width: 1200px;
    padding: 3rem 1.5rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.policy-index-page__header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.policy-index-page__title {
    margin: 0;
    font-size: clamp(2.25rem, 3vw, 3rem);
    line-height: 1.1;
}

.policy-index-page__meta {
    font-size: 0.95rem;
    color: var(--color-text-secondary, #595959);
}

.policy-index-page__intro {
    background: var(--color-bg-primary, #ffffff);
    border-radius: 18px;
    border: 1px solid var(--color-border-light, #e6e6e6);
    padding: 2rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.policy-index-page__accordion {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.policy-accordion__item {
    border: 1px solid var(--color-border-light, #e6e6e6);
    border-radius: 18px;
    background: var(--color-bg-primary, #ffffff);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: box-shadow var(--transition-normal, 0.3s ease);
}
.policy-accordion__item[open] {
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.06);
}

.policy-accordion__summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    font-weight: 700;
    color: var(--color-text-primary, #121212);
    list-style: none;
}

.policy-accordion__summary::-webkit-details-marker {
    display: none;
}

.policy-accordion__summary:focus {
    outline: none;
}

.policy-accordion__summary:focus-visible {
    outline: 2px solid var(--color-accent, #ec2024);
    outline-offset: 4px;
}

.policy-accordion__icon {
    position: relative;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--color-border-medium, #d1d5db);
}

.policy-accordion__icon::before,
.policy-accordion__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 2px;
    background: var(--color-accent, #ec2024);
    transform: translate(-50%, -50%);
    transition: opacity var(--transition-fast, 0.15s ease);
}

.policy-accordion__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.policy-accordion__item[open] .policy-accordion__icon::after {
    opacity: 0;
}

.policy-accordion__title {
    font-size: 1.05rem;
}

.policy-accordion__panel {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--color-border-light, #e6e6e6);
}

.policy-accordion__list {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.policy-accordion__link {
    display: inline-block;
    font-weight: 600;
    color: var(--color-text-primary, #1f1f1f);
    text-decoration: none;
    transition: color var(--transition-normal, 0.3s ease);
}

.policy-accordion__link:hover,
.policy-accordion__link:focus {
    color: var(--color-accent, #ec2024);
}

.policy-accordion__list-item {
    line-height: 1.5;
}

.policy-index__empty {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
}

@media (max-width: 960px) {
    .policy-index-page__inner {
        padding: 2.5rem 1rem 3.5rem;
    }
}

@media (max-width: 720px) {
    .policy-index-page__title {
        display: none !important;
    }

    .policy-accordion__item {
        border-radius: 14px;
    }

    .policy-accordion__summary {
        padding: 1rem 1.25rem;
    }

    .policy-accordion__panel {
        padding: 0 1.25rem 1.25rem;
    }
}

@media (max-width: 640px) {
    .policy-index-page__inner {
        padding: 2rem 0.75rem 3rem;
        gap: 2rem;
    }

    .policy-index-page__intro {
        padding: 1.5rem;
    }

    .policy-accordion__list {
        gap: 0.65rem;
    }
}

/* WooCommerce forms - align with site-wide inputs */
.woocommerce form .form-row,
.woocommerce-page form .form-row {
    margin-bottom: var(--spacing-sm, 1rem);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.woocommerce form .form-row label,
.woocommerce-page form .form-row label,
.woocommerce form .woocommerce-form__label,
.woocommerce-page form .woocommerce-form__label {
    font-weight: var(--font-weight-medium, 600);
    font-size: var(--font-size-small, 0.875rem);
    color: var(--input-text-color, #1f1f1f);
    margin: 0;
}

.woocommerce form .form-row span.description,
.woocommerce-page form .form-row span.description,
.woocommerce form .woocommerce-input-wrapper .description,
.woocommerce-page form .woocommerce-input-wrapper .description {
    font-size: 0.8125rem;
    color: #666;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text,
.woocommerce-page form .form-row textarea,
.woocommerce-page form .form-row select,
.woocommerce form .woocommerce-form__input,
.woocommerce-page form .woocommerce-form__input {
    padding: var(--input-padding, 0.75rem 1rem);
    border-radius: var(--input-border-radius, 16px);
    border: var(--input-border-width, 2px) solid var(--input-border-color, #d1d5db);
    background-color: var(--input-bg-color, #ffffff);
    color: var(--input-text-color, #1f1f1f);
    transition: var(--input-transition, border-color 0.3s ease);
    box-shadow: none;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.woocommerce-page form .form-row input.input-text:focus,
.woocommerce-page form .form-row textarea:focus,
.woocommerce-page form .form-row select:focus,
.woocommerce form .woocommerce-form__input:focus,
.woocommerce-page form .woocommerce-form__input:focus {
    border-color: var(--input-border-color-focus, #000000);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.woocommerce form .form-row .woocommerce-input-wrapper,
.woocommerce-page form .form-row .woocommerce-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.woocommerce form fieldset,
.woocommerce-page form fieldset {
    border: 1px solid var(--color-border-light, #e1e1e1);
    border-radius: var(--input-border-radius, 16px);
    padding: 22px 26px 18px;
    margin: 0 0 var(--spacing-md, 1.5rem);
    background: rgba(0, 0, 0, 0.02);
}

.woocommerce form fieldset legend,
.woocommerce-page form fieldset legend {
    padding: 0 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #444;
}

.woocommerce form .password-input,
.woocommerce-page form .password-input {
    position: relative;
}

.woocommerce form .password-input .show-password-input,
.woocommerce-page form .password-input .show-password-input {
    top: 50%;
    transform: translateY(-50%);
    background: none !important;
    color: #000000 !important;
}

.woocommerce .form-row.woocommerce-invalid input.input-text,
.woocommerce .form-row.woocommerce-invalid select,
.woocommerce .form-row.woocommerce-invalid textarea,
.woocommerce-page .form-row.woocommerce-invalid input.input-text,
.woocommerce-page .form-row.woocommerce-invalid select,
.woocommerce-page .form-row.woocommerce-invalid textarea {
    border-color: var(--color-error, #ec2024);
    box-shadow: 0 0 0 3px rgba(236, 32, 36, 0.1);
}

.woocommerce .form-row.woocommerce-validated input.input-text,
.woocommerce .form-row.woocommerce-validated select,
.woocommerce .form-row.woocommerce-validated textarea,
.woocommerce-page .form-row.woocommerce-validated input.input-text,
.woocommerce-page .form-row.woocommerce-validated select,
.woocommerce-page .form-row.woocommerce-validated textarea {
    border-color: var(--color-success, #3bae3f);
}

.woocommerce form .woocommerce-privacy-policy-text,
.woocommerce-page form .woocommerce-privacy-policy-text {
    font-size: 0.8125rem;
    color: #606060;
    line-height: 1.5;
}

.woocommerce form .woocommerce-form__label-for-checkbox,
.woocommerce-page form .woocommerce-form__label-for-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.woocommerce form .woocommerce-form__input-checkbox,
.woocommerce-page form .woocommerce-form__input-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: var(--input-border-width, 2px) solid var(--input-border-color, #d1d5db);
}

.woocommerce form .woocommerce-form__input-checkbox:checked,
.woocommerce-page form .woocommerce-form__input-checkbox:checked {
    background-color: var(--color-primary, #EC2024);
    border-color: var(--color-primary, #EC2024);
}

.woocommerce form .woocommerce-form__input-checkbox:focus,
.woocommerce-page form .woocommerce-form__input-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(236, 32, 36, 0.15);
}

.woocommerce form .woocommerce-form__label-for-checkbox span,
.woocommerce-page form .woocommerce-form__label-for-checkbox span {
    font-size: 0.9375rem;
}

/* Search form specific styling */
.search-form input[type="search"],
.searchform input[type="search"],
#searchform input[type="search"] {
    border-radius: var(--input-border-radius);
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    padding: var(--input-padding);
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.search-form input[type="search"]:focus,
.searchform input[type="search"]:focus,
#searchform input[type="search"]:focus,
.search-form input[type="search"]:focus-visible,
.searchform input[type="search"]:focus-visible,
#searchform input[type="search"]:focus-visible,
.search-form input[type="search"]:active,
.searchform input[type="search"]:active,
#searchform input[type="search"]:active {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* WordPress Bootstrap and theme overrides for search inputs */
.form-control[type="search"],
.wp-block-search input[type="search"],
.wp-block-search .wp-block-search__input,
.widget_search input[type="search"],
.widget_search .search-field,
input.search-field,
input[name="s"],
.search-submit + input,
.btn + input[type="search"],
form[role="search"] input,
.navbar-form input[type="search"],
.search-box input,
.search-widget input {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Focus states for all search input variations */
.form-control[type="search"]:focus,
.wp-block-search input[type="search"]:focus,
.wp-block-search .wp-block-search__input:focus,
.widget_search input[type="search"]:focus,
.widget_search .search-field:focus,
input.search-field:focus,
input[name="s"]:focus,
.search-submit + input:focus,
.btn + input[type="search"]:focus,
form[role="search"] input:focus,
.navbar-form input[type="search"]:focus,
.search-box input:focus,
.search-widget input:focus,
.form-control[type="search"]:focus-visible,
.wp-block-search input[type="search"]:focus-visible,
.wp-block-search .wp-block-search__input:focus-visible,
.widget_search input[type="search"]:focus-visible,
.widget_search .search-field:focus-visible,
input.search-field:focus-visible,
input[name="s"]:focus-visible {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}
/* ==========================================================================
   Series Layout
   ========================================================================== */

.serie-single {
    --serie-bg-dark: var(--page-header-bg-color, #0f0f0f);
    --serie-bg-muted: var(--page-header-bg-color, #0f0f0f);
    --serie-accent: #f4f4f4;
    --serie-accent-soft: var(--page-header-bg-color, #0f0f0f);
    --serie-text-light: #f4f4f4;
    --serie-text-muted: #c5c5c5;
    --serie-card-bg: var(--page-header-bg-color, #0f0f0f);
    --serie-border: var(--page-header-bg-color, #0f0f0f);
    --serie-transition: all 0.3s ease;
    color: var(--serie-text-light);
    background-color: #ffffff;
}

.serie-single a {
    color: var(--serie-accent);
    transition: var(--serie-transition);
}

.serie-single a:hover,
.serie-single a:focus {
    color: var(--serie-accent);
}

.serie-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 3vw, 4rem);
    padding: clamp(3rem, 5vw, 6rem);
    background: var(--page-header-bg-color);
    border-bottom: 1px solid var(--serie-border);
    position: relative;
    overflow: hidden;
}

.serie-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.06), transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.serie-hero > * {
    position: relative;
    z-index: 2;
}

.serie-hero-media {
    display: grid;
    gap: 1.5rem;
    align-content: start;
}

.serie-hero-image-wrap {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.serie-hero-image {
    width: 100%;
    height: auto;
    display: block;
}

.serie-hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.75rem;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.serie-logo-img {
    max-width: 260px;
    height: auto;
}

.serie-hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.serie-hero-heading {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.serie-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--serie-text-muted);
}

.serie-label::before {
    content: '';
    width: 36px;
    height: 1px;
    background: currentColor;
}

.serie-label--accent {
    color: var(--serie-accent);
}

.serie-title {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    margin: 0;
    font-weight: 700;
    color: #ffffff;
}

.serie-creators {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #ffffff;
}

.serie-creators-label {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.serie-creators-list {
    display: flex;
    text-transform: uppercase;
    color: #ffffff;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
}

.serie-creators-list li a:hover {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #ec2024;
    background: none;
    border: 0px;
    font-size: 0.85rem;
}

.serie-story-content {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
    font-size: 1.05rem;
}

.serie-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.serie-hero-actions .serie-next-release {
    margin: 0;
    font-size: 0.95rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.serie-hero-actions .serie-next-release strong {
    color: #ffffff;
}

.serie-countdown {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.serie-countdown-label {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
}

.serie-countdown-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #ffffff;
    font-size: 1rem;
}

.serie-countdown-timer span {
    color: var(--serie-accent);
    font-weight: 700;
}

.serie-countdown-finished {
    color: #efefef;
    font-weight: 600;
}

.serie-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #2a2a2a;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 1px solid transparent;
}

.serie-button--primary {
    background: #ffffff;
    color: #2a2a2a !important;
}

.serie-button--primary:hover {
    background: #ec2024;
    color: #ffffff !important;
}

.serie-button--secondary {
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.serie-button--secondary:hover {
    background: #ec2024;
    color: #000000;
}

.serie-follow-button[data-follow-state="followed"] {
    background: #ffffff !important;
    color: #000000 !important;
}

.serie-follow-button[data-follow-state="followed"]:hover {
    background: #ec2024 !important;
    color: #ffffff !important;
}

.serie-follow-button.is-busy {
    opacity: 0.65;
    pointer-events: none;
}

.serie-button--dark {
    background: #ffffff;
    color: #000000;
    border-color: transparent;
}

.serie-button--dark:hover {
    transform: translateY(-2px);
}

.serie-button--outline {
    background: #ffffff;
}

.serie-button--outline:hover {
    background: #ec2024;
}

.serie-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.serie-next-release {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
}

.serie-next-release strong {
    color: #ffffff;
    margin-left: 0.4rem;
}

.serie-rating-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.serie-rating-trigger:focus-visible {
    outline: 2px solid var(--serie-accent);
    outline-offset: 4px;
    border-radius: 12px;
}

.serie-rating-trigger:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.serie-rating-trigger-media {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.serie-rating-trigger-media img {
    display: block;
    max-width: 140px;
    height: auto;
    border-radius: 8px;
}

.serie-social-follow {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.serie-social-list {
    display: flex;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.serie-social-list a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff !important;
    font-size: 1.1rem;
    color: #1a1a1a !important;
    transition: all 0.2s ease;
}

.serie-social-list a:hover {
    background: #EC2024 !important;
    color: #ffffff !important;
}

.b4manga-share {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    margin: 1.5rem 0;
}

.single-layout .entry-header {
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.single-layout .entry-header-top .entry-title {
    flex: 1 1 auto;
    margin: 0;
}

.single-layout .entry-share {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    margin: 0;
}

.single-layout .entry-share .b4manga-share {
    margin: 0;
}

.single-layout .entry-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: clamp(1rem, 2vw, 1.5rem);
}

.single-layout .entry-footer .entry-share {
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .single-layout .entry-footer {
        gap: 1rem;
    }

    .single-layout .entry-footer .entry-share {
        justify-content: flex-start;
    }
}

.serie-hero-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.serie-hero-header .b4manga-share {
    margin: 0;
    flex: 0 0 auto;
}

.b4manga-share__link--disabled {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.35);
    cursor: not-allowed;
}

.b4manga-share__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #1a1a1a;
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.b4manga-share__trigger:hover,
.b4manga-share__trigger:focus {
    background: #EC2024;
    color: #ffffff;
    transform: translateY(-1px);
}

.b4manga-share__trigger:focus-visible {
    outline: 2px solid #EC2024;
    outline-offset: 2px;
}

.b4manga-share__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    min-width: 220px;
    background: #111111;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    padding: 1rem;
    z-index: 25;
}

.b4manga-share__panel[hidden] {
    display: none;
}

.b4manga-share__inline {
    display: none;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.b4manga-share__label--inline {
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.b4manga-share__list--inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.b4manga-share__inline .b4manga-share__item {
    flex: 0 0 auto;
    min-width: 0;
}

.b4manga-share__inline .b4manga-share__link {
    width: auto;
    padding: 0.5rem;
    justify-content: center;
}

.b4manga-share__inline .b4manga-share__link i {
    font-size: 1.15rem;
}

.b4manga-share__inline .b4manga-share__text {
    display: none;
}

.b4manga-share__panel-inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.b4manga-share__panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.b4manga-share__label {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.b4manga-share__close {
    background: transparent;
    border: 0;
    color: #ffffff;
    padding: 0.25rem;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.b4manga-share__close:hover,
.b4manga-share__close:focus {
    color: #EC2024;
}

.b4manga-share__close:focus-visible {
    outline: 2px solid #EC2024;
    outline-offset: 2px;
}

.b4manga-share__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.b4manga-share__item {
    flex: 1 1 48%;
    min-width: 95px;
}

.b4manga-share__link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.b4manga-share__text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.b4manga-share__link i {
    font-size: 1rem;
}

.b4manga-share__link:hover,
.b4manga-share__link:focus {
    background: #EC2024;
    color: #ffffff;
    transform: translateY(-1px);
}

.b4manga-share__link--copy {
    cursor: pointer;
}

.b4manga-share__notice {
    font-size: 0.75rem;
    min-height: 1rem;
    color: #EC2024;
    display: block;
    margin-top: 0.5rem;
    text-align: right;
}

.b4manga-share.is-open .b4manga-share__trigger {
    background: #EC2024;
}

@media (max-width: 800px) {
    .b4manga-share {
        width: 100%;
        justify-content: flex-start;
    }

    .serie-hero-header .b4manga-share {
        justify-content: flex-start;
    }

    .b4manga-share__trigger,
    .b4manga-share__panel {
        display: none !important;
    }

    .b4manga-share__inline {
        display: flex;
        flex-wrap: wrap;
    }

    .b4manga-share__notice {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .b4manga-share {
        width: 100%;
        justify-content: flex-start;
    }

    .b4manga-share__panel {
        left: 0;
        right: 0;
        top: auto;
        bottom: calc(100% + 0.5rem);
    }
}

@media (max-width: 768px) {
    .serie-hero-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .serie-hero-header .b4manga-share {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .b4manga-share__trigger,
    .b4manga-share__link {
        transition: none;
    }
}

.serie-genre-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

.serie-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.serie-genres li a {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.serie-genres li a:hover,
.serie-genres li a:focus-visible {
    background: #EC2024 !important;
    border-color: #EC2024;
    color: #ffffff !important;
}

.serie-volumes-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: clamp(3rem, 5vw, 5rem) clamp(2.5rem, 5vw, 5rem);
    background: #ffffff;
}

.serie-volume-body {
    display: grid;
    gap: 1.4rem;
}

.serie-volume-title .serie-volume-header-label {
    display: inline-flex;
    color: #1a1a1a !important;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
}

.serie-volume-header-label::before {
    content: '';
    width: 36px;
    height: 1px;
    background: currentColor;
}

.serie-volume-list {
    display: grid;
    margin-top: 1.5rem;
    gap: 1.25rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 600px) {
    .serie-volume-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .serie-volume-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .serie-volume-list {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.serie-volume-footer {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.serie-volume-button {
    display: inline-flex;
    background: #1e1e1e !important;
    color: #ffffff !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 1px solid transparent;
}

.serie-volume-button:hover {
    background: #EC2024 !important;
    color: #ffffff !important;
}

.serie-shop-section,
.serie-comments-section {
    padding: clamp(3rem, 5vw, 5.5rem) clamp(2.5rem, 5vw, 5rem);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, #181818, #111111);
}

.serie-section-heading {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.serie-section-heading h2 {
    margin: 0;
    font-size: clamp(1.85rem, 3vw, 2.4rem);
}

.serie-shop-button {
    display: inline-flex;
    background: #1e1e1e !important;
    color: #ffffff !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 1px solid transparent;
}

.serie-shop-button:hover {
    background: #EC2024 !important;
    color: #ffffff !important;
}

.serie-news-section {
    display: grid;
    padding: clamp(3rem, 5vw, 5.5rem) clamp(2.5rem, 5vw, 5rem);
    border-top: 1px solid #ffffff;
    background: #ffffff;
}

.serie-news-section-heading {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.serie-news-section-heading h2 {
    margin: 0;
    font-size: clamp(1.85rem, 3vw, 2.4rem);
}

.serie-news-grid {
    display: grid;
    --news-gap: var(--spacing-lg, 1.5rem);
    gap: var(--news-gap);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Cards inherit their own layout styles */

@media (min-width: 600px) {
    .serie-news-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        --news-gap: var(--spacing-md, 1rem);
    }
}
@media (min-width: 768px) {
    .serie-news-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        --news-gap: var(--spacing-lg, 1.5rem);
    }
}
@media (min-width: 1024px) {
    .serie-news-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.serie-news-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #2f2f2f;
}

.serie-news-label::before {
    content: '';
    width: 36px;
    height: 1px;
    background: currentColor;
}

.serie-news-label--accent {
    color: #2f2f2f !important;
}

.serie-news-section-heading h2 {
    color: #2f2f2f !important;
}


.serie-news-button {
    display: inline-flex;
    background: #1e1e1e !important;
    color: #ffffff !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 1px solid transparent;
}

.serie-news-button:hover{
    background: #EC2024 !important;
    color: #ffffff !important;
}

.serie-section-footer {
    margin-top: 2.5rem;
    text-align: center;
}

.serie-rating-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 9999;
    transition: opacity 0.25s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.serie-rating-overlay {
    position: absolute;
    inset: 0;
}

.serie-rating-dialog {
    position: relative;
    background: #121212;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: clamp(2rem, 4vw, 3rem);
    width: min(640px, 90vw);
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.serie-rating-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.serie-rating-modal[aria-hidden="false"] .serie-rating-dialog {
    transform: translateY(0);
}

.serie-rating-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.35rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: var(--serie-transition);
}

.serie-rating-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.serie-rating-title {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    color: #ffffff;
}

.serie-rating-content {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.65;
}

.serie-rating-content h1,
.serie-rating-content h2,
.serie-rating-content h3,
.serie-rating-content h4,
.serie-rating-content h5,
.serie-rating-content h6 {
    color: #ffffff;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.serie-rating-content h1:first-child,
.serie-rating-content h2:first-child,
.serie-rating-content h3:first-child,
.serie-rating-content h4:first-child,
.serie-rating-content h5:first-child,
.serie-rating-content h6:first-child {
    margin-top: 0;
}

.serie-rating-content p {
    margin-bottom: 1.25em;
}

.serie-rating-content p:last-child {
    margin-bottom: 0;
}

.serie-rating-content ul,
.serie-rating-content ol {
    margin-bottom: 1.25em;
    padding-left: 1.5em;
}

.serie-rating-content li {
    margin-bottom: 0.5em;
}

.serie-rating-content strong {
    color: #ffffff;
    font-weight: 600;
}

.serie-rating-cta {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.serie-rating-cta .serie-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: all 0.2s ease;
}

.serie-rating-cta .serie-button--outline {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.serie-rating-cta .serie-button--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}


@media (max-width: 1024px) {
    .serie-hero {
        grid-template-columns: 1fr;
        padding: clamp(2.5rem, 6vw, 4rem);
        margin-top: 6rem;
    }

    .serie-hero-media {
        order: 2;
    }

    .serie-hero-content {
        order: 1;
    }

    .serie-volume-item {
        grid-template-columns: 90px 1fr;
    }
    .serie-hero-image {
        display: none;
    }
}

@media (max-width: 768px) {
    .serie-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .serie-button {
        width: 100%;
    }
    
    .serie-meta-row {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    
    .serie-social-follow {
        align-items: center;
    }
    
    .serie-countdown {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
    
    .serie-countdown-timer {
        justify-content: center;
    }
    
    .serie-next-release {
        text-align: center;
    }

    .serie-volumes-section,
    .serie-shop-section,
    .serie-news-section,
    .serie-comments-section {
        padding-left: clamp(1.5rem, 6vw, 2rem);
        padding-right: clamp(1.5rem, 6vw, 2rem);
    }

    .serie-social-list {
        flex-wrap: wrap;
    }
}

@media (max-width: 520px) {
    .serie-volume-item {
        grid-template-columns: 1fr;
    }

    .serie-volume-thumb {
        justify-self: start;
        width: 160px;
    }
}

/* ==========================================================================
   Title 
   ========================================================================== */

/* Title Cards Styles - Reusable component */
.book-title-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    max-width: 400px;
}

.book-title-card:hover {
    transform: translateY(-4px);
    border-color: #EC2024;
    border-width: 2px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);

}

.book-title-card-cover-wrap {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    flex-shrink: 0;
}

/* Title Card Ribbon */
.book-title-card-ribbon {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(26, 26, 26, 0.85);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.book-title-card-ribbon__label--mobile {
    display: none;
}

.book-title-card-ribbon--manga {
    background: #ec2024;
}

.book-title-card-ribbon--one_shot {
    background: #0066cc;
}

.book-title-card-ribbon--light_novel {
    background: #2e8b57;
}

.book-title-card-ribbon--short_story {
    background: #d35400;
}

@media (max-width: 768px) {
    .book-title-card-ribbon {
        top: 8px;
        left: 8px;
        padding: 0.25rem 0.45rem;
        font-size: 0.6rem;
        border-radius: 12px;
    }

    .book-title-card-ribbon__label--desktop {
        display: none;
    }

    .book-title-card-ribbon__label--mobile {
        display: inline;
    }
}

.book-title-card-cover-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 12px 12px 0 0;
    object-fit: cover;
    display: block;
}

.book-title-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 2.5rem;
}

.series-card {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #111;
    padding: clamp(16px, 6vw, 32px);
    width: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.series-card__link {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.series-card:hover,
.series-card:focus-within {
    transform: translateY(-4px);
    background: #1a1a1a;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.series-card__image {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

.series-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .series-card {
        padding: clamp(14px, 8vw, 24px);
    }
}

@media (max-width: 540px) {
    .series-card {
        padding: clamp(12px, 10vw, 20px);
    }
}

.series-posts-page {
    background: var(--color-bg-secondary, #f5f5f5);
}

.series-posts {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 72px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.series-posts__header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.series-posts__title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.series-posts__intro > *:last-child {
    margin-bottom: 0;
}

.front-titles-row--account.front-titles-row--account-series {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
}

.series-card-myaccount {
    padding: clamp(20px, 6vw, 36px);
    border-radius: 16px;
}

@media (max-width: 768px) {
    .front-titles-row--account.front-titles-row--account-series {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
    }

    .series-card-myaccount {
        padding: clamp(16px, 10vw, 28px);
    }
}

.series-posts__grid {
    margin-top: 8px;
}

.series-posts__empty {
    margin: 32px auto 0;
    max-width: 540px;
    text-align: center;
    color: #6a6a6a;
}

@media (max-width: 768px) {
    .series-posts {
        padding: 32px 16px 48px;
    }

    .series-posts__title {
        font-size: 1.5rem;
    }
}

.book-title-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.book-title-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.5rem 0.25rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px !important;
    transition: all 0.2s ease;
    border: none;
    border-radius:  0 0 12px 0px;
    background: none;
}

.book-title-card-btn i {
    font-size: 0.8rem;
    color: #ffffff !important;
}

.book-title-card-btn--preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.5rem 0.25rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.7rem;
    transition: all 0.2s ease;
    border: none;
    border-radius:  0 0 0px 12px;
    background: none;
}

.book-title-card-btn--preview {
    color: #ffffff !important;
    background: #1a1a1a !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.book-title-card-btn--preview:hover {
    color: #ffffff !important;
    background: #EC2024!important;
}

.book-title-card-btn--purchase,
.book-title-card-btn--read {
    color: #ffffff !important;
    background: #1a1a1a !important;
}

.book-title-card-btn--purchase:hover,
.book-title-card-btn--read:hover {
    color: #ffffff !important;
    background: #EC2024!important;
}

/* Grid layouts for title cards */
.book-title-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    max-width: 100%;
    align-items: stretch;
}

@media (max-width: 800px) {
    .book-title-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
    }
    .book-title-card-btn {
        gap: 0;
        padding: 0.5rem;
    }

    .book-title-card-btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        border: 0;
        white-space: nowrap;
    }
}

@media (max-width: 900px) {
    .book-title-card-btn,
    .book-title-card-btn--preview,
    .book-title-card-btn--purchase,
    .book-title-card-btn--read {
        font-size: 0.8rem !important;
        padding: 0.45rem 0.35rem;
    }
}

@media (max-width: 600px) {
    .book-title-card {
        max-width: none;
    }

    .book-title-card-btn,
    .book-title-card-btn--preview,
    .book-title-card-btn--purchase,
    .book-title-card-btn--read {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.3rem;
    }
}

/* My Account Title Cards Styles - Reusable component */
.myaccount-book-title-card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF !important;
    overflow: hidden;
    max-width: 200px !important;
}

.myaccount-book-title-card-cover-link {
    display: block;
    height: 100%;
}

.myaccount-book-title-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);

}

.myaccount-book-title-card-cover-wrap {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    flex-shrink: 0;
}

.myaccount-book-title-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(17, 17, 17, 0.3));
    border-radius: 12px 12px 0 0;
}

.myaccount-book-title-card-cover-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 12px 12px 0 0;
    object-fit: cover;
    display: block;
}

.myaccount-book-title-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.myaccount-book-title-card-body {
    display: none;
}

.myaccount-book-title-card-btn--continue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.5rem 0.25rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.7rem;
    transition: all 0.2s ease;
    border: none;
    border-radius:  0 0 12px 12px;
    background: none;
}

.myaccount-book-title-card-btn--continue{
    color: #ffffff !important;
    background: #1a1a1a !important;
}

.myaccount-book-title-card-btn--continue:hover,
.myaccount-book-title-card-btn--continue:hover {
    color: #ffffff !important;
    background: #EC2024!important;
}

.myaccount-book-title-card-btn--disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.myaccount-book-title-card--library {
    background: #0f0f0f;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    max-width: none;
    min-height: 100%;
}

.myaccount-book-title-card--library .myaccount-book-title-card-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 800px) {
    .myaccount-book-title-card-btn {
        gap: 0;
        padding: 0.5rem;
    }

    .book-title-card-btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        border: 0;
        white-space: nowrap;
    }
}

@media (max-width: 900px) {
    .myaccount-book-title-card-btn--continue{
        font-size: 0.8rem !important;
        padding: 0.45rem 0.35rem;
    }
}

@media (max-width: 600px) {
    .myaccount-book-title-card {
        max-width: none;
    }

    .bmyaccount-ook-title-card-btn,
    .myaccount-book-title-card-btn--continue{
        font-size: 0.75rem !important;
        padding: 0.4rem 0.3rem;
    }
}

.myaccount-main-container {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}


/* ==========================================================================
   Header
   ========================================================================== */

.site-header, .site-header-woo {
    background: var(--header-bg-color);
    border-bottom: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: var(--header-z-index);
    width: 100%;
    margin-bottom: 0;
    padding: 0;
}

/* Offset sticky header for WP admin bar */
.admin-bar .site-header, .admin-bar .site-header-woo {
    top: 32px;
}
@media (max-width: 782px) {
    .admin-bar .site-header, .admin-bar .site-header-woo {
        top: 46px;
    }
}

.header-content {
    margin-top: 0 !important;
    border-top: none !important;
    box-shadow: none !important;
    background: none !important;
    display: flex;
    align-items: center;
    min-height: var(--header-height);
    width: 100%;
    padding: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Logo Section - Red Background */
.site-branding {
    background-color: var(--branding-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--branding-padding);
    min-height: var(--header-height);
    flex-shrink: 0;
    width: var(--branding-width);
}

.site-title {
    font-size: var(--font-size-h3);
    font-weight: var(--font-weight-bold);
    color: var(--branding-text-color);
    text-decoration: none;
    margin: 0;
    line-height: var(--line-height-tight);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    font-family: var(--font-family-heading);
}

.site-title a {
    color: var(--branding-text-color);
    text-decoration: none;
    transition: opacity var(--transition-normal);
}

.site-title a:hover {
    opacity: 0.9;
}

.site-description {
    display: none;
}

/* Ensure WooCommerce's generic image rules don't override header logo sizing */
.site-header-woo .custom-logo-link,
.site-header-woo .custom-logo-link img,
.site-header-woo .custom-logo {
    width: var(--branding-logo-width) !important;
    height: var(--branding-logo-height) !important;
    max-width: none !important;
}

/* Custom Logo in Red Section */
.custom-logo-link {
    display: inline-block;
    width: var(--branding-logo-width);
    height: var(--branding-logo-height);
    line-height: 0; /* Remove line-height issues */
}

.custom-logo {
    width: var(--branding-logo-width);
    height: var(--branding-logo-height);
    transition: opacity var(--transition-normal);
    filter: brightness(0) invert(1);
    object-fit: contain; /* Prevent cropping, maintain aspect ratio */
    display: block; /* Ensure proper block display */
}

.custom-logo:hover {
    opacity: 0.9;
}

/* Navigation Section - White Background */
.main-navigation {
    margin-top: 0;
    border-top: none;
    box-shadow: none;
    background-color: var(--nav-bg-color);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: var(--header-height);
    padding: 0;
    font-family: var(--font-family-menu);
}

.main-navigation ul {
    font-family: var(--font-family-menu);
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-navigation li {
    font-family: var(--font-family-menu);
    margin: 0;
}

.main-navigation a {
    font-family: var(--font-family-menu) !important;
}
.main-navigation > ul > li > a {
    font-family: var(--font-family-menu) !important;
    color: var(--nav-text-color);
    text-decoration: none;
    font-weight: var(--nav-font-weight);
    font-size: var(--nav-font-size);
    padding: 1.2rem 0.7rem;
    border-radius: 4px;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: var(--nav-letter-spacing);
}

.main-navigation > ul > li > a:hover,
.main-navigation > ul > li > a:focus,
.main-navigation a:hover,
.main-navigation a:focus {
    font-family: var(--font-family-menu) !important;
    color: #EC2024 !important;
    background-color: rgba(236, 32, 36, 0.05) !important;
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation > ul > li.current-menu-item > a,
.main-navigation > ul > li.current_page_item > a {
    font-family: var(--font-family-menu) !important;
    color: #EC2024 !important;
    font-weight: var(--font-weight-semibold) !important;
}

/* Desktop Mega Menu Styles - HIDDEN BY DEFAULT */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 99999;
    background: #ffffff;
    border: none;
    border-top: 3px solid #EC2024;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 1rem 0;
    margin: 0;
    display: none; /* Force hidden by default */
}

/* Mega Menu specific styling - full width - HIDDEN BY DEFAULT */
.main-navigation ul ul.mega-menu {
    width: 100vw;
    padding: 0;
    transform: translateY(-20px);
    transition: all 0.4s ease;
    transition-delay: 0.1s;
    display: none; /* Force hidden by default */
}

/* ONLY show dropdown for menu items that have actual children AND hover */
.main-navigation li.menu-item-has-children:hover > ul {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}

/* Mega Menu Container */
.main-navigation ul ul .mega-menu-container,
.main-navigation .mega-menu .mega-menu-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    padding: 0;
    max-width: 1200px;
    margin: 0;
    position: relative;
    min-height: 400px;
}

/* Mega Menu Items Column (Left Side) */
.main-navigation ul ul .mega-menu-items {
    background: #f8f9fa;
    border-right: 1px solid #e5e5e5;
    padding: 25px;
}

.main-navigation ul ul .mega-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
    width: 100%;
}

.main-navigation ul ul .mega-menu-list li {
    margin: 0;
    display: block;
    width: 100%;
}

.main-navigation ul ul .mega-menu-list a {
    display: block;
    padding: 16px 25px;
    color: #333333;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    border-bottom: 1px solid var(--color-border-light, #f5f5f5);
    transition: all 0.2s ease;
    position: relative;
    background: transparent;
    border-radius: 0;
    white-space: normal;
}

.main-navigation ul ul .mega-menu-list a:hover,
.main-navigation ul ul .mega-menu-list a:focus {
    background-color: #dedede !important;
    color: #333333 !important;
    padding-left: 35px;
    transform: none;
    border-color: var(--color-border-light, #f5f5f5);
}

.main-navigation ul ul .mega-menu-list li:hover {
    background-color: #cccccc !important;
}

.main-navigation ul ul .mega-menu-list li {
    background-color: transparent !important;
}

.main-navigation ul ul .mega-menu-list a:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--color-primary, #EC2024);
}

/* Mega Menu Content Column (Right Side) */
.main-navigation ul ul .mega-menu-content {
    background: #ffffff;
    padding: 25px;
    position: relative;
}

/* Prevent navigation hover styles from affecting mega menu content */
.mega-menu-content a:hover,
.mega-menu-content a:focus {
    background-color: transparent !important;
}

/* Horizontal layout for comma-separated shortcodes */
.mega-menu-horizontal {
    display: flex;
    gap: 2rem;
    width: 100%;
}

.mega-menu-horizontal-item {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .mega-menu-horizontal {
        flex-direction: column;
        gap: 1.5rem;
    }
}

.main-navigation ul ul .mega-menu-featured-content {
    width: 100%;
    height: 100%;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-navigation ul ul .mega-content-placeholder {
    text-align: center;
    color: #666;
    font-style: italic;
}

.main-navigation ul ul li {
    width: 100%;
    margin: 0;
    border-bottom: none;
}

/* Remove third level positioning since we're using mega menu */
.main-navigation ul ul ul {
    position: static;
    background: none;
    box-shadow: none;
    border: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin: 0;
    padding: 0;
}

/* Remove featured section completely */
.main-navigation ul ul .mega-menu-featured {
    display: none;
}

/* Dropdown indicator for mega menu parents */
.main-navigation .menu-item-has-children > a::after {
    content: '\f107'; /* FontAwesome down arrow */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.main-navigation .menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Remove sub-menu arrows for mega menu */
.main-navigation ul ul .menu-item-has-children > a::after {
    display: none;
}

/* Fallback for regular dropdowns (if not converted to mega menu) */
.main-navigation ul ul:not(.mega-menu) {
    width: 250px;
    left: 0;
    padding: 10px 0;
}

.main-navigation ul ul:not(.mega-menu) li {
    width: 100%;
    margin: 0;
}

.main-navigation ul ul:not(.mega-menu) a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    color: var(--color-text-primary, #333);
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
}

.main-navigation ul ul:not(.mega-menu) a:hover {
    background-color: #f8f9fa;
    color: #EC2024;
    padding-left: 30px;
}

/* Responsive Mega Menu */
@media (max-width: 1200px) {
    .main-navigation ul ul .mega-menu-container,
    .main-navigation .mega-menu .mega-menu-container {
        grid-template-columns: 280px 1fr;
        max-width: 1000px;
        min-height: 350px;
    }
}

@media (max-width: 992px) {
    .main-navigation ul ul .mega-menu-container,
    .main-navigation .mega-menu .mega-menu-container {
        grid-template-columns: 250px 1fr;
        max-width: 800px;
        min-height: 300px;
    }
}

@media (min-width: 769px) and (max-width: 900px) {
    .main-navigation ul ul .mega-menu-container,
    .main-navigation .mega-menu .mega-menu-container {
        grid-template-columns: 1fr;
        max-width: 600px;
        min-height: auto;
    }
    
    .main-navigation ul ul .mega-menu-content {
        display: none; /* Hide content area on smallest desktop screens */
    }
}

/* Header Utilities Section */
.header-utilities {
    font-family: var(--font-family-menu) !important;
    font-weight: var(--font-weight-menu) !important;
    font-size: var(--font-size-menu) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-right: var(--container-padding);
    flex-shrink: 0;
}

.header-utility-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    text-decoration: none;
    color: var(--nav-text-color);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-normal);
    position: relative;
}

.header-utility-item:hover {
    color: #EC2024;
    background-color: rgba(236, 32, 36, 0.05);
}

/* Search button specific styling */
.header-utility-item.search-toggle {
    background: none !important;
    background-color: transparent !important;
    padding: var(--spacing-xs);
}

.header-utility-item.search-toggle:hover {
    background: none !important;
    background-color: transparent !important;
}

.header-utility-item.search-toggle .utility-icon {
    color: #000000;
    transition: color var(--transition-normal);
}

.header-utility-item.search-toggle:hover .utility-icon {
    color: #EC2024;
}

.utility-icon {
    font-size: 1.1em;
    line-height: 1;
    width: 16px;
    text-align: center;
}

.utility-text {
    font-size: var(--font-size-small);
    white-space: nowrap;
}

.cart-count {
    background-color: var(--color-danger);
    color: #EC2024;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    position: absolute;
    top: -6px;
    right: 65px;
    min-width: 18px;
}

.b4-cart-trigger {
    display: inline-flex;
    position: relative;
    align-items: center;
}

.b4-cart-trigger .cart-link,
.b4-cart-trigger .mobile-cart-link {
    position: relative;
}

.b4-cart-trigger .cart-amount {
    margin-left: 0.35rem;
    font-weight: var(--font-weight-bold);
    white-space: nowrap;
}

.b4-cart-trigger:not(.has-items) .cart-count,
.b4-cart-trigger:not(.has-items) [data-b4-cart-count] {
    display: none;
}

.b4-cart-trigger--mobile .mobile-cart-link {
    padding: var(--spacing-xs);
}

body.b4-cart-open {
    overflow: hidden;
}

.b4-cart-drawer {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
    visibility: hidden;
    z-index: 10000;
}

.b4-cart-drawer__overlay {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.b4-cart-drawer__panel {
    width: min(400px, 100%);
    max-width: 100%;
    background: #ffffff;
    height: 100%;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
}

.b4-cart-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-border-light, #e6e6e6);
}

.b4-cart-drawer__title {
    margin: 0;
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: var(--font-weight-bold);
}

.b4-cart-drawer__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #111827;
}

.b4-cart-drawer__close:focus {
    outline: 2px solid var(--color-danger);
    outline-offset: 2px;
}

.b4-cart-drawer__count {
    padding: 0 var(--spacing-md);
    margin: var(--spacing-sm) 0 0;
    font-size: 0.9rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.b4-cart-drawer__content {
    flex: 1;
    padding: var(--spacing-md);
    overflow-y: auto;
}

.b4-cart-drawer__content .woocommerce-mini-cart {
    list-style: none;
    margin: 0;
    padding: 0;
}

.b4-cart-drawer__content .woocommerce-mini-cart-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: var(--spacing-sm);
    align-items: start;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border-light, #e6e6e6);
    position: relative;
    padding-right: 1.75rem;
}

.b4-cart-drawer__content .woocommerce-mini-cart-item:last-child {
    border-bottom: none;
}

.b4-cart-drawer__content .woocommerce-mini-cart-item img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
}

.b4-cart-drawer__content .woocommerce-mini-cart-item .woocommerce-mini-cart-item__image {
    grid-row: span 2;
}

.b4-cart-drawer__content .woocommerce-mini-cart-item > a:not(.remove) {
    grid-column: 2;
    font-weight: var(--font-weight-medium, 500);
    color: #111827;
    text-decoration: none;
}

.b4-cart-drawer__content .woocommerce-mini-cart-item > a:not(.remove):hover {
    color: var(--color-danger);
}

.b4-cart-drawer__content .woocommerce-mini-cart-item .quantity,
.b4-cart-drawer__content .woocommerce-mini-cart-item span.quantity {
    grid-column: 2;
    font-size: 0.9rem;
    color: #4b5563;
}

.b4-cart-drawer__content .woocommerce-mini-cart-item .remove {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 1.1rem;
    color: #e6e6e6 !important;
    background: #000000;
}

.b4-cart-drawer__content .woocommerce-mini-cart-item .remove:hover {
    color: #ffffff;
    background: #EC2024;
}

.b4-cart-drawer__content .woocommerce-mini-cart__total {
    margin: var(--spacing-md) 0 0;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border-light, #e6e6e6);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
}

.b4-cart-drawer__content .woocommerce-mini-cart__buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.b4-cart-drawer__content .woocommerce-mini-cart__buttons .button {
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.05em;
}

.b4-cart-drawer__content .woocommerce-mini-cart__buttons .checkout {
    background-color: var(--color-danger);
    color: #ffffff;
}

.b4-cart-drawer__content .woocommerce-mini-cart__buttons .checkout:hover {
    background-color: #EC2024;
}

.b4-cart-drawer__content .woocommerce-mini-cart__empty-message {
    text-align: center;
    margin: 2rem 0;
    color: #6b7280;
    font-weight: var(--font-weight-medium, 500);
}

.b4-cart-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}

.b4-cart-drawer.is-open .b4-cart-drawer__overlay {
    opacity: 1;
}

.b4-cart-drawer.is-open .b4-cart-drawer__panel {
    transform: translateX(0);
}

@media (max-width: 767px) {
    .b4-cart-drawer__panel {
        width: 100%;
    }

    .b4-cart-drawer__header {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .b4-cart-drawer__content {
        padding: var(--spacing-md);
    }
}

/* ==========================================================================
   CONTACT PAGE
   ========================================================================== */

.contact-page {
    background: #ededed;
    color: var(--color-text-primary, #0a0a0a);
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.contact-page__shell {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.75rem;
    box-sizing: border-box;
}

.contact-page__header {
    margin-bottom: clamp(2rem, 4vw, 3rem);
    text-align: left;
}

.contact-page__title {
    font-size: clamp(2.25rem, 4vw, 3rem);
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.contact-page__lead {
    margin: 0;
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    color: #4b5563;
}

.contact-page__grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: clamp(1.75rem, 3vw, 2.5rem);
    align-items: start;
}

.contact-page__form {
    background: #f8f8f8;
    border-radius: 16px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    padding: clamp(1.75rem, 3vw, 2.5rem);
}

.contact-page__form-inner > *:last-child {
    margin-bottom: 0;
}

.contact-page__cta {
    border-radius: 24px;
    padding: clamp(1.75rem, 3vw, 2.5rem);
    color: #f9fafb;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.24);
}

.contact-cta__inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-cta__image {
    text-align: center;
}

.contact-cta__img {
    width: 100%;
    max-width: 280px;
    max-height: 140px;
    margin: 0 auto;
    display: block;
}

.contact-cta__content {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    flex: 1;
}

.contact-cta__text {
    font-size: 1.05rem;
    line-height: 1.6;
}

.contact-cta__text p {
    margin: 0 0 1rem;
}

.contact-cta__text p:last-child {
    margin-bottom: 0;
}

.contact-cta__actions {
    margin-top: auto;
}

.contact-cta__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    background: #f3f4f6;
    color: #111827;
    text-transform: uppercase;
    font-weight: var(--font-weight-bold, 700);
    border-radius: 999px;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-cta__button:hover,
.contact-cta__button:focus {
    transform: translateY(-2px);
    background: #EC2024;
    color: #ffffff !important;
}

.contact-cta__button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.75);
    outline-offset: 3px;
}

.contact-page__content {
    margin-top: clamp(3rem, 6vw, 4rem);
    background: #ffffff;
    border-radius: 16px;
    padding: clamp(2rem, 4vw, 3rem);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.contact-page__content > *:first-child {
    margin-top: 0;
}

.contact-page__content > *:last-child {
    margin-bottom: 0;
}

@media (max-width: 1023px) {
    .contact-page__grid {
        grid-template-columns: 1fr;
    }

    .contact-page__cta {
        order: -1;
    }
}

@media (max-width: 639px) {
    .contact-page__shell {
        padding: 0 1.25rem;
    }

    .contact-page__form,
    .contact-page__cta,
    .contact-page__content {
        border-radius: 18px;
        padding: 1.5rem;
    }

    .contact-page__title {
        letter-spacing: 0.06em;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Exit Portal Section - Black Background */
.header-exit-portal {
    background-color: var(--exit-portal-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    min-height: var(--header-height);
    flex-shrink: 0;
    width: var(--exit-portal-width);
}

.exit-portal-link {
    color: var(--exit-portal-text-color);
    text-decoration: none;
    font-weight: var(--nav-font-weight);
    font-size: var(--exit-portal-font-size);
    text-transform: uppercase;
    letter-spacing: var(--nav-letter-spacing);
    transition: all var(--transition-normal);
    padding: var(--spacing-xs) 12px;
    border-radius: 4px;
}

.exit-portal-link:hover {
    background-color: var(--exit-portal-bg-color-hover);
    color: var(--exit-portal-text-color-hover);
    transform: translateY(-1px);
}

/* ==========================================================================
   SEARCH OVERLAY
   ========================================================================== */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    background-color: var(--color-bg-primary);
    border-radius: 16px;
    padding: var(--spacing-xl);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(30px);
    transition: transform 0.3s ease-in-out;
}

.search-overlay.active .search-overlay-content {
    transform: translateY(0);
}

.search-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    color: var(--color-text-secondary);
    font-size: 20px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.search-close:hover {
    background-color: var(--color-bg-secondary);
    color: var(--color-text-primary);
    transform: rotate(90deg);
}

.search-container {
    padding-right: var(--spacing-lg);
}

.search-title {
    margin: 0 0 var(--spacing-md) 0;
    font-size: var(--font-size-h3);
    color: var(--color-text-primary);
    text-align: center;
}

.search-form {
    margin-bottom: var(--spacing-md);
}

.search-input-group {
    position: relative;
    display: flex;
    border: 2px solid #2F2F2F;
    border-radius: 16px;
    overflow: hidden;
    transition: none;
}

.search-input-group:focus-within {
    border-color: #2F2F2F;
    box-shadow: none;
}

.search-field {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-md);
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
    font-family: var(--font-family-primary);
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.search-field:focus,
.search-field:focus-visible,
.search-field:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.search-field::placeholder {
    color: var(--color-text-secondary);
}

.search-submit {
    background-color: var(--button-primary-bg);      /* Black background */
    color: var(--button-primary-text);               /* White text */
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    cursor: pointer;
    font-size: var(--font-size-base);
    transition: background-color var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    border-radius: var(--button-border-radius);      /* 16px border radius */
}

.search-submit:hover {
    background-color: var(--button-primary-bg-hover); /* Red hover background */
    color: var(--button-primary-text-hover);          /* White text on hover */
}

.search-suggestions {
    text-align: center;
}

.search-hint {
    margin: 0;
    color: #FFFFFF;
    font-size: var(--font-size-small);
    font-style: italic;
}

/* ==========================================================================
   SEARCH RESULTS PAGE
   ========================================================================== */

.search-header {
    margin-bottom: var(--spacing-xl);
    text-align: center;
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--color-border-light);
}

.search-header .page-title {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
}

.search-query {
    color: var(--color-primary);
    font-style: italic;
}

.search-meta {
    color: var(--color-text-secondary);
    font-size: var(--font-size-small);
    margin-bottom: var(--spacing-md);
}

.search-refine {
    max-width: 500px;
    margin: 0 auto;
}

.search-refine-form .search-input-group {
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-results {
    margin-bottom: var(--spacing-xl);
}

.search-results .archive-posts-grid {
    display: flex;
    justify-content: center;
}

.search-results .b4-post-card-grid {
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.search-result-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border-light);
    border-radius: 16px;
    transition: all var(--transition-normal);
}

.search-result-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.search-result-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
}

.search-result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-content .entry-title {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: var(--font-size-h4);
    line-height: 1.3;
}

.search-result-content .entry-title a {
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.search-result-content .entry-title a:hover {
    color: var(--color-primary);
}

.search-result-content .entry-meta {
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-small);
    color: var(--color-text-secondary);
}

.search-result-content .entry-meta a {
    color: var(--color-text-secondary);
    text-decoration: none;
}

.search-result-content .entry-meta a:hover {
    color: var(--color-primary);
}

.meta-separator {
    margin: 0 var(--spacing-xs);
}

.post-type {
    background-color: var(--color-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: var(--font-weight-bold);
}

.search-result-content .entry-summary {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.search-result-content .entry-summary mark {
    background-color: var(--color-accent);
    color: var(--color-text-primary);
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: var(--font-weight-semibold);
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-primary);
    text-decoration: none;
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition-normal);
}

.read-more-link:hover {
    color: var(--color-primary-dark);
    gap: var(--spacing-sm);
}

.read-more-icon {
    font-size: 12px;
    transition: transform var(--transition-normal);
}

.read-more-link:hover .read-more-icon {
    transform: translateX(3px);
}

/* No Results Section */
.no-results {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.no-results .page-header {
    margin-bottom: var(--spacing-lg);
}

.search-form-container {
    max-width: 500px;
    margin: var(--spacing-lg) auto;
}

.search-suggestions {
    max-width: 400px;
    margin: var(--spacing-lg) auto 0;
    text-align: left;
}

.search-suggestions h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-suggestions li {
    padding: var(--spacing-xs) 0;
    color: var(--color-text-secondary);
    font-size: var(--font-size-small);
    position: relative;
    padding-left: var(--spacing-md);
}

.search-suggestions li::before {
    content: '•';
    color: var(--color-primary);
    position: absolute;
    left: 0;
    top: var(--spacing-xs);
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-result-item {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .search-result-thumbnail {
        width: 100%;
        height: 200px;
        align-self: center;
        max-width: 300px;
    }
    
    .search-refine,
    .search-form-container {
        max-width: 100%;
        padding: 0 var(--spacing-sm);
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    color: var(--nav-text-color);
    font-size: var(--font-size-base);
    font-family: var(--font-family-primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    color: var(--branding-text-color);
    position: absolute;
    right: var(--spacing-sm);
    top: 50%;
    transform: translateY(-50%);
    z-index: 101;
}

.mobile-menu-toggle:hover {
    opacity: 0.9;
}

/* ==========================================================================
   Content
   ========================================================================== */

/* Page Headers (full-width black background) */
.page .entry-header {
    position: relative;
    margin: 0 !important;
    border-radius: 0;
    box-shadow: none;
    padding: 0 !important;
    z-index: 1;
    top: 0;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

/* Single Post Headers (normal content area styling) */
.single .entry-header {
    position: relative;
    margin: 1.5rem 0 !important;
    border-radius: 0;
    box-shadow: none;
    padding: 0 !important;
    z-index: 1;
    width: auto;
    left: auto;
    right: auto;
}

.entry-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    background-color: var(--page-header-bg-color);
    z-index: 0;
}

.entry-header-inner {
    position: relative;
    z-index: 1;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--header-padding, 48px) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page .entry-content,
.single .entry-content {
    max-width: var(--single-content-width, 1280px) !important;
    border: none;
    border-radius: 0;
    padding: 1.5rem 1rem;
    margin-left: auto;
    margin-right: auto;
}

.entry-header {
    margin-top: 0 !important;
    border-top: none !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.entry-title {
    margin: 0 0 10px 0;
    font-size: var(--font-size-h1);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--page-title-color, var(--color-text-primary)) !important;
    padding: 0.5em 0;
    text-align: center;
}

.entry-title a {
    color: var(--color-text-primary);
}

.entry-title a:hover {
    color: var(--color-secondary);
}

.entry-meta {
    font-size: var(--font-size-small);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
    padding: 0;
}

.entry-content {
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-relaxed);
    color: var(--main-text-color);
    padding: 0;
}

.entry-content p {
    margin-bottom: var(--spacing-md);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
    font-family: var(--font-family-heading);
}

.entry-content h2 {
    font-size: var(--font-size-h2);
}

.entry-content h3 {
    font-size: var(--font-size-h3);
}

.entry-content h4 {
    font-size: var(--font-size-h4);
}

.entry-content ul,
.entry-content ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

.entry-content li {
    margin-bottom: var(--spacing-xs);
}

/* ==========================================================================
   Chapter Preview Section
   ========================================================================== */

.chapter-preview-section {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
    background: var(--color-background-light);
    border-radius: 8px;
    padding: var(--spacing-lg);
}

.preview-title {
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-primary);
    text-align: center;
}

.chapter-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.preview-panel {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.preview-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.chapter-preview-action {
    text-align: center;
    padding: var(--spacing-lg) 0;
    background: none;
    margin: 0 calc(var(--spacing-lg) * -1) calc(var(--spacing-lg) * -1);
    border-radius: 0 0 8px 8px;
}

.btn-read-chapter-full {
    display: inline-block;
    padding: 15px 60px;
    background: #000;
    color: white !important;
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-bold);
    text-decoration: none;
    border: none;
    border-radius: 999px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-read-chapter-full:hover {
    background: #EC2024;
    color: rgb(255, 255, 255) !important;
    transform: scale(1.05);
}

/* Light Novel Chapter Sections */
.light-novel-chapter-sections {
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.ln-section {
    background: var(--color-background-light);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
}

.ln-section-title {
    font-size: var(--font-size-h3);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
    color: var(--color-text-primary);
}

.ln-section-content {
    font-family: Georgia, serif;
    font-size: var(--font-size-body);
    line-height: 1.8;
    color: var(--color-text-primary);
}

.ln-previously {
    border-left-color: var(--color-secondary);
    background: #f8f9fa;
}

.ln-next {
    border-left-color: var(--color-accent);
    background: #f0f4f8;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .chapter-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .chapter-preview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .preview-title {
        font-size: var(--font-size-h3);
    }
    
    .btn-read-chapter-full {
        padding: 12px 40px;
        font-size: var(--font-size-body);
    }
    
    .chapter-preview-section {
        padding: var(--spacing-md);
    }
}

.entry-content li {
    margin-bottom: var(--spacing-xs);
}

.entry-footer {
    border-top: 1px solid var(--main-border-color);
    padding-top: var(--spacing-md);
    font-size: var(--font-size-small);
    color: var(--color-text-secondary);
}

/* ==========================================================================
   Posts Loop
   ========================================================================== */

.post {
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--main-border-color);
}

.post:last-child {
    border-bottom: none;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.widget {
    margin-bottom: var(--widget-spacing);
        /* background-color removed, now controlled by sidebar or other settings */
    color: var(--widget-text-color);
}

.widget-title {
    font-size: var(--font-size-h5);
    font-weight: var(--font-weight-semibold);
    color: var(--widget-title-color);
    margin-bottom: var(--spacing-md);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--widget-border-color);
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--widget-link-color);
}

.widget a:hover {
    color: var(--widget-link-color-hover);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    background: linear-gradient(135deg, var(--hero-bg-gradient-start) 0%, var(--hero-bg-gradient-end) 100%);
    color: var(--hero-text-color);
    padding: var(--hero-padding);
    text-align: center;
}

.hero-title {
    font-size: var(--hero-title-size);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-tight);
    color: var(--hero-text-color);
    font-family: var(--font-family-heading);
}

.submission-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    flex-wrap: wrap;
}

.submission-button {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--hero-text-color);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--card-border-radius);
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition-normal);
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-width: 200px;
    text-align: center;
}

.submission-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}


/* ==========================================================================
   Button Styles
   ========================================================================== */

.button,
input[type="submit"],
button[type="submit"] {
    display: inline-block;
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    padding: var(--button-padding);
    border-radius: var(--button-border-radius);
    font-weight: var(--button-font-weight);
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    font-family: var(--font-family-primary);
}

.button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    background-color: var(--button-bg-color-hover);
    transform: translateY(-1px);
    box-shadow: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: var(--footer-bg-color) !important;
    color: var(--footer-text-color);
    padding: var(--footer-padding);
    text-align: center;
}

/* Footer links override global link settings */
.site-footer a {
    color: var(--footer-link-color) !important;
    text-decoration: var(--link-decoration);
    transition: color var(--transition-normal);
}

.site-footer a:hover,
.site-footer a:focus {
    color: var(--footer-link-color-hover) !important;
    text-decoration: var(--link-decoration-hover);
}

.site-footer a:active {
    color: var(--footer-link-color-hover) !important;
}
 
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.footer-text {
    color: var(--footer-text-color);
    line-height: var(--line-height-base);
}

.footer-text a {
    color: var(--footer-link-color);
}

.footer-text a:hover {
    color: var(--footer-link-color-hover);
}

.exit-portal {
    color: var(--footer-link-color);
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid #555;
    border-radius: 4px;
    transition: all var(--transition-normal);
}

.exit-portal:hover {
    background-color: #555;
    border-color: #777;
    color: var(--footer-link-color-hover);
    transform: translateY(-1px);
}

/* ==========================================================================
   Archive Pages
   ========================================================================== */

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #171717;
}


.page-description {
    font-size: 1.1rem;
    color: #e0e0e0;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.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;
}

.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin: 0 auto 1rem auto;
}

/* Remove focus outlines for better visual design */
a:focus,
a:active,
button:focus,
button:active,
input:focus,
textarea:focus,
textarea:active,
select:focus,
select:active {
    outline: none;
    box-shadow: none;
}

/* Maintain accessibility with focus-visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid rgba(229, 62, 62, 0.6);
    outline-offset: 2px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
.site-content {
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    background-color: var(--main-bg-color);
    width: 100vw;
    max-width: 100vw;
}

.main-content {
    flex: 1;
    color: var(--main-text-color);
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background-color: var(--sidebar-bg-color);
    border-radius: 16px;
    border: none;
}

@media (max-width: 768px) {
    .site-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
        padding: var(--container-padding);
    }

    .site-branding {
        width: 100%;
        position: relative;
        margin-left: 0;
    }

    .main-navigation {
        width: 100%;
        order: 3;
        display: none;
        padding: var(--spacing-sm) var(--container-padding);
    }

    .main-navigation.active {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        background-color: var(--nav-bg-color);
        border-top: 1px solid var(--color-border-light);
    }

    .main-navigation a {
        display: block;
        padding: var(--spacing-sm) var(--spacing-lg);
        border-bottom: 1px solid var(--color-border-light);
        font-size: var(--font-size-small);
    }

    .header-exit-portal {
        width: 100%;
        order: 2;
    }

    .menu-toggle,
    .mobile-menu-toggle {
        display: block;
    }

    .header-utilities {
        order: 1;
        justify-content: center;
        padding: var(--spacing-sm) 0;
        border-bottom: 1px solid var(--color-border-light);
    }

    .header-utility-item {
        font-size: var(--font-size-small);
    }

    .utility-text {
        font-size: 12px;
    }

    .custom-logo {
        width: var(--branding-logo-width);
        height: var(--branding-logo-height);
    }

    .site-title {
        font-size: var(--font-size-h4);
    }

    .submission-buttons {
        flex-direction: column;
        align-items: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .entry-title {
        font-size: var(--font-size-h2);
    }

    .page-title {
        font-size: var(--font-size-h2);
    }

    .hero-title {
        font-size: var(--font-size-h2);
    }

    .section-title {
        font-size: var(--font-size-h2);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: var(--font-size-h3);
    }

    .section-title {
        font-size: var(--font-size-h3);
    }

    /* Page layout responsive */
    .page-layout {
        padding: 1.5rem 0;
    }

    .page-content-wrapper {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }
}
/* Terms of Use Modal Styles */
#b4manga-terms-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
}
.b4manga-terms-modal-box {
    background: #fff;
    max-width: 600px;
    margin: 5vh auto;
    padding: 2.5em 2em 2em 2em;
    position: relative;
    box-shadow: 0 4px 32px rgba(0,0,0,0.18);
    overflow: auto;
    max-height: 92vh;
    border-radius: 20px;
    border: 2px solid #222;
    font-family: inherit;
}
.b4manga-terms-close {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 2em;
    color: #888;
    background: none;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
    font-family: Arial, Helvetica, sans-serif;
}
.b4manga-terms-close:hover {
    color: #EC2024;
    background: #f2f2f2;
}
/* Modal links styling for auth modal */
.b4manga-modal-links {
    text-align: center;
    margin-top: 1em;
    font-size: 1em;
}
/* =============================
     B4 Manga Auth Modal Styles (Modern)
     ============================= */
.b4manga-auth-container {
    background: #fff;
    max-width: 430px;
    width: 100%;
    padding: 2.5em 2em 2em 2em;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 24px rgba(0,0,0,0.13);
    border-radius: 20px;
    border: 2px solid #222;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    min-height: 0;
    z-index: 99999;
}
.b4manga-auth-container .b4manga-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 2em;
    color: #888;
    background: none;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
    font-family: Arial, Helvetica, sans-serif;
}
.b4manga-auth-container .b4manga-modal-close:hover {
    color: #EC2024;
    background: #f2f2f2;
}
#b4manga-auth-modal h2, #b4manga-auth-modal h3, #b4manga-auth-modal h1 {
    text-align: center;
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 1.2em;
    margin-top: 0;
}
#b4manga-auth-modal .b4manga-modal-form > .b4manga-modal-links {
    margin-top: 2em;
}
#b4manga-auth-modal input[type="text"],
#b4manga-auth-modal input[type="email"],
#b4manga-auth-modal input[type="password"],
#b4manga-auth-modal input[type="number"],
#b4manga-auth-modal input[type="file"] {
    width: 100%;
    padding: 0.7em 1em;
    margin-bottom: 1.2em;
    border: 1.5px solid #bbb;
    border-radius: 8px;
    font-size: 1.08em;
    background: #fafbfc;
    transition: border 0.2s;
}
#b4manga-auth-modal input[type="text"]:focus,
#b4manga-auth-modal input[type="email"]:focus,
#b4manga-auth-modal input[type="password"]:focus,
#b4manga-auth-modal input[type="number"]:focus {
    border-color: #EC2024;
    outline: none;
}
#b4manga-auth-modal label {
    font-weight: 600;
    margin-bottom: 0.3em;
    display: block;
    font-size: 1em;
}
#b4manga-auth-modal input[type="submit"] {
    background: #EC2024;
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 0.8em 2.5em;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0.5em;
    box-shadow: 0 2px 8px rgba(229,62,62,0.10);
    transition: background 0.2s;
}
#b4manga-auth-modal input[type="submit"]:hover {
    background: #EC2024;
}
#b4manga-auth-modal a {
    color: #EC2024;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}
#b4manga-auth-modal a:hover {
    color: #EC2024;
}
.b4manga-modal-links {
    text-align: center;
    margin-top: 1.5em;
    font-size: 1em;
}
/* Social login row (if present) */
#b4manga-auth-modal .login-social-row {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin-bottom: 1.5em;
}
#b4manga-auth-modal .login-social-row a {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    transition: background 0.2s;
}
#b4manga-auth-modal .login-social-row a:hover {
    background: #EC2024;
    color: #fff;
}
#b4manga-auth-modal hr {
    border: none;
    border-top: 1.5px solid #eee;
    margin: 1.5em 0 1.2em 0;
}

/* B4 Manga Auth Divider */
.b4manga-auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5em 0;
    color: #888;
    font-size: 0.9em;
    font-weight: 500;
    text-transform: uppercase;
}
.b4manga-auth-divider::before,
.b4manga-auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1.5px solid #ddd;
}
.b4manga-auth-divider span {
    padding: 0 1em;
}

/* B4 Social Login - Center icons */
.b4manga-social-login-wrapper,
.b4-social-login-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* B4 Social Login in Modal - Force transparent background */
#b4manga-auth-modal .b4manga-social-login-wrapper,
#b4manga-auth-modal .b4-social-login-buttons,
#b4manga-auth-modal .b4-social-login-providers {
    background: transparent !important;
}

#b4manga-auth-modal .b4manga-social-login-wrapper {
    padding-top: 1.5em;
}

#b4manga-auth-modal .b4-social-login-button {
    background-color: #000000 !important;
    color: #fff !important;
}

#b4manga-auth-modal .b4-social-login-button:hover {
    background-color: #EC2024 !important;
    color: #fff !important;
}

#b4manga-auth-modal .b4-social-icon,
#b4manga-auth-modal .b4-social-icon svg {
    color: #fff !important;
    fill: currentColor !important;
}

/* ==========================================================================
   B4 Manga Post Card Styles (Reusable for blog, archive, related, etc.)
   ========================================================================== */
.b4-post-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    align-items: stretch;
}

@media (min-width: 768px) {
    .b4-post-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .b4-post-card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
.b4-post-card {
    background: #e7e7e7;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15), 0 6px 16px rgba(0, 0, 0, 0.10), 0 3px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0 0 2rem 0;
    transition: box-shadow 0.3s ease, border-color 0.2s ease, transform 0.3s ease;
}
.b4-post-card:hover {
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.25), 0 16px 36px rgba(0, 0, 0, 0.10), 0 8px 20px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-16px) scale(1.04);
}
.b4-post-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.b4-post-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background: #fafbfc;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}
.b4-post-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    display: block;
}
.b4-post-card-img-placeholder {
    background: #eee;
    width: 100%;
    height: 100%;
    min-height: 180px;
}
.b4-post-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #EC2024;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.25em 0.8em;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(229,62,62,0.10);
    letter-spacing: 0.01em;
}
.b4-post-card-content {
    padding: 1.2rem 1rem 0.5rem 1rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.b4-post-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: #222;
}
.b4-post-card-excerpt {
    font-size: 1rem;
    color: #1e1e1e;
    margin-bottom: 0.7rem;
    min-height: 2.2em;
}
.b4-post-card-date {
    font-size: 0.98rem;
    color: #EC2024;
    margin-bottom: 0.5rem;
}
.b4-post-card-footer {
    padding: 1rem 1rem 1.2rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.b4-post-card-btn {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    display: inline-flex !important; /* Override to match .btn base styling */
    padding: var(--button-padding) !important; /* Use consistent button padding */
    /* Ensure proper inheritance from .btn and .btn-primary classes */
    color: #ffffff !important; /* Force white text */
    background-color: #000000 !important; /* Force black background */
    border-color: #000000 !important; /* Force black border */
    text-decoration: none !important;
}

/* Force text color for all states and nested elements */
.b4-post-card-btn,
.b4-post-card-btn:link,
.b4-post-card-btn:visited,
.b4-post-card-btn:active,
a.b4-post-card-btn,
a.b4-post-card-btn:link,
a.b4-post-card-btn:visited,
a.b4-post-card-btn:active {
    color: #ffffff !important;
    background-color: #000000 !important;
    text-decoration: none !important;
}

.b4-post-card-btn:hover, 
.b4-post-card-btn:focus,
.b4-post-card-btn:hover:link,
.b4-post-card-btn:hover:visited,
.b4-post-card-btn:focus:link,
.b4-post-card-btn:focus:visited,
a.b4-post-card-btn:hover,
a.b4-post-card-btn:focus,
a.b4-post-card-btn:hover:link,
a.b4-post-card-btn:hover:visited,
a.b4-post-card-btn:focus:link,
a.b4-post-card-btn:focus:visited {
    text-decoration: none !important;
    color: #ffffff !important; /* Force white text on hover */
    background-color: #EC2024 !important; /* Force red background on hover */
    border-color: #EC2024 !important; /* Force red border on hover */
}

/* Ultra-specific button override to win CSS specificity battle */
* * * .b4-post-card-btn,
* * * a.b4-post-card-btn,
* * * .b4-post-card-btn:link,
* * * .b4-post-card-btn:visited,
* * * a.b4-post-card-btn:link,
* * * a.b4-post-card-btn:visited {
    color: #ffffff !important;
    background-color: #000000 !important;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

* * * .b4-post-card-btn:hover,
* * * .b4-post-card-btn:focus,
* * * .b4-post-card-btn:active,
* * * a.b4-post-card-btn:hover,
* * * a.b4-post-card-btn:focus,
* * * a.b4-post-card-btn:active,
* * * .b4-post-card-btn:hover:link,
* * * .b4-post-card-btn:focus:link,
* * * .b4-post-card-btn:active:link,
* * * a.b4-post-card-btn:hover:link,
* * * a.b4-post-card-btn:focus:link,
* * * a.b4-post-card-btn:active:link {
    color: #ffffff !important;
    background-color: #EC2024 !important;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

@media (max-width: 900px) {
    .b4-post-card-content {
        padding: 0.9rem 0.85rem 0.6rem 0.85rem;
    }

    .b4-post-card-title {
        font-size: 1rem;
    }

    .b4-post-card-date {
        font-size: 0.85rem;
    }

    .b4-post-card-footer {
        padding: 0.85rem 0.85rem 1rem 0.85rem;
    }

    .b4-post-card-btn {
        max-width: none;
        padding: 0.6rem 0.75rem !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 600px) {
    .b4-post-card-content {
        padding: 0.8rem 0.75rem 0.5rem 0.75rem;
    }

    .b4-post-card-title {
        font-size: 0.95rem;
        line-height: 1.25;
    }

    .b4-post-card-date {
        font-size: 0.8rem;
    }

    .b4-post-card-footer {
        padding: 0.75rem 0.75rem 0.9rem 0.75rem;
    }

    .b4-post-card-btn {
        padding: 0.55rem 0.65rem !important;
        font-size: 0.8rem !important;
        letter-spacing: 0.05em;
    }
}

/* ==========================================================================
   Comments Section Custom Styles
   ========================================================================== */

.comment-respond, #respond {
    background: #fff;
    border: none;
    border-radius: 10px;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    box-shadow: none;
}

.comment-respond h3, #reply-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #222;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] {
    width: 100%;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    background: #fafbfc;
    color: #222;
    transition: border-color 0.2s;
    resize: vertical;
}

.comment-form textarea:focus, .comment-form input:focus {
    border-color: var(--color-primary, #EC2024);
    outline: none;
}

.comment-form label {
    font-weight: 500;
    color: #444;
    margin-bottom: 0.3rem;
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #666;
}

.form-submit {
    display: flex;
    justify-content: flex-end;
}

/* .form-submit input[type="submit"] styles removed to avoid empty ruleset.
   The button will inherit .btn and .btn-primary classes from theme. */


/* Comment List */
.comment-list {
    list-style: none;
    margin: 0 0 2rem 0;
    padding: 2rem 2rem 0 2rem;
}

.comment-list .comment {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.comment-list .comment .comment-meta {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.comment-list .comment .comment-author {
    font-weight: 600;
    color: #EC2024;
    margin-right: 0.5rem;
}

.comment-list .comment .comment-content {
    font-size: 1rem;
    color: #222;
    margin-bottom: 0.5rem;
}

.comment-list .children {
    margin-left: 2rem;
    border-left: 2px solid #f1f1f1;
    padding-left: 1.5rem;
}

.comment-reply-link {
    color: var(--color-primary, #EC2024);
    font-weight: 500;
    font-size: 0.98rem;
    text-decoration: none;
    margin-top: 0.5rem;
    display: inline-block;
    transition: color 0.2s;
}

.comment-reply-link:hover {
    color: #EC2024;
    text-decoration: underline;
}
.sidebar-inner {
    background: transparent !important;
    border-radius: 16px;
    border: none;
    padding: 1.5rem 1rem;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.widget {
    background: transparent !important;
}
/* === PAGE LAYOUT CONTAINERS === */

/* New page layout structure */
.page-layout {
    padding: 3rem 0;
}

.page-content-wrapper {
    background: var(--color-bg-secondary); /* White content box */
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 2.5rem 3rem;
    margin: 0 auto;
    max-width: 1280px;
}

.page-article {
    width: 100%;
}

.page-article .entry-content {
    line-height: 1.7;
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
}

.page-article .post-thumbnail {
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: hidden;
}

.page-article .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Legacy containers (keeping for compatibility) */
.page-body-container {
    width: 100%;
    background: var(--page-body-bg, #f7f7f7); /* Use global Page Body Background variable */
    padding: 3rem 0;
}

.page-content-container {
    max-width: var(--page-content-width, 1280px) !important;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    background: var(--page-content-bg, #fff); /* Use Page Content Background variable */
    color: var(--page-body-text-color, #222222);
    border-radius: var(--single-content-border-radius, 0px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 1.5rem 1rem;
    box-sizing: border-box;
    overflow-x: auto;
}
/* Remove background, border, and border-radius from .page .entry-content so only .page-content-container controls them */
.page .entry-content {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

body.page .entry-content {
    text-align: left;
    margin: 0;
    padding: 0;
}
body.page .entry-content {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}
.container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Wide container variant for pages that require larger layout (e.g., search results) */
.container--wide {
    max-width: 1280px !important;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Inner content wrapper used on wide pages to further constrain the main content area */
.content-inner {
    max-width: 1200px; /* inner red box width */
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 0;
}

@media (max-width: 1400px) {
    .content-inner { max-width: 1000px; }
}

@media (max-width: 900px) {
    .content-inner { max-width: 100%; padding: 1.2rem; }
}

.site-content {
    width: 100%;
    margin: 0 auto;
}
.post-main-column {
    flex: 0 1 var(--post-main-column-width, 800px);
    max-width: var(--post-main-column-width, 800px);
    width: 100%;
    padding-left: 0;
    margin-left: 0;
}

.entry-title,
.entry-content {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.entry-title {
    margin-left: 0;
    padding-left: 0;
}

body.single .entry-title {
    color: var(--post-title-color) !important;
}

/* Page headers (white text on black background) */
.page .entry-header .entry-title  {
    color: var(--page-header-title-color) !important;
}

/* Blog post headers (dark text in content area) */
.single .entry-header .entry-title {
    color: var(--color-text-primary) !important;
}

/* Content area page titles (dark text) */
body.page .entry-title {
    color: var(--page-title-color);
}

.entry-meta {
    color: var(--post-meta-color);
    padding: 0 2rem 1rem 2rem;
}

.entry-content {
    width: 100%;
    margin: 0;
    padding: 0 2rem 2rem 2rem;
    text-align: left;
    justify-content: flex-start;
    color: var(--post-content-color);
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
    overflow-x: auto;
}

.entry-content {
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
    justify-content: flex-start;
}
/* Single Post Layout Fixes */
.main-container.single-layout {
    width: 100%;
    display: flex;
    justify-content: center;
    background: var(--post-body-bg-color, #fff);
    margin-left: auto;
    margin-right: auto;
}

.single-inner-wrapper {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 3rem;
    margin-bottom: 3rem;
    align-items: flex-start;
}

.sidebar-area {
    flex: 0 0 320px;
    max-width: 320px;
    min-width: 220px;
    background: var(--sidebar-bg-color) !important;
    border-radius: 16px;
    border: none;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-main-column {
    flex: 1 1 0;
    max-width: 1200px;
    width: 100%;
    background: var(--post-main-bg-color, #fff);
    border: var(--post-main-border-thickness, 0px) solid #e0e0e0;
    border-radius: var(--post-main-border-radius, 0px);
    box-sizing: border-box;
    padding: 1.5rem 1rem;
}

.post-thumbnail {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    overflow: hidden;
}

.entry-header {
    margin-bottom: 1.2rem;
    padding: 0;
}

.entry-content {
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
    justify-content: flex-start;
}

@media (max-width: 900px) {
    .single-inner-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }
    .sidebar-area, .post-main-column {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .single-layout .sidebar-area {
        display: none !important;
    }

    .single-layout .post-main-column {
        max-width: 100%;
    }

    .single-layout .single-inner-wrapper {
        justify-content: center;
    }

    .archive-layout .sidebar-area {
        display: none !important;
    }

    .archive-layout .post-main-column {
        max-width: 100%;
    }

    .archive-layout .single-inner-wrapper {
        justify-content: center;
    }
}
/* Centered single post layout */
/* Improved centered two-column single post layout */
.single-layout {
    display: flex;
    justify-content: center;
    width: 100%;
}

.single-layout .site-content {
    display: flex;
    gap: 2.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    align-items: flex-start;
}

.single-layout .sidebar-area {
    flex: 0 0 320px;
    max-width: 320px;
    min-width: 220px;
    background: var(--sidebar-bg-color) !important;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Full-width single post layout */
.single-layout .main-content {
    flex: 1 1 0;
    max-width: 100%;
    padding: 0;
    margin: 0;
    display: block;
}
.single-layout .post-thumbnail {
    display: block !important;
    width: 100% !important;
    margin: 0 0 1.5rem 0 !important;
    border-radius: 16px;
    overflow: hidden;
    text-align: left;
    visibility: visible !important;
    opacity: 1 !important;
}
.single-layout .post-thumbnail img {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    border-radius: 16px;
}
.single-layout .entry-header,
.single-layout .entry-title,
.single-layout .entry-meta,
.single-layout .entry-content {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
}

/* ==========================================================================
   Sticky Footer - Always at Bottom
   ========================================================================== */
html, body {
  height: 100%;
  min-height: 100vh;
  margin: 0 !important;
  padding: 0 !important;
}

#page.site {
  min-height: 100vh;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
}

/* Main content area should grow to fill space */
.site-content {
  flex: 1 0 auto;
}

/* Footer stays at bottom */
.site-footer {
  flex-shrink: 0;
  margin-top: auto !important;
}

/* Related posts ----------------------------------------------------------- */
.related-posts {
    margin-top: clamp(2rem, 4vw, 3rem);
}

.related-posts-heading {
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

.related-posts-list {
    width: 100%;
}

.related-posts-list .b4-post-card {
    margin: 0;
}

/* End related posts ------------------------------------------------------- */

/* Modal Styles - Moving inline styles to CSS */
#b4manga-auth-modal,
#b4manga-terms-modal {
    display: none;
}

.header-utility-item.account-link {
    cursor: pointer;
    transition: all var(--transition-normal);
}

.header-utility-item.account-link:hover {
    color: #EC2024;
    background-color: rgba(236, 32, 36, 0.05);
}

.header-utility-item.account-link:hover .utility-text {
    color: #EC2024;
}

.header-utility-item.account-link:hover .utility-icon {
    color: #EC2024;
}

/* Submit, Cart, and Logout link hover effects */
.header-utility-item.submit-link:hover,
.header-utility-item.cart-link:hover,
.header-utility-item.logout-link:hover {
    color: #EC2024;
    background-color: rgba(236, 32, 36, 0.05);
}

.header-utility-item.submit-link:hover .utility-text,
.header-utility-item.cart-link:hover .utility-text,
.header-utility-item.logout-link:hover .utility-text,
.header-utility-item.submit-link:hover .utility-icon,
.header-utility-item.cart-link:hover .utility-icon,
.header-utility-item.logout-link:hover .utility-icon {
    color: #EC2024;
}

#b4manga-cache-info {
    float: right;
    margin-left: 20px;
    font-size: 11px;
    color: #666;
}

/* Footer Styles */
.site-footer {
    background-color: var(--footer-bg-color) !important;
    color: var(--footer-text-color);
    padding: var(--footer-padding);
    margin-top: 4rem;
}

.site-footer a {
    color: white;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget-area {
    color: white;
}

.footer-widget-area h2,
.footer-widget-area h3,
.footer-widget-area h4 {
    color: white;
    margin-bottom: 1rem;
}

.site-info {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.9rem;
}

.footer-section {
    padding: 3rem 0;
}

.footer-section--newsletter {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-newsletter-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-newsletter-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 500;
    margin-bottom: 1.75rem;
    color: rgba(255, 255, 255, 0.85);
}

.footer-newsletter-form {
    max-width: 720px;
    margin: 0 auto;
}

.footer-newsletter-form .b4-mailchimp-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "email email"
        "consent submit"
        "message message";
    align-items: center;
    gap: 0.85rem 0.75rem;
}

.footer-newsletter-form .b4-mailchimp-field {
    grid-area: email;
    width: 100%;
}

.footer-newsletter-form input[type="email"] {
    width: 100%;
    min-height: 56px;
    border-radius: 999px;
    border: none;
    padding: 0 1.75rem;
}

.footer-newsletter-form .b4-mailchimp-consent {
    grid-area: consent;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.75);
    text-align: left;
    justify-self: end;
    flex-wrap: wrap;
}

.footer-newsletter-form .b4-mailchimp-consent label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.85);
}

.footer-newsletter-link {
    color: inherit;
    text-decoration: none !important;
}

.footer-newsletter-link:hover,
.footer-newsletter-link:focus {
    color: var(--color-accent, #EC2024);
}

.footer-newsletter-form .b4-mailchimp-consent input[type="checkbox"] {
    transform: scale(1.05);
    margin: 0;
    flex-shrink: 0;
}

.footer-newsletter-button {
    grid-area: submit;
    padding: 1.05rem 2.05rem !important;
    border-radius: 999px !important;
    font-weight: 600;
    justify-self: end;
}

.footer-newsletter-form .b4-mailchimp-message {
    grid-area: message;
    margin: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
}

.footer-newsletter-placeholder {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

html.footer-newsletter-modal-open,
body.footer-newsletter-modal-open {
    overflow: hidden;
}

.footer-newsletter-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.footer-newsletter-modal.is-open {
    display: flex;
}

.footer-newsletter-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.footer-newsletter-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(90%, 640px);
    max-height: 80vh;
    background: #111111;
    color: rgba(255, 255, 255, 0.92) !important;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    overflow-y: auto;
}

.footer-newsletter-modal__title {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.footer-newsletter-modal__content {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-newsletter-modal__content p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 1rem;
}

.footer-newsletter-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.footer-newsletter-modal__close:hover,
.footer-newsletter-modal__close:focus {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
}

@media (max-width: 600px) {
    .footer-newsletter-modal {
        padding: 1rem;
    }

    .footer-newsletter-modal__dialog {
        width: min(100%, 520px);
        padding: 1.5rem;
    }
}

.footer-section--menus {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-menus {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    text-align: left;
    max-width: 960px;
    margin: 0 auto;
}

.footer-menu-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    align-items: center;
}

.footer-menu-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
    align-items: center;
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: center;
}

.footer-menu-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-menu-link:hover,
.footer-menu-link:focus {
    color: var(--color-accent, #EC2024);
    text-decoration: none !important;
}

.footer-menu-placeholder {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.footer-social-area {
    text-align: center;
}

.footer-social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}
.footer-social-link {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
    color: inherit;
}

.footer-social-link i {
    font-size: 1.25rem;
}

.footer-social-link {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    color: rgba(255, 255, 255, 0.75);
}

.footer-social-link i,
.footer-social-link svg {
    font-size: 1.25rem;
    color: inherit;
    fill: currentColor;
    transition: color 0.25s ease, fill 0.25s ease;
}

.footer-social-link svg path,
.footer-social-link svg use {
    fill: currentColor;
    transition: fill 0.25s ease;
}

.footer-social-link:hover,
.footer-social-link:focus {
    transform: translateY(-6px);
    background: var(--color-accent, #EC2024);
    color: #ffffff !important;
    border-color: transparent;
}

.footer-social-link:hover i,
.footer-social-link:focus i,
.footer-social-link:hover svg,
.footer-social-link:focus svg,
.footer-social-link:hover svg path,
.footer-social-link:focus svg path,
.footer-social-link:hover svg use,
.footer-social-link:focus svg use {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.footer-mascot {
    max-width: 280px;
    margin: 0 auto 2.5rem;
}

.footer-mascot img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.footer-mascot:hover img,
.footer-mascot:focus-within img {
    animation: footer-mascot-bounce 0.6s ease infinite;
}

@keyframes footer-mascot-bounce {
    0% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-6px) scale(1.05);
    }
    70% {
        transform: translateY(3px) scale(0.98);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1024px) {
    .footer-menus {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .footer-section {
        padding: 2.5rem 0;
    }

    .footer-mascot {
        max-width: 220px;
        margin-bottom: 2rem;
    }

    .footer-menus {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-newsletter-form .b4-mailchimp-form {
        grid-template-columns: 1fr;
        grid-template-areas:
            "email"
            "consent"
            "submit"
            "message";
    }

    .footer-newsletter-form .b4-mailchimp-consent {
        justify-self: start;
    }

    .footer-newsletter-button {
        width: 100%;
        justify-self: stretch;
    }
}

/* ==========================================================================
   Design Specification Compliance Check
   ========================================================================== */

/* All content containers should have 16px border-radius and no visible border */
.content-container,
.post-container,
.page-container,
.sidebar-widget,
.widget,
.content-area,
.main-content,
article,
.comment-body,
.post-card {
    border-radius: 16px;
    border: none;
}

/* Ensure main content areas use correct background colors */
.content-area,
.main-content {
    background-color: var(--main-body-bg-color); /* Light Gray Main Body */
}

/* Inner page/post containers */
.post-content,
.page-content,
.entry-content,
.single .post,
.page .post {
    background-color: var(--color-bg-secondary); /* #EEEEEE */
    border-radius: 16px;
}

/* Sidebar styling */
.sidebar,
.widget-area {
    background-color: var(--color-bg-tertiary); /* #CDCDCD */
    border-radius: 16px;
    border: none;
}

/* Ensure all widgets in sidebar have proper styling */
.sidebar .widget,
.widget-area .widget {
    background-color: var(--color-bg-tertiary);
    border-radius: 16px;
    border: none;
    padding: 8px;
}

/* ==========================================================================
   8px Padding for All Content Areas
   ========================================================================== */

/* Main content areas */
.content-area,
.main-content,
.post-content,
.page-content,
.entry-content {
    padding: 8px;
}

/* Sidebar content */
.sidebar,
.widget-area {
    padding: 8px;
}

/* Individual widgets */
.widget {
    padding: 8px;
}

/* Post and page containers */
.post,
.page,
article {
    padding: 16px;
}

/* Comment areas */
.comment-body,
.comment-content {
    padding: 8px;
}

/* ==========================================================================
   Mobile Responsive Settings
   ========================================================================== */

@media (max-width: 768px) {
    /* Post and page containers - reduce padding on mobile */
    .post,
    .page,
    article {
        padding: 12px;
    }
    
    /* Comment areas - adjust for mobile */
    .comment-body,
    .comment-content {
        padding: 0px;
    }
    
    /* Comment list - reduce nesting indentation on mobile */
    .comment-list {
        padding: 1rem 0.5rem 0 0.5rem;
    }
    
    .comment-list .comment {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Reduce nested comment indentation to prevent squishing */
    .comment-list .children {
        margin-left: 0.5rem;
        padding-left: 0.75rem;
        border-left: 2px solid #f1f1f1;
    }
    
    /* Make sure comment content has breathing room */
    .comment-list .comment .comment-content {
        padding: 0.5rem 0;
        font-size: 0.95rem;
    }
    
    /* Product images - remove fixed height on mobile */
    .woocommerce .product-images-container {
        height: auto !important;
        min-height: auto !important;
    }
    
    .woocommerce .product-images {
        height: auto !important;
    }
    
    /* Gallery elements should size to content on mobile */
    .woocommerce .product-images .woocommerce-product-gallery,
    .woocommerce .product-images .woocommerce-product-gallery__wrapper,
    .woocommerce .product-images .woocommerce-product-gallery__image,
    .woocommerce .product-images .flex-viewport {
        height: auto !important;
    }
    
    .woocommerce .product-images .woocommerce-product-gallery {
        display: block !important;
    }
    
    /* Stack product layout on mobile */
    .woocommerce .product-main {
        grid-template-columns: 1fr !important;
        gap: 0;
    }
    
    .woocommerce .product-summary-container {
        padding: 0;
    }
    
    /* Buttons - full width on mobile */
    button,
    input[type="submit"],
    input[type="button"],
    .btn,
    .button,
    .wp-block-button__link {
        width: 100%;
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Form inputs - larger touch targets */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
        min-height: 44px; /* iOS recommended touch target */
    }
}

@media (max-width: 600px) {
    /* Extra small devices - further adjustments */
    .post,
    .page,
    article {
        padding: 8px;
    }
    
    /* Comment list - minimal padding for very small screens */
    .comment-list {
        padding: 0.5rem 0.25rem 0 0.25rem;
    }
    
    .comment-list .comment {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    /* Minimal nesting indentation on small screens */
    .comment-list .children {
        margin-left: 0.25rem;
        padding-left: 0.5rem;
    }
    
    /* Product images - even more compact on very small screens */
    .woocommerce .product-images-container {
        min-height: auto !important;
    }
    
    /* Reduce font sizes for small screens */
    body {
        font-size: 14px;
    }
    
    h1 { font-size: 1.75em; }
    h2 { font-size: 1.5em; }
    h3 { font-size: 1.25em; }
    h4 { font-size: 1.1em; }
    h5, h6 { font-size: 1em; }
}

/* ==========================================================================
   Force Override All Blue Button Styles
   ========================================================================== */

/* Absolutely override any WordPress default blue buttons */
.wp-block-button:not(.is-style-outline) .wp-block-button__link,
.wp-block-button .wp-block-button__link,
button:not(.is-style-outline),
input[type="submit"]:not(.is-style-outline),
input[type="button"]:not(.is-style-outline),
.btn:not(.is-style-outline),
.button:not(.is-style-outline) {
    background-color: var(--button-primary-bg) !important;
    color: var(--button-primary-text) !important;
    border-color: var(--button-primary-bg) !important;
}

/* Force override blue hover states */
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:hover,
button:not(.is-style-outline):hover,
input[type="submit"]:not(.is-style-outline):hover,
input[type="button"]:not(.is-style-outline):hover,
.btn:not(.is-style-outline):hover,
.button:not(.is-style-outline):hover {
    background-color: var(--button-primary-bg-hover) !important;
    color: var(--button-primary-text-hover) !important;
    border-color: var(--button-primary-bg-hover) !important;
}

/* Override any WordPress core button colors */
.wp-core-ui .button-primary,
.wp-core-ui .button-primary:hover,
.wp-core-ui .button-primary:focus,
.wp-element-button,
.wp-element-button:hover,
.wp-element-button:focus {
    background-color: var(--button-primary-bg) !important;
    color: var(--button-primary-text) !important;
    border-color: var(--button-primary-bg) !important;
}

/* Force override search button specifically */
.search-submit,
.search-form input[type="submit"],
#searchsubmit,
.searchform input[type="submit"] {
    background-color: var(--button-primary-bg) !important;
    color: var(--button-primary-text) !important;
    border-color: var(--button-primary-bg) !important;
}

.search-submit:hover,
.search-form input[type="submit"]:hover,
#searchsubmit:hover,
.searchform input[type="submit"]:hover {
    background-color: var(--button-primary-bg-hover) !important;
    color: var(--button-primary-text-hover) !important;
    border-color: var(--button-primary-bg-hover) !important;
}

/* Override any remaining blue colors with our brand colors */
*[style*="background-color: blue"],
*[style*="background: blue"],
*[style*="color: blue"] {
    background-color: var(--button-primary-bg) !important;
    color: var(--button-primary-text) !important;
}

/* ==========================================================================
   WordPress Block Editor Button Overrides
   ========================================================================== */

/* Override WordPress default button colors */
.wp-block-button__link,
.wp-block-button .wp-block-button__link,
.wp-element-button {
    background-color: var(--button-primary-bg) !important;
    color: var(--button-primary-text) !important;
    border-color: var(--button-primary-bg) !important;
    border-radius: var(--button-border-radius) !important;
}

.wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:hover,
.wp-element-button:hover {
    background-color: var(--button-primary-bg-hover) !important;
    color: var(--button-primary-text-hover) !important;
    border-color: var(--button-primary-bg-hover) !important;
}

/* Override any WordPress color scheme classes */
.has-vivid-cyan-blue-background-color,
.has-vivid-cyan-blue-color,
.has-pale-cyan-blue-background-color,
.has-pale-cyan-blue-color,
.has-vivid-blue-background-color,
.has-vivid-blue-color {
    background-color: var(--button-primary-bg) !important;
    color: var(--button-primary-text) !important;
}

/* Force override any CSS custom properties that might be blue */
:root {
    --wp--preset--color--vivid-cyan-blue: var(--color-primary) !important;
    --wp--preset--color--pale-cyan-blue: var(--color-secondary) !important;
    --wp--preset--color--vivid-blue: var(--color-primary) !important;
}

/* ==========================================================================
   Sidebar Complete Styling - 16px Border Radius + No Borders
   ========================================================================== */

/* All sidebar containers */
.sidebar,
.sidebar-area,
.sidebar-inner,
.widget-area,
#secondary,
.primary-sidebar,
.secondary-sidebar {
    border-radius: 16px !important;
    border: none !important;
    background-color: var(--color-bg-tertiary);
}

/* All sidebar widgets */
.sidebar .widget,
.sidebar-area .widget,
.widget-area .widget,
.widget,
.wp-block-group.widget {
    border-radius: 16px !important;
    border: none !important;
    background-color: var(--color-bg-tertiary);
    padding: 8px;
}

/* Widget titles */
.widget-title,
.wp-block-group.widget .wp-block-heading {
    border: none !important;
}

/* ==========================================================================
   Remove All Button Drop Shadows Completely
   ========================================================================== */

/* Remove box-shadow from ALL buttons */
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.btn,
.button,
.wp-block-button__link,
.wp-element-button,
.search-submit {
    box-shadow: none !important;
}

/* Remove box-shadow from button hover states */
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
.btn:hover,
.button:hover,
.wp-block-button__link:hover,
.wp-element-button:hover,
.search-submit:hover {
    box-shadow: none !important;
}

/* Remove box-shadow from button active states */
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active,
.btn:active,
.button:active,
.wp-block-button__link:active,
.wp-element-button:active,
.search-submit:active {
    box-shadow: none !important;
}

/* Remove box-shadow from button focus states */
button:focus,
input[type="submit"]:focus,
input[type="button"]:focus,
input[type="reset"]:focus,
.btn:focus,
.button:focus,
.wp-block-button__link:focus,
.wp-element-button:focus,
.search-submit:focus {
    box-shadow: none !important;
}

/* ==========================================================================
   Authentication Forms - Following Base Theme Setup
   ========================================================================== */

/* Authentication Form Container */
.b4-auth-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
}

/* Form Fields */
.b4-auth-form input[type="text"],
.b4-auth-form input[type="email"],
.b4-auth-form input[type="password"] {
    width: 100%;
    padding: var(--input-padding, 0.75rem);
    border: var(--input-border, 2px solid #e0e0e0);
    border-radius: var(--input-border-radius, 16px);
    font-size: var(--font-size-text, 14px);
    font-family: var(--font-family-text, inherit);
    background-color: var(--input-bg-color, #ffffff);
    color: var(--color-text-primary, #121212);
    margin-bottom: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.b4-auth-form input[type="text"]:focus,
.b4-auth-form input[type="email"]:focus,
.b4-auth-form input[type="password"]:focus {
    border-color: var(--color-primary, #EC2024);
    outline: none;
}

/* Form Labels */
.b4-auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-text-primary, #121212);
    font-family: var(--font-family-text, inherit);
    font-size: var(--font-size-text, 14px);
}

/* Submit Buttons */
.b4-auth-form input[type="submit"],
.b4-auth-form button[type="submit"] {
    background-color: var(--button-bg-color, #000000);
    color: var(--button-text-color, #ffffff);
    padding: var(--button-padding, 0.5rem 1rem);
    border: none;
    border-radius: var(--button-border-radius, 12px);
    font-size: var(--button-font-size, 0.875rem);
    font-weight: var(--button-font-weight, 600);
    font-family: var(--font-family-text, inherit);
    cursor: pointer;
    transition: var(--button-transition, background 0.2s, color 0.2s);
    width: 100%;
    margin-top: 1rem;
}

.b4-auth-form input[type="submit"]:hover,
.b4-auth-form button[type="submit"]:hover {
    background-color: var(--button-bg-color-hover, #EC2024);
}

.woocommerce-account-auth {
    margin-top: clamp(1.75rem, 4vw, 2.75rem);
}

.woocommerce-account-auth__inner {
    display: grid;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    max-width: 960px;
    margin: 0 auto;
}

.woocommerce-account-auth__inner--split {
    align-items: start;
}

@media (min-width: 960px) {
    .woocommerce-account-auth__inner--split {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.woocommerce-account-auth__block {
    display: flex;
    justify-content: center;
}

.woocommerce-account-auth__block .b4-auth-form {
    width: 100%;
}

/* Form Messages */
.b4-auth-form .auth-message {
    padding: 1rem;
    border-radius: var(--card-border-radius, 12px);
    margin-bottom: 1.5rem;
    font-family: var(--font-family-text, inherit);
}

.b4-auth-form .auth-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.b4-auth-form .auth-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form Links */
.b4-auth-form .auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.b4-auth-form .auth-links a {
    color: var(--link-color, var(--color-primary, #EC2024));
    text-decoration: var(--link-decoration, none);
    font-family: var(--font-family-text, inherit);
    font-size: var(--font-size-text, 14px);
    transition: color 0.3s ease;
}

.b4-auth-form .auth-links a:hover {
    color: var(--link-color-hover, #c41e22);
    text-decoration: var(--link-decoration-hover, underline);
}

/* Form Groups */
.b4-auth-form .form-group {
    margin-bottom: 1.5rem;
}

/* Remember Me Checkbox */
.b4-auth-form .remember-me {
    display: flex;
    align-items: center;
    margin: 1rem 0;
}

.b4-auth-form .remember-me input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    margin-bottom: 0;
}

.b4-auth-form .remember-me label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .b4-auth-form {
        max-width: 100%;
        padding: 0 1rem;
    }
}

/* ==========================================================================
   Authentication Fallback Page Styles
   ========================================================================== */

.b4manga-auth-fallback {
	max-width: 420px;
	margin: 40px auto;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 2px 16px rgba(0,0,0,0.08);
	padding: 36px 28px 28px 28px;
	font-family: 'Segoe UI', Arial, sans-serif;
}

.b4manga-auth-fallback h2 {
	font-size: 2rem;
	color: #000000;
	margin-bottom: 18px;
	font-weight: 600;
	text-align: center;
}

.b4manga-auth-fallback .b4manga-auth-tabs {
	display: flex;
	justify-content: center;
	margin-bottom: 24px;
	gap: 12px;
}

.b4manga-auth-fallback .b4manga-auth-tab {
	background: #f8f9fa;
	border: none;
	padding: 8px 18px;
	border-radius: 5px 5px 0 0;
	font-size: 1rem;
	color: #000000;
	cursor: pointer;
	font-weight: 500;
	transition: background 0.2s;
}

.b4manga-auth-fallback .b4manga-auth-tab.active {
	background: #EC2024;
	color: #fff;
}

.b4manga-auth-fallback form {
	display: none;
}

.b4manga-auth-fallback form.active {
	display: block;
}

.b4manga-auth-fallback .b4manga-auth-message {
	margin-bottom: 16px;
	color: #EC2024;
	text-align: center;
	font-weight: 500;
}

.b4manga-auth-fallback .b4manga-auth-success {
	color: #000000ff;
}

.b4manga-auth-fallback input[type="text"],
.b4manga-auth-fallback input[type="email"],
.b4manga-auth-fallback input[type="password"] {
	width: 100%;
	padding: 10px;
	margin-bottom: 14px;
	border: 1px solid #ccc;
	border-radius: 5px;
	font-size: 1rem;
}

.b4manga-auth-fallback button[type="submit"] {
	width: 100%;
	background: #000000;
	color: #fff;
	border: none;
	padding: 12px;
	border-radius: 5px;
	font-size: 1.1rem;
	font-weight: 600;
	cursor: pointer;
	margin-bottom: 8px;
	transition: background 0.2s;
}

.b4manga-auth-fallback button[type="submit"]:hover {
	background: #EC2024;
}

.b4manga-auth-fallback .b4manga-auth-links {
	text-align: center;
	margin-top: 10px;
}

.b4manga-auth-fallback .b4manga-auth-links a {
	color: #EC2024;
	text-decoration: underline;
	margin: 0 6px;
	font-size: 0.98rem;
}

/* ==========================================================================
   Set Password Page Styles (extends auth fallback styles)
   ========================================================================== */

.b4manga-auth-fallback input[type="password"] {
	width: 100%;
	padding: 10px;
	margin-bottom: 14px;
	border: 1px solid #ccc;
	border-radius: 5px;
	font-size: 1rem;
}

/* ==========================================================================
   MOBILE/TABLET HEADER STYLES
   ========================================================================== */

/* Hide mobile header on desktop, show desktop header */
@media (min-width: 769px) {
    .mobile-header {
        display: none !important;
    }
    
    .desktop-header {
        display: block;
    }
}

/* Hide desktop header on mobile/tablet, show mobile header */
@media (max-width: 768px) {
    .desktop-header {
        display: none !important;
    }
    
    .mobile-header {
        display: block;
    }
    
    /* Ensure body has proper spacing for fixed mobile header */
    body {
        padding-top: 60px;
    }
    
    /* Fix admin bar overlap - push mobile header below admin bar */
    body.admin-bar {
        padding-top: 60px; /* Just mobile header height */
    }
    
    body.admin-bar .mobile-header {
        top: 46px; /* Admin bar height on mobile */
        z-index: 99999;
    }
    
    body.admin-bar .mobile-menu-overlay {
        top: calc(60px + 46px); /* Mobile header + admin bar */
    }
    
    /* Mobile Header Container */
    .mobile-header {
        background:  #EC2024;
        border-bottom: 1px solid var(--header-border-color, #e5e5e5);
        box-shadow: var(--header-shadow, 0 2px 4px rgba(0, 0, 0, 0.1));
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: var(--header-z-index, 100);
    }
    
    /* Add body padding to compensate for fixed header */
    body.mobile-header-active {
        padding-top: 60px;
    }
    
    .mobile-header-content {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        padding: 12px 15px;
        min-height: 60px;
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Mobile Branding */
    .mobile-site-branding {
        grid-column: 1;
        min-width: 0;
    }
    
    .mobile-site-branding img {
        max-height: 36px;
        width: auto;
    }
    
    .mobile-site-title {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--color-primary, #EC2024);
        text-decoration: none;
        margin: 0;
    }
    
    /* Mobile Header Utilities */
    .mobile-header-utilities {
        grid-column: 2;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 5px;
        padding: 0;
    }

    /* FORCE NO BLACK BACKGROUNDS ON ICONS AND BUTTONS ONLY - NOT MENU CONTENT */
    .mobile-header-utilities *,
    .mobile-utility-item,
    .mobile-utility-item *,
    .mobile-menu-toggle,
    .mobile-menu-toggle *,
    .mobile-cart-link,
    .mobile-cart-link *,
    .mobile-header a:not(.mobile-nav-menu a):not(.mobile-action-item),
    .mobile-header button:not(.mobile-action-item),
    .mobile-header .fas,
    .mobile-header i {
        background: transparent !important;
        background-color: transparent !important;
    }
    
    .mobile-utility-item {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        color: #ffffff !important;
        text-decoration: none;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        cursor: pointer;
        transition: none !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .mobile-utility-item:hover,
    .mobile-utility-item:focus,
    .mobile-utility-item:active {
        color: #ffffff !important;
        background: transparent !important;
        background-color: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        transition: none !important;
        transform: none !important;
        box-shadow: none !important;
        outline: none !important;
    }

    /* FORCE NO BACKGROUNDS ON HOVER/FOCUS FOR ICONS AND BUTTONS ONLY - NOT MENU ITEMS */
    .mobile-header-utilities *:hover,
    .mobile-header-utilities *:focus,
    .mobile-header-utilities *:active,
    .mobile-utility-item:hover,
    .mobile-utility-item:focus,
    .mobile-utility-item:active,
    .mobile-menu-toggle:hover,
    .mobile-menu-toggle:focus,
    .mobile-menu-toggle:active {
        background: transparent !important;
        background-color: transparent !important;
    }
    
    .mobile-utility-item .fas,
    .mobile-utility-item i,
    .mobile-utility-icon,
    .mobile-utility-item *,
    .mobile-cart-link i,
    .mobile-cart-link .fas {
        font-size: 20px !important;
        color: #ffffff !important;
        background: transparent !important;
        border: none !important;
        transition: none !important;
        transform: none !important;
    }
    
    .mobile-utility-item:hover .fas,
    .mobile-utility-item:hover i,
    .mobile-utility-item:hover .mobile-utility-icon,
    .mobile-utility-item:focus .fas,
    .mobile-utility-item:focus i,
    .mobile-utility-item:focus .mobile-utility-icon {
        color: #ffffff !important;
        background: transparent !important;
        border: none !important;
        transition: none !important;
        transform: none !important;
    }
    
    .mobile-cart-count {
        position: absolute;
        top: -6px;
        right: 8px;
        background: var(--color-danger);
        color: #ffffff;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        font-size: 11px;
        font-weight: var(--font-weight-bold);
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        min-width: 18px;
        border: 2px solid #ffffff;
    }
    
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: transparent !important;
        border: none !important;
        cursor: pointer;
        padding: 8px;
        border-radius: 0 !important;
        position: relative;
        transition: none !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .mobile-menu-toggle:hover,
    .mobile-menu-toggle:focus,
    .mobile-menu-toggle:active {
        background: transparent !important;
        background-color: transparent !important;
        outline: none !important;
        border: none !important;
        border-radius: 0 !important;
        transition: none !important;
        transform: none !important;
        box-shadow: none !important;
    }

    /* HAMBURGER LINES - FORCE WHITE AND NO BACKGROUNDS */
    .hamburger-line,
    .mobile-menu-toggle .hamburger-line,
    .mobile-menu-icon .hamburger-line {
        background: #ffffff !important;
        background-color: #ffffff !important;
    }
    
    .mobile-menu-icon {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 22px;
        height: 16px;
        position: relative;
    }
    
    .hamburger-line {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #ffffff !important;
        border-radius: 1px;
        transition: all 0.3s ease;
        transform-origin: center;
    }
    
    /* Hamburger Animation - X transformation */
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 60px; /* Account for fixed header height */
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        backdrop-filter: blur(2px);
    }
    
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-menu-content {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        background: var(--header-bg-color, #ffffff);
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        padding: 0;
        display: flex;
        flex-direction: column;
    }
    
    .mobile-menu-overlay.active .mobile-menu-content {
        transform: translateX(0);
    }
    
    /* Mobile Navigation */
    .mobile-navigation {
        border-bottom: 1px solid var(--color-border-light, #e5e5e5);
        padding: 20px 0;
        flex: 1;
    }
    
    .mobile-nav-menu {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .mobile-nav-menu li {
        margin: 0;
    }
    
    .mobile-nav-menu a {
        display: block;
        padding: 16px 25px;
        color: var(--color-text-primary, #333);
        text-decoration: none;
        font-weight: 500;
        font-size: 16px;
        border-bottom: 1px solid var(--color-border-light, #f5f5f5);
        transition: all 0.2s ease;
        position: relative;
    }
    
    .mobile-nav-menu a:hover,
    .mobile-nav-menu a:focus,
    .mobile-nav-menu .current-menu-item > a {
        background-color: var(--color-background-light, #f8f9fa);
        color: var(--color-primary, #EC2024);
        padding-left: 35px;
    }
    
    .mobile-nav-menu a:hover::before,
    .mobile-nav-menu .current-menu-item > a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--color-primary, #EC2024);
    }

    /* Mobile Sub-Menu Styles */
    .mobile-nav-menu .sub-menu {
        list-style: none;
        margin: 0;
        padding: 0;
        background: var(--color-background-light, #f8f9fa);
        border-left: 3px solid #EC2024;
        margin-left: 15px;
        margin-right: 15px;
        border-radius: 0 6px 6px 0;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transition: all 0.3s ease;
    }

    .mobile-nav-menu .menu-item-has-children.open .sub-menu {
        max-height: 500px;
        opacity: 1;
    }

    .mobile-nav-menu .sub-menu a {
        padding: 12px 20px;
        font-size: 14px;
        background: transparent;
        border-bottom: 1px solid var(--color-border-light, #e5e5e5);
        margin: 0;
    }

    .mobile-nav-menu .sub-menu a:hover,
    .mobile-nav-menu .sub-menu a:focus {
        background-color: #ffffff;
        color: #EC2024;
        padding-left: 30px;
    }

    .mobile-nav-menu .sub-menu .current-menu-item > a {
        background-color: #ffffff;
        color: #EC2024;
        font-weight: 600;
    }

    .mobile-nav-menu .sub-menu li:last-child a {
        border-bottom: none;
    }

    /* Mobile menu parent item toggle */
    .mobile-nav-menu .menu-item-has-children > a {
        position: relative;
        padding-right: 50px;
    }

    .mobile-nav-menu .menu-item-has-children > a::after {
        content: '\f107'; /* FontAwesome down arrow */
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        position: absolute;
        right: 25px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 14px;
        color: #666;
        transition: transform 0.3s ease;
    }

    .mobile-nav-menu .menu-item-has-children.open > a::after {
        transform: translateY(-50%) rotate(180deg);
    }

    .mobile-nav-menu .menu-item-has-children > a:hover::after,
    .mobile-nav-menu .menu-item-has-children.open > a::after {
        color: #EC2024;
    }
    
    /* Mobile User Actions */
    .mobile-user-actions {
        padding: 20px 25px;
        border-top: 1px solid var(--color-border-light, #e5e5e5);
        background: var(--color-background-light, #f8f9fa);
    }
    
    .mobile-action-item {
        display: flex;
        align-items: center;
        padding: 15px 0;
        color: var(--color-text-primary, #333);
        text-decoration: none;
        border-bottom: 1px solid var(--color-border-light, #f0f0f0);
        transition: color 0.2s ease;
        background: transparent;
        border: none;
        width: 100%;
        text-align: left;
        cursor: pointer;
        font-size: 16px;
    }
    
    .mobile-action-item:hover,
    .mobile-action-item:focus {
        color: var(--color-primary, #EC2024);
    }
    
    .mobile-action-item:last-child {
        border-bottom: none;
    }
    
    .mobile-action-icon {
        margin-right: 12px;
        width: 20px;
        font-size: 16px;
    }
    
    .mobile-action-text {
        font-weight: 500;
    }
    
    /* Mobile Search Integration */
    .mobile-search-toggle {
        background: none;
        border: none;
        padding: 0;
        font-family: inherit;
    }
}

/* ==========================================================================
   🛒 WOOCOMMERCE STYLES
   ========================================================================== */

/* WooCommerce Archive/Shop Page */
.woocommerce .shop-header {
    margin-bottom: 10px;
    padding: 40px;
    background: #0f0f0f;
}

.woocommerce .shop-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--page-header-title-color) !important;
    margin: 0;
}

.woocommerce .shop-description {
    color: var(--page-header-title-color) !important;
    margin: 10px 0 0;
}

.woocommerce .shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.woocommerce .woocommerce-result-count {
    color: var(--color-text-secondary, #666);
    font-size: 14px;
}

.woocommerce .woocommerce-ordering select {
    padding: 8px 12px;
    border: 1px solid var(--color-border-light, #ddd);
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: 40px;
}

@media (min-width: 900px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Product Cards (scoped to -card classes) */
.woocommerce .product-card {
    background: white;
    border: 1px solid #cacaca !important;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center;
}

.woocommerce .product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 2px solid #EC2024 !important;
    transform: translateY(-2px);
}

.woocommerce .product-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.woocommerce .product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.woocommerce .product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.woocommerce .product-card .onsale {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #EC2024 !important;
    color: #ffffff;
    padding: 0.40rem;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    z-index: 2;
}

.woocommerce .product-card-content {
    padding: 20px;
}

/* Title and meta inside product cards */
.woocommerce .product-card .woocommerce-loop-product__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.4;
    color: var(--color-text-primary, #333);
}

/* Star ratings inside product cards */
.woocommerce ul.products li.product .star-rating,
.woocommerce .product-card .star-rating {
    display: inline-block;
    line-height: 1;
    font-size: 14px; /* star size */
    margin: 4px 0 10px 0; /* space under title, above price */
    vertical-align: middle;
}

/* Unfilled stars (track) */
.woocommerce ul.products li.product .star-rating::before,
.woocommerce .product-card .star-rating::before {
    color: var(--color-border-light, #d8d8d8);
}

/* Filled stars */
.woocommerce ul.products li.product .star-rating span::before,
.woocommerce .product-card .star-rating span::before {
    color: #F5C518; /* gold */
}

/* Optional review count next to stars when present */
.woocommerce ul.products li.product .star-rating + .woocommerce-review-link,
.woocommerce .product-card .star-rating + .woocommerce-review-link {
    margin-left: 6px;
    font-size: 12px;
    color: var(--color-text-muted, #777);
}

.woocommerce .product-card .price {
    font-size: 18px;
    font-weight: 600;
    color: #EC2024 !important;
    margin: 10px 0;
}

.woocommerce .product-card .price del {
    color: var(--color-text-muted, #999);
    font-weight: 400;
    margin-right: 8px;
}

.woocommerce .product-card-actions {
    padding: 0 20px 20px;
    display: flex;
    justify-content: center;
}

.woocommerce .product-card-actions .button,
.woocommerce .product-card-actions .add_to_cart_button,
.woocommerce .product-card-actions .product_type_simple,
.woocommerce .product-card-actions .product_type_variable,
.woocommerce .product-card-actions .product_type_grouped,
.woocommerce .product-card-actions .product_type_external,
.woocommerce .product-card-actions .added_to_cart,
.woocommerce .product-card-actions .wc-forward {
    background: #000000 !important;
    color: #ffffff !important;
    padding: 0.55rem 1.6rem;
    margin-top: 10px;
    border: none !important;
    border-radius: 999px !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 60%;
    max-width: 220px;
    width: 100%;
    letter-spacing: 0.06em;
}

.woocommerce .product-card-actions .button:hover,
.woocommerce .product-card-actions .button:focus,
.woocommerce .product-card-actions .add_to_cart_button:hover,
.woocommerce .product-card-actions .add_to_cart_button:focus,
.woocommerce .product-card-actions .product_type_simple:hover,
.woocommerce .product-card-actions .product_type_simple:focus,
.woocommerce .product-card-actions .product_type_variable:hover,
.woocommerce .product-card-actions .product_type_variable:focus,
.woocommerce .product-card-actions .product_type_grouped:hover,
.woocommerce .product-card-actions .product_type_grouped:focus,
.woocommerce .product-card-actions .product_type_external:hover,
.woocommerce .product-card-actions .product_type_external:focus,
.woocommerce .product-card-actions .added_to_cart:hover,
.woocommerce .product-card-actions .added_to_cart:focus,
.woocommerce .product-card-actions .wc-forward:hover,
.woocommerce .product-card-actions .wc-forward:focus {
    background: #EC2024 !important;
    color: #ffffff !important;
}

/* Cart table links should keep normal link styling instead of button treatment */
.woocommerce-cart .woocommerce-cart-form .product-remove a.remove,
.woocommerce-cart .woocommerce-cart-form .product-remove a.remove:visited {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    min-width: auto;
    color: var(--link-color);
    text-decoration: var(--link-decoration);
    font-weight: 500;
}

.woocommerce-cart .woocommerce-cart-form .product-remove a.remove:hover,
.woocommerce-cart .woocommerce-cart-form .product-remove a.remove:focus {
    color: var(--link-color-hover);
    text-decoration: var(--link-decoration-hover);
}

@media (max-width: 900px) {
    .woocommerce .product-card-content {
        padding: 1rem 0.85rem;
        gap: 0.5rem;
    }

    .woocommerce .product-card .woocommerce-loop-product__title {
        font-size: 1rem;
    }

    .woocommerce .product-card .price {
        font-size: 1.05rem;
    }

    .woocommerce .product-card-excerpt {
        font-size: 0.85rem;
    }

    .woocommerce .product-card .onsale {
        padding: 0.3rem 0.75rem;
        font-size: 0.75rem;
        letter-spacing: 0.06em;
    }

    .woocommerce .product-card-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
    }

    .woocommerce .product-card-actions .button,
    .woocommerce .product-card-actions .add_to_cart_button,
    .woocommerce .product-card-actions .product_type_simple,
    .woocommerce .product-card-actions .product_type_variable,
    .woocommerce .product-card-actions .product_type_grouped,
    .woocommerce .product-card-actions .product_type_external,
    .woocommerce .product-card-actions .added_to_cart {
        font-size: 0.85rem;
        padding: 0.55rem 1.3rem;
        min-height: 42px;
        width: auto;
        min-width: 70%;
    }
}

@media (max-width: 600px) {
    .woocommerce .product-card-content {
        padding: 0.85rem 0.75rem;
    }

    .woocommerce .product-card .woocommerce-loop-product__title {
        font-size: 0.95rem;
        line-height: 1.25;
    }

    .woocommerce .product-card .price {
        font-size: 1rem;
    }

    .woocommerce .product-card-excerpt {
        font-size: 0.8rem;
    }

    .woocommerce .product-card .onsale {
        font-size: 0.4rem;
        padding: 0.25rem;
        top: 10px;
        left: 10px;
    }

    .woocommerce .product-card-actions .button,
    .woocommerce .product-card-actions .add_to_cart_button,
    .woocommerce .product-card-actions .product_type_simple,
    .woocommerce .product-card-actions .product_type_variable,
    .woocommerce .product-card-actions .product_type_grouped,
    .woocommerce .product-card-actions .product_type_external,
    .woocommerce .product-card-actions .added_to_cart {
        font-size: 0.8rem;
        padding: 0.5rem 1.15rem;
        min-height: 38px;
        min-width: 75%;
    }
}



/* Single Product Page - Match page.php background styling */
.single-product .main-container.shop-layout {
    background: var(--color-bg-primary);
    min-height: 100vh;
    padding-top: 0;
    padding-bottom: 0;
}

.woocommerce .single-product-main-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    background: var(--color-bg-secondary);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 32px;
    margin-bottom: 32px;
}

.woocommerce .single-product-content {
    width: 100%;
}

.woocommerce .product-main {
    display: grid;
    grid-template-columns: 1fr 2fr; /* image 1/3, summary 2/3 */
    margin-bottom: 40px;
    padding: 0;
}

.woocommerce .product-details {
    width: 100%;
    background: var(--color-bg-secondary);
    padding: 20px 0;
}

/* Product Images Container (left side - red box area) */
.woocommerce .product-images-container {
    background: none !important;
    padding: 0;
    margin: 0;
    height: 600px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border-radius: 12px 0 0 0;
}

.woocommerce .product-images {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
}

/* Aggressively remove all padding and margins from WooCommerce image elements */
.woocommerce .product-images * {
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.woocommerce .product-images .woocommerce-product-gallery,
.woocommerce .product-images .woocommerce-product-gallery__wrapper,
.woocommerce .product-images .woocommerce-product-gallery__image,
.woocommerce .product-images .flex-viewport,
.woocommerce .product-images .woocommerce-product-gallery__image a,
.woocommerce .product-images .attachment-woocommerce_single,
.woocommerce .product-images .wp-post-image {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    background: none !important;
}

/* Make the Woo gallery fill the container while leaving room for thumbnails when present */
.woocommerce .product-images .woocommerce-product-gallery {
    display: grid !important;
    grid-template-rows: 1fr auto !important; /* main image grows, thumbs take natural height */
    gap: 0 !important;
    background: none !important;
}
.woocommerce .product-images .flex-viewport {
    grid-row: 1 / 2 !important;
    align-self: stretch !important;
}
.woocommerce .product-images .flex-control-nav {
    grid-row: 2 / 3 !important;
    display: flex !important;
    gap: 8px !important;
    justify-content: flex-start !important;
    margin: 8px 0 0 0 !important;
    padding: 0 !important;
}
.woocommerce .product-images .flex-control-nav li {
    margin: 0 !important;
    padding: 0 !important;
}
.woocommerce .product-images .flex-control-nav img {
    height: 64px !important; /* reasonable thumb height */
    width: auto !important;
    object-fit: cover !important;
}

.woocommerce .product-images .woocommerce-product-gallery__image img,
.woocommerce .product-images img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    display: block !important;
    max-width: none !important;
    max-height: none !important;
    background: none !important;
}

.woocommerce .product-images .woocommerce-product-gallery__trigger {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 10 !important;
    margin: 0 !important;
    padding: 5px !important;
    
}

/* Sale badge: change background color only */
.woocommerce span.onsale {
    background-color: #EC2024 !important; /* brand red */
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    margin: 0;
    padding: 8px 12px;
}

/* Custom Product Gallery */
.b4manga-featured-image {
    width: 100%;
    margin-bottom: 16px;
}

.b4manga-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.b4manga-product-gallery {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.b4manga-gallery-main {
    position: relative;
    flex: 1;
    overflow: hidden;
}

.b4manga-gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.b4manga-gallery-image.active {
    opacity: 1;
    pointer-events: auto;
}

.b4manga-gallery-image img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    image-rendering: -webkit-optimize-contrast;
}

.b4manga-gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding: 0;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
}

.b4manga-gallery-thumb {
    background: none !important;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s;
    flex-shrink: 0;
    border-radius: 0;
    overflow: hidden;
    width: 100%;
}

.b4manga-gallery-thumb img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    border-radius: 0;
    background: none !important;
}

.b4manga-gallery-thumb.active,
.b4manga-gallery-thumb:hover {
    background: none !important;
}

.b4manga-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Remove any flexslider spacing */
.woocommerce .product-images .flexslider,
.woocommerce .product-images .slides,
.woocommerce .product-images .slides > li {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Product Summary Container (right side - black box area) */
.woocommerce .product-summary-container {
    background: #0f0f0f;
    color: #ffffff !important;
    padding: 24px;
    border-radius: 0 12px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    height: 600px;
    display: flex;
    align-items: flex-start;
}

.woocommerce .product-summary {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    height: 100%;
    overflow-y: auto; /* allow long descriptions to scroll within panel */

}

/* Ensure WooCommerce single product summary content displays properly on dark background */
.woocommerce .summary.entry-summary {
    display: block;
    width: 100%;
}

.woocommerce .summary.entry-summary .product_title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #ffffff !important;
    margin-bottom: 1rem;
    line-height: 1.3;
    text-align: left;
    width: 100%;
    word-wrap: break-word;
}

.woocommerce .summary.entry-summary .price {
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff !important;
    margin-bottom: 1rem;
    display: block;
    text-align: left;
}

.woocommerce .summary.entry-summary .woocommerce-product-details__short-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #ffffff !important;
    text-align: left;
}

.woocommerce .summary.entry-summary .cart {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
    display: flex;
    flex-direction: row; /* align controls horizontally */
    align-items: baseline; /* keep text baselines aligned across controls */
    gap: 12px;
    flex-wrap: wrap; /* allow wrap on smaller screens */
}
/* On normal screens keep everything on one row */
@media (min-width: 600px) {
    .woocommerce .summary.entry-summary .cart { flex-wrap: nowrap; }
}

/* Variable products: align attribute select, qty, and add-to-cart in one row */
.woocommerce .summary.entry-summary .cart .variations {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0;
    border: 0;
    width: auto;
    flex: 0 0 auto; /* keep compact so qty+button fit */
}
.woocommerce .summary.entry-summary .cart .variations tr,
.woocommerce .summary.entry-summary .cart .variations td,
.woocommerce .summary.entry-summary .cart .variations th { display: contents; }
.woocommerce .summary.entry-summary .cart .variations .label { display: none; }
.woocommerce .summary.entry-summary .cart .variations select {
    height: 44px;
    line-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: none;
    background: #e9e9e9;
    color: #111;
    min-width: 120px;
}
.woocommerce .summary.entry-summary .cart .variations .reset_variations { margin-left: 6px; font-size: 0.9rem; }

/* Ensure the add-to-cart group in variable products aligns inline with qty */
.woocommerce .summary.entry-summary .cart .single_variation_wrap {
    display: flex;
    align-items: baseline; /* align price text baseline with controls */
    gap: 12px;
    flex: 0 0 auto;
}
.woocommerce .summary.entry-summary .cart .single_variation_wrap .woocommerce-variation {
    order: 0; /* keep inline */
    display: inline-flex;
    align-items: center;
    width: auto;
    margin: 0;
}
.woocommerce .summary.entry-summary .cart .single_variation_wrap .variations_button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

/* Keep the live variation price visually unstyled (no background) and inline */
.woocommerce .summary.entry-summary .single_variation_wrap .woocommerce-variation-price,
.woocommerce .summary.entry-summary .single_variation_wrap .woocommerce-variation .price,
.woocommerce .summary.entry-summary .single_variation_wrap .price {
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
    display: inline-block;
    margin: 0;
}

/* Normalize Woo quantity and align nicely with the button */
.woocommerce .summary.entry-summary .cart .quantity {
    display: flex;
    align-items: center;
    margin: 0 !important;
    height: 44px;
}

.woocommerce .summary.entry-summary .cart .quantity input.qty {
    height: 44px;
    line-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: none;
    background: #e9e9e9;
    color: #111;
    width: 72px; /* stable width */
}

.woocommerce .summary.entry-summary .single_add_to_cart_button {
    background: var(--button-primary-bg);
    color: var(--button-primary-text);
    padding: 0 20px;
    border: none;
    border-radius: var(--button-border-radius);
    font-weight: var(--button-font-weight);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--button-transition);
    width: auto;
    align-self: flex-start;
    height: 44px; /* match quantity height */
    display: inline-flex;
    align-items: center;
        margin-top: 0 !important;
}

/* Stack controls on very small screens */
@media (max-width: 480px) {
    .woocommerce .summary.entry-summary .cart {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .woocommerce .summary.entry-summary .cart .variations,
    .woocommerce .summary.entry-summary .cart .single_variation_wrap { width: 100%; }
    .woocommerce .summary.entry-summary .cart .variations select { width: 100%; min-width: 0; }
    .woocommerce .summary.entry-summary .cart .single_add_to_cart_button { width: 100%; justify-content: center; }
}

.woocommerce .summary.entry-summary .single_add_to_cart_button:hover {
    background: var(--button-primary-bg-hover);
    color: var(--button-primary-text-hover);
}

.woocommerce .summary.entry-summary .product_meta {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #cccccc  !important;
    text-align: left;
    width: 100%;
}

.woocommerce .summary.entry-summary .product_meta > span {
    display: block;
    margin-bottom: 0.5rem;
    color: #cccccc  !important;
}

/* Stock status messages */
.woocommerce .summary.entry-summary .stock {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.5rem 0 1rem 0;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
}

.woocommerce .summary.entry-summary .stock.in-stock {
    color: #22c55e !important;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 999px;
}

/* Make the Out of stock notice larger and clearer */
.woocommerce .summary.entry-summary .stock.out-of-stock {
    font-size: 1rem;
    font-weight: 700;
    color: #EC2024 !important;
    background: rgba(236, 32, 36, 0.1);
    border: 1px solid rgba(236, 32, 36, 0.3);
}

.woocommerce .summary.entry-summary .product_meta a {
    color: #ffffff;
    text-decoration: none;
}

.woocommerce .summary.entry-summary .product_meta a:hover {
    color: #EC2024;
}

/* =====================
   Book Title: Chapter List
   ===================== */
.woocommerce .chapter-list-title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
}

.woocommerce .book-chapters.chapter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce .book-chapters.chapter-list .chapter-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border-light, #eaeaea);
}

.woocommerce .book-chapters .chapter-title a,
.woocommerce .book-chapters .chapter-title span {
    font-size: 16px;
    color: var(--color-text-primary, #333);
}

.woocommerce .book-chapters .chapter-title span {
    opacity: 0.9;
}

.woocommerce .chapter-badge {
    font-weight: 600;
    font-size: 14px;
}

.woocommerce .chapter-badge.badge-free { color: #28a745; }
.woocommerce .chapter-badge.badge-preview { color: #007cba; }
.woocommerce .chapter-badge.badge-premium { color: #EC2024; }

.woocommerce .chapter-cta {
    margin-left: 8px;
    font-size: 14px;
}

/* =====================
   Generic Modal (Credits)
   ===================== */
.woocommerce .b4-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
    align-items: center; /* center vertically */
    justify-content: center; /* center horizontally */
    padding: 20px;
    min-height: 100vh;
}
.woocommerce .b4-modal-overlay.active { display: flex; }

.woocommerce .b4-modal {
    position: relative;
    background: #ffffff;
    color: #111;
    width: 100%;
    max-width: 720px;
    max-height: 85vh; /* ensure fits viewport */
    overflow-y: auto;
    border-radius: 12px;
    padding: 24px 24px 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.woocommerce .b4-modal h2 { margin: 0 0 14px; font-size: 28px; font-weight: 700; }
.woocommerce .b4-modal h3 { margin: 18px 0 6px; font-size: 16px; font-weight: 700; }
.woocommerce .b4-modal p { margin: 0 0 4px; font-size: 15px; }

.woocommerce .b4-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.woocommerce .b4-modal-close:hover { color: #000; }

/* Title row with credits button */
.woocommerce .product-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.woocommerce .product-title-row .credits-button {
    background: transparent !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.35) !important;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.woocommerce .product-title-row .credits-button:hover,
.woocommerce .product-title-row .credits-button:focus {
    background: #EC2024 !important;
    border-color: #EC2024 !important;
    color: #ffffff !important;
}

@media (max-width: 640px) {
    .woocommerce .product-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* =====================
   Book Title: Top Section Layout Overrides
   - Make image:summary 1/3 : 2/3
   - Increase panel height
   - Show full cover with object-fit: contain
   ===================== */
.single-book_title .woocommerce .product-main {
    grid-template-columns: 1fr 2fr;
}

.single-book_title .woocommerce .product-images-container,
.single-book_title .woocommerce .product-summary-container {
    height: 640px;
}

/* Give the image area a subtle backdrop to letterbox when using contain */
.single-book_title .woocommerce .product-images-container {
    background: none !important;
}

/* Ensure images scale to fit without cropping on Book Title pages */
.single-book_title .woocommerce .product-images .woocommerce-product-gallery__image img,
.single-book_title .woocommerce .product-images img {
    object-fit: contain !important;
    background: none !important;
}

/* Mobile adjustments: stack and let heights be natural */
@media (max-width: 768px) {
    .single-book_title .woocommerce .product-images-container,
    .single-book_title .woocommerce .product-summary-container {
        height: auto !important;
        min-height: 0;
    }
    .single-book_title .woocommerce .product-images .woocommerce-product-gallery__image img,
    .single-book_title .woocommerce .product-images img {
        height: auto !important;
        max-height: 60vh;
        object-fit: contain !important;
    }
}

/* Cart Page */
.woocommerce .cart-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.woocommerce .cart-table-wrapper {
    overflow-x: auto;
    margin-bottom: 30px;
}

.woocommerce table.cart {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce table.cart th,
.woocommerce table.cart td {
    padding: 15px;
    border-bottom: 1px solid var(--color-border-light, #e5e5e5);
    text-align: left;
}

.woocommerce table.cart th {
    background: var(--color-background-light, #f8f9fa);
    font-weight: 600;
}

.woocommerce .cart-collaterals {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-top: 30px;
}

/* Checkout Page */
.woocommerce .checkout-form-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.woocommerce .checkout-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .woocommerce .product-main,
    .woocommerce .checkout-sections,
    .woocommerce .cart-collaterals {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .woocommerce .shop-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Single Product Mobile Layout */
@media (max-width: 768px) {
    .single-product .single-product-main-container {
        margin: 72px auto 16px auto;
        padding: 16px;
    }

    .single-product .product-main {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .single-product .product-details {
        padding: 0 12px;
    }

    .single-product .product-images-container,
    .single-product .product-summary-container {
        height: auto;
        min-height: 0;
    }

    .single-product .product-images-container {
        border-radius: 12px;
    }

    .single-product .product-summary-container {
        border-radius: 12px;
        padding: 16px;
    }

    .single-product .product-images .woocommerce-product-gallery__image img,
    .single-product .product-images img {
        height: auto !important;
        max-height: 60vh;
        object-fit: contain !important;
    }

    /* Mobile Gallery: Show one image at a time with horizontal scroll */
    .single-product .b4manga-gallery-main {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        height: auto;
    }

    .single-product .b4manga-gallery-image {
        position: relative;
        flex: 0 0 100%;
        width: 100%;
        height: auto;
        min-height: 300px;
        opacity: 1;
        scroll-snap-align: start;
        pointer-events: auto;
    }

    .single-product .b4manga-gallery-image img {
        width: 100%;
        height: auto;
        max-height: 60vh;
        object-fit: contain;
    }

    /* Hide thumbnails on mobile */
    .single-product .b4manga-gallery-thumbs {
        display: none;
    }

    /* If there's no gallery (just featured image), display it normally */
    .single-product .b4manga-product-gallery:has(.b4manga-gallery-image:only-child) .b4manga-gallery-main {
        display: block;
        overflow: visible;
    }

    .single-product .b4manga-product-gallery:has(.b4manga-gallery-image:only-child) .b4manga-gallery-image {
        position: relative;
        flex: none;
    }

    .single-product .summary.entry-summary {
        overflow: visible;
    }

    .single-product .summary.entry-summary .product_title {
        font-size: 1.6rem;
    }

    .single-product .summary.entry-summary .price {
        font-size: 1.8rem;
    }

    .single-product .summary.entry-summary .woocommerce-product-details__short-description {
        font-size: 0.95rem;
    }
}

/* WooCommerce Product Tabs */
.b4-woo-tabs {
    margin-top: 40px;
}

.b4-woo-tabs__list {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.b4-woo-tab {
    appearance: none;
    border: 0;
    border-radius: 0;
    margin: 0;
    background: #111;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.b4-woo-tab:hover,
.b4-woo-tab:focus {
    background: #ec2024 !important;
    color: #fff;
}

.b4-woo-tab.is-active {
    background: #ec2024 !important;
    color: #fff;
}

.b4-woo-tab:focus-visible {
    outline: 2px solid #ec2024;
    outline-offset: 2px;
}

.b4-woo-tabs__panels {
    background: none;
}

.b4-woo-panel {
    display: none;
    background: none;
    padding: 24px;
    border: 0;
}

.b4-woo-panel:last-child {
    margin-bottom: 0;
}

.b4-woo-panel.is-active {
    display: block;
}

.b4-woo-panel__toggle {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    background: #111;
    color: #fff;
    padding: 12px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.b4-woo-panel__toggle:focus-visible {
    outline: 2px solid #ec2024;
    outline-offset: 2px;
}

.b4-woo-panel__toggle:hover,
.b4-woo-panel__toggle:focus {
    background: #ec2024;
    color: #fff;
}

.b4-woo-panel.is-active .b4-woo-panel__toggle {
    background: #ec2024;
    color: #fff;
}

.b4-woo-panel__content {
    background: none;
}

.b4-woo-panel__toggle-icon {
    width: 12px;
    height: 12px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.b4-woo-panel.is-active .b4-woo-panel__toggle-icon {
    transform: rotate(225deg);
}

@media (max-width: 768px) {
    .b4-woo-tabs__list {
        display: none;
    }

    .b4-woo-panel {
        display: block;
        padding: 0;
        border: 1px solid var(--color-border-light, #eaeaea);
        margin-bottom: 12px;
    }

    .b4-woo-panel__toggle {
        display: inline-flex;
    }

    .b4-woo-panel__content {
        padding: 18px 16px 24px;
        background: var(--color-bg-secondary, #f5f5f5);
    }
}

/* Account Navigation */
.b4-account-nav {
    position: relative;
    margin-bottom: 0;

}

.b4-account-nav__inner {
    background: #111;
    border-radius: 16px 16px 0px 0px;
}

.b4-account-nav__toggle {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    color: #fff;
    border: 0;
    font-weight: 600;
    cursor: pointer;
}

.b4-account-nav__toggle:focus-visible {
    outline: 2px solid #ec2024;
    outline-offset: 2px;
}

.b4-account-nav__toggle-icon {
    width: 12px;
    height: 12px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.b4-account-nav.is-open .b4-account-nav__toggle-icon {
    transform: rotate(225deg);
}

.b4-account-nav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.b4-account-nav__item {
    margin: 0;

}

.b4-account-nav__link,
.b4-account-nav__link:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease;
    min-width: 120px;
}

.b4-account-nav__link-label {
    color: inherit;
}

.b4-account-nav__item:not(.is-active) .b4-account-nav__link {
    color: rgba(255, 255, 255, 0.85);
}

.b4-account-nav__item:not(.is-active) .b4-account-nav__link:hover,
.b4-account-nav__item:not(.is-active) .b4-account-nav__link:focus {
    color: #fff;
}

.b4-account-nav__item.is-active .b4-account-nav__link,
.b4-account-nav__link:hover,
.b4-account-nav__link:focus {
    background: #ec2024;
    color: #fff;
}

.woocommerce-account .woocommerce-MyAccount-content {
    width: 100%;
    float: none;
    clear: both;
    margin: 0;
    padding: 0;
}

@media (max-width: 900px) {
    .b4-account-nav__link {
        min-width: 0;
        flex: 1 1 auto;
    }
}

@media (max-width: 768px) {
    .b4-account-nav__toggle {
        display: inline-flex;
    }

    .b4-account-nav__inner {
        border-radius: 14px;
    }

    .b4-account-nav__list {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .b4-account-nav.is-open .b4-account-nav__list {
        display: flex;
    }

    .b4-account-nav__item + .b4-account-nav__item {
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .b4-account-nav__link {
        justify-content: flex-start;
    }
}

/* Account Dashboard */
.b4-account-dashboard {
    background: #fff;
    border-radius: 0px 0px 16px 16px;
    margin-top: 0;
    padding: 0 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* .b4-account-dashboard__header,
.b4-account-panel,
.b4-account-action {
} */

.b4-account-dashboard__header {
    padding: 16px;
    display: block;
}

.b4-account-dashboard__intro {
    display: block;
}

.b4-account-dashboard__icon {
    font-size: 40px;
    line-height: 1;
}

.b4-account-dashboard__title {
    margin: 0 0 0px;
    font-size: 26px;
    font-weight: 700;
}

.b4-account-dashboard__subtitle {
    margin: 0;
    color: #545454;
    font-size: 15px;
}

.b4-account-dashboard__main,
.b4-account-dashboard__secondary,
.b4-account-actions__grid {
    display: grid;
    gap: 0px;
}

.b4-account-dashboard__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.b4-account-dashboard__secondary {
    grid-template-columns: minmax(0, 1fr);
}

.b4-account-panel {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 0px !important;
}

.b4-account-panel__header {
    display: flex;
    align-items: center;
    gap: 0px;
}

.b4-account-panel__icon {
    font-size: 22px;
}

.b4-account-panel__title {
    margin: 0;
    font-size: 18px !important;
    font-weight: 700;
}

.b4-account-panel__empty {
    margin: 0;
    color: #6a6a6a;
    font-size: 15px;
}

.b4-account-media-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.b4-account-media-grid--favorites {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}


.b4-account-orders__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.b4-account-orders__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--color-bg-secondary, #f7f7f7);
    border-radius: 12px;
    padding: 16px 18px;
    border: 1px solid var(--color-border-light, #e3e3e3);
}

.b4-account-orders__number {
    font-weight: 700;
    font-size: 16px;
}

.b4-account-orders__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #555;
    font-size: 14px;
}

.b4-account-orders__link {
    background: #111;
    color: #fff !important;
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.b4-account-orders__link:hover,
.b4-account-orders__link:focus {
    background: #ec2024;
}

.b4-account-orders__tracker {
    background: var(--color-bg-secondary, #f7f7f7);
    border-radius: 14px;
    border: 1px solid var(--color-border-light, #e3e3e3);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.b4-account-orders__tracker-title {
    margin: 0;
    font-size: 16px !important;
    font-weight: 600;
}

.b4-account-orders__controls {
    display: flex;
    gap: 12px;
}

.b4-account-orders__controls input {
    flex: 1;
    border: 1px solid var(--color-border-light, #dcdcdc);
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 15px;
}

.b4-account-orders__submit {
    background: #111;
    color: #fff !important;
    border: 0;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.b4-account-orders__submit:hover,
.b4-account-orders__submit:focus {
    background: #ec2024;
    color: #fff !important;
}

.b4-account-orders__submit.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.b4-account-orders__help {
    margin: 0;
    font-size: 13px;
    color: #707070;
}

.b4-account-orders__error {
    margin: 0;
    color: #ec2024;
    font-weight: 600;
}

.b4-account-actions__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.b4-account-action {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.b4-account-action__title {
    margin: 0;
    font-size: 18px !important;
    font-weight: 700;
}

.b4-account-action__copy {
    margin: 0;
    color: #555;
    font-size: 15px;
}

.b4-account-action__content form {
    margin: 0;
}

.b4-account-action__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 999px;
    border: 0;
    background: #bbb;
    color: #fff !important;
    font-weight: 600;
    cursor: not-allowed;
}

.b4-account-order-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 9999;
}

.b4-account-order-modal.is-visible {
    display: flex;
}

.b4-account-order-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.65);
}

.b4-account-order-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
    padding: 32px;
}

.b4-account-order-modal__close {
    position: absolute;
    top: 16px;
    left: 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 26px;
    cursor: pointer;
    color: #707070;
}

.b4-account-order-modal__close:hover,
.b4-account-order-modal__close:focus {
    color: #ec2024;
}

.b4-order-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

.b4-order-modal__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.b4-order-modal__meta {
    margin: 4px 0 0;
    color: #555;
    font-size: 14px;
}

.b4-order-modal__action-button {
    display: inline-flex;
    padding: 10px 18px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.b4-order-modal__action-button:hover,
.b4-order-modal__action-button:focus {
    background: #ec2024;
    color: #fff;
}

.b4-order-modal__section + .b4-order-modal__section {
    margin-top: 28px;
}

.b4-order-modal__section-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
}

.b4-order-modal__table-wrapper {
    border: 1px solid var(--color-border-light, #e6e6e6);
    border-radius: 12px;
    overflow: hidden;
}

.b4-order-modal__table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.b4-order-modal__table th,
.b4-order-modal__table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--color-border-light, #ededed);
    text-align: left;
    vertical-align: top;
}

.b4-order-modal__table thead th {
    background: #f7f7f7;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.b4-order-modal__table-actions {
    text-align: right;
}

.b4-order-modal__download {
    display: inline-block;
    background: #111;
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
}

.b4-order-modal__download:hover,
.b4-order-modal__download:focus {
    background: #ec2024;
}

.b4-order-modal__quantity {
    display: inline-block;
    margin-left: 6px;
    color: #777;
    font-size: 13px;
}

.b4-order-modal__table-right {
    text-align: right;
}

.b4-account-order-modal__body {
    font-size: 14px;
}

.b4-account-order-modal__placeholder {
    margin: 0;
    color: #6a6a6a;
    text-align: center;
}

body.b4-account-order-modal-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .b4-account-dashboard__main,
    .b4-account-actions__grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .b4-account-dashboard__secondary {
        grid-template-columns: minmax(0, 1fr);
    }

    .b4-account-dashboard__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .b4-account-dashboard__intro {
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .b4-account-dashboard {
        padding: 0 24px 24px;
    }

    .b4-account-panel {
        padding: 20px;
    }

    .b4-account-orders__item {
        flex-direction: column;
        align-items: flex-start;
    }

    .b4-account-orders__link {
        align-self: stretch;
        text-align: center;
    }

    .b4-account-orders__controls {
        flex-direction: column;
    }

    .b4-account-orders__submit {
        width: 100%;
    }

    .b4-account-order-modal__dialog {
        padding: 24px 20px;
    }
}

@media (max-width: 540px) {
    .b4-account-dashboard {
        padding: 0 18px 18px;
        margin-top: 0;
    }

    .b4-account-media-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .b4-account-actions__grid {
        grid-template-columns: 1fr;
    }
}

/* My Account Shared Layout */
.b4-account-page {
    background: #fff;
    border: 1px solid var(--color-border-light, #e4e4e4);
    border-top: 0;
    border-radius: 0 0 16px 16px;
    padding: 36px 36px 40px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.b4-account-page__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.b4-account-page__title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.b4-account-page__description {
    margin: 10px 0 0;
    color: #5f5f5f;
    max-width: 640px;
}

.b4-account-card-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.b4-account-card {
    background: var(--color-bg-secondary, #f5f5f5);
    border: 1px solid var(--color-border-light, #e6e6e6);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.b4-account-card--orders {
    gap: 24px;
    padding: 24px 24px 32px;
}

.b4-account-card--form {
    max-width: 760px;
}

.b4-account-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.b4-account-card__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.b4-account-card__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.b4-account-card__empty {
    margin: 0;
    color: #6b6b6b;
}

.b4-account-address {
    margin: 0;
    font-style: normal;
    line-height: 1.7;
    color: var(--color-text-primary, #222);
}

.b4-account-table-wrapper {
    border: 1px solid var(--color-border-light, #e6e6e6);
    border-radius: 16px;
    overflow-x: auto;
    background: #fff;
}

.b4-account-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

.b4-account-table th,
.b4-account-table td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light, #ededed);
    vertical-align: top;
    font-size: 15px;
}

.b4-account-table thead th {
    background: var(--color-bg-secondary, #f5f5f5);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #525252;
}

.b4-account-table__row:last-child th,
.b4-account-table__row:last-child td {
    border-bottom: 0;
}

.b4-account-table__link {
    color: var(--color-primary, #111);
    font-weight: 600;
    text-decoration: none;
}

.b4-account-table__link:hover,
.b4-account-table__link:focus {
    color: var(--color-accent, #ec2024);
}

.b4-account-table__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.b4-account-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: #f1f2f4;
    color: #1f2933;
}

.b4-account-status--completed {
    background: #dcfce7;
    color: #047857;
}

.b4-account-status--processing {
    background: rgba(236, 32, 36, 0.12);
    color: #ec2024;
}

.b4-account-status--pending,
.b4-account-status--on-hold {
    background: #fef3c7;
    color: #b45309;
}

.b4-account-status--cancelled,
.b4-account-status--failed,
.b4-account-status--refunded {
    background: #f3f4f6;
    color: #4b5563;
}

.b4-account-pagination {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.b4-account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    border: 0;
    background: var(--button-primary-bg, #111);
    color: var(--button-primary-text, #fff) !important;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background var(--transition-fast, 0.15s ease), color var(--transition-fast, 0.15s ease), border-color var(--transition-fast, 0.15s ease);
}

.b4-account-button:hover,
.b4-account-button:focus {
    background: var(--button-primary-bg-hover, #ec2024);
    color: var(--button-primary-text-hover, #fff) !important;
}

.b4-account-button:focus-visible {
    outline: 2px solid var(--color-accent, #ec2024);
    outline-offset: 3px;
}

.b4-account-button--secondary {
    background: var(--button-secondary-bg, #ec2024);
    color: var(--button-secondary-text, #fff) !important;
}

.b4-account-button--secondary:hover,
.b4-account-button--secondary:focus {
    background: var(--button-secondary-bg-hover, #000);
}

.b4-account-button--ghost {
    background: transparent;
    color: var(--color-primary, #111) !important;
    border: 1px solid rgba(17, 17, 17, 0.18);
}

.b4-account-button--ghost:hover,
.b4-account-button--ghost:focus {
    background: #111;
    color: #fff !important;
    border-color: #111;
}

.b4-account-empty {
    background: var(--color-bg-secondary, #f5f5f5);
    border: 1px solid var(--color-border-light, #e6e6e6);
    border-radius: 18px;
    padding: 48px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    max-width: 520px;
    margin: 0 auto;
}

.b4-account-empty__title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.b4-account-empty__description {
    margin: 0;
    color: #606060;
}

.b4-account-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.b4-account-form .woocommerce-form-row {
    margin: 0 0 18px;
}

.b4-account-form .woocommerce-Input,
.b4-account-form .woocommerce-select {
    border-radius: var(--input-border-radius, 16px);
    padding: 12px 16px;
    border: 2px solid var(--input-border-color, #d1d5db);
    background: #fff;
}

.b4-account-form .woocommerce-Input:focus,
.b4-account-form .woocommerce-select:focus {
    border-color: var(--input-border-color-focus, #000);
}

.b4-account-form__grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.b4-account-form__help {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 13px;
}

.b4-account-form__fieldset {
    border: 1px solid var(--color-border-light, #e1e1e1);
    border-radius: 16px;
    padding: 22px 26px 10px;
    margin: 6px 0 0;
    background: rgba(0, 0, 0, 0.02);
}

.b4-account-form__fieldset legend {
    padding: 0 6px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #444;
}

.b4-account-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.b4-account-form__actions .b4-account-button {
    min-width: 180px;
}

@media (max-width: 1024px) {
    .b4-account-card--form {
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .b4-account-card-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 780px) {
    .b4-account-page {
        padding: 28px 24px 32px;
    }

    .b4-account-page__header {
        align-items: stretch;
    }

    .b4-account-card {
        padding: 22px;
    }

    .b4-account-form__grid {
        grid-template-columns: 1fr;
    }

    .b4-account-pagination {
        justify-content: center;
    }
}

@media (max-width: 680px) {
    .b4-account-card-grid {
        grid-template-columns: 1fr;
    }

    .b4-account-table-wrapper {
        border-radius: 16px;
    }

    .b4-account-table {
        min-width: 0;
    }

    .b4-account-table thead {
        display: none;
    }

    .b4-account-table tbody {
        display: grid;
        gap: 16px;
    }

    .b4-account-table__row {
        display: flex;
        flex-direction: column;
        gap: 14px;
        background: var(--color-bg-secondary, #f6f6f6);
        border-radius: 14px;
        border: 1px solid var(--color-border-light, #e6e6e6);
        padding: 18px 20px;
    }

    .b4-account-table__row:last-child {
        margin-bottom: 0;
    }

    .b4-account-table__cell,
    .b4-account-table__header {
        display: flex;
        flex-direction: column;
        gap: 6px;
        border: 0;
        padding: 0;
    }

    .b4-account-table__cell::before,
    .b4-account-table__header::before {
        content: attr(data-title);
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #6a6a6a;
    }

    .b4-account-table__actions {
        gap: 8px;
    }

    .b4-account-table__actions .b4-account-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .b4-account-page {
        padding: 24px 18px 28px;
    }

    .b4-account-card {
        padding: 20px;
    }

    .b4-account-button {
        width: 100%;
    }

    .b4-account-form__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .b4-account-form__actions .b4-account-button {
        width: 100%;
    }

    .b4-account-pagination {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
}

/* ======================================
   Book Title (bt-single) isolated styles
   - No dependency on WooCommerce selectors
   - Used only on single book_title pages
   ====================================== */
.bt-single .bt-container {
    max-width: 1280px;
    margin: 0 auto;
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 24px 20px 32px;
    background: var(--color-bg-secondary, #f5f5f5);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.bt-single .bt-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    margin-bottom: 12px; /* tighter gap above Chapters */
    padding: 0;
}

/* Left: images */
.bt-single .bt-images-container {
    background: #0b0b0b;
    padding: 0;
    margin: 0;
    height: auto; /* let the image define height */
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border-radius: 12px 0 0 0;
}

.bt-single .bt-image img,
.bt-single .bt-images img {
    width: 100% !important;
    height: auto !important; /* natural height */
    object-fit: contain !important;
    object-position: top left !important; /* eliminate top letterbox gap */
    display: block !important;
}

/* Right: summary */
.bt-single .bt-summary-container {
    background: #0f0f0f;
    color: #ffffff;
    padding: 32px;
    border-radius: 0 12px 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    height: auto; /* shrink-wrap to content */
    display: flex;
    align-items: flex-start;
}

.bt-single .bt-summary {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    height: 100%;
    overflow-y: auto;
}

.bt-single .bt-title {
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.bt-single .bt-price {
    font-size: 2.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.bt-single .bt-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #ffffff;
}

/* Title row + credits button */
.bt-single .bt-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.bt-single .bt-title-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.bt-single .bt-title-actions .b4manga-share {
    margin: 0;
}

.bt-single .bt-title-actions .b4manga-share__label,
.bt-single .bt-title-actions .b4manga-share__label--inline {
    color: #ffffff;
}

.bt-single .bt-credits-button {
    background: transparent !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.35) !important;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 600;
    line-height: 1.2;
}
.bt-single .bt-credits-button:hover,
.bt-single .bt-credits-button:focus {
    background: #EC2024 !important;
    border-color: #EC2024 !important;
    color: #ffffff !important;
}

/* Badges */
.bt-single .bt-badges {
    margin: 8px 0 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.bt-single .bt-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}
.bt-single .bt-badge-type { background: #f3f4f6; color: #333; }
.bt-single .bt-badge-status { background: #EC2024; color: #fff; }

@media (max-width: 768px) {
    .bt-single .bt-badge {
        padding: 4px 8px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        width: auto !important;
        display: inline-flex !important;
    }
}

/* Actions */
.bt-single .bt-actions { margin-top: 16px; }
/* Add inner breathing room for Woo add-to-cart/variations block rendered via shortcode */
.bt-single .bt-actions form.cart,
.bt-single .bt-actions .variations_form,
.bt-single .bt-actions .cart {
    display: flex;              /* lay controls on one row */
    align-items: baseline;      /* align text baselines for price/select/button */
    flex-wrap: wrap;            /* allow wrap on small screens */
    padding: 16px 20px;         /* inner spacing so price isn't hugging the edge */
    column-gap: 14px;           /* space between price / selects / button */
    row-gap: 10px;
}

/* Nudge price away from neighbors without styling the price itself */
.bt-single .bt-actions .price { margin-right: 12px; }

/* Ensure the variation table doesn't collapse padding when present */
.bt-single .bt-actions .variations { margin: 0; }

/* Slightly separate the meta block below the cart area */
.bt-single .bt-meta { margin-top: 32px; }
.bt-single .bt-rating-meta { margin-top: 10px; }

/* Meta */
.bt-single .bt-meta { margin-top: 24px; }
.bt-single .bt-meta-list {
    list-style: none;
    padding: 0; margin: 0;
    display: grid; gap: 6px;
}
.bt-single .bt-meta-bottom {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.bt-single .bt-meta-cta .btn {
    margin: 0;
    padding: var(--button-large-padding);
    font-size: var(--button-large-font-size);
}
.bt-single .bt-meta a { color: #ffffff !important; text-decoration: none !important; }
.bt-single .bt-meta a:hover { color: #ffffff !important; }

/* Chapters (mirrors earlier chapter styles but scoped) */
.bt-single .bt-chapter-section,
.bt-single .bt-comments-section {
    padding: 16px 20px;
}
.bt-single .bt-comments-title { margin: 0 0 12px; font-size: 22px; font-weight: 700; }
.bt-single .bt-details {
    max-width: 1280px;
    margin: 0 auto; /* center the Chapters section */
}
.bt-single .chapter-list-title { margin: 0 0 10px; font-size: 22px; font-weight: 700; }
.bt-single .book-chapters.chapter-list { list-style: none; padding: 0; margin: 0; }
.bt-single .book-chapters .chapter-list-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0; border-bottom: 1px solid var(--color-border-light, #eaeaea);
}
.bt-single .book-chapters .chapter-title a,
.bt-single .book-chapters .chapter-title span { font-size: 18px; color: var(--color-text-primary, #333); }
.bt-single .book-chapters .chapter-title span { opacity: 0.9; }
.bt-single .book-chapters .chapter-subtitle { color: #666; font-weight: 400; margin-left: 6px; font-size: 16px; }
.bt-single .chapter-badge { font-weight: 600; font-size: 18px; }
.bt-single .chapter-badge.badge-free { color: #28a745; }
.bt-single .chapter-badge.badge-preview { color: #007cba; }
.bt-single .chapter-badge.badge-premium { color: #EC2024; }
.bt-single .chapter-meta .btn { margin-left: 10px; }

/* Credits modal (scoped) */
.bt-single .b4-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10000;
    display: none; align-items: center; justify-content: center; padding: 20px; min-height: 100vh;
}
.bt-single .b4-modal-overlay.active { display: flex; }
.bt-single .b4-modal {
    position: relative; background: #ffffff; color: #111; width: 100%; max-width: 720px; max-height: 85vh;
    overflow-y: auto; border-radius: 12px; padding: 24px 24px 28px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.bt-single .b4-modal h2 { margin: 0 0 14px; font-size: 28px; font-weight: 700; }
.bt-single .b4-modal h3 { margin: 18px 0 6px; font-size: 16px; font-weight: 700; }
.bt-single .b4-modal p { margin: 0 0 4px; font-size: 15px; }
.bt-single .b4-modal-close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: none; background: transparent; color: #666; font-size: 22px; line-height: 1; cursor: pointer; }
.bt-single .b4-modal-close:hover { color: #000; }

/* Title Card Responsive */
@media (max-width: 768px) {
    /* Card spacing and stack */
    .bt-single .bt-container { margin: 72px auto 16px; padding: 0 12px 16px 0; }
    .bt-single .bt-details { padding: 0 12px; }
    .bt-single .bt-main { grid-template-columns: 1fr; gap: 16px; }
    .bt-single .bt-title-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .bt-single .bt-title-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .bt-single .bt-title-actions .b4manga-share {
        width: 100%;
    }

    /* Image and summary become a vertical card */
    .bt-single .bt-images-container, .bt-single .bt-summary-container {width:100%; height: auto; min-height: 0; }
    .bt-single .bt-images-container { background: none; border-radius: 12px; justify-content: center; }
    .bt-single .bt-summary-container { border-radius: 12px; padding: 16px; }
    .bt-single .bt-image img, .bt-single .bt-images img { height: auto !important; max-height: 60vh; object-fit: contain !important; border-radius: 12px; }

    /* Typography scaling */
    .bt-single .bt-title { font-size: 1.6rem; }
    .bt-single .bt-price { font-size: 1.8rem; }
    .bt-single .bt-description { font-size: 0.95rem; }
    .bt-single .bt-summary { overflow: visible; }

    /* Chapters readability */
    .bt-single .chapter-list-title { font-size: 20px; }
    .bt-single .book-chapters .chapter-title a { font-size: 15px; }
    .bt-single .book-chapters .chapter-list-item {
        flex-wrap: nowrap;
        gap: 10px;
    }
    .bt-single .chapter-badge {
        font-size: 14px;
        white-space: nowrap;
    }
    .bt-single .chapter-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }
    .bt-single .chapter-meta .btn {
        margin-left: 0;
        width: auto !important;
        padding: 8px 20px !important;
        font-size: 14px !important;
    }
    .chapter-title span { display: none; }
}



/* =====================
   Front Page Styles
   ===================== */

/* Series Slider - Full bleed, edge-to-edge */
.series-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  position: relative;
  overflow: hidden;
}

.series-slider {
  position: relative;
  width: 100%;
  height: min(92vh, 1000px);
  min-height: 360px;
  overflow: hidden;
  background: #060606;
}

.series-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .7s ease-in-out;
    pointer-events: none;
    z-index: 1;
}

.series-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.series-slide img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: fill;
  inset: 0;
}

.series-caption {
  position: absolute;
  right: 3%;
  bottom: 6%;
  max-width: 560px;
  background: rgba(0,0,0,.82);
  color: #fff;
  padding: 24px;
  border-radius: 12px;
}

.series-caption h2 { margin: 0 0 10px; line-height: 1.2; }
.series-caption p { margin: 0 0 16px; opacity: .95; }

.series-btn {
  display: inline-block;
  background: #EC2024;
  color: #fff !important;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
}

.series-btn:hover {
  display: inline-block;
  background: #ffffff !important;
  color: #000000 !important;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
}

/* Arrows */
.series-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  pointer-events: none;
}

.series-arrow {
  position: absolute;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 20px; font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
}
.series-arrow:hover { background: rgba(0,0,0,.85); }
.series-arrow.prev { left: 12px; }
.series-arrow.next { right: 12px; }

/* Front page hero section background */
.front-hero-section {
  background-color: #f0f0f0;
  padding: 20px 0;
}

@media (max-width: 768px){
  .series-slider{ display: none; }
  .series-caption{ display: none; }
  .series-arrow{ display: none; }
  .series-hero{ display: none; }
  
  /* Add top padding to front page when series slider is hidden */
  .front-page-fullwidth{ padding-top: 60px; }
  .front-hero-shortcode{ margin-top: 0 !important; }
}


.front-hero-section {background: #060606;}

/* Front page sidebar and titles section */
.front-sidebar-and-titles {
  margin: 40px;
}

.front-flex-container {
  display: flex;
  gap: 24px;
  align-items: start;
}

/* Desktop-only grid wrapper for sidebar + titles */
@media (min-width: 769px) {
    .front-grid {
        display: grid;
        grid-template-columns: 260px 1fr;
        gap: 48px; /* visible space between sidebar and titles */
        align-items: start;
    }
}

.front-sidebar {
  flex-shrink: 0;
  width: 260px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.front-titles {
    flex: 1;
    min-width: 0;
    margin-top: 20px;
    margin-bottom: 20px;
}

@media (min-width: 769px) {
    .front-titles { padding-left: 8px; }
}

.front-titles h2 {
    display: inline-flex;
    color: #1a1a1a !important;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
}

.front-titles h2::before {
    content: '';
    width: 36px;
    height: 1px;
    background: currentColor;
}

.story-genre-filter-list,
.title-series-filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.story-genre-filter-list li,
.title-series-filter-list li {
  margin-bottom: 8px;
}

.story-genre-filter-list a,
.title-series-filter-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.story-genre-filter-list a:hover,
.story-genre-filter-list li.is-active a,
.title-series-filter-list a:hover,
.title-series-filter-list li.is-active a {
  color: #ec2024;
}

.story-genre-filter-list li.is-active a::before,
.title-series-filter-list li.is-active a::before {
  content: '•';
  color: inherit;
}

.story-genre-filter-list .reset-filter a,
.title-series-filter-list .reset-filter a {
  color: #333;
  font-weight: 600;
}

.story-genre-filter-list .reset-filter a:hover,
.title-series-filter-list .reset-filter a:hover {
  color: #ec2024;
}

.title-early-access-filter {
    margin: 16px 0 0;
    padding: 0;
}

.title-early-access-filter__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}

.title-early-access-filter__label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--color-primary);
}

.title-early-access-filter__label span {
    color: var(--color-text-primary);
}

.title-book-type-filter {
    margin: 20px 0 0;
    padding: 0;
}

.title-book-type-filter__group {
    margin: 0;
    padding: 0;
    border: 0;
}

.title-book-type-filter__option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    user-select: none;
}

.title-book-type-filter__option input[type="radio"] {
    accent-color: var(--color-primary);
}

.title-book-type-filter__option span {
    color: var(--color-text-primary);
    font-size: 0.95rem;
}

.title-book-type-filter__reset {
    display: inline-block;
    margin-top: 8px;
    color: var(--color-primary);
}

/* Desktop: 5 columns */
.front-titles-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.front-titles-row--account {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.front-titles-row--account.front-titles-row--library {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.front-titles-row > * {
  min-width: 0;
}

.front-titles-actions {
  margin-top: 16px;
}

.front-titles-actions .button {
  display: inline-block;
  background: #111;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
}

/* Tablet: 3 columns */
@media (max-width: 1024px) {
  .front-flex-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
  }
  
  .front-titles-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

/* Mobile: 2 columns, hide sidebar */
@media (max-width: 768px) {
  .front-sidebar { 
    display: none; 
  }
  
  .front-flex-container {
    display: block;
  }
  
  .front-titles-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .front-titles h2 {
        display: inline-flex;
        color: #1a1a1a !important;
        align-items: center;
        gap: 0.15rem;
        font-size: 1.0rem;
        margin-bottom: 1.5rem;
        letter-spacing: 0.35em;
        text-transform: uppercase;
    }

    .front-titles h2::before {
        content: '';
        width: 16px;
        height: 1px;
        background: currentColor;
    }
}

.b4-woo-panel__toggle-label {
    flex: 1;
    text-align: left;
}

@media (max-width: 600px) {
    .footer-mascot {
        display: none;
    }
}

/* ========================================================================== 
   Creator Profile Template
   ========================================================================== */
.creator-profile {
    background: var(--color-background-alt, #f5f7fb);
    padding: clamp(2rem, 4vw, 4rem) 1.5rem;
}

.creator-profile__inner {
    max-width: 1280px;
    margin: 0 auto;
}

.creator-profile__layout {
    display: flex;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: flex-start;
}

.creator-profile__sidebar {
    flex: 0 0 280px;
    max-width: 320px;
    position: sticky;
    top: clamp(2rem, 4vw, 4rem);
}

.creator-profile__photo {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(28, 27, 38, 0.12);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.creator-profile__image {
    display: block;
    width: 100%;
    height: auto;
}

.creator-profile__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    font-size: 3rem;
    color: var(--color-text-muted, #8b8da5);
}

.creator-profile__social {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.creator-profile__social a {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    font-weight: var(--font-weight-semibold, 600);
    color:  #ffffff;
    text-decoration: none;
    background: rgba(8, 8, 8, 0.9);
    border-radius: 999px;
    padding: 0.75rem 1.35rem !important;
    box-shadow: 0 4px 12px rgba(28, 27, 38, 0.08);
    transition: transform 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.creator-profile__social a:hover,
.creator-profile__social a:focus {
    transform: translateY(-2px);
    color: #ffffff;
    background: #EC2024;
}

.creator-profile__content {
    flex: 1 1 auto;
}

.creator-profile__article {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 45px rgba(28, 27, 38, 0.08);
    padding: clamp(2rem, 4vw, 3rem);
}

.creator-profile__title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin: 0 0 1rem;
}

.creator-profile__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.creator-profile__field {
    background: var(--color-accent-soft, rgba(255, 64, 87, 0.12));
    color: var(--color-accent, #ff4057);
    font-size: 0.85rem;
    font-weight: var(--font-weight-semibold, 600);
    letter-spacing: 0.04em;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    text-transform: uppercase;
}

.creator-profile__meta {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin: 0 0 2rem;
}

.creator-profile__meta dt {
    font-weight: var(--font-weight-semibold, 600);
    margin: 0 0 0.25rem;
    color: var(--color-text-secondary, #4f506a);
}

.creator-profile__meta dd {
    margin: 0;
    color: var(--color-text-primary, #1c1b26);
}

.creator-profile__bio {
    border-top: 1px solid var(--color-border-light, #e1e1e1);
    margin-top: clamp(2rem, 5vw, 3rem);
    padding: 1.5rem 0 0;
}

.creator-profile__bio-toggle {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--color-text-primary, #1c1b26);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 1.15rem;
    font-weight: var(--font-weight-semibold, 600);
    padding: 0.75rem 0;
    width: 100%;
    transition: color 150ms ease;
}

.creator-profile__bio-toggle:hover,
.creator-profile__bio-toggle:focus-visible {
    color: var(--color-accent, #ff4057);
}

.creator-profile__bio-toggle:focus-visible {
    outline: 2px solid var(--color-accent, #ff4057);
    outline-offset: 6px;
    border-radius: 10px;
}

.creator-profile__bio-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.75rem;
}

.creator-profile__bio-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: var(--color-background-alt, #f5f7fb);
    color: var(--color-accent, #ff4057);
    transition: background 150ms ease, color 150ms ease;
    margin-right: 0.5rem;
}

.creator-profile__bio-toggle-icon i {
    transition: transform 180ms ease;
}

.creator-profile__bio-toggle:hover .creator-profile__bio-toggle-icon,
.creator-profile__bio-toggle:focus-visible .creator-profile__bio-toggle-icon {
    background: var(--color-accent, #ff4057);
    color: #ffffff;
}

.creator-profile__bio-toggle[aria-expanded="true"] .creator-profile__bio-toggle-icon i {
    transform: rotate(180deg);
}

.creator-profile__bio-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-primary, #1c1b26);
    transition: max-height 260ms ease, opacity 200ms ease;
    max-height: 9999px;
    opacity: 1;
    visibility: visible;
    padding: 1.2rem 0 0;
}

.creator-profile__bio-content[aria-hidden="true"] {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    padding-top: 0;
}

.creator-profile__bio-content p {
    margin-bottom: 1.2rem;
}

.creator-profile__bio-content p:last-child {
    margin-bottom: 0;
}

.creator-profile__bio--mobile .creator-profile__bio-toggle {
    display: flex;
}

.creator-profile__series,
.creator-profile__titles {
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.creator-profile__series h2,
.creator-profile__titles h2 {
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    margin-bottom: 1.25rem;
}

.creator-profile__series ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.creator-profile__titles .b4-post-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .creator-profile__titles .b4-post-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .creator-profile__titles .b4-post-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ========================================================================== 
   FAQ Archive Template
   ========================================================================== */
.faq-archive {
    margin-top: clamp(2rem, 5vw, 3.5rem);
}

.faq-archive__list {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.25rem);
}

.faq-archive__question {
    margin: 0 0 0.85rem;
    font-size: clamp(1.4rem, 2.5vw, 1.7rem);
    color: #ec2024 !important;
    font-weight: var(--font-weight-bold, 700);
}

.faq-archive__answer {
    color: var(--color-text-primary, #1c1b26);
    font-size: 1.05rem;
    line-height: 1.8;
}

.faq-archive__answer p {
    margin: 0 0 1.2rem;
}

.faq-archive__answer p:last-child {
    margin-bottom: 0;
}

.faq-archive__empty {
    margin: clamp(2rem, 4vw, 3rem) 0 0;
    font-size: 1.05rem;
    color: var(--color-text-secondary, #4f506a);
}

.creator-profile__series a {
    color: var(--color-accent, #ff4057);
    font-weight: var(--font-weight-semibold, 600);
    text-decoration: none;
}

.creator-profile__series a:hover,
.creator-profile__series a:focus {
    text-decoration: underline;
}

@media (max-width: 960px) {
    .creator-profile__layout {
        flex-direction: column;
    }

    .creator-profile__sidebar {
        position: static;
        max-width: none;
        width: 100%;
    }

    .creator-profile__photo {
        max-width: 320px;
        margin: 0 auto 1.75rem;
    }

    .creator-profile__social {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 640px) {
    .creator-profile {
        padding: 2rem 1rem;
    }

    .creator-profile__article {
        padding: 1.75rem;
    }

    .creator-profile__fields {
        gap: 0.4rem;
    }

    .creator-profile__meta {
        grid-template-columns: 1fr;
    }
}