:root {
    --cds-primary: #2563eb;
    --cds-primary-dark: #1d4ed8;
    --cds-accent: #14b8a6;
    --cds-bg: #f8fafc;
    --cds-surface: #ffffff;
    --cds-text: #0f172a;
    --cds-muted: #64748b;
    --cds-border: #e2e8f0;
    --cds-soft: #eff6ff;
    --cds-radius: 22px;
    --cds-radius-sm: 14px;
    --cds-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
    --cds-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.cds-theme {
    margin: 0;
    background: var(--cds-bg);
    color: var(--cds-text);
    font-family: var(--cds-font);
    font-size: 16px;
    line-height: 1.65;
}
body.cds-theme a { color: inherit; text-decoration: none; }
body.cds-theme a:hover { color: var(--cds-primary); }
body.cds-theme img { max-width: 100%; height: auto; }

.cds-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.cds-skip-link { position: absolute; left: -999px; top: 10px; z-index: 10000; padding: 10px 14px; background: var(--cds-text); color: #fff; border-radius: 8px; }
.cds-skip-link:focus { left: 10px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.cds-site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226,232,240,.9);
}
.cds-header-inner { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.cds-branding { min-width: 185px; }
.cds-site-title { display: block; font-weight: 850; font-size: 1.18rem; letter-spacing: -.03em; color: var(--cds-text); }
.cds-site-tagline { display: block; color: var(--cds-muted); font-size: .82rem; line-height: 1.2; }
.custom-logo-link img { max-height: 56px; width: auto; }

.cds-primary-nav { margin-left: auto; }
.cds-menu { display: flex; align-items: center; gap: 6px; list-style: none; padding: 0; margin: 0; }
.cds-menu a { display: inline-flex; padding: 10px 12px; border-radius: 999px; color: var(--cds-muted); font-weight: 700; font-size: .94rem; }
.cds-menu a:hover { background: var(--cds-soft); color: var(--cds-primary); }
.cds-header-actions { display: flex; align-items: center; }
.cds-cart-link { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid var(--cds-border); border-radius: 999px; background: #fff; box-shadow: 0 8px 22px rgba(15,23,42,.06); font-weight: 800; }
.cds-cart-icon { display: inline-flex; width: 18px; height: 18px; color: var(--cds-primary); }
.cds-cart-icon svg { width: 18px; height: 18px; }
.cds-cart-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; background: var(--cds-accent); color: #fff; border-radius: 999px; font-size: .76rem; }
.cds-menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--cds-border); border-radius: 999px; background: #fff; align-items: center; justify-content: center; flex-direction: column; gap: 4px; }
.cds-menu-toggle span:not(.screen-reader-text) { display: block; width: 18px; height: 2px; background: var(--cds-text); border-radius: 999px; }

.cds-hero { padding: 76px 0 54px; background: radial-gradient(circle at top right, rgba(20,184,166,.17), transparent 35%), linear-gradient(180deg, #fff 0%, var(--cds-bg) 100%); }
.cds-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .8fr); gap: 44px; align-items: center; }
.cds-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--cds-primary); background: var(--cds-soft); border-radius: 999px; padding: 6px 12px; font-size: .78rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.cds-hero h1, .cds-page-hero h1 { margin: 18px 0 18px; font-size: clamp(2.3rem, 5vw, 4.6rem); line-height: .98; letter-spacing: -.07em; }
.cds-hero p, .cds-page-hero p, .cds-section-heading p { color: var(--cds-muted); font-size: 1.08rem; max-width: 680px; }
.cds-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cds-button, body.cds-theme .button, body.cds-theme button.button, body.cds-theme input.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 850;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.cds-button:hover, body.cds-theme .button:hover { transform: translateY(-1px); }
.cds-button-primary, body.cds-theme .button, body.cds-theme button.button, body.cds-theme input.button { background: var(--cds-primary); color: #fff; box-shadow: 0 12px 28px rgba(37,99,235,.22); }
.cds-button-primary:hover, body.cds-theme .button:hover { background: var(--cds-primary-dark); color: #fff; }
.cds-button-soft { background: #fff; color: var(--cds-text); border-color: var(--cds-border); }
.cds-disabled-button { opacity: .7; pointer-events: none; }

.cds-hero-card { position: relative; padding: 22px; border-radius: 32px; background: linear-gradient(145deg, rgba(37,99,235,.12), rgba(20,184,166,.17)); box-shadow: var(--cds-shadow); }
.cds-mini-checkout { background: #fff; border: 1px solid rgba(226,232,240,.85); border-radius: 28px; padding: 24px; box-shadow: 0 20px 55px rgba(15,23,42,.12); }
.cds-mini-header { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.cds-mini-header span { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 14px; background: var(--cds-soft); color: var(--cds-primary); }
.cds-mini-header svg { width: 22px; height: 22px; }
.cds-mini-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--cds-border); }
.cds-mini-row span, .cds-mini-checkout p { color: var(--cds-muted); }
.cds-mini-progress { height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin: 20px 0; }
.cds-mini-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--cds-primary), var(--cds-accent)); border-radius: inherit; }
.cds-mini-checkout button { width: 100%; min-height: 48px; border: 0; border-radius: 999px; background: var(--cds-text); color: #fff; font-weight: 850; }


.cds-answer-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.cds-answer-strip span { display: inline-flex; align-items: center; min-height: 34px; padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.8); border: 1px solid var(--cds-border); color: var(--cds-muted); font-size: .86rem; font-weight: 800; }
.cds-answer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cds-answer-card { background: var(--cds-surface); border: 1px solid var(--cds-border); border-radius: var(--cds-radius); padding: 22px; box-shadow: 0 14px 35px rgba(15,23,42,.055); }
.cds-answer-card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.cds-answer-card p { margin: 0; color: var(--cds-muted); }

.cds-section { padding: 70px 0; }
.cds-section-muted { background: #fff; border-block: 1px solid var(--cds-border); }
.cds-section-heading { margin-bottom: 30px; }
.cds-section-heading h2 { margin: 14px 0 8px; font-size: clamp(1.9rem, 3vw, 3rem); line-height: 1.08; letter-spacing: -.05em; }
.cds-inline-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.cds-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cds-feature-card, .cds-product-card, .cds-entry, .cds-widget { background: var(--cds-surface); border: 1px solid var(--cds-border); border-radius: var(--cds-radius); padding: 22px; box-shadow: 0 14px 35px rgba(15,23,42,.055); }
.cds-feature-card > span { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 15px; color: var(--cds-primary); background: var(--cds-soft); }
.cds-feature-card svg { width: 22px; height: 22px; }
.cds-feature-card h3, .cds-product-card h3 { margin: 16px 0 8px; line-height: 1.2; }
.cds-feature-card p { margin: 0; color: var(--cds-muted); }

.cds-products-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.cds-product-card { padding: 0; overflow: hidden; }
.cds-product-image { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / .82; background: linear-gradient(145deg, #f1f5f9, #e0f2fe); color: var(--cds-primary); }
.cds-product-image img { width: 100%; height: 100%; object-fit: cover; }
.cds-product-placeholder { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; border-radius: 22px; background: #fff; box-shadow: 0 14px 32px rgba(15,23,42,.11); }
.cds-product-placeholder svg { width: 30px; height: 30px; }
.cds-product-body { padding: 20px; }
.cds-product-body h3 a { color: var(--cds-text); }
.cds-product-price { color: var(--cds-primary); font-weight: 850; font-size: 1.08rem; }
.cds-pill { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: .78rem; font-weight: 800; }

.cds-demo-steps { display: grid; grid-template-columns: .95fr 1fr; gap: 36px; align-items: start; }
.cds-demo-steps h2 { font-size: clamp(1.9rem, 3vw, 3rem); line-height: 1.08; letter-spacing: -.05em; margin: 14px 0 10px; }
.cds-demo-steps p { color: var(--cds-muted); }
.cds-demo-steps ol { margin: 0; padding: 0; counter-reset: demo; display: grid; gap: 12px; }
.cds-demo-steps li { list-style: none; background: #fff; border: 1px solid var(--cds-border); border-radius: 18px; padding: 16px 16px 16px 54px; position: relative; font-weight: 700; }
.cds-demo-steps li::before { counter-increment: demo; content: counter(demo); position: absolute; left: 16px; top: 13px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--cds-primary); color: #fff; font-size: .85rem; }

.cds-page-hero { padding: 56px 0 36px; background: linear-gradient(180deg, #fff 0%, var(--cds-bg) 100%); border-bottom: 1px solid var(--cds-border); }
.cds-page-hero h1 { font-size: clamp(2rem, 4vw, 3.4rem); margin-bottom: 8px; }
.cds-content-wrap { max-width: 920px; }
.cds-entry + .cds-entry { margin-top: 18px; }
.cds-entry-content a { color: var(--cds-primary); text-decoration: underline; }

.cds-shop-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.cds-shop-layout:has(.cds-shop-sidebar) { grid-template-columns: minmax(0, 1fr) 300px; }
.cds-shop-sidebar { display: grid; gap: 18px; }
.cds-widget-title { margin: 0 0 12px; font-size: 1rem; }

/* WooCommerce light normalization. Craft Checkout can still control cart/checkout pages. */
body.cds-theme.woocommerce ul.products { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; margin: 0; }
body.cds-theme.woocommerce ul.products li.product { width: auto !important; float: none !important; margin: 0 !important; padding: 0; background: #fff; border: 1px solid var(--cds-border); border-radius: var(--cds-radius); overflow: hidden; box-shadow: 0 14px 35px rgba(15,23,42,.055); }
body.cds-theme.woocommerce ul.products li.product a img { margin: 0; width: 100%; aspect-ratio: 1 / .82; object-fit: cover; background: #f1f5f9; }
body.cds-theme.woocommerce ul.products li.product .woocommerce-loop-product__title,
body.cds-theme.woocommerce ul.products li.product .price,
body.cds-theme.woocommerce ul.products li.product .button { margin-left: 18px; margin-right: 18px; }
body.cds-theme.woocommerce ul.products li.product .button { margin-bottom: 18px; }
body.cds-theme.woocommerce div.product { background: #fff; border: 1px solid var(--cds-border); border-radius: var(--cds-radius); padding: 24px; box-shadow: 0 14px 35px rgba(15,23,42,.055); }
body.cds-theme.woocommerce div.product .woocommerce-tabs ul.tabs li { border-radius: 999px; background: var(--cds-soft); border: 0; }
body.cds-theme.woocommerce div.product .woocommerce-tabs .panel { background: #fff; border: 1px solid var(--cds-border); border-radius: var(--cds-radius-sm); padding: 20px; }
body.cds-theme .woocommerce-message,
body.cds-theme .woocommerce-info,
body.cds-theme .woocommerce-error { border-radius: var(--cds-radius-sm); border-top-color: var(--cds-primary); background: #fff; box-shadow: 0 12px 28px rgba(15,23,42,.06); }

.cds-site-footer { background: var(--cds-text); color: #fff; margin-top: 0; }
.cds-footer-grid { display: grid; grid-template-columns: 1.1fr .6fr .9fr; gap: 28px; padding: 48px 0; }
.cds-site-footer h2, .cds-site-footer h3 { margin-top: 0; }
.cds-site-footer p, .cds-site-footer a, .cds-site-footer li { color: rgba(255,255,255,.72); }
.cds-site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cds-site-footer a:hover { color: #fff; }
.cds-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; }
.cds-footer-bottom p { margin: 0; font-size: .92rem; }

@media (max-width: 980px) {
    .cds-menu-toggle { display: inline-flex; margin-left: auto; }
    .cds-primary-nav { display: none; position: absolute; left: 20px; right: 20px; top: 76px; background: #fff; border: 1px solid var(--cds-border); border-radius: 20px; padding: 12px; box-shadow: var(--cds-shadow); }
    .cds-primary-nav.is-open { display: block; }
    .cds-menu { display: grid; gap: 4px; }
    .cds-menu a { display: flex; }
    .cds-header-actions { margin-left: 0; }
    .cds-cart-text { display: none; }
    .cds-hero-grid, .cds-demo-steps { grid-template-columns: 1fr; }
    .cds-feature-grid, .cds-products-grid, .cds-answer-grid, body.cds-theme.woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cds-shop-layout:has(.cds-shop-sidebar) { grid-template-columns: 1fr; }
    .cds-footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .cds-container { width: min(100% - 28px, 1180px); }
    .cds-header-inner { gap: 10px; }
    .cds-branding { min-width: 0; flex: 1; }
    .cds-site-tagline { display: none; }
    .cds-hero { padding-top: 46px; }
    .cds-hero-actions, .cds-inline-heading { align-items: stretch; flex-direction: column; }
    .cds-button { width: 100%; }
    .cds-feature-grid, .cds-products-grid, .cds-answer-grid, body.cds-theme.woocommerce ul.products { grid-template-columns: 1fr; }
    .cds-section { padding: 48px 0; }
    .cds-hero-card { padding: 14px; border-radius: 24px; }
    .cds-mini-checkout { padding: 18px; border-radius: 22px; }
}
