/* =============================================================
   SizePaper.net — Full CSS
   Blue theme + Dark/Light mode
   Homepage: 5 + 1 View All per row
   Category: 6 per row
   ============================================================= */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    background: #f8fafc;
}
html[data-theme="dark"] { background: #0a1526; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100%;
    transition: background-color 0.2s, color 0.2s;
}

img, svg { max-width: 100%; display: block; }

/* ============= LIGHT MODE ============= */
:root {
    --blue-dark:      #0a4bb8;
    --blue-primary:   #0d6efd;
    --blue-medium:    #1d7ff5;
    --blue-light:     #e6f0ff;
    --blue-lighter:   #f0f7ff;
    --blue-border:    #c7ddff;
    --blue-hover:     #0b5ed7;

    --text:           #0f2f5c;
    --text-mid:       #475569;
    --text-light:     #64748b;
    --text-subtle:    #94a3b8;

    --bg:             #f8fafc;
    --bg-white:       #ffffff;
    --card-bg:        #ffffff;
    --card-hover-bg:  #f0f7ff;
    --header-bg:      #ffffff;
    --footer-bg:      #f0f7ff;
    --table-header:   #f0f7ff;
    --table-row-alt:  #fafcff;
    --dropdown-bg:    #ffffff;

    --border:         #dbeafe;
    --border-medium:  #bfdbfe;
    --border-dark:    #93c5fd;

    --success:        #059669;
    --danger:         #dc2626;

    --gutter:         20px;
    --radius:         8px;
    --radius-lg:      12px;

    --shadow-sm:      0 1px 2px rgba(13, 110, 253, 0.06);
    --shadow:         0 2px 6px rgba(13, 110, 253, 0.08);
    --shadow-md:      0 6px 16px rgba(13, 110, 253, 0.12);
    --shadow-lg:      0 12px 32px rgba(13, 110, 253, 0.15);
}

/* ============= DARK MODE ============= */
html[data-theme="dark"] {
    --blue-dark:      #4d9eff;
    --blue-primary:   #3b82f6;
    --blue-medium:    #60a5fa;
    --blue-light:     #1e3a5f;
    --blue-lighter:   #16283f;
    --blue-border:    #1e3a5f;
    --blue-hover:     #2563eb;

    --text:           #e8f0fb;
    --text-mid:       #a8b8cc;
    --text-light:     #8499b4;
    --text-subtle:    #5c718c;

    --bg:             #0a1526;
    --bg-white:       #0f1e33;
    --card-bg:        #0f1e33;
    --card-hover-bg:  #16283f;
    --header-bg:      #0f1e33;
    --footer-bg:      #0f1e33;
    --table-header:   #16283f;
    --table-row-alt:  #0f1e33;
    --dropdown-bg:    #16283f;

    --border:         #1e3352;
    --border-medium:  #264168;
    --border-dark:    #375d8f;

    --success:        #10b981;
    --danger:         #f87171;

    --shadow-sm:      0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow:         0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-md:      0 6px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg:      0 12px 32px rgba(0, 0, 0, 0.6);
}

/* ============= TYPOGRAPHY ============= */
h1, h2, h3, h4 { font-weight: 800; color: var(--text); line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.3rem; margin-bottom: 12px; color: var(--blue-dark); }
h3 { font-size: 1.1rem; margin-bottom: 10px; }
p { color: var(--text-mid); margin-bottom: 12px; }
p:last-child { margin-bottom: 0; }
a { color: var(--blue-primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--blue-dark); text-decoration: none; }
ul, ol { padding-left: 22px; color: var(--text-mid); }
li { margin-bottom: 6px; }
strong { color: var(--text); font-weight: 700; }

/* ============= LAYOUT ============= */
.container {
    width: 100%; margin: 0 auto; padding: 0 var(--gutter);
    max-width: 1280px; position: relative; z-index: 1;
}
main { min-height: 60vh; padding-bottom: 40px; position: relative; z-index: 1; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--blue-primary); color: #fff; padding: 10px 16px; z-index: 999; }
.skip-link:focus { left: 0; color: #fff; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============= HEADER ============= */
.site-header {
    background: var(--header-bg); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 1000; overflow: visible !important;
    box-shadow: var(--shadow-sm); transition: background-color 0.2s;
}

.header-inner {
    display: flex; align-items: center; gap: 16px;
    padding: 12px var(--gutter); max-width: 1280px; margin: 0 auto; min-height: 64px;
}

.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--blue-dark); flex-shrink: 0; letter-spacing: -0.02em; }
.logo svg { color: var(--blue-primary); }

.header-search { position: relative; flex: 1; max-width: 300px; margin-left: auto; display: flex; align-items: center; }
.header-search > svg { position: absolute; left: 14px; color: var(--text-light); pointer-events: none; }
.header-search input {
    width: 100%; padding: 9px 14px 9px 38px; font-size: 0.875rem; font-family: inherit;
    color: var(--text); background: var(--blue-lighter);
    border: 1px solid var(--blue-border); border-radius: 22px; outline: none; transition: all 0.15s;
}
.header-search input::placeholder { color: var(--text-subtle); }
.header-search input:focus {
    border-color: var(--blue-primary); background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.search-results {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--dropdown-bg); border: 1px solid var(--blue-border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    max-height: 320px; overflow-y: auto; z-index: 9999; display: none; padding: 6px;
}
.search-results.is-open { display: block; }
.search-results a { display: block; padding: 10px 14px; color: var(--text); font-size: 0.9rem; border-radius: 6px; font-weight: 500; }
.search-results a:hover { background: var(--blue-lighter); color: var(--blue-primary); }
.search-results .sr-empty { padding: 10px 14px; font-size: 0.85rem; color: var(--text-light); }

.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.header-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; font-size: 0.82rem; font-family: inherit; font-weight: 600;
    background: var(--bg-white); border: 1px solid var(--blue-border);
    border-radius: 22px; color: var(--blue-dark); cursor: pointer;
    transition: all 0.15s; white-space: nowrap; text-decoration: none;
}
.header-btn:hover { background: var(--blue-lighter); border-color: var(--blue-primary); color: var(--blue-primary); }
.header-icon { padding: 8px 10px; }

/* ============= UNIT DROPDOWN ============= */
.unit-dropdown { position: relative; }
.unit-menu {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--dropdown-bg); border: 1px solid var(--blue-border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    min-width: 160px; padding: 6px; z-index: 9999; animation: unitFadeIn 0.15s ease;
}
@keyframes unitFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.unit-option {
    display: block; width: 100%; text-align: left; padding: 9px 12px;
    background: transparent; border: 0; font-family: inherit; font-size: 0.85rem;
    font-weight: 500; color: var(--text); cursor: pointer; border-radius: 6px;
    transition: all 0.1s; position: relative;
}
.unit-option:hover { background: var(--blue-lighter); color: var(--blue-primary); }
.unit-option.is-active { background: var(--blue-primary); color: #ffffff; font-weight: 700; }
.unit-option.is-active::before { content: "✓"; position: absolute; right: 12px; font-size: 0.75rem; }

/* ============= CATEGORY NAV ============= */
.cat-nav { border-top: 1px solid var(--border); background: var(--header-bg); position: relative; z-index: 200; overflow: visible; }
.cat-nav-inner {
    display: flex; gap: 6px; padding: 10px var(--gutter);
    max-width: 1280px; margin: 0 auto; overflow-x: auto;
    scrollbar-width: none; align-items: center; position: relative;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-tab {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 7px 16px; font-size: 0.85rem; font-weight: 600;
    color: var(--blue-dark); background: var(--bg-white);
    border: 1px solid var(--blue-border); border-radius: 8px;
    white-space: nowrap; transition: all 0.15s; flex-shrink: 0;
    cursor: pointer; font-family: inherit; text-decoration: none;
}
.cat-tab:hover { background: var(--blue-lighter); border-color: var(--blue-primary); color: var(--blue-primary); }
.cat-tab.is-active { background: var(--blue-primary); border-color: var(--blue-primary); color: #ffffff; font-weight: 700; }

/* ============= MORE MENU ============= */
.cat-more-menu {
    position: fixed; top: 0; left: 0;
    background-color: var(--dropdown-bg); color: var(--text);
    border: 1px solid var(--blue-border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 8px; max-height: 70vh; overflow-y: auto;
    z-index: 2147483647; min-width: 240px; width: 260px;
    opacity: 0; transform: translateY(-8px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}
.cat-more-menu.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cat-more-menu[hidden] { display: none; }
.cat-more-menu a {
    display: block; padding: 10px 14px; font-size: 0.88rem; font-weight: 600;
    color: var(--text); background-color: transparent; border-radius: 6px;
    text-decoration: none; white-space: nowrap; transition: all 0.1s; cursor: pointer;
}
.cat-more-menu a:hover, .cat-more-menu a:focus { background-color: var(--blue-lighter); color: var(--blue-primary); outline: none; }
.cat-more-menu a.is-active { background-color: var(--blue-primary); color: #ffffff; font-weight: 700; }
.cat-more-menu::-webkit-scrollbar { width: 6px; }
.cat-more-menu::-webkit-scrollbar-thumb { background: var(--blue-border); border-radius: 3px; }

/* ============= BREADCRUMB ============= */
.breadcrumb { padding: 16px 0 4px; font-size: 0.82rem; color: var(--text-light); }
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--text-subtle); }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--blue-primary); }
.size-label-top { font-size: 0.82rem; color: var(--text-light); margin: 16px 0 8px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }

/* ============= HOMEPAGE ============= */
.intro-text { font-size: 1.05rem; color: var(--text-mid); padding: 24px 0 12px; max-width: 800px; line-height: 1.6; }
.category-section { margin: 28px 0; position: relative; z-index: 1; }
.category-title { display: flex; align-items: center; gap: 6px; font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; color: var(--blue-dark); }
.category-title a { color: var(--blue-dark); display: inline-flex; align-items: center; gap: 6px; }
.category-title a:hover { color: var(--blue-primary); }
.category-title .arrow { color: var(--blue-primary); font-size: 0.9rem; }

/* ============= GRIDS ============= */
.home-grid {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px; align-items: stretch; width: 100%;
}
.sizes-grid, .sizes-grid-4 {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px; align-items: stretch; width: 100%;
}

/* ============= SIZE CARDS ============= */
.size-card {
    display: flex; flex-direction: column; justify-content: flex-end;
    aspect-ratio: 1 / 0.7; padding: 8px;
    background: var(--card-bg); border: 1px solid var(--blue-border);
    border-radius: var(--radius); text-decoration: none; color: var(--text);
    transition: all 0.15s; overflow: hidden; min-width: 0;
    width: 100%; box-sizing: border-box; min-height: 60px;
}
.size-card:hover {
    border-color: var(--blue-primary); background: var(--card-hover-bg);
    transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none;
}
.size-name {
    font-size: 1.15rem; font-weight: 800; line-height: 1.1;
    letter-spacing: -0.03em; color: var(--blue-dark);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.size-dim { font-size: 0.68rem; color: var(--text-light); margin-top: 4px; line-height: 1.3; font-weight: 500; }
.size-unit { color: var(--text-light); font-weight: 500; }

.size-card-viewall {
    justify-content: center; align-items: center; text-align: center;
    background: var(--blue-lighter); border-color: var(--blue-primary);
}
.viewall-text { font-size: 0.75rem; font-weight: 700; color: var(--blue-primary); margin-bottom: 6px; }
.viewall-arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border: 1.5px solid var(--blue-primary);
    border-radius: 50%; font-size: 0.8rem; color: var(--blue-primary);
    line-height: 1; transition: all 0.15s;
}
.size-card-viewall:hover .viewall-arrow { background: var(--blue-primary); color: #ffffff; }

/* ============= SIZE HERO ============= */
.cat-h1 { font-size: 2.2rem; margin: 20px 0 24px; color: var(--blue-dark); }
.size-hero { margin: 12px 0 24px; }
.size-hero-row { display: flex; gap: 24px; align-items: flex-start; margin-top: 16px; flex-wrap: wrap; }
.size-visual {
    width: 100px; height: 140px; display: flex; align-items: center; justify-content: center;
    background: var(--bg-white); border: 2px solid var(--blue-primary);
    border-radius: 4px; padding: 16px; flex-shrink: 0; box-shadow: var(--shadow);
}
.size-visual-box { width: 100%; height: 100%; background: var(--blue-lighter); border: 1.5px solid var(--blue-primary); }
.size-hero-info { flex: 1; min-width: 200px; }
.size-hero-dim { font-size: 1.35rem; color: var(--blue-dark); font-weight: 800; margin-bottom: 12px; }
.size-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-ghost {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; font-size: 0.82rem; font-weight: 600;
    background: var(--bg-white); border: 1px solid var(--blue-border);
    border-radius: 8px; color: var(--blue-dark); font-family: inherit;
    cursor: pointer; transition: all 0.15s; text-decoration: none;
}
.btn-ghost:hover { background: var(--blue-lighter); border-color: var(--blue-primary); color: var(--blue-primary); }

/* Change Unit dropdown */
.change-unit-wrap { position: relative; display: inline-block; }
.change-unit-menu {
    position: absolute; top: calc(100% + 6px); left: 0;
    background: var(--dropdown-bg); border: 1px solid var(--blue-border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    min-width: 140px; padding: 6px; z-index: 9999; animation: unitFadeIn 0.15s ease;
}
.change-unit-menu button {
    display: block; width: 100%; text-align: left; padding: 9px 12px;
    background: transparent; border: 0; font-family: inherit; font-size: 0.85rem;
    font-weight: 500; color: var(--text); cursor: pointer; border-radius: 6px;
    transition: all 0.1s; position: relative;
}
.change-unit-menu button:hover { background: var(--blue-lighter); color: var(--blue-primary); }
.change-unit-menu button.is-active { background: var(--blue-primary); color: #ffffff; font-weight: 700; }
.change-unit-menu button.is-active::before { content: "✓"; position: absolute; right: 12px; font-size: 0.75rem; }

/* ============= CONTENT SECTIONS ============= */
.content-section { margin: 40px 0; }
.info-block {
    margin: 32px 0; padding: 24px;
    background: var(--blue-lighter); border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
}
.info-block h2 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue-dark); margin-bottom: 12px; font-weight: 800; }
.info-block p { font-size: 0.92rem; line-height: 1.7; max-width: 900px; color: var(--text-mid); }

/* ============= TABLES ============= */
.table-block {
    margin: 32px 0; overflow-x: auto;
    border-radius: var(--radius-lg); border: 1px solid var(--blue-border);
    background: var(--bg-white); box-shadow: var(--shadow-sm);
}
.table-title {
    font-size: 0.95rem; font-weight: 800; color: #ffffff;
    background: var(--blue-primary); padding: 14px 20px; margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.sizes-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.sizes-table th, .sizes-table td { padding: 12px 20px; text-align: left; border-bottom: 1px solid var(--border); }
.sizes-table th { font-weight: 700; font-size: 0.82rem; color: var(--blue-dark); background: var(--table-header); }
.sizes-table tr:last-child td { border-bottom: 0; }
.sizes-table tr:nth-child(even) td { background: var(--table-row-alt); }
.sizes-table tr:hover td { background: var(--blue-lighter); }
.sizes-table a { color: var(--blue-dark); font-weight: 600; }
.sizes-table a:hover { color: var(--blue-primary); }
.sizes-table-units td:first-child { color: var(--text-light); font-weight: 600; }

/* ============= RELATED CATEGORIES ============= */
.related-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.related-cat {
    display: inline-flex; align-items: center; padding: 9px 16px;
    background: var(--bg-white); border: 1px solid var(--blue-border);
    border-radius: 22px; font-size: 0.85rem; font-weight: 600;
    color: var(--blue-dark); text-decoration: none; transition: all 0.15s;
}
.related-cat:hover { border-color: var(--blue-primary); background: var(--blue-primary); color: #ffffff; }

/* ============= FAQ ============= */
.faq-section { margin: 40px 0; }
.faq-item {
    background: var(--bg-white); border: 1px solid var(--blue-border);
    border-radius: var(--radius); padding: 16px 20px; margin-bottom: 8px;
}
.faq-item summary { cursor: pointer; font-weight: 700; font-size: 0.95rem; color: var(--blue-dark); list-style: none; padding: 4px 24px 4px 0; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    font-size: 1.2rem; font-weight: 400; color: var(--blue-primary); transition: transform 0.2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] { background: var(--blue-lighter); }
.faq-item p { margin-top: 12px; font-size: 0.9rem; color: var(--text-mid); line-height: 1.7; }

/* ============= SVG NESTING ============= */
.svg-nest {
    display: flex; justify-content: center; margin: 24px 0; padding: 20px;
    background: var(--bg-white); border: 1px solid var(--blue-border);
    border-radius: var(--radius); max-width: 500px;
}
.svg-nest svg { width: 100%; max-width: 420px; height: auto; display: block; }
.svg-nest rect { stroke: var(--blue-primary); fill: var(--blue-lighter); stroke-width: 1.5; }
.svg-nest text { fill: var(--blue-dark); font-size: 11px; font-family: inherit; font-weight: 700; }

/* ============= COMPARE ============= */
.compare-unit-row {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin: 8px 0 24px; padding: 16px;
    background: var(--blue-lighter); border: 1px solid var(--blue-border);
    border-radius: var(--radius);
}
.compare-unit-label { font-size: 0.82rem; font-weight: 800; color: var(--blue-dark); text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; }
.compare-unit-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.unit-pill {
    padding: 7px 16px; font-size: 0.82rem; font-family: inherit; font-weight: 600;
    color: var(--blue-dark); background: var(--bg-white);
    border: 1px solid var(--blue-border); border-radius: 999px;
    cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.unit-pill:hover { border-color: var(--blue-primary); color: var(--blue-primary); }
.unit-pill.is-active { background: var(--blue-primary); color: #ffffff; border-color: var(--blue-primary); font-weight: 700; }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 24px 0 32px; align-items: start; }
.compare-form { display: flex; flex-direction: column; gap: 6px; }
.compare-label { font-size: 0.82rem; font-weight: 700; color: var(--blue-dark); margin-top: 10px; }
.compare-select {
    width: 100%; padding: 11px 14px; font-size: 0.9rem; font-family: inherit;
    font-weight: 500; color: var(--text); background: var(--bg-white);
    border: 1px solid var(--blue-border); border-radius: var(--radius);
    cursor: pointer; outline: none; transition: all 0.15s;
}
.compare-select:focus { border-color: var(--blue-primary); box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15); }

.compare-visual {
    position: relative; width: 100%; aspect-ratio: 1 / 1;
    background: var(--blue-lighter); border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg); padding: 20px;
    display: flex; align-items: center; justify-content: center; min-height: 300px;
}
.compare-box {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--blue-primary); border-radius: 2px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
}
.compare-box-a { background: rgba(13, 110, 253, 0.15); border-color: var(--blue-primary); }
.compare-box-b { background: rgba(220, 38, 38, 0.12); border-color: var(--danger); }
.compare-box-label {
    position: absolute; top: 4px; left: 6px;
    font-size: 0.72rem; font-weight: 800; color: #ffffff;
    background: var(--blue-dark); padding: 2px 8px; border-radius: 3px;
    white-space: nowrap; z-index: 2;
}
.compare-box-b .compare-box-label { background: var(--danger); }

.compare-summary {
    margin: 32px 0; padding: 24px;
    background: var(--blue-lighter); border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
}
.compare-summary-title { font-size: 1rem; font-weight: 800; margin-bottom: 10px; color: var(--blue-dark); }
.compare-summary-text { font-size: 0.95rem; line-height: 1.7; color: var(--text-mid); margin: 0; }

/* ============= LEGAL ============= */
.legal-page { max-width: 820px; margin: 0 auto; padding: 8px 0 48px; }
.legal-content h2 { font-size: 1.5rem; margin: 28px 0 12px; color: var(--blue-dark); padding-bottom: 8px; border-bottom: 2px solid var(--blue-border); }
.legal-content h3 { font-size: 1.05rem; margin: 22px 0 8px; color: var(--blue-dark); font-weight: 700; }
.legal-content p { font-size: 0.95rem; line-height: 1.75; color: var(--text-mid); margin-bottom: 12px; }
.legal-content ul { padding-left: 22px; margin: 10px 0 16px; }
.legal-content li { font-size: 0.93rem; line-height: 1.7; color: var(--text-mid); margin-bottom: 6px; }
.legal-content a { color: var(--blue-primary); text-decoration: underline; text-underline-offset: 2px; }

/* ============= AD SLOTS ============= */
.ad-slot { margin: 32px auto; width: 100%; max-width: 100%; text-align: center; min-height: 100px; overflow: hidden; }
.ad-slot[data-label]::before {
    content: attr(data-label); display: block; font-size: 0.68rem; color: var(--text-light);
    text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; margin-bottom: 6px;
}
.ad-slot ins.adsbygoogle {
    display: block !important; width: 100% !important;
    max-width: 100% !important; min-height: 100px !important;
}

/* ============= FOOTER ============= */
.site-footer {
    margin-top: 60px; padding: 24px 0;
    border-top: 3px solid var(--blue-primary);
    font-size: 0.85rem; color: var(--text-light);
    background: var(--footer-bg); transition: background-color 0.2s;
}
.footer-inner {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    flex-wrap: wrap; padding: 0 var(--gutter); max-width: 1280px; margin: 0 auto;
}
.footer-left { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.footer-left a { color: var(--text-light); font-weight: 500; }
.footer-left a:hover { color: var(--blue-primary); }
.footer-right { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-right a {
    color: var(--text-light); font-size: 0.8rem; font-weight: 600;
    padding: 4px 10px; border-radius: 4px; transition: all 0.15s;
}
.footer-right a.is-active { color: var(--blue-primary); font-weight: 800; background: var(--bg-white); border: 1px solid var(--blue-border); }
.footer-right a:hover { color: var(--blue-primary); background: var(--bg-white); }

/* ============= BUTTONS ============= */
.btn {
    display: inline-flex; align-items: center; padding: 11px 22px;
    background: var(--blue-primary); color: #ffffff; border-radius: var(--radius);
    font-weight: 700; font-size: 0.9rem; text-decoration: none;
    transition: all 0.15s; border: 1px solid var(--blue-primary);
}
.btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #ffffff; box-shadow: var(--shadow-md); }

/* ============= ERROR ============= */
.error-page { text-align: center; padding: 60px 20px; }
.error-page h1 { font-size: 5rem; color: var(--blue-primary); margin: 0 0 12px; line-height: 1; font-weight: 900; }
.error-page p { font-size: 1.05rem; color: var(--text-mid); margin-bottom: 24px; }

/* ============= RESPONSIVE ============= */
@media (max-width: 1280px) {
    .home-grid, .sizes-grid, .sizes-grid-4 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 7px;
    }
    .size-card { min-height: 58px; padding: 7px; }
}
@media (max-width: 1024px) {
    .home-grid, .sizes-grid, .sizes-grid-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px;
    }
}
@media (max-width: 860px) {
    .home-grid, .sizes-grid, .sizes-grid-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
    .size-card { min-height: 55px; padding: 7px; }
}
@media (max-width: 640px) {
    :root { --gutter: 14px; }
    .header-inner { flex-wrap: wrap; padding: 10px var(--gutter); }
    .logo { font-size: 1rem; }
    .header-search { flex: 1; max-width: none; order: 3; width: 100%; margin-top: 4px; margin-left: 0; }
    .header-actions { order: 2; gap: 4px; margin-left: auto; }
    .header-btn span { display: none; }
    .header-btn { padding: 8px 10px; }
    .home-grid, .sizes-grid, .sizes-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .size-card { padding: 7px; min-height: 55px; }
    .cat-h1 { font-size: 1.6rem; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .sizes-table th, .sizes-table td { padding: 10px 14px; font-size: 0.85rem; }
    .size-visual { width: 90px; height: 120px; }
    .size-hero-dim { font-size: 1.15rem; }
    .compare-grid { grid-template-columns: 1fr; gap: 20px; }
    .compare-unit-row { gap: 8px; padding: 12px; }
    .compare-unit-label { width: 100%; margin-bottom: 4px; }
    .unit-pill { padding: 6px 12px; font-size: 0.75rem; }
    .compare-summary { padding: 18px; }
    .compare-summary-text { font-size: 0.88rem; }
    .legal-content h2 { font-size: 1.25rem; }
    .legal-content h3 { font-size: 1rem; }
}
@media (max-width: 480px) {
    .home-grid, .sizes-grid, .sizes-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }
    .size-card { padding: 6px; min-height: 50px; }
}

/* ============= PRINT ============= */
@media print {
    .site-header, .site-footer, .ad-slot, .cat-nav, .header-search,
    .compare-unit-row, .size-hero-actions { display: none !important; }
    body { background: #fff; color: #000; }
    .container { padding: 0; }
}