/*!
 * Theme Name: Lightcraft OnBoom
 * Theme URI: https://muabantenmien.com/themes/lightcraft/
 * Description: A lightweight, fast, secure WordPress + WooCommerce theme. Modern, accessible, ~40KB CSS, no jQuery dependency for core features. Built for PHP 8.1+ and WordPress 6.x.
 * Version: 1.0.9
 * Author: Lightcraft Team - OnBoom Group - Mr.Chính
 * Author URI: https://muabantenmien.com/
 * Tags: blog, e-commerce, two-columns, right-sidebar, custom-background, custom-colors, custom-logo, custom-menu, featured-images, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks
 * Text Domain: lightcraft
 * Tested up to: 6.5
 * Requires at least: 5.9
 * Requires PHP: 7.4
 * License: GNU General Public License v2.0 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 */

/* ==========================================================================
   1. CSS Variables (Design Tokens)
   ========================================================================== */
:root {
    /* Colors */
    --lc-color-text: #1f2937;
    --lc-color-text-light: #6b7280;
    --lc-color-bg: #ffffff;
    --lc-color-bg-alt: #f9fafb;
    --lc-color-border: #e5e7eb;
    --lc-color-primary: #2563eb;
    --lc-color-primary-hover: #1d4ed8;
    --lc-color-link: var(--lc-color-primary);
    --lc-color-link-hover: var(--lc-color-primary-hover);
    --lc-color-success: #10b981;
    --lc-color-danger: #ef4444;
    --lc-color-warning: #f59e0b;

    /* Typography */
    --lc-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    --lc-font-heading: var(--lc-font-body);
    --lc-font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;

    --lc-text-xs: 0.75rem;
    --lc-text-sm: 0.875rem;
    --lc-text-base: 1rem;
    --lc-text-lg: 1.125rem;
    --lc-text-xl: 1.25rem;
    --lc-text-2xl: 1.5rem;
    --lc-text-3xl: clamp(1.5rem, 4vw, 1.875rem);
    --lc-text-4xl: clamp(1.875rem, 5vw, 2.25rem);
    --lc-text-5xl: clamp(2.25rem, 6vw, 3rem);

    --lc-leading-tight: 1.25;
    --lc-leading-normal: 1.6;
    --lc-leading-relaxed: 1.75;

    /* Spacing */
    --lc-space-1: 0.25rem;
    --lc-space-2: 0.5rem;
    --lc-space-3: 0.75rem;
    --lc-space-4: 1rem;
    --lc-space-5: 1.25rem;
    --lc-space-6: 1.5rem;
    --lc-space-8: 2rem;
    --lc-space-10: 2.5rem;
    --lc-space-12: 3rem;
    --lc-space-16: 4rem;
    --lc-space-20: 5rem;

    /* Layout */
    --lc-container: 1200px;
    --lc-container-narrow: 800px;
    --lc-sidebar-width: 320px;
    --lc-radius-sm: 4px;
    --lc-radius: 8px;
    --lc-radius-lg: 12px;

    /* Shadows */
    --lc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --lc-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --lc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

    /* Header */
    --lc-header-height: 72px;

    /* Transitions */
    --lc-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode tokens */
[data-theme="dark"] {
    --lc-color-text: #f3f4f6;
    --lc-color-text-light: #9ca3af;
    --lc-color-bg: #111827;
    --lc-color-bg-alt: #1f2937;
    --lc-color-border: #374151;
    --lc-color-primary: #60a5fa;
    --lc-color-primary-hover: #93c5fd;
}

/* Auto dark mode (system preference) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --lc-color-text: #f3f4f6;
        --lc-color-text-light: #9ca3af;
        --lc-color-bg: #111827;
        --lc-color-bg-alt: #1f2937;
        --lc-color-border: #374151;
        --lc-color-primary: #60a5fa;
        --lc-color-primary-hover: #93c5fd;
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    font-family: var(--lc-font-body);
    font-size: var(--lc-text-base);
    line-height: var(--lc-leading-normal);
    color: var(--lc-color-text);
    background-color: var(--lc-color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: 0;
    background: transparent;
    padding: 0;
}

a {
    color: var(--lc-color-link);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--lc-transition);
}

a:hover,
a:focus-visible {
    color: var(--lc-color-link-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--lc-color-primary);
    outline-offset: 2px;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--lc-font-heading);
    font-weight: 700;
    line-height: var(--lc-leading-tight);
    margin: 0 0 var(--lc-space-4);
    color: var(--lc-color-text);
}

h1 { font-size: var(--lc-text-5xl); }
h2 { font-size: var(--lc-text-4xl); }
h3 { font-size: var(--lc-text-3xl); }
h4 { font-size: var(--lc-text-2xl); }
h5 { font-size: var(--lc-text-xl); }
h6 { font-size: var(--lc-text-lg); }

p {
    margin: 0 0 var(--lc-space-4);
}

ul, ol {
    padding-left: var(--lc-space-6);
}

blockquote {
    border-left: 4px solid var(--lc-color-primary);
    padding: var(--lc-space-2) var(--lc-space-6);
    margin: var(--lc-space-6) 0;
    font-style: italic;
    color: var(--lc-color-text-light);
}

code, pre, kbd {
    font-family: var(--lc-font-mono);
    font-size: 0.9em;
}

code {
    background: var(--lc-color-bg-alt);
    padding: 0.125em 0.375em;
    border-radius: var(--lc-radius-sm);
    border: 1px solid var(--lc-color-border);
}

pre {
    background: var(--lc-color-bg-alt);
    padding: var(--lc-space-4);
    border-radius: var(--lc-radius);
    overflow-x: auto;
    border: 1px solid var(--lc-color-border);
}

pre code {
    background: transparent;
    padding: 0;
    border: 0;
}

hr {
    border: 0;
    border-top: 1px solid var(--lc-color-border);
    margin: var(--lc-space-8) 0;
}

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

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 99999;
    background: var(--lc-color-primary);
    color: #fff;
    padding: var(--lc-space-3) var(--lc-space-4);
    text-decoration: none;
    border-radius: 0 0 var(--lc-radius) 0;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

/* ==========================================================================
   5. Layout
   ========================================================================== */
.lc-container {
    width: 100%;
    max-width: var(--lc-container);
    margin-inline: auto;
    padding-inline: var(--lc-space-4);
}

@media (min-width: 768px) {
    .lc-container { padding-inline: var(--lc-space-6); }
}

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
    padding-block: var(--lc-space-8);
}

@media (min-width: 768px) {
    .site-content { padding-block: var(--lc-space-12); }
}

/* Two-column layout (sidebar) */
.lc-layout {
    display: grid;
    gap: var(--lc-space-8);
}

@media (min-width: 992px) {
    .has-sidebar .lc-layout {
        grid-template-columns: 1fr var(--lc-sidebar-width);
    }
    .has-sidebar.sidebar-left .lc-layout {
        grid-template-columns: var(--lc-sidebar-width) 1fr;
    }
    .has-sidebar.sidebar-left .lc-main { order: 2; }
}

.full-width .lc-layout {
    grid-template-columns: 1fr;
}

.full-width-narrow .lc-layout {
    max-width: var(--lc-container-narrow);
    margin-inline: auto;
}

/* ==========================================================================
   6. Header
   ========================================================================== */
.site-header {
    background: var(--lc-color-bg);
    border-bottom: 1px solid var(--lc-color-border);
    position: relative;
    z-index: 100;
}

.site-header.is-sticky {
    position: sticky;
    top: 0;
    backdrop-filter: saturate(180%) blur(8px);
    background: color-mix(in srgb, var(--lc-color-bg) 85%, transparent);
}

.lc-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--lc-space-6);
    min-height: var(--lc-header-height);
}

.site-branding {
    flex-shrink: 0;
}

.site-title {
    margin: 0;
    font-size: var(--lc-text-xl);
}

.site-title a {
    color: var(--lc-color-text);
    text-decoration: none;
}

.custom-logo-link img {
    max-height: 48px;
    width: auto;
}

.site-description {
    font-size: var(--lc-text-sm);
    color: var(--lc-color-text-light);
    margin: 0;
}

/* Header actions (search, cart, etc.) */
.lc-header-actions {
    display: flex;
    align-items: center;
    gap: var(--lc-space-3);
}

.lc-icon-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--lc-radius);
    color: var(--lc-color-text);
    transition: background var(--lc-transition);
    text-decoration: none;
    position: relative;
}

.lc-icon-btn:hover,
.lc-icon-btn:focus-visible {
    background: var(--lc-color-bg-alt);
    color: var(--lc-color-text);
}

.lc-icon-btn svg {
    width: 22px;
    height: 22px;
}

.lc-cart-count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--lc-color-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

/* Theme toggle */
.lc-theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .lc-theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .lc-theme-toggle .icon-moon { display: none; }

/* ==========================================================================
   7. Navigation
   ========================================================================== */
.main-navigation {
    display: none;
}

@media (min-width: 992px) {
    .main-navigation {
        display: block;
        flex: 1;
    }
}

.lc-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: var(--lc-space-1);
    flex-wrap: wrap;
}

.lc-menu > li > a,
.lc-menu > li > .menu-item-text {
    display: block;
    padding: var(--lc-space-3) var(--lc-space-4);
    color: var(--lc-color-text);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--lc-radius);
    transition: background var(--lc-transition), color var(--lc-transition);
}

.lc-menu > li > a:hover,
.lc-menu > li > a:focus-visible,
.lc-menu > .current-menu-item > a {
    background: var(--lc-color-bg-alt);
    color: var(--lc-color-primary);
}

/* Submenu */
.lc-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: var(--lc-space-2);
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--lc-color-bg);
    border: 1px solid var(--lc-color-border);
    border-radius: var(--lc-radius);
    box-shadow: var(--lc-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--lc-transition), visibility var(--lc-transition), transform var(--lc-transition);
    z-index: 50;
}

.lc-menu li {
    position: relative;
}

.lc-menu li:hover > .sub-menu,
.lc-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lc-menu .sub-menu a {
    display: block;
    padding: var(--lc-space-2) var(--lc-space-3);
    color: var(--lc-color-text);
    text-decoration: none;
    border-radius: var(--lc-radius-sm);
    font-size: var(--lc-text-sm);
}

.lc-menu .sub-menu a:hover,
.lc-menu .sub-menu a:focus-visible {
    background: var(--lc-color-bg-alt);
    color: var(--lc-color-primary);
}

/* Mega menu */
.lc-menu .menu-item-mega {
    position: static;
}

.lc-menu .menu-item-mega > .sub-menu {
    left: 0;
    right: 0;
    width: 100%;
    max-width: var(--lc-container);
    margin: 0 auto;
    columns: 4;
    column-gap: var(--lc-space-6);
    padding: var(--lc-space-6);
}

.lc-menu .menu-item-mega > .sub-menu li {
    break-inside: avoid;
    margin-bottom: var(--lc-space-2);
}

/* Mobile menu toggle */
.lc-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--lc-radius);
}

@media (min-width: 992px) {
    .lc-menu-toggle { display: none; }
}

.lc-menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* Mobile drawer */
.lc-mobile-drawer {
    position: fixed;
    inset: 0;
    background: var(--lc-color-bg);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 280ms ease-out;
    overflow-y: auto;
    padding: var(--lc-space-6);
    visibility: hidden;
}

.lc-mobile-drawer[aria-hidden="false"] {
    transform: translateX(0);
    visibility: visible;
}

.lc-mobile-drawer .lc-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: var(--lc-space-6);
}

.lc-mobile-drawer .lc-menu li {
    border-bottom: 1px solid var(--lc-color-border);
}

.lc-mobile-drawer .lc-menu a {
    padding: var(--lc-space-4);
    border-radius: 0;
}

.lc-mobile-drawer .sub-menu {
    position: static;
    border: 0;
    box-shadow: none;
    padding-left: var(--lc-space-4);
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    background: var(--lc-color-bg-alt);
}

.lc-mobile-drawer .sub-menu.is-open {
    display: block;
}

.lc-drawer-close {
    position: absolute;
    top: var(--lc-space-4);
    right: var(--lc-space-4);
    width: 40px;
    height: 40px;
    border-radius: var(--lc-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   8. Buttons & Forms
   ========================================================================== */
.lc-btn,
button.lc-btn,
input[type="submit"],
button[type="submit"],
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--lc-space-2);
    padding: var(--lc-space-3) var(--lc-space-6);
    background: var(--lc-color-primary);
    color: #fff;
    border-radius: var(--lc-radius);
    font-weight: 600;
    font-size: var(--lc-text-base);
    text-decoration: none;
    border: 0;
    cursor: pointer;
    transition: background var(--lc-transition), transform var(--lc-transition);
    line-height: 1.4;
}

.lc-btn:hover,
input[type="submit"]:hover,
button[type="submit"]:hover,
.button:hover {
    background: var(--lc-color-primary-hover);
    color: #fff;
    transform: translateY(-1px);
}

.lc-btn-outline {
    background: transparent;
    color: var(--lc-color-primary);
    border: 1px solid var(--lc-color-border);
}

.lc-btn-outline:hover {
    background: var(--lc-color-bg-alt);
    color: var(--lc-color-primary);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: var(--lc-space-3) var(--lc-space-4);
    border: 1px solid var(--lc-color-border);
    border-radius: var(--lc-radius);
    background: var(--lc-color-bg);
    transition: border-color var(--lc-transition), box-shadow var(--lc-transition);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--lc-color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lc-color-primary) 20%, transparent);
    outline: 0;
}

label {
    display: block;
    margin-bottom: var(--lc-space-2);
    font-weight: 500;
    font-size: var(--lc-text-sm);
}

/* ==========================================================================
   9. Posts
   ========================================================================== */
.entry {
    margin-bottom: var(--lc-space-12);
}

.entry-header {
    margin-bottom: var(--lc-space-4);
}

.entry-title {
    margin: 0 0 var(--lc-space-3);
}

.entry-title a {
    color: var(--lc-color-text);
    text-decoration: none;
}

.entry-title a:hover {
    color: var(--lc-color-primary);
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--lc-space-3);
    color: var(--lc-color-text-light);
    font-size: var(--lc-text-sm);
}

.entry-meta a {
    color: inherit;
    text-decoration: none;
}

.entry-meta a:hover {
    color: var(--lc-color-primary);
}

.post-thumbnail {
    display: block;
    overflow: hidden;
    border-radius: var(--lc-radius);
    margin-bottom: var(--lc-space-4);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    transition: transform 400ms ease;
}

.post-thumbnail:hover img {
    transform: scale(1.03);
}

.entry-summary,
.entry-content {
    line-height: var(--lc-leading-relaxed);
}

.entry-content > * {
    margin-bottom: var(--lc-space-4);
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

/* Posts grid */
.lc-posts-grid {
    display: grid;
    gap: var(--lc-space-8);
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .lc-posts-grid.cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .lc-posts-grid.cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Pagination */
.lc-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: var(--lc-space-2);
    justify-content: center;
    margin-top: var(--lc-space-12);
}

.lc-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--lc-space-3);
    border: 1px solid var(--lc-color-border);
    border-radius: var(--lc-radius);
    color: var(--lc-color-text);
    text-decoration: none;
    transition: all var(--lc-transition);
}

.lc-pagination .page-numbers:hover,
.lc-pagination .page-numbers.current {
    background: var(--lc-color-primary);
    color: #fff;
    border-color: var(--lc-color-primary);
}

/* ==========================================================================
   10. Sidebar & Widgets
   ========================================================================== */
.widget {
    margin-bottom: var(--lc-space-8);
    padding-bottom: var(--lc-space-6);
    border-bottom: 1px solid var(--lc-color-border);
}

.widget:last-child {
    border-bottom: 0;
}

.widget-title {
    font-size: var(--lc-text-lg);
    margin-bottom: var(--lc-space-4);
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: var(--lc-space-2) 0;
    border-bottom: 1px solid var(--lc-color-border);
}

.widget ul li:last-child {
    border-bottom: 0;
}

.widget a {
    text-decoration: none;
    color: var(--lc-color-text);
}

.widget a:hover {
    color: var(--lc-color-primary);
}

/* ==========================================================================
   11. Footer
   ========================================================================== */
.site-footer {
    background: var(--lc-color-bg-alt);
    border-top: 1px solid var(--lc-color-border);
    padding-block: var(--lc-space-12);
    margin-top: var(--lc-space-16);
}

.lc-footer-widgets {
    display: grid;
    gap: var(--lc-space-8);
    grid-template-columns: 1fr;
    margin-bottom: var(--lc-space-8);
}

@media (min-width: 640px) {
    .lc-footer-widgets.cols-2 { grid-template-columns: repeat(2, 1fr); }
    .lc-footer-widgets.cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lc-footer-widgets.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .lc-footer-widgets.cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lc-footer-widgets.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.site-info {
    text-align: center;
    color: var(--lc-color-text-light);
    font-size: var(--lc-text-sm);
    padding-top: var(--lc-space-6);
    border-top: 1px solid var(--lc-color-border);
}

/* ==========================================================================
   12. Search Modal
   ========================================================================== */
.lc-search-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    padding-inline: var(--lc-space-4);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.lc-search-modal[aria-hidden="false"] {
    display: flex;
    animation: lc-fade-in 200ms ease-out;
}

.lc-search-modal-inner {
    background: var(--lc-color-bg);
    width: 100%;
    max-width: 600px;
    border-radius: var(--lc-radius-lg);
    padding: var(--lc-space-4);
    box-shadow: var(--lc-shadow-lg);
}

.lc-search-modal input[type="search"] {
    font-size: var(--lc-text-lg);
    padding: var(--lc-space-4);
}

@keyframes lc-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   13. Comments
   ========================================================================== */
.comments-area {
    margin-top: var(--lc-space-12);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--lc-space-8);
}

.comment-list .children {
    list-style: none;
    padding-left: var(--lc-space-6);
}

.comment-body {
    padding: var(--lc-space-4);
    background: var(--lc-color-bg-alt);
    border-radius: var(--lc-radius);
    margin-bottom: var(--lc-space-4);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: var(--lc-space-3);
    margin-bottom: var(--lc-space-3);
}

.comment-author img {
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: 600;
    font-style: normal;
}

/* ==========================================================================
   14. Back to top
   ========================================================================== */
.lc-back-to-top {
    position: fixed;
    bottom: var(--lc-space-6);
    right: var(--lc-space-6);
    width: 44px;
    height: 44px;
    background: var(--lc-color-primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--lc-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity var(--lc-transition), visibility var(--lc-transition), transform var(--lc-transition);
    z-index: 50;
}

.lc-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lc-back-to-top:hover {
    background: var(--lc-color-primary-hover);
    color: #fff;
}

.lc-back-to-top svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   15. WooCommerce
   ========================================================================== */
.woocommerce ul.products {
    display: grid;
    gap: var(--lc-space-6);
    grid-template-columns: 1fr;
    list-style: none;
    padding: 0;
    margin: 0 0 var(--lc-space-8);
}

@media (min-width: 480px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .woocommerce ul.products.columns-3 { grid-template-columns: repeat(3, 1fr); }
    .woocommerce ul.products.columns-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .woocommerce ul.products.columns-4 { grid-template-columns: repeat(4, 1fr); }
}

.woocommerce ul.products li.product {
    background: var(--lc-color-bg);
    border: 1px solid var(--lc-color-border);
    border-radius: var(--lc-radius);
    overflow: hidden;
    transition: transform var(--lc-transition), box-shadow var(--lc-transition);
    text-align: left;
    margin: 0 !important;
    width: auto !important;
    float: none !important;
    padding: 0 !important;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-2px);
    box-shadow: var(--lc-shadow-lg);
}

.woocommerce ul.products li.product a {
    text-decoration: none;
    color: var(--lc-color-text);
    display: block;
}

.woocommerce ul.products li.product img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    margin: 0 !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: var(--lc-space-3) var(--lc-space-4) var(--lc-space-1);
    font-size: var(--lc-text-base);
    font-weight: 600;
    margin: 0;
}

.woocommerce ul.products li.product .price {
    display: block;
    padding: 0 var(--lc-space-4) var(--lc-space-3);
    color: var(--lc-color-primary);
    font-weight: 700;
}

.woocommerce ul.products li.product .price del {
    color: var(--lc-color-text-light);
    margin-right: var(--lc-space-2);
}

.woocommerce ul.products li.product .price ins {
    background: transparent;
    text-decoration: none;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button {
    margin: 0 var(--lc-space-4) var(--lc-space-4);
    width: calc(100% - var(--lc-space-8));
    padding: var(--lc-space-2) var(--lc-space-4);
    font-size: var(--lc-text-sm);
}

.woocommerce span.onsale {
    position: absolute;
    top: var(--lc-space-3);
    left: var(--lc-space-3);
    background: var(--lc-color-danger);
    color: #fff;
    padding: var(--lc-space-1) var(--lc-space-3);
    border-radius: 9999px;
    font-size: var(--lc-text-xs);
    font-weight: 600;
    z-index: 1;
    margin: 0 !important;
    min-height: auto !important;
    min-width: auto !important;
    line-height: 1.4 !important;
}

/* WooCommerce single product */
.woocommerce div.product {
    display: grid;
    gap: var(--lc-space-8);
}

@media (min-width: 768px) {
    .woocommerce div.product {
        grid-template-columns: 1fr 1fr;
    }
}

.woocommerce div.product .product_title {
    margin-top: 0;
}

.woocommerce div.product .price {
    color: var(--lc-color-primary);
    font-size: var(--lc-text-2xl);
    font-weight: 700;
    margin-bottom: var(--lc-space-4);
}

.woocommerce-tabs {
    grid-column: 1 / -1;
    margin-top: var(--lc-space-8);
}

.woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--lc-space-6);
    display: flex;
    flex-wrap: wrap;
    gap: var(--lc-space-2);
    border-bottom: 1px solid var(--lc-color-border);
}

.woocommerce-tabs ul.tabs li {
    padding: 0;
    border: 0;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: var(--lc-space-3) var(--lc-space-4);
    color: var(--lc-color-text-light);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--lc-color-primary);
    border-bottom-color: var(--lc-color-primary);
}

/* WooCommerce messages */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: var(--lc-space-3) var(--lc-space-4);
    border-radius: var(--lc-radius);
    margin-bottom: var(--lc-space-4);
    list-style: none;
}

.woocommerce-message {
    background: color-mix(in srgb, var(--lc-color-success) 12%, transparent);
    border-left: 3px solid var(--lc-color-success);
}

.woocommerce-info {
    background: color-mix(in srgb, var(--lc-color-primary) 12%, transparent);
    border-left: 3px solid var(--lc-color-primary);
}

.woocommerce-error {
    background: color-mix(in srgb, var(--lc-color-danger) 12%, transparent);
    border-left: 3px solid var(--lc-color-danger);
}

/* AJAX cart drawer */
.lc-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: var(--lc-color-bg);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 280ms ease-out;
    overflow-y: auto;
    padding: var(--lc-space-6);
    box-shadow: var(--lc-shadow-lg);
    visibility: hidden;
}

.lc-cart-drawer[aria-hidden="false"] {
    transform: translateX(0);
    visibility: visible;
}

.lc-cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--lc-space-4);
    border-bottom: 1px solid var(--lc-color-border);
    margin-bottom: var(--lc-space-4);
}

.lc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--lc-transition);
}

.lc-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Quantity input */
.woocommerce .quantity .qty {
    width: 80px;
    text-align: center;
}

/* Cart and checkout */
.woocommerce-cart-form table,
.woocommerce-checkout table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--lc-space-6);
}

.woocommerce-cart-form table th,
.woocommerce-cart-form table td {
    padding: var(--lc-space-3);
    border-bottom: 1px solid var(--lc-color-border);
    text-align: left;
}

.woocommerce-cart-form table img {
    width: 60px;
    height: auto;
    border-radius: var(--lc-radius-sm);
}

/* Star rating */
.star-rating {
    color: var(--lc-color-warning);
    font-size: var(--lc-text-sm);
}

/* ==========================================================================
   16. Block Editor Compatibility
   ========================================================================== */
.alignwide,
.alignfull {
    max-width: var(--lc-container);
    margin-inline: auto;
}

.alignfull {
    max-width: 100%;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.wp-block-image,
.wp-block-cover,
.wp-block-gallery {
    margin-bottom: var(--lc-space-6);
}

.wp-block-button__link {
    background: var(--lc-color-primary);
    color: #fff;
    padding: var(--lc-space-3) var(--lc-space-6);
    border-radius: var(--lc-radius);
    text-decoration: none;
    display: inline-block;
}

/* ==========================================================================
   17. Print
   ========================================================================== */
@media print {
    .site-header,
    .site-footer,
    .lc-back-to-top,
    .comments-area,
    .lc-pagination {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
    }
}
/* ==========================================================================
   LIGHTCRAFT — Hot Fix Patch
   --------------------------------------------------------------------------
   Fix for daocat.com:
   - Product grid: 3 cols desktop / 3 cols tablet & mobile-landscape / 2 cols mobile-portrait
   - Sidebar product widgets: 60x40 thumb left, title right top, red price below
   - Mobile overflow & tiny font issues
   --------------------------------------------------------------------------
   How to apply: Paste this CSS into Appearance → Customize → Additional CSS,
   OR add to child theme's style.css.
   ========================================================================== */

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

img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

/* Grid children must allow shrinking */
.lc-layout > *,
.woocommerce ul.products > li,
.lc-posts-grid > * {
    min-width: 0;
}

/* ----- 2. Product Grid: 3 / 3 / 2 columns --------------------------------- */
/* Mobile portrait (default, < 480px): 2 columns */
.woocommerce ul.products,
ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    list-style: none;
    padding: 0;
    margin: 0 0 2rem !important;
}

/* Mobile landscape & tablet (≥ 480px): 3 columns */
@media (min-width: 480px) {
    .woocommerce ul.products,
    ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px !important;
    }
}

/* Desktop (≥ 1024px): keep 3 columns, larger gap */
@media (min-width: 1024px) {
    .woocommerce ul.products,
    ul.products {
        gap: 24px !important;
    }
}

/* Override WooCommerce inline width on <li> */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
ul.products li.product {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: none !important;
    display: flex !important;
    flex-direction: column !important;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
}

/* Product image */
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 0 !important;
    display: block;
}

/* Product link */
.woocommerce ul.products li.product > a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Product title */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product h3 {
    padding: 8px 12px 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

@media (min-width: 768px) {
    .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .woocommerce ul.products li.product h2,
    .woocommerce ul.products li.product h3 {
        font-size: 15px !important;
        padding: 12px 14px 4px !important;
    }
}

/* Product price */
.woocommerce ul.products li.product .price {
    display: block;
    padding: 0 12px 8px !important;
    color: #dc2626 !important;          /* red price */
    font-weight: 700 !important;
    font-size: 14px !important;
    margin: 0 !important;
}

@media (min-width: 768px) {
    .woocommerce ul.products li.product .price {
        font-size: 16px !important;
        padding: 0 14px 12px !important;
    }
}

.woocommerce ul.products li.product .price del {
    color: #9ca3af !important;
    font-weight: 400;
    margin-right: 6px;
    font-size: 0.85em;
}

.woocommerce ul.products li.product .price ins {
    background: transparent !important;
    text-decoration: none !important;
}

/* Add to cart button */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button {
    margin: auto 12px 12px !important;   /* push to bottom */
    padding: 8px 12px !important;
    font-size: 13px !important;
    text-align: center;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
}

.woocommerce ul.products li.product .button:hover {
    background: #1d4ed8;
    color: #fff;
}

/* Sale flash badge */
.woocommerce ul.products li.product .onsale,
.woocommerce span.onsale {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #dc2626;
    color: #fff;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    line-height: 1.4;
    z-index: 1;
    margin: 0 !important;
    min-height: auto !important;
    min-width: auto !important;
}

.woocommerce ul.products li.product {
    position: relative;
}

/* ----- 3. Sidebar / Footer Product Widgets ------------------------------- */
/* WooCommerce widgets render <ul class="product_list_widget"> with <li> containing
   <a>, <img>, title text, and <.amount> price */

ul.product_list_widget,
.widget ul.product_list_widget,
.widget_products ul,
.widget_recently_viewed_products ul,
.widget_top_rated_products ul,
.widget_recent_reviews ul,
.widget_shopping_cart_content ul.cart_list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

ul.product_list_widget li,
.widget_products ul li,
.widget_recently_viewed_products ul li,
.widget_top_rated_products ul li,
.widget_recent_reviews ul li,
.widget_shopping_cart_content ul.cart_list li {
    display: grid !important;
    grid-template-columns: 60px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 2px;
    padding: 8px 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    align-items: start;
    list-style: none;
    /* Reset float layout from WC default */
    overflow: hidden;
}

ul.product_list_widget li:last-child {
    border-bottom: 0 !important;
}

/* Thumbnail: 60x40, top-left, span 2 rows */
ul.product_list_widget li img,
.widget_products ul li img,
.widget_recently_viewed_products ul li img,
.widget_top_rated_products ul li img,
.widget_recent_reviews ul li img {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 60px !important;
    height: 40px !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    border-radius: 4px;
    display: block;
}

/* Product title link: top-right */
ul.product_list_widget li a,
.widget_products ul li a,
.widget_recently_viewed_products ul li a,
.widget_top_rated_products ul li a {
    grid-column: 2;
    grid-row: 1;
    display: block;
    color: #1f2937;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    /* Limit title to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

ul.product_list_widget li a:hover {
    color: #2563eb;
}

/* When the <a> wraps both image and title, we need different handling */
ul.product_list_widget li > a {
    /* If <a> contains <img>, treat the <a> as the wrapper */
    display: contents; /* let img and text flow into grid directly */
}

/* But if display:contents loses styles, fallback: */
@supports not (display: contents) {
    ul.product_list_widget li > a {
        display: block;
        grid-column: 1 / -1;
    }
}

/* Price: bottom-right, red */
ul.product_list_widget li .amount,
ul.product_list_widget li .woocommerce-Price-amount,
.widget_products ul li .amount,
.widget_recently_viewed_products ul li .amount,
.widget_top_rated_products ul li .amount {
    grid-column: 2;
    grid-row: 2;
    color: #dc2626 !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    line-height: 1.4;
    display: inline-block;
}

/* Hide quantity unless cart widget */
ul.product_list_widget li .quantity {
    color: #6b7280;
    font-size: 12px;
    font-weight: normal;
}

/* Hide del/ins formatting glitches in widgets */
ul.product_list_widget li del .amount {
    color: #9ca3af !important;
    font-size: 11px !important;
    text-decoration: line-through;
}

ul.product_list_widget li ins {
    background: transparent;
    text-decoration: none;
}

/* Star rating in widgets - smaller */
ul.product_list_widget li .star-rating {
    grid-column: 2;
    font-size: 11px;
    margin-top: 2px;
}

/* ----- 4. Sidebar layout & spacing --------------------------------------- */
.lc-sidebar,
#secondary,
.widget-area {
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.lc-sidebar .widget,
#secondary .widget,
.widget-area .widget {
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.lc-sidebar .widget-title,
#secondary .widget-title,
.widget-area .widget-title {
    font-size: 16px !important;
    margin: 0 0 12px !important;
    padding-bottom: 8px;
    border-bottom: 2px solid #2563eb;
    font-weight: 700;
}

/* ----- 5. Footer widgets - same compact list style ----------------------- */
.site-footer .widget {
    margin-bottom: 16px;
}

.site-footer .widget-title {
    color: #1f2937;
    font-size: 15px !important;
    margin: 0 0 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-footer ul.product_list_widget li,
.site-footer .widget_products ul li {
    border-bottom-color: #e5e7eb !important;
}

.site-footer ul.product_list_widget li a {
    color: #1f2937;
    font-size: 12px;
}

/* ----- 6. Mobile-specific fixes ------------------------------------------ */
@media (max-width: 991px) {
    /* Sidebar moves below content */
    .lc-layout {
        grid-template-columns: 1fr !important;
    }
    .lc-sidebar,
    #secondary {
        margin-top: 32px;
    }
}

@media (max-width: 767px) {
    /* Body font-size readability on mobile */
    body {
        font-size: 15px;
    }

    /* Container padding */
    .lc-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Headings smaller on mobile but still readable */
    h1 { font-size: 24px !important; }
    h2 { font-size: 20px !important; }
    h3 { font-size: 18px !important; }

    /* Page header */
    .page-title,
    .entry-title {
        font-size: 20px !important;
        line-height: 1.3 !important;
    }

    /* Header bar layout */
    .lc-header-inner {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .site-branding img,
    .custom-logo {
        max-height: 36px !important;
        width: auto !important;
    }

    /* Header action buttons smaller */
    .lc-icon-btn {
        width: 36px !important;
        height: 36px !important;
    }
    .lc-icon-btn svg {
        width: 20px !important;
        height: 20px !important;
    }
}

@media (max-width: 480px) {
    /* Even tighter on small phones */
    body {
        font-size: 14px;
    }
    .lc-container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    .woocommerce ul.products,
    ul.products {
        gap: 8px !important;
    }
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 13px !important;
        padding: 6px 8px 2px !important;
    }
    .woocommerce ul.products li.product .price {
        font-size: 13px !important;
        padding: 0 8px 6px !important;
    }
    .woocommerce ul.products li.product .button {
        margin: auto 8px 8px !important;
        padding: 6px 8px !important;
        font-size: 12px !important;
    }
}

/* ----- 7. Pagination spacing on mobile ----------------------------------- */
.lc-pagination,
.woocommerce-pagination {
    flex-wrap: wrap;
    gap: 4px;
}

@media (max-width: 480px) {
    .lc-pagination .page-numbers,
    .woocommerce-pagination .page-numbers {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
        padding: 0 8px;
    }
}

/* ----- 8. Header sticky polish on mobile --------------------------------- */
.site-header {
    position: relative;
}

@media (max-width: 991px) {
    .site-header.is-sticky {
        position: sticky;
        top: 0;
    }
}

/* ==========================================================================
   v1.0.2 — Related Products 4 cols × 16 + Menu polish
   ========================================================================== */

/* ----- Related Products / Up-sells: 4 cols desktop, 3 tablet, 2 mobile --- */
.related.products ul.products,
.upsells.products ul.products,
.cross-sells ul.products,
section.related ul.products,
section.up-sells ul.products,
.woocommerce .related ul.products,
.woocommerce .upsells ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
}

@media (min-width: 480px) {
    .related.products ul.products,
    .upsells.products ul.products,
    .cross-sells ul.products,
    section.related ul.products,
    section.up-sells ul.products,
    .woocommerce .related ul.products,
    .woocommerce .upsells ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px !important;
    }
}

@media (min-width: 1024px) {
    .related.products ul.products,
    .upsells.products ul.products,
    .cross-sells ul.products,
    section.related ul.products,
    section.up-sells ul.products,
    .woocommerce .related ul.products,
    .woocommerce .upsells ul.products {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 20px !important;
    }
}

/* Related section spacing & heading */
.related.products,
.upsells.products,
.cross-sells,
section.related,
section.up-sells {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
    grid-column: 1 / -1; /* full width inside .product grid */
}

.related.products > h2,
.upsells.products > h2,
.cross-sells > h2,
section.related > h2,
section.up-sells > h2 {
    font-size: 22px !important;
    margin-bottom: 20px !important;
    font-weight: 700;
}

@media (min-width: 768px) {
    .related.products > h2,
    .upsells.products > h2,
    section.related > h2,
    section.up-sells > h2 {
        font-size: 26px !important;
    }
}

/* Compact card sizing for related (smaller buttons & padding) */
.related.products ul.products li.product,
.upsells.products ul.products li.product,
section.related ul.products li.product,
section.up-sells ul.products li.product {
    font-size: 13px;
}

.related.products ul.products li.product .button,
.upsells.products ul.products li.product .button,
section.related ul.products li.product .button,
section.up-sells ul.products li.product .button {
    margin: auto 8px 8px !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    /* Make button auto-width inline so card height is consistent */
}

@media (min-width: 1024px) {
    .related.products ul.products li.product .button,
    .upsells.products ul.products li.product .button,
    section.related ul.products li.product .button,
    section.up-sells ul.products li.product .button {
        margin: auto 10px 10px !important;
        padding: 7px 12px !important;
        font-size: 13px !important;
    }
}

/* ==========================================================================
   Menu polish — modern, professional look
   ========================================================================== */

/* Top menu bar styling */
.main-navigation {
    align-self: stretch;
}

.lc-menu {
    height: 100%;
    align-items: stretch;
    gap: 0;
}

.lc-menu > li {
    display: flex;
    align-items: center;
}

/* Top-level menu items: pill style, animated underline */
.lc-menu > li > a {
    position: relative;
    padding: 10px 16px !important;
    color: #1f2937;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    border-radius: 0;
    transition: color 200ms ease;
    background: transparent !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Animated underline effect */
.lc-menu > li > a::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 4px;
    height: 2px;
    background: #2563eb;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.lc-menu > li:hover > a::after,
.lc-menu > li:focus-within > a::after,
.lc-menu > li.current-menu-item > a::after,
.lc-menu > li.current-menu-parent > a::after,
.lc-menu > li.current-menu-ancestor > a::after {
    transform: scaleX(1);
}

.lc-menu > li:hover > a,
.lc-menu > li.current-menu-item > a,
.lc-menu > li.current-menu-parent > a,
.lc-menu > li.current-menu-ancestor > a {
    color: #2563eb !important;
    background: transparent !important;
}

/* Submenu indicator arrow */
.lc-menu .submenu-arrow,
.lc-menu .menu-item-has-children > a::before {
    transition: transform 200ms ease;
}

.lc-menu > li.menu-item-has-children > a::after {
    /* keep underline; arrow handled separately */
}

/* Add a small chevron next to parent items */
.lc-menu > li.menu-item-has-children > a {
    padding-right: 28px !important;
}

.lc-menu > li.menu-item-has-children > a::before {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 200ms ease;
}

.lc-menu > li.menu-item-has-children:hover > a::before,
.lc-menu > li.menu-item-has-children:focus-within > a::before {
    transform: translateY(-30%) rotate(-135deg);
}

/* ----- Submenu (dropdown) refined styling ------------------------------- */
.lc-menu .sub-menu {
    margin-top: 0 !important;
    padding: 8px !important;
    min-width: 240px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 12px 32px -8px rgba(0,0,0,.15), 0 4px 8px -2px rgba(0,0,0,.06);
    transform: translateY(12px) !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease, visibility 200ms ease, transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.lc-menu li:hover > .sub-menu,
.lc-menu li:focus-within > .sub-menu {
    transform: translateY(0) !important;
    opacity: 1;
    visibility: visible;
}

.lc-menu .sub-menu a {
    padding: 10px 12px !important;
    border-radius: 6px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
    transition: background 150ms ease, color 150ms ease, padding 150ms ease;
    position: relative;
}

.lc-menu .sub-menu a:hover {
    background: #eff6ff;
    color: #2563eb;
    padding-left: 16px !important;
}

/* Submenu arrow - small dash on hover */
.lc-menu .sub-menu a::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    width: 0;
    height: 2px;
    background: #2563eb;
    transform: translateY(-50%);
    transition: width 150ms ease;
}

.lc-menu .sub-menu a:hover::before {
    width: 6px;
}

/* Nested submenu (level 3): position to right */
.lc-menu .sub-menu .sub-menu {
    top: -8px !important;
    left: 100% !important;
    margin-left: 8px;
}

/* ----- Mega menu: enhanced styling ------------------------------------- */
.lc-menu .menu-item-mega > .sub-menu {
    columns: 4;
    column-gap: 24px;
    padding: 24px !important;
    border-radius: 12px;
}

.lc-menu .menu-item-mega > .sub-menu li {
    break-inside: avoid;
    margin-bottom: 4px;
}

.lc-menu .menu-item-mega > .sub-menu > li > a {
    font-weight: 600;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
    margin-bottom: 4px;
    border-radius: 0;
}

.lc-menu .menu-item-mega > .sub-menu > li > a:hover {
    border-bottom-color: #2563eb;
    background: transparent;
    padding-left: 0 !important;
}

@media (max-width: 991px) {
    .lc-menu .menu-item-mega > .sub-menu {
        columns: 1 !important;
    }
}

/* ----- Header bar: subtle bottom shadow on sticky --------------------- */
.site-header {
    transition: box-shadow 200ms ease, background 200ms ease;
}

.site-header.is-sticky {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 4px 16px -8px rgba(0,0,0,.08);
}

[data-theme="dark"] .site-header.is-sticky {
    background: rgba(17, 24, 39, 0.92);
}

/* ----- Header inner: better spacing & alignment ----------------------- */
.lc-header-inner {
    min-height: 68px;
}

@media (min-width: 992px) {
    .lc-header-inner {
        min-height: 76px;
        gap: 32px;
    }
}

/* Logo subtle hover */
.site-branding a {
    transition: opacity 200ms ease;
}
.site-branding a:hover {
    opacity: 0.85;
}

/* Header action icons: subtle hover background */
.lc-icon-btn {
    transition: background 200ms ease, color 200ms ease;
    color: #4b5563;
}

.lc-icon-btn:hover,
.lc-icon-btn:focus-visible {
    background: #f3f4f6;
    color: #2563eb;
}

[data-theme="dark"] .lc-icon-btn:hover {
    background: #374151;
}

/* Cart badge - more refined */
.lc-cart-count {
    background: #dc2626;  /* red, more eye-catching for shop */
    box-shadow: 0 0 0 2px #fff;
}

[data-theme="dark"] .lc-cart-count {
    box-shadow: 0 0 0 2px #111827;
}

/* ----- Mobile drawer menu polish -------------------------------------- */
@media (max-width: 991px) {
    .lc-mobile-drawer .lc-menu {
        gap: 2px;
    }
    .lc-mobile-drawer .lc-menu > li {
        display: block;
        border-bottom: 1px solid #f3f4f6;
    }
    .lc-mobile-drawer .lc-menu > li > a {
        font-size: 16px !important;
        font-weight: 500;
        padding: 14px 12px !important;
        border-radius: 6px;
    }
    .lc-mobile-drawer .lc-menu > li > a::after,
    .lc-mobile-drawer .lc-menu > li > a::before {
        display: none;
    }
    .lc-mobile-drawer .lc-menu > li > a:hover,
    .lc-mobile-drawer .lc-menu > li.current-menu-item > a {
        background: #eff6ff !important;
    }
    .lc-mobile-drawer .submenu-toggle {
        position: absolute;
        right: 8px;
        top: 8px;
        width: 36px;
        height: 36px;
        border-radius: 6px;
        background: transparent;
        border: 0;
    }
    .lc-mobile-drawer .submenu-toggle:hover {
        background: #f3f4f6;
    }
    .lc-mobile-drawer .lc-menu li {
        position: relative;
    }
}

/* ==========================================================================
   v1.0.3 — HARD FIX: Mobile overflow on single product + related
   ========================================================================== */

/* ----- Universal overflow lockdown ---------------------------------- */
html {
    overflow-x: clip;       /* better than hidden: doesn't break sticky */
    max-width: 100vw;
}
body {
    overflow-x: clip;
    max-width: 100vw;
    width: 100%;
}

#page,
.site,
.site-content,
.site-content > .lc-container,
main#primary,
.lc-main {
    max-width: 100%;
    overflow-x: clip;
    min-width: 0;
}

/* Any direct child of main shouldn't be wider than parent */
main#primary > *,
.lc-main > *,
.lc-layout > * {
    max-width: 100%;
    min-width: 0;
}

/* ----- Single product page: image cannot exceed viewport ------------ */
.woocommerce div.product,
.woocommerce-page div.product {
    max-width: 100%;
    overflow: hidden;
}

.woocommerce div.product .woocommerce-product-gallery,
.woocommerce-product-gallery {
    max-width: 100% !important;
    width: 100% !important;
    float: none !important;
}

.woocommerce div.product .woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery__wrapper {
    max-width: 100%;
    width: 100% !important;
}

.woocommerce div.product .woocommerce-product-gallery__image,
.woocommerce-product-gallery__image {
    max-width: 100% !important;
    width: 100% !important;
}

.woocommerce div.product .woocommerce-product-gallery__image a,
.woocommerce-product-gallery__image a {
    display: block;
    max-width: 100%;
    width: 100%;
}

.woocommerce div.product .woocommerce-product-gallery img,
.woocommerce-product-gallery img,
.woocommerce div.product img {
    max-width: 100% !important;
    height: auto !important;
    width: 100% !important;
    display: block;
}

/* WooCommerce often inline-styles width:48% on gallery — override it */
.woocommerce div.product .woocommerce-product-gallery[style] {
    width: 100% !important;
}

/* On desktop, gallery returns to 50/50 grid via parent .product layout */
@media (max-width: 767px) {
    .woocommerce div.product {
        display: block !important;
        grid-template-columns: 1fr !important;
    }
    .woocommerce div.product .summary,
    .woocommerce div.product .entry-summary {
        margin-top: 16px !important;
        max-width: 100%;
        float: none !important;
        width: 100% !important;
    }
}

/* Magnify icon (small zoom button overlay) */
.woocommerce div.product .woocommerce-product-gallery__trigger {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-indent: 0;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ----- Related products: STRONGER selector to force grid ---------- */
/* Some themes/plugins inject inline styles or overflow-x: auto */
.related.products,
.upsells.products,
section.related,
section.up-sells,
.woocommerce .related,
.woocommerce .upsells {
    max-width: 100% !important;
    overflow: hidden !important;     /* kills any horizontal scroll */
    width: 100% !important;
    clear: both;
}

.related.products ul.products,
.upsells.products ul.products,
section.related ul.products,
section.up-sells ul.products,
.cross-sells ul.products,
.woocommerce .related ul.products,
.woocommerce .upsells ul.products,
.woocommerce-page .related ul.products {
    /* Reset any flex/scroll behavior */
    display: grid !important;
    flex-wrap: nowrap;
    overflow: visible !important;
    overflow-x: visible !important;
    flex: none;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

/* Mobile portrait: 2 cols */
@media (max-width: 479px) {
    .related.products ul.products,
    .upsells.products ul.products,
    section.related ul.products,
    section.up-sells ul.products,
    .woocommerce .related ul.products,
    .woocommerce .upsells ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
}

/* Tablet/mobile-landscape: 3 cols */
@media (min-width: 480px) and (max-width: 1023px) {
    .related.products ul.products,
    .upsells.products ul.products,
    section.related ul.products,
    section.up-sells ul.products,
    .woocommerce .related ul.products,
    .woocommerce .upsells ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
}

/* Desktop: 4 cols */
@media (min-width: 1024px) {
    .related.products ul.products,
    .upsells.products ul.products,
    section.related ul.products,
    section.up-sells ul.products,
    .woocommerce .related ul.products,
    .woocommerce .upsells ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }
}

/* Force-shrink each product card: KEY is minmax(0, 1fr) above + min-width:0 */
.related.products ul.products li.product,
.upsells.products ul.products li.product,
section.related ul.products li.product,
section.up-sells ul.products li.product,
.woocommerce .related ul.products li.product,
.woocommerce .upsells ul.products li.product {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    margin: 0 !important;
}

/* All product images inside related must shrink */
.related.products img,
.upsells.products img,
section.related img,
section.up-sells img,
.woocommerce .related img,
.woocommerce .upsells img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* Sale flash inside related shouldn't overlap */
.related.products .onsale,
.upsells.products .onsale,
section.related .onsale,
section.up-sells .onsale {
    top: 4px !important;
    left: 4px !important;
    font-size: 10px !important;
    padding: 1px 6px !important;
}

/* On very small screens, hide the "Add to cart" button on related to save space */
@media (max-width: 479px) {
    .related.products ul.products li.product .button,
    .related.products ul.products li.product .add_to_cart_button,
    .upsells.products ul.products li.product .button,
    section.related ul.products li.product .button,
    section.up-sells ul.products li.product .button {
        font-size: 11px !important;
        padding: 4px 6px !important;
        margin: auto 6px 6px !important;
    }
    /* Compact title on tiny screens */
    .related.products ul.products li.product .woocommerce-loop-product__title,
    .upsells.products ul.products li.product .woocommerce-loop-product__title,
    section.related ul.products li.product .woocommerce-loop-product__title,
    section.up-sells ul.products li.product .woocommerce-loop-product__title {
        font-size: 12px !important;
        padding: 6px 6px 2px !important;
        min-height: 2.6em;
    }
    .related.products ul.products li.product .price,
    .upsells.products ul.products li.product .price,
    section.related ul.products li.product .price,
    section.up-sells ul.products li.product .price {
        font-size: 12px !important;
        padding: 0 6px 4px !important;
    }
}

/* ----- Belt and suspenders: kill any element that exceeds viewport - */
.entry-content > *,
.entry-summary > *,
.summary > * {
    max-width: 100%;
}

/* WooCommerce gallery flex-direction reset */
.flex-viewport {
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
}

.flex-control-thumbs {
    max-width: 100%;
    overflow: hidden;
}

/* Tables in product description (specs tables etc.) */
.woocommerce-product-attributes,
.shop_attributes,
.woocommerce-Tabs-panel table {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;     /* if table genuinely needs scroll, allow it inside */
}

/* Tabs nav can wrap on mobile */
@media (max-width: 767px) {
    .woocommerce-tabs ul.tabs {
        flex-wrap: wrap;
        gap: 4px !important;
    }
    .woocommerce-tabs ul.tabs li a {
        padding: 8px 12px !important;
        font-size: 14px;
    }
}

/* ==========================================================================
   v1.0.4 — FINAL fixes: H1/H2 size, image align center,
            mobile overflow, mobile-landscape full-width related
   ========================================================================== */

/* ----- 1. Heading sizes per request: H1=18px, H2=16px ---------------- */
/* Override regardless of viewport. If you want different desktop sizes,
   override per breakpoint below. */
h1, .entry-title, .page-title, .product_title {
    font-size: 18px !important;
    line-height: 1.35 !important;
    font-weight: 700;
}

h2, .related.products > h2, .upsells.products > h2, .comments-title,
.woocommerce-Tabs-panel h2, section.related > h2, section.up-sells > h2 {
    font-size: 16px !important;
    line-height: 1.4 !important;
    font-weight: 700;
}

h3 {
    font-size: 15px !important;
    line-height: 1.4 !important;
    font-weight: 600;
}

h4 { font-size: 14px !important; }
h5 { font-size: 13px !important; }
h6 { font-size: 13px !important; }

/* ----- 2. Image alignment in editor content -------------------------- */
/* Default: center all images inside content/summary unless explicitly aligned */
.entry-content img,
.entry-summary img,
.woocommerce-Tabs-panel img,
.woocommerce-product-details__short-description img,
article .entry-content img,
.summary img,
#tab-description img {
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Respect explicit alignment classes from editor */
.entry-content .alignleft,
.entry-content img.alignleft,
.entry-content .wp-block-image.alignleft,
.entry-content .wp-block-image.alignleft img {
    margin-left: 0 !important;
    margin-right: 1.5em !important;
    float: left;
    max-width: 50%;
}

.entry-content .alignright,
.entry-content img.alignright,
.entry-content .wp-block-image.alignright,
.entry-content .wp-block-image.alignright img {
    margin-left: 1.5em !important;
    margin-right: 0 !important;
    float: right;
    max-width: 50%;
}

.entry-content .aligncenter,
.entry-content img.aligncenter,
.entry-content .wp-block-image.aligncenter,
.entry-content .wp-block-image.aligncenter img {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block;
    float: none;
}

.entry-content .alignnone,
.entry-content img.alignnone {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block;
}

/* Caption */
.entry-content .wp-caption,
.entry-content figure {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block;
    text-align: center;
    max-width: 100%;
}

.entry-content figure img {
    margin: 0 auto !important;
}

.entry-content figcaption {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
    margin-top: 4px;
}

/* On mobile, kill float to keep readability */
@media (max-width: 767px) {
    .entry-content .alignleft,
    .entry-content .alignright,
    .entry-content img.alignleft,
    .entry-content img.alignright {
        float: none !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block;
    }
}

/* ----- 3. a3 Lazy Load fix: hide placeholder GIF size --------------- */
/* The placeholder gif has natural 1x1 px size; some configs set
   width/height attributes that disrupt layout. */
img[src*="lazy_placeholder.gif"],
img[src*="lazy_placeholder.svg"] {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* When lazy-load swaps in, the second img sits next to placeholder.
   Some lazy plugins emit two img tags in sequence. Hide nothing —
   just ensure both shrink. */
.entry-content img + img {
    /* both images keep centered alignment */
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ----- 4. Force content area & related to use FULL parent width ---- */
/* This solves "mobile-landscape: 3 cols dồn sang trái" issue.
   Cause: parent container had max-width that didn't expand. */

main#primary,
.lc-main,
.site-main,
.woocommerce-content {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto;
}

/* Single product summary + tabs + related — all should span full main */
.woocommerce div.product .summary,
.woocommerce div.product .entry-summary,
.woocommerce div.product .woocommerce-tabs,
.woocommerce div.product .related,
.woocommerce div.product .upsells,
section.related,
section.up-sells {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

/* When related is inside .product (which is grid 2-col on desktop),
   force it to span both columns */
.woocommerce div.product .related,
.woocommerce div.product .upsells,
.woocommerce div.product .woocommerce-tabs {
    grid-column: 1 / -1 !important;
}

/* ----- 5. Mobile-portrait single product image: HARD CAP ---------- */
@media (max-width: 767px) {
    /* Container ép cứng vào viewport */
    .woocommerce div.product,
    .woocommerce div.product > * {
        max-width: 100vw !important;
        max-width: calc(100vw - 24px) !important; /* respect 12px container padding */
    }

    /* Gallery: critical width cap */
    .woocommerce-product-gallery,
    .woocommerce div.product .woocommerce-product-gallery,
    .woocommerce div.product div.images {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 16px !important;
    }

    /* Anchor wrapping the image */
    .woocommerce-product-gallery__image a,
    .woocommerce-product-gallery a {
        display: block !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* The img itself */
    .woocommerce-product-gallery img,
    .woocommerce div.product img,
    .woocommerce div.product .wp-post-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Some lazy-load wrappers add extra divs that ignore parent width */
    .woocommerce-product-gallery > .flex-viewport,
    .woocommerce-product-gallery > ol.flex-control-thumbs {
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* ----- 6. Mobile-LANDSCAPE related not filling full width --------- */
/* Problem: at 480-991px (mobile landscape + tablet) with sidebar layout,
   parent has flexbox set wrong, related ul doesn't stretch.
   Solution: force width:100% and make sure parent is block. */
@media (min-width: 480px) and (max-width: 991px) {
    /* Layout switches to single-column at <992px (already in main CSS).
       Make sure main, related, and ul all stretch. */
    .lc-layout {
        display: block !important;
    }

    .lc-main, main#primary {
        display: block !important;
        width: 100% !important;
    }

    section.related,
    section.up-sells,
    .related.products,
    .upsells.products {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    section.related ul.products,
    section.up-sells ul.products,
    .related.products ul.products,
    .upsells.products ul.products {
        width: 100% !important;
        max-width: 100% !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

/* ----- 7. Better mobile padding so card không bị dí sát mép -------- */
@media (max-width: 479px) {
    body { font-size: 14px; }

    main#primary, .lc-main {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .lc-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* H1 still 18px on mobile per request */
    h1, .entry-title, .product_title {
        font-size: 18px !important;
    }
}

/* ----- 8. Block editor wide/full alignment center ------------------ */
.entry-content .alignwide,
.entry-content .alignfull,
.wp-block-image.alignwide,
.wp-block-image.alignfull {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
}

.entry-content .alignwide img,
.entry-content .alignfull img,
.wp-block-image.alignwide img,
.wp-block-image.alignfull img {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block;
}

/* ----- 9. WooCommerce-specific image inside short description ----- */
.woocommerce-product-details__short-description {
    text-align: left;
}

.woocommerce-product-details__short-description img,
.woocommerce-product-details__short-description figure {
    margin: 8px auto !important;
    display: block;
    max-width: 100%;
    height: auto;
}

/* ----- 10. Tab description content images centered too ----------- */
.woocommerce-Tabs-panel--description img,
.woocommerce-Tabs-panel--description figure,
.woocommerce-Tabs-panel--description .wp-caption,
#tab-description img,
#tab-description figure,
#tab-description .wp-caption {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block;
    max-width: 100%;
    height: auto;
    text-align: center;
}

/* Paragraph alignment in tab content stays left, only images center */
.woocommerce-Tabs-panel--description p,
#tab-description p {
    text-align: left;
}

/* ==========================================================================
   v1.0.5 — Desktop 4 cols + bulletproof mobile fix
   ========================================================================== */

/* ----- 1. Universal product list selector (catches ALL variants) ----- */
/* WooCommerce uses different class combos across versions:
   - section.related ul.products
   - section.up-sells ul.products
   - .related.products ul.products
   - aside.related ul.products
   - div.related ul.products
   So we target ANY ul.products that's a descendant of related/upsells/cross-sells */

[class*="related"] ul.products,
[class*="upsells"] ul.products,
[class*="up-sells"] ul.products,
[class*="cross-sells"] ul.products {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    /* Force shrink */
    grid-auto-flow: row !important;
}

/* Mobile DỌC: 2 cột — match by max-width */
@media screen and (max-width: 479px) {
    [class*="related"] ul.products,
    [class*="upsells"] ul.products,
    [class*="up-sells"] ul.products,
    [class*="cross-sells"] ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
}

/* Mobile NGANG + Tablet: 3 cột */
@media screen and (min-width: 480px) and (max-width: 1023px) {
    [class*="related"] ul.products,
    [class*="upsells"] ul.products,
    [class*="up-sells"] ul.products,
    [class*="cross-sells"] ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
}

/* DESKTOP: 4 cột (per request) */
@media screen and (min-width: 1024px) {
    [class*="related"] ul.products,
    [class*="upsells"] ul.products,
    [class*="up-sells"] ul.products,
    [class*="cross-sells"] ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }
}

/* Force every product card to shrink properly */
[class*="related"] ul.products li.product,
[class*="upsells"] ul.products li.product,
[class*="up-sells"] ul.products li.product,
[class*="cross-sells"] ul.products li.product {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: none !important;
    /* Reset any inline styles WooCommerce inserts */
}

/* Force inner content not to overflow card */
[class*="related"] ul.products li.product *,
[class*="upsells"] ul.products li.product *,
[class*="up-sells"] ul.products li.product *,
[class*="cross-sells"] ul.products li.product * {
    max-width: 100%;
    box-sizing: border-box;
}

[class*="related"] ul.products li.product img,
[class*="upsells"] ul.products li.product img,
[class*="up-sells"] ul.products li.product img,
[class*="cross-sells"] ul.products li.product img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    margin: 0 !important;
    display: block;
}

/* Section header - smaller again per H2=16px rule */
[class*="related"] > h2,
[class*="upsells"] > h2,
[class*="up-sells"] > h2,
[class*="cross-sells"] > h2,
section.related > h2,
section.up-sells > h2,
.related.products > h2,
.upsells.products > h2 {
    font-size: 16px !important;
    margin: 16px 0 12px !important;
    font-weight: 700;
    line-height: 1.3;
}

/* ----- 2. PARENT containers must allow content to fill width ------- */
/* Related is sometimes wrapped in flex/grid parent that constrains it */
section.related,
section.up-sells,
.related.products,
.upsells.products,
.cross-sells {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    grid-column: 1 / -1 !important;   /* if inside grid */
    flex: 1 1 100% !important;        /* if inside flex */
    box-sizing: border-box;
}

/* ----- 3. Single product page: AGGRESSIVE width control ------------ */
@media screen and (max-width: 767px) {
    /* Body-level overflow lockdown - last resort */
    html, body {
        overflow-x: clip !important;
        max-width: 100vw !important;
        width: 100vw !important;
    }

    /* Every product page descendant constrained */
    .single-product .site-content,
    .single-product .lc-container,
    .single-product main,
    .single-product .lc-main,
    .single-product .woocommerce,
    .single-product div.product {
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden;
        box-sizing: border-box;
    }

    /* WooCommerce gallery: no inline width nonsense */
    .single-product .woocommerce-product-gallery,
    .single-product div.product .woocommerce-product-gallery,
    .single-product .images {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin-bottom: 16px !important;
        padding: 0 !important;
    }

    /* All product images shrink */
    .single-product img,
    .single-product .wp-post-image,
    .single-product .attachment-woocommerce_single,
    .single-product .woocommerce-product-gallery img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }

    /* Summary: full width on mobile */
    .single-product .summary,
    .single-product .entry-summary {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* ----- 4. Sidebar widget products that might be in main column ----- */
/* On mobile, sidebar is moved below content; widget product list stays
   in compact form (60x40 thumb) */
@media screen and (max-width: 991px) {
    .lc-layout {
        display: block !important;
    }
    aside#secondary,
    .lc-sidebar {
        margin-top: 32px;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ----- 5. Heading sizes — H1=18, H2=16 — desktop also -------------- */
h1, .entry-title, .page-title, .product_title,
.woocommerce-products-header__title,
.single-product .product_title.entry-title {
    font-size: 18px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
    margin: 12px 0 !important;
}

h2, .comments-title, .woocommerce-Tabs-panel h2 {
    font-size: 16px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
    margin: 16px 0 12px !important;
}

/* The huge "Sản phẩm tương tự" h2 in image 2 — explicit override */
section.related > h2,
section.up-sells > h2,
.related.products > h2,
.upsells.products > h2,
[class*="related"] > h2,
[class*="upsells"] > h2 {
    font-size: 16px !important;
    margin: 16px 0 12px !important;
}

/* ----- 6. Cache-busting comment so WP Fastest Cache reprocesses --- */
/* version: 1.0.5 */

/* ==========================================================================
   v1.0.6 — Related Posts (cuối bài viết) + ẩn meta/thumb khi tắt
   ========================================================================== */

/* ----- Related Posts Section ---------------------------------------- */
.lc-related-posts {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    clear: both;
}

.lc-related-posts__title {
    font-size: 16px !important;
    margin: 0 0 16px !important;
    font-weight: 700;
    line-height: 1.3;
}

.lc-related-posts__list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Mobile dọc: 2 cột */
@media screen and (max-width: 479px) {
    .lc-related-posts__list {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
}

/* Mobile ngang + Tablet: 3 cột */
@media screen and (min-width: 480px) and (max-width: 1023px) {
    .lc-related-posts__list {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
}

/* Desktop: 4 cột */
@media screen and (min-width: 1024px) {
    .lc-related-posts__list {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }
}

.lc-related-posts__item {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: transform 200ms ease, box-shadow 200ms ease;
    min-width: 0;
}

.lc-related-posts__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
}

.lc-related-posts__link {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
    height: 100%;
}

.lc-related-posts__thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f3f4f6;
}

.lc-related-posts__thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    margin: 0 !important;
    display: block;
    transition: transform 400ms ease;
}

.lc-related-posts__item:hover .lc-related-posts__thumb img {
    transform: scale(1.04);
}

.lc-related-posts__thumb--placeholder {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.lc-related-posts__title-text {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #1f2937;
    /* Limit to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media screen and (max-width: 479px) {
    .lc-related-posts__title-text {
        font-size: 13px;
        padding: 8px 10px;
        -webkit-line-clamp: 2;
    }
}

.lc-related-posts__link:hover .lc-related-posts__title-text {
    color: #2563eb;
}

[data-theme="dark"] .lc-related-posts__item {
    background: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .lc-related-posts__title-text {
    color: #f3f4f6;
}

/* ==========================================================================
   v1.0.8 — Dark mode contrast fix + 4/3/2 product grid + perf
   ========================================================================== */

/* ----- Dark mode: bulletproof contrast for all surfaces ----------- */
[data-theme="dark"] {
    --lc-color-text: #f3f4f6;
    --lc-color-text-light: #9ca3af;
    --lc-color-bg: #0f172a;
    --lc-color-bg-alt: #1e293b;
    --lc-color-bg-card: #1e293b;
    --lc-color-border: #334155;
    --lc-color-primary: #60a5fa;
    --lc-color-primary-hover: #93c5fd;
    --lc-color-link: #60a5fa;
    --lc-color-danger: #f87171;
}

/* Body & main areas */
[data-theme="dark"] body,
[data-theme="dark"] #page,
[data-theme="dark"] .site,
[data-theme="dark"] .site-content,
[data-theme="dark"] main,
[data-theme="dark"] .lc-main {
    background-color: var(--lc-color-bg) !important;
    color: var(--lc-color-text) !important;
}

/* All headings */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .entry-title,
[data-theme="dark"] .product_title,
[data-theme="dark"] .page-title,
[data-theme="dark"] .widget-title,
[data-theme="dark"] .lc-related-posts__title,
[data-theme="dark"] .woocommerce-loop-product__title {
    color: #f9fafb !important;
}

/* Body text & paragraphs */
[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] span,
[data-theme="dark"] .entry-content,
[data-theme="dark"] .entry-summary,
[data-theme="dark"] .woocommerce-product-details__short-description,
[data-theme="dark"] .woocommerce-Tabs-panel,
[data-theme="dark"] .woocommerce-Tabs-panel p {
    color: var(--lc-color-text) !important;
}

/* Links */
[data-theme="dark"] a {
    color: var(--lc-color-link) !important;
}
[data-theme="dark"] a:hover {
    color: var(--lc-color-primary-hover) !important;
}

/* Header */
[data-theme="dark"] .site-header {
    background: var(--lc-color-bg) !important;
    border-color: var(--lc-color-border) !important;
}

[data-theme="dark"] .site-header.is-sticky {
    background: rgba(15, 23, 42, 0.92) !important;
}

[data-theme="dark"] .site-title a,
[data-theme="dark"] .site-description {
    color: var(--lc-color-text) !important;
}

/* Header nav menu */
[data-theme="dark"] .lc-menu > li > a {
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] .lc-menu > li:hover > a,
[data-theme="dark"] .lc-menu > li.current-menu-item > a {
    color: var(--lc-color-primary) !important;
}

[data-theme="dark"] .lc-menu .sub-menu {
    background: var(--lc-color-bg-alt) !important;
    border-color: var(--lc-color-border) !important;
}

[data-theme="dark"] .lc-menu .sub-menu a {
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] .lc-menu .sub-menu a:hover {
    background: rgba(96, 165, 250, 0.15) !important;
    color: var(--lc-color-primary) !important;
}

/* Header icons */
[data-theme="dark"] .lc-icon-btn {
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] .lc-icon-btn:hover {
    background: var(--lc-color-bg-alt) !important;
}

/* Mobile drawer */
[data-theme="dark"] .lc-mobile-drawer {
    background: var(--lc-color-bg) !important;
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] .lc-mobile-drawer .lc-menu > li {
    border-color: var(--lc-color-border) !important;
}

/* ----- SIDEBAR & WIDGETS (CRITICAL FIX) -------------------------- */
[data-theme="dark"] .lc-sidebar,
[data-theme="dark"] #secondary,
[data-theme="dark"] .widget-area,
[data-theme="dark"] aside.widget-area {
    background: transparent !important;
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] .widget,
[data-theme="dark"] .lc-sidebar .widget,
[data-theme="dark"] #secondary .widget,
[data-theme="dark"] .widget-area .widget {
    background: var(--lc-color-bg-alt) !important;
    border-color: var(--lc-color-border) !important;
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] .widget *:not(.amount):not(.lc-cart-count) {
    color: var(--lc-color-text);
}

[data-theme="dark"] .widget a,
[data-theme="dark"] .widget li a,
[data-theme="dark"] .lc-sidebar a {
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] .widget a:hover,
[data-theme="dark"] .widget li a:hover {
    color: var(--lc-color-primary) !important;
}

[data-theme="dark"] .widget li {
    border-color: var(--lc-color-border) !important;
}

/* Widget search form */
[data-theme="dark"] .widget input[type="search"],
[data-theme="dark"] .widget input[type="text"],
[data-theme="dark"] .widget select {
    background: var(--lc-color-bg) !important;
    border-color: var(--lc-color-border) !important;
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] .widget input::placeholder {
    color: var(--lc-color-text-light) !important;
}

/* Product widgets in dark - keep red price visible */
[data-theme="dark"] ul.product_list_widget li .amount,
[data-theme="dark"] ul.product_list_widget li .woocommerce-Price-amount {
    color: #f87171 !important;
}

[data-theme="dark"] ul.product_list_widget li del .amount {
    color: var(--lc-color-text-light) !important;
}

/* ----- Footer ---------------------------------------------------- */
[data-theme="dark"] .site-footer {
    background: #020617 !important;
    border-color: var(--lc-color-border) !important;
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] .site-footer .widget {
    background: transparent !important;
    border: 0 !important;
}

[data-theme="dark"] .site-footer .widget-title {
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] .site-footer a {
    color: var(--lc-color-text-light) !important;
}

[data-theme="dark"] .site-footer a:hover {
    color: var(--lc-color-primary) !important;
}

[data-theme="dark"] .site-info {
    color: var(--lc-color-text-light) !important;
    border-color: var(--lc-color-border) !important;
}

/* ----- Cards (products, related posts) -------------------------- */
[data-theme="dark"] .woocommerce ul.products li.product,
[data-theme="dark"] ul.products li.product,
[data-theme="dark"] .lc-related-posts__item {
    background: var(--lc-color-bg-card) !important;
    border-color: var(--lc-color-border) !important;
}

[data-theme="dark"] .woocommerce ul.products li.product .woocommerce-loop-product__title,
[data-theme="dark"] .lc-related-posts__title-text {
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] .woocommerce ul.products li.product .price {
    color: #f87171 !important;
}

[data-theme="dark"] .woocommerce ul.products li.product .price del .amount {
    color: var(--lc-color-text-light) !important;
}

/* Forms inside cards / pages */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: var(--lc-color-bg-alt) !important;
    border-color: var(--lc-color-border) !important;
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--lc-color-text-light) !important;
}

/* WooCommerce specific */
[data-theme="dark"] .woocommerce-message,
[data-theme="dark"] .woocommerce-info {
    background: rgba(96, 165, 250, 0.1) !important;
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] .woocommerce-error {
    background: rgba(248, 113, 113, 0.1) !important;
    color: #fecaca !important;
}

[data-theme="dark"] .woocommerce-tabs ul.tabs {
    border-color: var(--lc-color-border) !important;
}

[data-theme="dark"] .woocommerce-tabs ul.tabs li a {
    color: var(--lc-color-text-light) !important;
}

[data-theme="dark"] .woocommerce-tabs ul.tabs li.active a {
    color: var(--lc-color-primary) !important;
    border-bottom-color: var(--lc-color-primary) !important;
}

/* Cart, checkout, account tables */
[data-theme="dark"] table,
[data-theme="dark"] .woocommerce-cart-form table,
[data-theme="dark"] .woocommerce-checkout table {
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] table th,
[data-theme="dark"] table td {
    border-color: var(--lc-color-border) !important;
}

[data-theme="dark"] .cart-collaterals,
[data-theme="dark"] .woocommerce-cart .cart-collaterals {
    background: var(--lc-color-bg-alt) !important;
    color: var(--lc-color-text) !important;
}

/* My Account navigation */
[data-theme="dark"] .woocommerce-MyAccount-navigation li {
    border-color: var(--lc-color-border) !important;
}

[data-theme="dark"] .woocommerce-MyAccount-navigation li a {
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] .woocommerce-MyAccount-navigation li.is-active a,
[data-theme="dark"] .woocommerce-MyAccount-navigation li a:hover {
    background: var(--lc-color-bg-alt) !important;
    color: var(--lc-color-primary) !important;
}

/* Breadcrumb */
[data-theme="dark"] .woocommerce-breadcrumb,
[data-theme="dark"] .woocommerce-breadcrumb a {
    color: var(--lc-color-text-light) !important;
}

[data-theme="dark"] .woocommerce-breadcrumb a:hover {
    color: var(--lc-color-primary) !important;
}

/* Comments */
[data-theme="dark"] .comment-body {
    background: var(--lc-color-bg-alt) !important;
    color: var(--lc-color-text) !important;
}

/* Code blocks, blockquote */
[data-theme="dark"] code,
[data-theme="dark"] pre {
    background: #020617 !important;
    border-color: var(--lc-color-border) !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] blockquote {
    border-color: var(--lc-color-primary) !important;
    color: var(--lc-color-text-light) !important;
}

/* Pagination */
[data-theme="dark"] .lc-pagination .page-numbers,
[data-theme="dark"] .woocommerce-pagination .page-numbers {
    background: var(--lc-color-bg-alt) !important;
    border-color: var(--lc-color-border) !important;
    color: var(--lc-color-text) !important;
}

[data-theme="dark"] .lc-pagination .page-numbers:hover,
[data-theme="dark"] .lc-pagination .page-numbers.current,
[data-theme="dark"] .woocommerce-pagination .page-numbers:hover,
[data-theme="dark"] .woocommerce-pagination .page-numbers.current {
    background: var(--lc-color-primary) !important;
    border-color: var(--lc-color-primary) !important;
    color: #0f172a !important;
}

/* Search modal */
[data-theme="dark"] .lc-search-modal-inner {
    background: var(--lc-color-bg-alt) !important;
    color: var(--lc-color-text) !important;
}

/* Back to top - keep it visible */
[data-theme="dark"] .lc-back-to-top {
    background: var(--lc-color-primary) !important;
    color: #0f172a !important;
}

/* Borders everywhere */
[data-theme="dark"] hr,
[data-theme="dark"] [class*="related"],
[data-theme="dark"] [class*="upsells"],
[data-theme="dark"] .lc-related-posts {
    border-color: var(--lc-color-border) !important;
}

/* ==========================================================================
   (2) Shop product grid: 4 / 3 / 2 cols, 36 per page
   ========================================================================== */

/* MOBILE DỌC: 2 cột */
@media screen and (max-width: 599px) {
    .woocommerce-shop ul.products,
    .woocommerce ul.products:not([class*="related"]):not([class*="upsells"]):not([class*="cross-sells"]),
    .post-type-archive-product ul.products,
    .tax-product_cat ul.products,
    .tax-product_tag ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
}

/* MOBILE NGANG, TABLET DỌC, NARROW DESKTOP: 3 cột */
@media screen and (min-width: 600px) and (max-width: 1199px) {
    .woocommerce-shop ul.products,
    .woocommerce ul.products:not([class*="related"]):not([class*="upsells"]):not([class*="cross-sells"]),
    .post-type-archive-product ul.products,
    .tax-product_cat ul.products,
    .tax-product_tag ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }
}

/* DESKTOP, TABLET NGANG: 4 cột */
@media screen and (min-width: 1200px) {
    .woocommerce-shop ul.products,
    .woocommerce ul.products:not([class*="related"]):not([class*="upsells"]):not([class*="cross-sells"]),
    .post-type-archive-product ul.products,
    .tax-product_cat ul.products,
    .tax-product_tag ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 18px !important;
    }
}
/* ==========================================================================
   LIGHTCRAFT — Table Styles (Patch)
   --------------------------------------------------------------------------
   Paste this into: Customize → Additional CSS
   --------------------------------------------------------------------------
   - Hỗ trợ table trong content (entry-content, woocommerce tabs, ...)
   - Responsive: scroll ngang trên mobile thay vì vỡ layout
   - Hỗ trợ dark mode
   - Style cho zebra striping, hover, header sticky (optional)
   ========================================================================== */

/* ----- 1. Table base style ------------------------------------------ */
.entry-content table,
.entry-summary table,
.woocommerce-Tabs-panel table,
.comment-content table,
table.lc-table,
.wp-block-table table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.5;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

/* ----- 2. Cells ----------------------------------------------------- */
.entry-content table th,
.entry-content table td,
.entry-summary table th,
.entry-summary table td,
.woocommerce-Tabs-panel table th,
.woocommerce-Tabs-panel table td,
.comment-content table th,
.comment-content table td,
table.lc-table th,
table.lc-table td,
.wp-block-table table th,
.wp-block-table table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

/* Last row no border */
.entry-content table tr:last-child td,
.entry-summary table tr:last-child td,
.woocommerce-Tabs-panel table tr:last-child td,
table.lc-table tr:last-child td,
.wp-block-table table tr:last-child td {
    border-bottom: 0;
}

/* ----- 3. Header row ------------------------------------------------ */
.entry-content table thead th,
.entry-content table th,
.entry-summary table thead th,
.entry-summary table th,
.woocommerce-Tabs-panel table thead th,
.woocommerce-Tabs-panel table th,
table.lc-table thead th,
table.lc-table th,
.wp-block-table table thead th,
.wp-block-table table th {
    background: #f9fafb;
    font-weight: 600;
    color: #1f2937;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

/* ----- 4. Zebra stripes (optional, looks nice) --------------------- */
.entry-content table tbody tr:nth-child(even),
.woocommerce-Tabs-panel table tbody tr:nth-child(even),
table.lc-table tbody tr:nth-child(even),
.wp-block-table table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* ----- 5. Hover row highlight -------------------------------------- */
.entry-content table tbody tr:hover,
.woocommerce-Tabs-panel table tbody tr:hover,
table.lc-table tbody tr:hover,
.wp-block-table table tbody tr:hover {
    background: #eff6ff;
    transition: background 150ms ease;
}

/* ----- 6. Caption --------------------------------------------------- */
.entry-content table caption,
.woocommerce-Tabs-panel table caption,
table.lc-table caption,
.wp-block-table figcaption {
    padding: 8px 14px;
    background: #f3f4f6;
    font-size: 13px;
    color: #6b7280;
    text-align: left;
    font-style: italic;
}

/* ----- 7. Block editor table classes ------------------------------- */
.wp-block-table {
    margin: 16px 0;
    overflow-x: auto;
}

.wp-block-table.is-style-stripes table tbody tr:nth-child(odd) {
    background: #fafafa;
}

.wp-block-table.is-style-stripes table tbody tr:nth-child(even) {
    background: transparent;
}

/* Bordered variant */
.wp-block-table.is-style-bordered table th,
.wp-block-table.is-style-bordered table td {
    border: 1px solid #e5e7eb;
}

/* ----- 8. RESPONSIVE: Horizontal scroll on mobile ------------------ */
/* Wrap table in scroll container on small screens.
   This requires the table to be wrapped in a scrollable parent.
   We use overflow-x:auto on the figure/div that contains the table. */

.entry-content,
.entry-summary,
.woocommerce-Tabs-panel,
.comment-content {
    /* Allow horizontal scroll for tables that exceed width */
}

/* For tables not wrapped in figure: make them horizontally scrollable */
@media screen and (max-width: 767px) {
    .entry-content > table,
    .woocommerce-Tabs-panel > table,
    .comment-content > table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    /* Reset display:block side effects for inner cells */
    .entry-content > table > tbody,
    .entry-content > table > thead,
    .woocommerce-Tabs-panel > table > tbody,
    .woocommerce-Tabs-panel > table > thead {
        display: table-row-group;
    }

    /* Smaller padding on mobile */
    .entry-content table th,
    .entry-content table td,
    .woocommerce-Tabs-panel table th,
    .woocommerce-Tabs-panel table td,
    table.lc-table th,
    table.lc-table td {
        padding: 8px 10px;
        font-size: 13px;
    }

    /* Allow text wrap in cells on narrow tables (better than always nowrap) */
    .entry-content table.lc-no-scroll,
    .entry-content table.lc-no-scroll td,
    .entry-content table.lc-no-scroll th {
        white-space: normal;
        display: revert;
    }
}

/* Wrap with figure (Block editor adds this automatically) */
figure.wp-block-table,
figure.lc-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    margin: 16px 0;
}

figure.wp-block-table table,
figure.lc-table-wrap table {
    margin: 0;
}

/* ----- 9. WooCommerce specific tables ------------------------------ */
/* Cart */
.woocommerce-cart-form table.cart,
.woocommerce table.shop_table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 24px;
}

.woocommerce-cart-form table.cart th,
.woocommerce table.shop_table th {
    background: #f9fafb;
    padding: 12px 14px;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    text-align: left;
}

.woocommerce-cart-form table.cart td,
.woocommerce table.shop_table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.woocommerce-cart-form table.cart tr:last-child td,
.woocommerce table.shop_table tr:last-child td {
    border-bottom: 0;
}

/* Cart product image */
.woocommerce-cart-form table.cart .product-thumbnail img,
.woocommerce table.shop_table .product-thumbnail img {
    width: 60px;
    height: auto;
    border-radius: 4px;
}

/* Cart remove button */
.woocommerce-cart-form table.cart .product-remove a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    transition: background 150ms ease;
}

.woocommerce-cart-form table.cart .product-remove a:hover {
    background: #dc2626;
    color: #fff;
}

/* Order summary (cart_totals) */
.woocommerce table.shop_table_responsive tr,
.woocommerce-checkout table.shop_table {
    border-radius: 6px;
}

/* Quantity input in cart */
.woocommerce-cart-form .quantity input.qty {
    width: 70px;
    padding: 6px 8px;
    text-align: center;
}

/* Mobile cart: stack rows */
@media screen and (max-width: 600px) {
    .woocommerce-cart-form table.cart,
    .woocommerce-cart-form table.cart thead,
    .woocommerce-cart-form table.cart tbody,
    .woocommerce-cart-form table.cart tr,
    .woocommerce-cart-form table.cart td {
        display: block;
        width: 100%;
    }

    .woocommerce-cart-form table.cart thead {
        display: none;
    }

    .woocommerce-cart-form table.cart tr {
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        margin-bottom: 12px;
        padding: 12px;
        background: #fff;
    }

    .woocommerce-cart-form table.cart td {
        border: 0;
        padding: 6px 0;
        text-align: right;
    }

    .woocommerce-cart-form table.cart td::before {
        content: attr(data-title) ": ";
        font-weight: 600;
        float: left;
        color: #6b7280;
    }

    .woocommerce-cart-form table.cart .product-thumbnail::before,
    .woocommerce-cart-form table.cart .product-remove::before {
        display: none;
    }

    .woocommerce-cart-form table.cart .product-thumbnail {
        text-align: center;
    }
}

/* ----- 10. Product attributes table (specifications) -------------- */
.woocommerce-product-attributes,
table.shop_attributes {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin: 16px 0;
}

.woocommerce-product-attributes th,
table.shop_attributes th {
    background: #f9fafb;
    width: 35%;
    padding: 10px 14px;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
}

.woocommerce-product-attributes td,
table.shop_attributes td {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    font-style: normal;
}

.woocommerce-product-attributes tr:last-child th,
.woocommerce-product-attributes tr:last-child td,
table.shop_attributes tr:last-child th,
table.shop_attributes tr:last-child td {
    border-bottom: 0;
}

/* ----- 11. DARK MODE table styles --------------------------------- */
[data-theme="dark"] .entry-content table,
[data-theme="dark"] .entry-summary table,
[data-theme="dark"] .woocommerce-Tabs-panel table,
[data-theme="dark"] .comment-content table,
[data-theme="dark"] table.lc-table,
[data-theme="dark"] .wp-block-table table,
[data-theme="dark"] .woocommerce-cart-form table.cart,
[data-theme="dark"] .woocommerce table.shop_table,
[data-theme="dark"] .woocommerce-product-attributes,
[data-theme="dark"] table.shop_attributes {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f3f4f6 !important;
}

[data-theme="dark"] .entry-content table th,
[data-theme="dark"] .entry-content table td,
[data-theme="dark"] .woocommerce-Tabs-panel table th,
[data-theme="dark"] .woocommerce-Tabs-panel table td,
[data-theme="dark"] table.lc-table th,
[data-theme="dark"] table.lc-table td,
[data-theme="dark"] .wp-block-table table th,
[data-theme="dark"] .wp-block-table table td,
[data-theme="dark"] .woocommerce table.shop_table th,
[data-theme="dark"] .woocommerce table.shop_table td,
[data-theme="dark"] .woocommerce-product-attributes th,
[data-theme="dark"] .woocommerce-product-attributes td,
[data-theme="dark"] table.shop_attributes th,
[data-theme="dark"] table.shop_attributes td {
    border-color: #334155 !important;
    color: #f3f4f6 !important;
}

[data-theme="dark"] .entry-content table thead th,
[data-theme="dark"] .entry-content table th,
[data-theme="dark"] .woocommerce-Tabs-panel table thead th,
[data-theme="dark"] table.lc-table thead th,
[data-theme="dark"] table.lc-table th,
[data-theme="dark"] .wp-block-table table thead th,
[data-theme="dark"] .woocommerce table.shop_table th,
[data-theme="dark"] .woocommerce-product-attributes th,
[data-theme="dark"] table.shop_attributes th {
    background: #0f172a !important;
    color: #f9fafb !important;
    border-bottom-color: #475569 !important;
}

[data-theme="dark"] .entry-content table tbody tr:nth-child(even),
[data-theme="dark"] .woocommerce-Tabs-panel table tbody tr:nth-child(even),
[data-theme="dark"] table.lc-table tbody tr:nth-child(even),
[data-theme="dark"] .wp-block-table table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.4) !important;
}

[data-theme="dark"] .entry-content table tbody tr:hover,
[data-theme="dark"] .woocommerce-Tabs-panel table tbody tr:hover,
[data-theme="dark"] table.lc-table tbody tr:hover,
[data-theme="dark"] .wp-block-table table tbody tr:hover {
    background: rgba(96, 165, 250, 0.1) !important;
}

[data-theme="dark"] .entry-content table caption,
[data-theme="dark"] .wp-block-table figcaption {
    background: #0f172a !important;
    color: #9ca3af !important;
}

/* Mobile cart in dark mode */
[data-theme="dark"] .woocommerce-cart-form table.cart tr {
    background: #1e293b !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .woocommerce-cart-form table.cart td::before {
    color: #9ca3af !important;
}

/* Cart remove button dark */
[data-theme="dark"] .woocommerce-cart-form table.cart .product-remove a {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

[data-theme="dark"] .woocommerce-cart-form table.cart .product-remove a:hover {
    background: #f87171;
    color: #0f172a;
}
