/* =====================================================
   CaseMe Theme — Main Stylesheet
   Design: Luxury B2B, Playfair + Inter, Dark/Light contrast
===================================================== */

/* -------------------------------------------------------
   Custom Fonts
------------------------------------------------------- */
/* Oswald loaded via Google Fonts CDN in functions.php */
@font-face {
    font-family: 'HarmonyOS Sans SC';
    src: url('fonts/HarmonyOS_SansSC_Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* -------------------------------------------------------
   CSS Variables
------------------------------------------------------- */
:root {
    --bg-light:   #F7F6F2;
    --bg-dark:    #111111;
    --bg-white:   #FFFFFF;
    --text-main:  #222222;
    --text-muted: #7A7A7A;
    --red:        #D51522;
    --red-dark:   #B01018;
    --accent:     #8A7F73;
    --border:     #E5E5E5;

    --font-sans:    'Jost', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif:   'Jost', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-title:   'Oswald', 'Jost', sans-serif;
    --font-harmony: 'HarmonyOS Sans SC', 'Jost', sans-serif;

    --ease-slow:  cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out:   cubic-bezier(0.19, 1, 0.22, 1);

    --container: 1400px;
    --gutter:    clamp(1.5rem, 5vw, 6rem);
    --header-h:  60px;
}

/* -------------------------------------------------------
   Reset & Base
------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; background: #0f0f0f; }

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-main);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* -------------------------------------------------------
   Typography
------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1.2;
}

/* -------------------------------------------------------
   Container
------------------------------------------------------- */
.cm-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* -------------------------------------------------------
   Buttons
------------------------------------------------------- */
.cm-btn {
    display: inline-block;
    padding: 1.1rem 3rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 1px solid transparent;
    border-radius: 100px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: color 0.4s ease;
    z-index: 0;
    text-align: center;
}

.cm-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s var(--ease-out);
    z-index: -1;
}

.cm-btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Red filled */
.cm-btn-red {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}
.cm-btn-red::before { background: var(--red-dark); }

/* Outline white */
.cm-btn-outline-white {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.cm-btn-outline-white::before { background: #fff; }
.cm-btn-outline-white:hover { color: var(--bg-dark); }

/* Outline dark */
.cm-btn-outline-dark {
    background: transparent;
    color: var(--text-main);
    border-color: var(--text-main);
}
.cm-btn-outline-dark::before { background: var(--text-main); }
.cm-btn-outline-dark:hover { color: #fff; }

/* -------------------------------------------------------
   Header
------------------------------------------------------- */
#cm-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    z-index: 1000;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--text-main);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

/* WP admin bar offset — WP already adds margin-top:32px to html */
body.admin-bar #cm-header { top: 32px; }
body { padding-top: var(--header-h); }

.cm-nav { flex: 1; display: flex; justify-content: center; }

/* Logo */
.cm-logo { display: flex; align-items: center; }
.cm-logo-img { height: 36px !important; width: auto !important; max-width: none !important; object-fit: contain; }
.cm-logo-text {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

/* Nav */
.cm-nav-list {
    display: flex;
    gap: 1.8rem;
    align-items: center;
}

.cm-nav-list > li > a {
    font-family: 'Oswald', 'HarmonyOS Sans SC', var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    position: relative;
    padding: 6px 0;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.cm-drop-arrow {
    width: 10px;
    height: 6px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.cm-has-drop:hover .cm-drop-arrow {
    transform: rotate(180deg);
}

.cm-nav-list > li > a:hover {
    color: var(--red);
}

/* Header Right — Search */
.cm-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cm-search-form {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: visible;
    background: rgba(255,255,255,0.9);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.cm-search-form:focus-within {
    border-color: var(--red);
    box-shadow: 0 0 0 2px rgba(213,21,34,0.1);
}

.cm-search-input {
    border: none;
    outline: none;
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    font-family: var(--font-sans);
    width: clamp(120px, 12vw, 180px);
    background: transparent;
    color: var(--text-main);
}

.cm-search-input::placeholder {
    color: var(--text-muted);
}

.cm-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.6rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.cm-search-btn:hover {
    color: var(--red);
}

/* Mobile search toggle (icon-only button in header) */
.cm-search-toggle {
    display: none; /* hidden on desktop, shown on mobile */
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    color: var(--text-main);
    -webkit-tap-highlight-color: transparent;
}

/* Nav search bar + tags — hidden on desktop */
.cm-nav-search { display: none; }
.cm-nav-tags { display: none; }

/* Menu overlay backdrop */
.cm-menu-overlay {
    display: none;
}

/* -------------------------------------------------------
   Nav Dropdown
------------------------------------------------------- */
.cm-has-drop { position: relative; }

.cm-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    transform: translateY(6px);
    background: #fff;
    min-width: 200px;
    max-height: 70vh;
    padding: 0.6rem 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 100;
    list-style: none;
    overflow-y: auto;
    columns: 1;
}

/* Two-column layout for brands with many models */
.cm-has-drop:nth-child(1) .cm-dropdown,
.cm-has-drop:nth-child(2) .cm-dropdown {
    columns: 2;
    min-width: 340px;
}

.cm-has-drop:hover > .cm-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cm-dropdown li {
    break-inside: avoid;
}

.cm-dropdown li a {
    display: block;
    padding: 0.5rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--text-main) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.cm-dropdown li a::after { display: none !important; }

.cm-dropdown li a:hover {
    background: var(--bg-light);
    color: var(--red) !important;
}

.cm-drop-all {
    border-top: 1px solid var(--border);
    margin-top: 0.3rem;
    column-span: all;
}
.cm-drop-all a { font-weight: 500 !important; padding-top: 0.6rem; }


/* Hamburger */
.cm-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    -webkit-tap-highlight-color: transparent;
}

.cm-menu-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cm-menu-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.cm-menu-toggle.active span:nth-child(2) { opacity: 0; }
.cm-menu-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* -------------------------------------------------------
   Scroll Reveal Animation
   JS adds .js-reveal-ready to <html> before observing,
   so content is visible without JS or on first paint.
------------------------------------------------------- */
.reveal {
    transition: opacity 0.9s var(--ease-slow), transform 0.9s var(--ease-slow);
}

.js-reveal-ready .reveal {
    opacity: 0;
    transform: translateY(40px);
}

.js-reveal-ready .reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* -------------------------------------------------------
   HOMEPAGE — Hero
------------------------------------------------------- */
.cm-hero {
    height: calc(100vh - var(--header-h));
    min-height: 520px;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 0 var(--gutter) clamp(4rem, 8vh, 7rem);
    background-color: var(--bg-dark);
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    overflow: hidden;
    /* Apple-style gap */
    margin: 0 0 6px;
}

.cm-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.72) 0%,
        rgba(0,0,0,0.15) 50%,
        rgba(0,0,0,0.35) 100%
    );
}

.cm-hero-content {
    position: relative;
    z-index: 10;
    color: #fff;
    max-width: 820px;
    animation: heroFadeUp 1.4s var(--ease-slow) both;
}

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cm-hero-title {
    font-family: var(--font-title);
    font-size: clamp(3rem, 6.5vw, 6.5rem);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    line-height: 1.05;
}

.cm-hero-sub {
    font-size: 1.2rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-bottom: 3rem;
}

.cm-hero-btns {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

/* -------------------------------------------------------
   HOMEPAGE — Philosophy (Centered Serif Quote)
------------------------------------------------------- */
.cm-philosophy {
    padding: 12vw 5vw;
    text-align: center;
    background-color: var(--bg-light);
}

.cm-philosophy-text {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 3rem);
    font-style: italic;
    line-height: 1.5;
    max-width: 1000px;
    margin: 0 auto;
    color: var(--text-main);
}

.cm-philosophy-sub {
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* -------------------------------------------------------
   HOMEPAGE — Collections (Asymmetric Grid)
------------------------------------------------------- */
.cm-collections {
    padding: 0 5vw 3vw;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: 430px 430px 360px;
    gap: 1.5vw;
}

.cm-col-item {
    position: relative;
    overflow: hidden;
    display: block;
    background: #eee;
    height: auto;
}

.cm-col-item.cm-col-large {
    grid-row: span 2;
}

.cm-col-item.cm-col-small {
    /* height controlled by grid-template-rows */
}

/* 4th card (Xiaomi) spans both columns */
.cm-collections .cm-col-item.cm-col-small:last-child {
    grid-column: 1 / -1;
    grid-row: 3;
}

.cm-col-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 2s var(--ease-slow);
}

.cm-col-item:hover img {
    transform: scale(1.05);
}

.cm-col-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 3rem;
    color: #fff;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.cm-col-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 400;
}

.cm-col-subtitle {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}

/* -------------------------------------------------------
   HOMEPAGE — Craftsmanship (Dark, Image + Text)
------------------------------------------------------- */
.cm-craft {
    position: relative;
    min-height: 80vh;
    background-size: cover;
    background-position: center;
    background-color: #111;
    display: flex;
    align-items: center;
    color: #fff;
}

/* Left gradient overlay for text readability */
.cm-craft::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.72) 45%, rgba(0,0,0,0.15) 75%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.cm-craft-text {
    position: relative;
    z-index: 1;
    max-width: 560px;
    padding: 6vw 8vw;
}

.cm-section-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 2rem;
    display: block;
}

.cm-craft-text h2 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    font-weight: 400;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.cm-craft-text p {
    color: #aaa;
    font-weight: 300;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    line-height: 1.8;
}

/* -------------------------------------------------------
   HOMEPAGE — Featured Products (4-col Grid + Hover)
------------------------------------------------------- */
.cm-products {
    padding: 2.5rem 3vw 3rem;
}

.cm-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.cm-products-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Homepage featured: 4 cards, edge-to-edge, no gap */
.cm-products .cm-product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
}

.cm-product-grid-home {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2vw;
}

.cm-prod-card {
    display: block;
    cursor: pointer;
}

.cm-prod-img-wrap {
    aspect-ratio: 3/4;
    overflow: hidden;
    background-color: #EFEFEF;
    margin-bottom: 1.5rem;
    position: relative;
}

.cm-prod-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.cm-prod-card:hover .cm-prod-img-wrap img {
    transform: scale(1.08);
}

/* Slide-up "View Details" on hover */
.cm-prod-hover {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.9);
    color: var(--text-main);
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: bottom 0.3s ease;
}

.cm-prod-card:hover .cm-prod-hover {
    bottom: 0;
}

.cm-prod-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.cm-prod-name {
    font-size: 1.05rem;
    font-weight: 400;
}

.cm-prod-series {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* -------------------------------------------------------
   HOMEPAGE — Campaign Banner (Full-width Parallax)
------------------------------------------------------- */
.cm-campaign {
    height: 70vh;
    background-position: center;
    background-size: cover;
    background-attachment: scroll;
    background-color: var(--bg-dark);
}

/* -------------------------------------------------------
   HOMEPAGE — CTA Final (Dark Centered)
------------------------------------------------------- */
.cm-cta-final {
    padding: 10vw 5vw;
    background: var(--bg-dark);
    text-align: center;
    color: #fff;
}

.cm-cta-final-inner {
    max-width: 700px;
    margin: 0 auto;
}

.cm-cta-final-inner h2 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.cm-cta-final-inner p {
    color: #aaa;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.cm-cta-final .cm-section-tag {
    color: var(--accent);
}

/* -------------------------------------------------------
   ARCHIVE PAGE (Brand/Series Listings)
------------------------------------------------------- */
.cm-archive-wrap {
    padding-top: 0;
    min-height: 80vh;
    background: var(--bg-light);
}

.cm-archive-header {
    padding: 1.8rem var(--gutter) 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
}

.cm-archive-header h1 {
    font-family: 'Oswald', 'HarmonyOS Sans SC', var(--font-sans);
    font-size: 1.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cm-archive-count {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

/* Product Grid */
.cm-product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    padding: 3rem var(--gutter);
    background: var(--bg-light);
    gap: 1.5rem;
}

.cm-product-card {
    display: block;
    background: var(--bg-white);
    cursor: pointer;
    transition: transform 0.35s var(--ease-slow), box-shadow 0.35s ease;
}

.cm-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.cm-product-img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0efeb;
}

/* Primary image */
.cm-img-primary {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.45s ease, transform 0.6s ease;
}

/* Secondary image: stacked on top, invisible by default */
.cm-img-secondary {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.45s ease, transform 0.6s ease;
    transform: scale(1.04);
}

/* Hover swap */
.cm-product-card:hover .cm-img-primary  { opacity: 0; }
.cm-product-card:hover .cm-img-secondary {
    opacity: 1;
    transform: scale(1);
}

/* Slight zoom on primary when no secondary exists */
.cm-product-img-wrap:not(.has-hover-img) .cm-img-primary {
    transition: transform 1.5s var(--ease-slow);
}
.cm-product-card:hover .cm-product-img-wrap:not(.has-hover-img) .cm-img-primary {
    transform: scale(1.06);
}

.cm-product-info {
    padding: 1rem 0.8rem 1.2rem;
}

.cm-product-name {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-main);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.cm-product-series {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* Pagination */
.cm-archive-wrap .woocommerce-pagination {
    padding: 3rem var(--gutter);
    display: flex;
    justify-content: center;
}

.cm-archive-wrap .woocommerce-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cm-archive-wrap .woocommerce-pagination ul li {
    list-style: none;
}

.cm-archive-wrap .woocommerce-pagination ul li a,
.cm-archive-wrap .woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.cm-archive-wrap .woocommerce-pagination ul li span.current,
.cm-archive-wrap .woocommerce-pagination ul li a:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

/* -------------------------------------------------------
   SINGLE PRODUCT PAGE
------------------------------------------------------- */
.cm-single-wrap {
    padding-top: var(--header-h);
    background: var(--bg-light);
}

.cm-single-inner {
    display: flex;
    gap: 5vw;
    padding: 1.5rem var(--gutter);
    align-items: stretch;
    height: calc(100vh - var(--header-h));
    box-sizing: border-box;
}

/* Left: Gallery */
.cm-gallery {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.cm-gallery-main {
    position: relative;
    aspect-ratio: 1 / 1;
    max-height: calc(100vh - var(--header-h) - 4rem - 90px);
    overflow: hidden;
    background: var(--bg-light);
    margin-bottom: 0.75rem;
}

.cm-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.6s var(--ease-slow);
}

.cm-gallery-main img:hover { transform: scale(1.04); }

.cm-gallery-thumbs {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cm-thumb {
    width: 70px;
    height: 70px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    flex-shrink: 0;
}

.cm-thumb.active { border-color: var(--red); }
.cm-thumb:hover { border-color: var(--text-muted); }

.cm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cm-thumb:hover img { transform: scale(1.1); }

/* Right: Product Info */
.cm-product-summary {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.cm-product-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.cm-product-title {
    font-size: clamp(1.4rem, 2.2vw, 2.4rem);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cm-product-desc {
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Color Swatches */
.cm-colors-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.cm-colors {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.cm-color-dot {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.cm-color-dot:hover, .cm-color-dot.active {
    border-color: var(--text-muted);
    transform: scale(1.15);
}

.cm-color-dot .cm-tooltip {
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: #fff;
    font-size: 0.7rem;
    white-space: nowrap;
    padding: 0.35rem 0.7rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cm-color-dot:hover .cm-tooltip { opacity: 1; }

/* Divider */
.cm-divider {
    height: 1px;
    background: var(--border);
    margin: 1.5rem 0;
}

/* CTA Buttons */
.cm-summary-cta {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    margin-top: auto;
}

.cm-summary-cta .cm-btn {
    flex: 1;
    text-align: center;
}

.cm-whatsapp-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.1rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 1px solid #25D366;
    color: #25D366;
    transition: background 0.3s ease, color 0.3s ease;
}

.cm-whatsapp-btn:hover {
    background: #25D366;
    color: #fff;
}

.cm-whatsapp-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Product Meta */
.cm-product-meta {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 2;
}

.cm-product-meta span { color: var(--text-main); }

/* -------------------------------------------------------
   FOOTER
------------------------------------------------------- */
.cm-footer {
    background: #0f0f0f;
    color: #fff;
    /* Desktop: CSS Grid 布局 */
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* 光源层 — 深藏在黑底里的彩色光斑 */
.cm-footer-light {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 50% 80% at 8% 30%,  rgba(220, 38, 38, 0.55)  0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 30% 80%, rgba(180, 20, 20, 0.30)  0%, transparent 65%),
        radial-gradient(ellipse 35% 50% at 85% 25%, rgba(59, 90, 220, 0.22)  0%, transparent 65%),
        radial-gradient(ellipse 60% 40% at 60% 95%, rgba(100, 30, 200, 0.15) 0%, transparent 70%);
}

/* 磨砂玻璃层 — 盖在光源上，模糊扩散 */
.cm-footer-frost {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    backdrop-filter: blur(55px) saturate(1.3);
    -webkit-backdrop-filter: blur(55px) saturate(1.3);
    background: rgba(10, 10, 10, 0.62);
}

/* 顶边光晕线 */
.cm-footer-frost::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.06) 15%,
        rgba(255,255,255,0.28) 40%,
        rgba(220,38,38,0.5) 50%,
        rgba(255,255,255,0.28) 60%,
        rgba(255,255,255,0.06) 85%,
        transparent 100%
    );
}

/* 内容层浮在磨砂玻璃之上 */
.cm-footer > *:not(.cm-footer-light):not(.cm-footer-frost) {
    position: relative;
    z-index: 2;
}

/* 1. Brand — desktop col 1 row 1-2 */
.cm-footer-brand {
    grid-column: 1;
    grid-row: 1 / 3;
    padding: 4rem 2rem 2rem var(--gutter);
}

/* 2. Newsletter — desktop col 1 row 3 */
.cm-footer-newsletter {
    grid-column: 1;
    grid-row: 3;
    padding: 0 2rem 3rem var(--gutter);
}

/* 3. Social — desktop col 1 row 4 */
.cm-footer-social {
    grid-column: 1;
    grid-row: 4;
    display: flex;
    gap: 0.9rem;
    align-items: center;
    padding: 0 2rem 3rem var(--gutter);
}

/* 4. Nav — desktop col 2-4, rows 1-4 */
.cm-footer-nav {
    grid-column: 2 / -1;
    grid-row: 1 / 5;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3vw;
    padding: 4rem var(--gutter) 3rem 2rem;
    border-left: 1px solid rgba(255,255,255,0.06);
}

/* 5. Bottom — full width */
.cm-footer-bottom {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 1.4rem var(--gutter);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
}

/* Brand */
.cm-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    text-decoration: none;
    margin-left: 0;
    padding-left: 0;
}

.cm-footer-logo-img {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1);
}

.cm-footer-logo-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: #fff;
}

.cm-footer-desc {
    color: rgba(255,255,255,0.4);
    font-size: 0.82rem;
    line-height: 1.75;
    max-width: 260px;
    margin-bottom: 0;
}

/* Newsletter */
.cm-nl-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin: 0 0 0.8rem;
}

.cm-nl-form {
    display: flex;
    gap: 0;
    max-width: 320px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    padding: 0.3rem 0.3rem 0.3rem 1.1rem;
    align-items: center;
    transition: background 0.2s;
}

.cm-nl-form:focus-within {
    background: rgba(255,255,255,0.12);
}

.cm-nl-input {
    flex: 1;
    padding: 0.45rem 0;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #fff;
    font-size: 0.82rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.cm-nl-input[type="search"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    color: #fff;
}

.cm-nl-input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    height: 14px;
    width: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2.5' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") center/contain no-repeat;
    cursor: pointer;
}

.cm-nl-input:-webkit-autofill,
.cm-nl-input:-webkit-autofill:hover,
.cm-nl-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    transition: background-color 5000s ease-in-out 0s;
}

.cm-nl-input::placeholder { color: rgba(255,255,255,0.35); }

.cm-nl-btn {
    padding: 0;
    width: 34px;
    height: 34px;
    background: var(--accent, #d51522);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}

.cm-nl-btn:hover { background: #b8111d; transform: scale(1.08); }
.cm-nl-btn-text { display: none; }
.cm-nl-btn-icon { display: block; }
.cm-nl-note { display: none; }

/* Social icons */
.cm-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 35%;
    clip-path: inset(0 round 35%);
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}

.cm-social-icon:hover {
    color: #fff;
    background: rgba(255,255,255,0.14);
}

/* Nav columns */
.cm-col-chevron { display: none; }

.cm-footer-col h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 1rem;
    font-weight: 500;
}

.cm-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cm-footer-col ul li { margin-bottom: 0.5rem; }

.cm-footer-col a {
    font-family: 'HarmonyOS Sans SC', var(--font-sans);
    font-size: 0.88rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    position: relative;
    transition: color 0.25s;
}

.cm-footer-col a::before {
    content: '—';
    font-size: 0.7rem;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity 0.25s, max-width 0.25s, margin-right 0.25s;
    margin-right: 0;
    color: var(--accent, #d51522);
}

.cm-footer-col a:hover { color: #fff; }
.cm-footer-col a:hover::before {
    opacity: 1;
    max-width: 1.2rem;
    margin-right: 0.4rem;
}

/* -------------------------------------------------------
   Generic Page
------------------------------------------------------- */
.cm-page-wrap {
    padding-top: calc(var(--header-h) + 4rem);
    min-height: 80vh;
    background: var(--bg-light);
}

.cm-page-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 4rem var(--gutter) 8rem;
}

.cm-page-content h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 2.5rem;
}

.cm-page-content p {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* -------------------------------------------------------
   Contact Page
------------------------------------------------------- */
.cm-contact-page {
    margin-top: 1rem;
}

.cm-contact-intro {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.cm-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.cm-contact-item {
    padding: 2.5rem 2rem;
    border: 1px solid var(--border);
    text-align: center;
}

.cm-contact-icon {
    width: 36px;
    height: 36px;
    stroke: var(--text-main);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin: 0 auto 1.2rem;
    display: block;
}

.cm-contact-item h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.8rem;
}

.cm-contact-item a {
    color: var(--red);
    font-size: 0.95rem;
    display: block;
}

.cm-contact-item a:hover { text-decoration: underline; }

.cm-contact-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin: 0;
}

@media (max-width: 768px) {
    .cm-contact-grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------
   About Us Page — Full-Width Template
------------------------------------------------------- */

/* HERO — dark full bleed */
.cm-about-hero {
    background: var(--bg-dark);
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: calc(var(--header-h) + 6rem) var(--gutter) 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cm-about-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    pointer-events: none;
}

.cm-about-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.cm-about-hero h1 {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 500;
    line-height: 1.1;
    margin: 1.5rem 0 2rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.cm-about-hero p {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    color: #999;
    line-height: 1.8;
    max-width: 560px;
    margin: 0 auto;
    font-weight: 300;
}

/* STATS */
.cm-about-stats {
    background: var(--bg-light);
    padding: 5rem var(--gutter);
}

.cm-about-stats-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.cm-about-stat {
    text-align: center;
    padding: 2.5rem 1rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}

.cm-about-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

.cm-about-stat .num {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 500;
    color: var(--text-main);
    display: block;
    line-height: 1;
    margin-bottom: 0.6rem;
}

.cm-about-stat .num sup {
    font-size: 0.5em;
    vertical-align: super;
    color: var(--red);
}

.cm-about-stat .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* WHO WE ARE — two columns */
.cm-about-who {
    padding: 6rem var(--gutter);
    background: var(--bg-white);
}

.cm-about-who-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.cm-about-who-text h2 {
    font-family: var(--font-title);
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 400;
    margin: 1rem 0 2rem;
    line-height: 1.3;
}

.cm-about-who-text p {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

/* Feature list */
.cm-about-who-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cm-about-feat {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: border-color 0.3s;
}

.cm-about-feat:hover { border-color: var(--text-main); }

.cm-about-feat svg {
    flex-shrink: 0;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: var(--text-main);
    margin-top: 2px;
}

.cm-about-feat strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.cm-about-feat span {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* OEM — dark section */
.cm-about-oem {
    background: var(--bg-dark);
    background-image: url('https://caseme.net/wp-content/uploads/2026/04/image121-scaled.png');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 6rem var(--gutter);
    position: relative;
}

.cm-about-oem::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    pointer-events: none;
}

.cm-about-oem-inner {
    position: relative;
    z-index: 1;
    max-width: var(--container);
    margin: 0 auto;
}

.cm-about-oem-inner h2 {
    font-family: var(--font-title);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 400;
    margin: 1rem 0 1.5rem;
}

.cm-about-oem-inner > p {
    color: #999;
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 560px;
    font-weight: 300;
    margin-bottom: 3rem;
}

.cm-about-oem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.cm-about-oem-card {
    border: 1px solid rgba(255,255,255,0.2);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: border-color 0.3s;
    position: relative;
    z-index: 1;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cm-about-oem-card:hover {
    border-color: rgba(255,255,255,0.35);
}

.cm-about-oem-card .oem-num {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
}

.cm-about-oem-card strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: #fff;
}

.cm-about-oem-card .oem-desc {
    font-size: 0.85rem;
    color: #aaa;
    display: block;
}

/* CTA */
.cm-about-cta {
    text-align: center;
    padding: 6rem var(--gutter);
    background: var(--bg-light);
}

.cm-about-cta h2 {
    font-family: var(--font-title);
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 400;
    margin-bottom: 1rem;
}

.cm-about-cta p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* ARTICLES section */
.cm-about-articles {
    padding: 6rem var(--gutter);
    background: var(--bg-white);
}

.cm-about-articles-inner {
    max-width: var(--container);
    margin: 0 auto;
}

.cm-about-articles-header {
    text-align: center;
    margin-bottom: 3rem;
}

.cm-about-articles-header h2 {
    font-family: var(--font-title);
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 400;
    margin: 1rem 0 0;
}

.cm-about-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.cm-article-card {
    display: block;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
    color: inherit;
    text-decoration: none;
}

.cm-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

.cm-article-thumb {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-light);
}

.cm-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

.cm-article-card:hover .cm-article-thumb img {
    transform: scale(1.04);
}

.cm-article-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.cm-article-meta {
    padding: 1.5rem;
}

.cm-article-meta time {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cm-article-meta h3 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0.6rem 0 0.5rem;
    line-height: 1.4;
    color: var(--text-main);
}

.cm-article-meta p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.cm-about-articles-empty {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
    font-size: 1rem;
}

/* About page responsive */
@media (max-width: 768px) {
    .cm-about-hero { padding: calc(var(--header-h) + 3rem) var(--gutter) 4rem; }
    .cm-about-hero h1 { font-size: 2.2rem; }
    .cm-about-stats-inner { grid-template-columns: repeat(2, 1fr); }
    .cm-about-who-inner { grid-template-columns: 1fr; gap: 2rem; }
    .cm-about-who-features { padding-top: 0; }
    .cm-about-oem-grid { grid-template-columns: 1fr; }
    .cm-about-articles-grid { grid-template-columns: 1fr; }
    .cm-about-oem { padding: 4rem var(--gutter); }
    .cm-about-cta { padding: 4rem var(--gutter); }
}

/* -------------------------------------------------------
   Responsive
------------------------------------------------------- */
@media (max-width: 1200px) {
    .cm-product-grid { grid-template-columns: repeat(4, 1fr); }
    .cm-product-grid-home { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .cm-collections { grid-template-columns: 1fr; grid-template-rows: auto; }
    .cm-col-item.cm-col-large { grid-row: span 1; height: 60vh; }
    .cm-col-item.cm-col-small { height: 50vh; }
    .cm-collections .cm-col-item.cm-col-small:last-child { grid-row: auto; }
    .cm-craft { min-height: 60vh; }
    .cm-craft-text { padding: 8vw 5vw; max-width: 100%; }
    .cm-craft::before { background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%); }
}

@media (max-width: 960px) {
    .cm-footer-grid { grid-template-columns: 1fr 1fr; }
    .cm-footer-newsletter .cm-footer-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .cm-nl-form { max-width: 100%; width: 100%; }
    .cm-single-inner { flex-direction: column; }
    .cm-gallery { position: static; flex: none; width: 100%; }
    .cm-product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    :root { --header-h: 56px; }

    /* Mobile header: hamburger+search left, logo center, right empty */
    #cm-header {
        padding: 0 1rem;
        justify-content: center;
    }
    .cm-menu-toggle {
        display: -webkit-flex;
        display: flex;
        position: absolute;
        left: 1rem;
        top: 50%;
        -webkit-transform: translateY(-50%);
        transform: translateY(-50%);
        -webkit-appearance: none;
        appearance: none;
        font-size: 0;
    }
    .cm-menu-toggle span {
        font-size: initial;
    }
    .cm-logo {
        order: 0;
    }
    .cm-header-right {
        display: none;
    }
    /* Search toggle icon — next to hamburger */
    .cm-search-toggle {
        display: -webkit-flex !important;
        display: flex !important;
        position: absolute;
        left: 3.2rem;
        top: 50%;
        -webkit-transform: translateY(-50%);
        transform: translateY(-50%);
        color: var(--text-main);
        z-index: 10;
    }

    /* --- Menu panel (hamburger) — frosted glass rounded card --- */
    .cm-nav {
        position: fixed;
        top: calc(var(--header-h) + 0.5rem);
        left: 0.75rem;
        right: 0.75rem;
        bottom: auto;
        display: flex;
        flex-direction: column;
        background: linear-gradient(
            160deg,
            rgba(255,255,255,0.92) 0%,
            rgba(240,235,255,0.88) 40%,
            rgba(230,240,255,0.88) 60%,
            rgba(255,255,255,0.92) 100%
        );
        -webkit-backdrop-filter: blur(28px) saturate(1.5);
        backdrop-filter: blur(28px) saturate(1.5);
        padding: 1.5rem;
        border-radius: 28px;
        corner-shape: squircle;
        border: 1px solid rgba(255,255,255,0.5);
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s ease;
        box-shadow: 0 12px 40px rgba(0,0,0,0.12);
        z-index: 999;
        max-height: 75vh;
        overflow-y: auto;
    }
    .cm-nav-search {
        display: flex;
    }

    .cm-nav.open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Hide sub-dropdowns on mobile — only show main categories */
    .cm-nav .cm-dropdown {
        display: none !important;
    }
    .cm-nav .cm-drop-arrow {
        display: none;
    }

    /* Menu overlay backdrop */
    .cm-menu-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }
    .cm-menu-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* --- In-panel search bar --- */
    .cm-nav-search {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.65rem 1rem;
        background: rgba(255,255,255,0.6);
        border: 1.5px solid rgba(0,0,0,0.08);
        border-radius: 100px;
        margin-bottom: 1.8rem;
    }
    .cm-nav-search-icon {
        flex-shrink: 0;
        color: var(--text-muted);
    }
    .cm-nav-search-input {
        flex: 1;
        border: none;
        background: none;
        font-size: 0.9rem;
        font-family: var(--font-sans);
        outline: none;
        color: var(--text-main);
    }
    .cm-nav-search-input::placeholder {
        color: var(--text-muted);
    }

    /* Popular search tags */
    .cm-nav-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1.8rem;
    }
    .cm-nav-tag {
        display: inline-block;
        padding: 0.35rem 0.85rem;
        border-radius: 100px;
        border: 1px solid rgba(0,0,0,0.1);
        font-size: 0.78rem;
        color: var(--text-main);
        background: rgba(255,255,255,0.5);
        transition: background 0.2s, border-color 0.2s;
        -webkit-tap-highlight-color: transparent;
    }
    .cm-nav-tag:hover {
        background: rgba(255,255,255,0.8);
        border-color: rgba(0,0,0,0.2);
    }

    .cm-nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .cm-nav-list a {
        color: var(--text-main) !important;
        font-family: 'Oswald', 'HarmonyOS Sans SC', var(--font-sans);
        font-weight: 500;
        letter-spacing: 0.06em;
        -webkit-tap-highlight-color: transparent;
    }
    .cm-header-cta { display: none; }
    .cm-product-grid { grid-template-columns: repeat(2, 1fr); }
    .cm-product-grid-home { grid-template-columns: 1fr; }
    .cm-hero-btns { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .cm-hero-btns .cm-btn { text-align: center; width: auto; }
    .cm-footer-grid { grid-template-columns: 1fr 1fr; }
    .cm-footer-brand { grid-column: 1 / -1; }
    .cm-archive-header { flex-direction: column; gap: 0.5rem; }
    .cm-col-item.cm-col-large,
    .cm-col-item.cm-col-small { height: 50vh; }
    .cm-col-title { font-size: 1.8rem; }
    .cm-craft-text h2 { font-size: 2rem; }
    .cm-products-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

@media (max-width: 480px) {
    .cm-product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .cm-col-item.cm-col-large,
    .cm-col-item.cm-col-small { height: 40vh; }
    .cm-col-content { padding: 1.5rem; }
    .cm-col-title { font-size: 1.4rem; }
    /* Safari clamp() fix: --gutter 在 Safari 里 clamp 不生效，显式补 padding */
    .cm-product-detail-wrap {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* =======================================================
   HERO CAROUSEL
======================================================= */
.cm-carousel {
    position: relative;
    overflow: hidden;
    margin: 0 0 6px;
}

.cm-carousel-track {
    display: flex;
    width: 100%;
    will-change: transform;
    transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dots — bottom center */
.cm-carousel-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 20;
}

.cm-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cm-dot.active {
    width: 48px;
    background: rgba(255, 255, 255, 0.2);
}

/* 进度条动画 */
.cm-dot.active::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 4px;
    animation: cm-dot-progress 5s linear forwards;
}

@keyframes cm-dot-progress {
    from { width: 0%; }
    to   { width: 100%; }
}

/* =======================================================
   SERIES HERO SECTIONS (Apple-style full-screen)
   .cm-series-hero — 008 / 013 / 023 / 033
======================================================= */
.cm-series-hero {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    /* Inside carousel: no gap, full viewport width */
    margin: 0;
    flex: 0 0 100vw;
    width: 100vw;
    max-width: 100vw;
}

/* Image — fills entire section as background */
.cm-series-img-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.cm-series-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Text half — overlays on image */
.cm-series-text {
    position: relative;
    z-index: 1;
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 7vw;
    box-sizing: border-box;
}
/* Gradient to ensure text readability — text always on left */
.cm-series-text {
    background: linear-gradient(to right, rgba(0,0,0,0.55) 60%, transparent 100%);
}

.cm-series-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.55;
    margin-bottom: 1.5rem;
}

.cm-series-title {
    font-family: var(--font-title);
    font-size: clamp(2.4rem, 4vw, 4.2rem);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.15;
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
}

.cm-series-tagline {
    font-family: var(--font-harmony);
    font-size: 1.2rem;
    line-height: 1.7;
    opacity: 0.7;
    max-width: 400px;
    margin: 0 0 3rem;
}

.cm-series-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Primary: solid white on dark / solid dark on light */
.cm-series-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2.2rem;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    background: #ffffff;
    color: #111111;
}
/* .cm-series-light btn overrides removed — white buttons on all backgrounds */
.cm-series-btn-primary:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* Ghost: outline */
.cm-series-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2.2rem;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    border: 1px solid rgba(255,255,255,0.4);
    color: #ffffff;
    background: transparent;
}
.cm-series-btn-ghost:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

/* =======================================================
   SERIES GRID SECTION (C22 / C30 / C36 / C39 / C49 / ME80)
======================================================= */
.cm-series-grid-section {
    padding: 0;
    /* Apple-style gap */
    margin: 0 0 6px;
    background: #fff;
}

.cm-series-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.cm-series-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    aspect-ratio: 1/1;
    transition: transform 0.4s ease;
    cursor: pointer;
}
.cm-series-cell:hover {
    z-index: 1;
    transform: scale(1.01);
}

/* ---- Info block: TOP, overlays on image, centered ---- */
.cm-series-cell-info {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 2.5rem 5rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.62) 0%, transparent 100%);
    width: 100%;
    box-sizing: border-box;
}

.cm-series-cell-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.55;
    margin-bottom: 1rem;
    color: #ffffff;
}

.cm-series-cell-sub {
    font-family: var(--font-title);
    font-size: clamp(1.8rem, 3vw, 3.4rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.12;
    margin: 0 0 1rem;
    color: #ffffff;
}

.cm-series-cell-tagline {
    font-family: var(--font-harmony);
    font-size: clamp(0.85rem, 1.1vw, 1.05rem);
    font-weight: 300;
    line-height: 1.5;
    opacity: 0.75;
    margin: 0 0 1.6rem;
    color: #ffffff;
    max-width: 28ch;
}

.cm-series-cell-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cm-series-cell-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2.2rem;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    background: #ffffff;
    color: #111111;
    white-space: nowrap;
}
.cm-series-cell-btn-primary:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.cm-series-cell-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2.2rem;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    border: 1px solid rgba(255,255,255,0.4);
    color: #ffffff;
    background: transparent;
    white-space: nowrap;
}
.cm-series-cell-btn-ghost:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

/* Light theme cell button overrides removed — white buttons on all backgrounds */

/* ---- Image: fills entire cell as background ---- */
.cm-series-cell-img {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.cm-series-cell-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
    display: block;
    transition: transform 0.5s ease;
}
.cm-series-cell:hover .cm-series-cell-img img {
    transform: scale(1.04);
}

/* Per-cell image position fine-tuning */
.cm-series-cell[data-key="C36"] .cm-series-cell-img img {
    object-position: 30% 50%;
}
.cm-series-cell[data-key="C49"] .cm-series-cell-img img {
    object-position: 20% 50%;
}

/* =======================================================
   RESPONSIVE — Series sections mobile
======================================================= */
@media (max-width: 768px) {

    /* Hero main — 2:3, centered top */
    .cm-hero {
        height: auto;
        aspect-ratio: 2/3;
        min-height: auto;
        width: 100%;
        margin: 0 0 4px;
    }
    .cm-hero-content {
        text-align: center;
        align-items: center;
        justify-content: flex-start;
        padding-top: 6vh;
    }
    .cm-hero-btns {
        justify-content: center;
    }

    /* Carousel on mobile */
    .cm-carousel { margin: 0 0 4px; }
    .cm-carousel-dots { bottom: 1.2rem; left: 50%; transform: translateX(-50%); }
    .cm-dot { width: 6px; height: 6px; border-radius: 3px; }
    .cm-dot.active { width: 36px; }

    /* Full-screen series: 2:3, image background, text centered top */
    .cm-series-hero {
        min-height: auto;
        aspect-ratio: 2/3;
        margin: 0;
    }
    .cm-series-img-wrap {
        position: absolute;
        inset: 0;
        z-index: 0;
    }
    .cm-series-text {
        flex: 0 0 100%;
        width: 100%;
        padding: 6vh 1.5rem 3rem;
        background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 60%);
        align-items: center;
        text-align: center;
        justify-content: flex-start;
    }
    .cm-series-label {
        margin-bottom: 0.6rem;
    }
    .cm-series-title {
        font-size: clamp(1.8rem, 7vw, 2.6rem);
        margin-bottom: 0.6rem;
    }
    .cm-series-tagline {
        font-size: 0.8rem;
        max-width: 100%;
        margin-bottom: 1rem;
    }
    .cm-series-btns {
        justify-content: center;
    }

    /* Grid: single column, 2:3, text centered top */
    .cm-series-grid {
        grid-template-columns: 1fr;
    }
    .cm-series-cell {
        aspect-ratio: 2/3;
    }
    .cm-series-cell-info {
        padding: 6vh 1.5rem 1.2rem;
        justify-content: flex-start;
    }
    .cm-series-cell-sub {
        margin-bottom: 0.4rem;
    }
    .cm-series-cell-tagline {
        margin-bottom: 0.8rem;
    }

    /* Mobile buttons — smaller */
    .cm-btn,
    .cm-series-btn-primary,
    .cm-series-btn-ghost,
    .cm-series-cell-btn-primary,
    .cm-series-cell-btn-ghost {
        padding: 0.45rem 1.2rem;
        font-size: 0.6rem;
    }
}

/* =======================================================
   FOOTER — Mobile
   DOM order: brand → newsletter → social → nav → bottom
   Mobile: flex column = 自然顺序刚好对
======================================================= */
@media (max-width: 768px) {

    .cm-footer {
        display: flex;
        flex-direction: column;
    }

    /* Brand: show logo + desc */
    .cm-footer-brand {
        padding: 2.5rem 1.5rem 1.5rem;
        grid-column: unset;
        grid-row: unset;
    }

    /* Newsletter: big heading, pill input */
    .cm-footer-newsletter {
        padding: 0 1.5rem 1.5rem;
        grid-column: unset;
        grid-row: unset;
    }

    .cm-nl-label {
        font-size: 1.4rem;
        font-weight: 600;
        color: #fff;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .cm-nl-form {
        max-width: 100%;
        width: 100%;
        background: rgba(255,255,255,0.1);
        border-radius: 999px;
        padding: 0.3rem 0.3rem 0.3rem 1.2rem;
        align-items: center;
    }

    .cm-nl-input {
        border: none;
        background: transparent;
        border-radius: 0;
        padding: 0.6rem 0;
        font-size: 0.9rem;
    }

    .cm-nl-btn {
        border-radius: 50%;
        width: 42px;
        height: 42px;
        padding: 0;
        flex-shrink: 0;
    }

    .cm-nl-btn-text { display: none; }
    .cm-nl-btn-icon { display: block; }

    .cm-nl-note {
        display: block;
        font-size: 0.78rem;
        color: rgba(255,255,255,0.4);
        margin-top: 0.8rem;
    }

    /* Social: horizontal row */
    .cm-footer-social {
        padding: 0 1.5rem 1.5rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.6rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        grid-column: unset;
        grid-row: unset;
    }

    .cm-footer-social::-webkit-scrollbar { display: none; }

    .cm-social-icon {
        width: 42px;
        height: 42px;
        flex-shrink: 0;
    }

    /* Nav: single column accordion */
    .cm-footer-nav {
        display: flex;
        flex-direction: column;
        padding: 0 1.5rem;
        border-left: none;
        grid-column: unset;
        grid-row: unset;
        gap: 0;
    }

    .cm-footer-col {
        border-top: 1px solid rgba(255,255,255,0.08);
    }

    .cm-col-chevron {
        display: block;
        color: rgba(255,255,255,0.4);
        transition: transform 0.25s;
        flex-shrink: 0;
    }

    .cm-footer-col h4 { margin-bottom: 0; }

    .cm-footer-col-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        cursor: pointer;
        margin-bottom: 0 !important;
        color: rgba(255,255,255,0.92);
        user-select: none;
    }

    .cm-footer-col.open .cm-col-chevron { transform: rotate(180deg); }

    .cm-footer-col ul {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .cm-footer-col.open ul {
        max-height: 300px;
        padding-bottom: 1.2rem;
    }

    .cm-footer-col ul li { margin-bottom: 0.7rem; }

    /* Bottom */
    .cm-footer-bottom {
        margin-top: 1.5rem;
        padding: 1.2rem 1.5rem;
    }
}

/* ── Product Detail Section ── */
.cm-details-banner {
    width: 100%;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.08);
    padding: 1.1rem 0;
    text-align: center;
    display: block;
}
.cm-details-label {
    font-family: var(--font-title);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    color: var(--text-main);
    text-transform: uppercase;
}
.cm-product-detail-wrap {
    max-width: 1600px;
    margin: 0 auto;
    padding: 3rem var(--gutter);
    background: #fff;
}
.cm-product-detail-inner img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 1rem;
}
.cm-product-detail-inner p {
    margin: 0 0 1rem;
}

/* =====================================================
   Search Results Page
===================================================== */
.cm-search-refine {
    margin-top: 1.2rem;
    max-width: 520px;
}

.cm-search-refine .cm-search-form {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--surface, #f5f5f5);
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 999px;
    padding: 0.35rem 0.4rem 0.35rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cm-search-refine .cm-search-form:focus-within {
    border-color: var(--accent, #d51522);
    box-shadow: 0 0 0 3px rgba(213,21,34,0.08);
}

.cm-search-refine .cm-search-icon {
    flex-shrink: 0;
    color: var(--text-muted, #999);
    margin-right: 0.5rem;
}

.cm-search-refine .cm-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--text, #1a1a1a);
    outline: none;
    padding: 0.4rem 0;
    width: auto;
    -webkit-appearance: none;
    appearance: none;
}

.cm-search-refine .cm-search-input::placeholder {
    color: var(--text-muted, #999);
}

.cm-search-refine .cm-search-input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.cm-search-refine .cm-search-btn {
    flex-shrink: 0;
    padding: 0.5rem 1.2rem;
    background: var(--accent, #d51522);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.15s;
}

.cm-search-refine .cm-search-btn:hover {
    background: #b5111c;
}

/* Empty state */
.cm-search-empty {
    text-align: center;
    padding: 5rem 1rem;
}

.cm-empty-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text, #1a1a1a);
    margin: 0 0 0.5rem;
}

.cm-empty-hint {
    color: var(--text-muted, #999);
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}

.cm-empty-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.cm-empty-links a {
    display: inline-block;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text, #1a1a1a);
    background: var(--surface, #f5f5f5);
    text-decoration: none;
    transition: all 0.15s;
    border: 1px solid rgba(0,0,0,0.06);
}

.cm-empty-links a:hover {
    background: var(--accent, #d51522);
    color: #fff;
    border-color: var(--accent, #d51522);
}

/* Pagination */
.cm-search-pagination {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    padding: 2.5rem 0 1rem;
}

.cm-search-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text, #1a1a1a);
    text-decoration: none;
    transition: all 0.15s;
}

.cm-search-pagination .page-numbers:hover {
    background: var(--surface, #f5f5f5);
}

.cm-search-pagination .page-numbers.current {
    background: var(--accent, #d51522);
    color: #fff;
}

@media (max-width: 768px) {
    .cm-search-refine { max-width: 100%; }
    .cm-search-refine .cm-search-form { padding: 0.25rem 0.3rem 0.25rem 0.8rem; }
    .cm-search-refine .cm-search-btn { padding: 0.4rem 1rem; font-size: 0.78rem; }
}

/* =====================================================
   Search Autocomplete Dropdown (fixed positioning, body-mounted)
===================================================== */
.cm-ac-dropdown {
    position: fixed;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.1);
    max-height: 320px;
    overflow-y: auto;
    z-index: 99999;
    padding: 5px;
    scrollbar-width: thin;
    display: none;
}

.cm-ac-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 0.88rem;
    transition: all 0.12s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.cm-ac-item:hover,
.cm-ac-item.cm-ac-active {
    background: #f0f0f0;
    border-left-color: var(--accent, #d51522);
    padding-left: 11px;
    color: #000;
}

.cm-ac-item strong {
    color: var(--accent, #d51522);
    font-weight: 700;
}

.cm-ac-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-ac-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    flex-shrink: 0;
    background: rgba(213,21,34,0.08);
    color: var(--accent, #d51522);
}

@media (max-width: 768px) {
    .cm-ac-dropdown { max-height: 250px; border-radius: 10px; }
    .cm-ac-item { padding: 9px 12px; font-size: 0.82rem; gap: 8px; }
}
/* footer inquiry link — match .cm-footer-col a exactly */
.cm-footer-nav .cm-btn {
    display: inline-flex;
    align-items: center;
    padding: 0;
    font-family: 'HarmonyOS Sans SC', var(--font-sans);
    font-size: 0.88rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    text-transform: none;
    border: none;
    border-radius: 0;
    background: none;
    color: rgba(255,255,255,0.6);
    position: relative;
    overflow: visible;
    transition: color 0.25s;
    text-align: left;
    z-index: auto;
}
.cm-footer-nav .cm-btn::before {
    content: '—';
    font-size: 0.7rem;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity 0.25s, max-width 0.25s, margin-right 0.25s;
    margin-right: 0;
    color: var(--accent, #d51522);
    position: static;
    inset: auto;
    transform: none;
    background: none;
}
.cm-footer-nav .cm-btn:hover { color: #fff; }
.cm-footer-nav .cm-btn:hover::before {
    opacity: 1;
    max-width: 1.2rem;
    margin-right: 0.4rem;
    transform: none;
}
