/* Admin inline CMS editing (images + text) */

body.cms-edit-active,
body.cms-reorder-active {
    --cms-edit-accent: #2563eb;
    --cms-edit-bar-height: 52px;
    padding-top: var(--cms-edit-bar-height);
}

/* ---- Edit session top bar ---- */
.cms-edit-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--cms-edit-bar-height, 52px);
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
    background: #111;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

body.cms-edit-active .cms-edit-topbar,
body.cms-reorder-active .cms-edit-topbar {
    display: flex;
}

.cms-reorder-box {
    outline: 2px dashed rgba(250, 204, 21, 0.45);
    outline-offset: 6px;
    border-radius: 12px;
}

body.cms-reorder-active .cms-reorder-box {
    scroll-snap-type: none !important;
    touch-action: none;
}

body.cms-reorder-active .cms-reorder-item,
body.cms-reorder-active .cms-reorder-item * {
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

body.cms-reorder-active .cms-reorder-item {
    transition: none !important;
    transform: none !important;
}

.cms-reorder-item {
    cursor: grab;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.55);
    border-radius: 12px;
}

.cms-reorder-item::after {
    content: "Drag";
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 8;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.82);
    color: #facc15;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
}

.cms-drag-placeholder {
    border: 2px dashed #facc15;
    border-radius: 12px;
    background: rgba(250, 204, 21, 0.14);
    pointer-events: none;
    box-sizing: border-box;
}

.cms-reorder-item.is-cms-dragging {
    cursor: grabbing;
    opacity: 0.95;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    border-radius: 12px;
}

.cms-edit-topbar-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #e5e7eb;
}

.cms-edit-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cms-edit-topbar-btn {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
    transition: background 0.15s, border-color 0.15s;
}

.cms-edit-topbar-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
}

.cms-edit-topbar-btn--save {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
    padding: 9px 22px;
    box-shadow: 0 2px 10px rgba(22, 163, 74, 0.45);
}

.cms-edit-topbar-btn--save:hover:not(:disabled) {
    background: #15803d;
    border-color: #15803d;
}

.cms-edit-topbar-btn--save:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.cms-edit-topbar-btn--save.is-saving {
    opacity: 0.85;
    pointer-events: none;
}

/* ---- Admin tools (cog on the page edge, pen slides out left) ---- */
.cms-admin-shell {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10040;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.cms-admin-shell > * {
    pointer-events: auto;
}

.cms-admin-cog {
    position: relative;
    z-index: 2;
    width: 46px;
    height: 52px;
    border: none;
    border-radius: 14px 0 0 14px;
    background: #111;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.28);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.cms-admin-cog svg {
    display: block;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cms-admin-cog:hover {
    background: #2563eb;
}

.cms-admin-cog.is-open {
    background: #2563eb;
    box-shadow: -4px 4px 24px rgba(37, 99, 235, 0.35);
}

.cms-admin-cog.is-open svg {
    transform: rotate(90deg);
}

.cms-admin-rail {
    position: absolute;
    right: 100%;
    top: 50%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(36px, -50%) scale(0.7);
    transition:
        transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.22s ease,
        visibility 0.45s;
}

.cms-admin-rail.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-10px, -50%) scale(1);
}

.cms-admin-tool {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #111;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.cms-admin-tool:hover {
    background: #2563eb;
    transform: scale(1.06);
}

.cms-admin-tool[data-tooltip] {
    position: relative;
}

.cms-admin-tool[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    background: #111;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.cms-admin-tool[data-tooltip]::after {
    content: '';
    position: absolute;
    right: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-left-color: #111;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.cms-admin-tool[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.cms-admin-tool[data-tooltip]:hover::after {
    opacity: 1;
}

.cms-admin-tool.is-active {
    background: #2563eb;
    color: #fff;
}

.cms-img-wrap:not(.td-machine-img-wrap):not(.sb-machine-img-wrap):not(.machine-card-img-wrap) {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.cms-img-wrap:not(.td-machine-img-wrap):not(.sb-machine-img-wrap):not(.machine-card-img-wrap) > img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Machine cards already size their photo. Edit mode only adds the camera. */
.td-machine-img-wrap > .cms-img-replace-btn,
.sb-machine-img-wrap > .cms-img-replace-btn,
.machine-card-img-wrap > .cms-img-replace-btn {
    top: 10px;
    right: auto;
    left: 10px;
}

/* Full-bleed / card images — wrapper must not break layout */
.cms-img-wrap--cover {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    z-index: 0;
}

.cms-img-wrap--cover > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: none;
}

.hero-bg > .cms-img-wrap--cover {
    position: absolute;
    inset: 0;
}

.home-acc-img > .cms-img-wrap--cover,
.promo-card > .cms-img-wrap--cover,
.showcase-card > .cms-img-wrap--cover,
.acc-range-feature > .cms-img-wrap--cover {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Promo overlay sits above the photo; edit control sits above the overlay */
.promo-card .promo-overlay {
    z-index: 2;
}

.promo-card .cms-img-replace-btn--promo,
.home-acc-card .cms-img-replace-btn--promo {
    z-index: 30;
}

/* Keep hero gradient below text but above photo */
.hero-bg::after {
    z-index: 1;
    pointer-events: none;
}

.cms-img-replace-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: rgba(17, 17, 17, 0.82);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: auto;
    transition: opacity 0.15s, background 0.15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.cms-img-wrap:hover .cms-img-replace-btn,
.cms-img-wrap:focus-within .cms-img-replace-btn {
    opacity: 1;
}

/* Always show replace control in admin edit mode */
body.cms-edit-active .cms-img-replace-btn,
body.cms-edit-active .cms-bg-edit-btn {
    opacity: 1;
}

.cms-img-replace-btn:hover {
    background: #2563eb;
}

/* Do not override full-bleed hero background layers */
.cms-bg-edit-wrap:not(.hero-bg) {
    position: relative;
}

.hero-bg.cms-bg-edit-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

/* Background stays under titles/search; only the camera control sits above */
body.cms-edit-active .hero-bg.cms-bg-edit-wrap {
    z-index: 0;
    pointer-events: none;
}

body.cms-edit-active .hero > .cms-bg-edit-btn,
.cms-bg-edit-btn--hero {
    position: absolute;
    top: 72px;
    right: 16px;
    z-index: 30;
    pointer-events: auto;
    opacity: 1;
}

@media (max-width: 768px) {
    body.cms-edit-active .hero > .cms-bg-edit-btn,
    .cms-bg-edit-btn--hero {
        top: 64px;
    }
}

.cms-bg-edit-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 25;
}

.cms-text-editable {
    outline: none;
    border-radius: 4px;
    transition: box-shadow 0.15s, background 0.15s;
}

.cms-text-editable:hover {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
    cursor: text;
}

.cms-text-editable:focus {
    box-shadow: 0 0 0 2px #2563eb;
    background: rgba(37, 99, 235, 0.06);
}

.cms-text-editable.cms-text-dirty {
    box-shadow: 0 0 0 2px #f59e0b;
}

/* Media picker modal */
.cms-mp-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10140;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cms-mp-backdrop.open { display: flex; }

.cms-mp-modal {
    width: min(1040px, 100%);
    max-height: min(88vh, 900px);
    background: #fff;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #111;
}

.cms-mp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.cms-mp-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.cms-mp-count {
    margin: 2px 0 0;
    font-size: 12px;
    color: #6b7280;
}

.cms-mp-toolbar {
    display: flex;
    gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    align-items: center;
}

.cms-mp-crumb {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
}

.cms-mp-crumb-link {
    border: none;
    background: none;
    padding: 0;
    color: #2563eb;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.cms-mp-crumb-current {
    color: #111;
    font-weight: 600;
}

.cms-mp-crumb-sep {
    color: #9ca3af;
}

.cms-mp-main {
    display: flex;
    flex: 1;
    min-height: 0;
}

.cms-mp-folders {
    width: 200px;
    flex-shrink: 0;
    border-right: 1px solid #f0f0f0;
    overflow: auto;
    padding: 10px 8px;
    background: #fafafa;
}

.cms-mp-folder-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    text-align: left;
    padding: 7px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #374151;
}

.cms-mp-folder-link:hover {
    background: #eee;
}

.cms-mp-folder-link.is-active {
    background: #111;
    color: #fff;
}

.cms-mp-folder-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cms-mp-folder-n {
    font-size: 10px;
    opacity: 0.65;
}

.cms-mp-folder-empty {
    margin: 8px 8px 0;
    font-size: 11px;
    color: #9ca3af;
}

.cms-mp-item-folder .cms-mp-folder-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: #eef2ff;
}

.cms-mp-folder-meta {
    padding-top: 0 !important;
    color: #9ca3af !important;
}

.cms-mp-search {
    flex: 1;
    min-width: 160px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
}

.cms-mp-upload-label {
    padding: 8px 14px;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.cms-mp-upload-label input { display: none; }

.cms-mp-body {
    flex: 1;
    overflow: auto;
    padding: 16px 18px;
}

.cms-mp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.cms-mp-item {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #f9fafb;
    transition: border-color 0.15s;
}

.cms-mp-item:hover { border-color: #9ca3af; }
.cms-mp-item.selected { border-color: #111; box-shadow: 0 0 0 2px #111; }

.cms-mp-item-thumb {
    aspect-ratio: 1;
    background: #f3f4f6;
}

.cms-mp-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cms-mp-item p {
    margin: 0;
    padding: 4px 6px;
    font-size: 10px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cms-mp-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid #e5e7eb;
}

.cms-mp-btn {
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.cms-mp-btn-primary {
    background: #111;
    color: #fff;
    border-color: #111;
}

.cms-mp-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.cms-mp-empty {
    text-align: center;
    color: #9ca3af;
    padding: 32px;
    font-size: 13px;
    grid-column: 1 / -1;
}

@media (max-width: 720px) {
    .cms-mp-main {
        flex-direction: column;
    }

    .cms-mp-folders {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        max-height: 140px;
    }
}

/* ---- Full-page SEO / AI search ---- */
body.cms-seo-open {
    overflow: hidden;
}

.cms-seo-overlay {
    position: fixed;
    inset: 0;
    z-index: 10080;
    display: none;
    background: #f3f4f6;
}

.cms-seo-overlay.is-open {
    display: flex;
}

.cms-seo-panel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.cms-seo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 28px;
    background: #111;
    color: #fff;
    flex-shrink: 0;
}

.cms-seo-kicker {
    margin: 0 0 2px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
}

.cms-seo-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.cms-seo-header-actions {
    display: flex;
    gap: 10px;
}

.cms-seo-btn {
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
}

.cms-seo-og-row .cms-seo-btn,
.cms-seo-card .cms-seo-btn {
    border-color: #e5e7eb;
    background: #111;
    color: #fff;
}

.cms-seo-btn--save {
    background: #16a34a;
    border-color: #16a34a;
}

.cms-seo-btn--close {
    background: #fff;
    color: #111;
    border-color: #fff;
}

.cms-seo-google-wrap {
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 28px 18px;
}

.cms-seo-google-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.cms-seo-google-label {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.cms-seo-score-mini {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.cms-seo-overlay .cms-google-serp {
    max-width: 652px;
    font-family: Arial, sans-serif;
    padding: 4px 0 0;
}

.cms-seo-overlay .cms-google-serp-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.cms-seo-overlay .cms-google-fav {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.cms-seo-overlay .cms-google-sitename {
    font-size: 14px;
    color: #202124;
    line-height: 1.2;
}

.cms-seo-overlay .cms-google-url {
    font-size: 12px;
    color: #4d5156;
    margin-top: 1px;
}

.cms-seo-overlay .cms-google-title {
    display: block;
    font-size: 20px;
    line-height: 1.3;
    color: #1a0dab !important;
    text-decoration: none !important;
    border-bottom: none !important;
    margin: 2px 0 4px;
    font-weight: 400;
}

.cms-seo-overlay .cms-google-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.58;
    color: #4d5156;
}

.cms-seo-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 24px;
    padding: 24px 28px 40px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.cms-seo-form-col,
.cms-seo-preview-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cms-seo-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px 22px;
}

.cms-seo-card h3 {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
}

.cms-seo-help {
    margin: -6px 0 14px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.45;
}

.cms-seo-field .cms-seo-help {
    margin: 0;
}

.cms-seo-score {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.cms-seo-score-ring {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 6px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

.cms-seo-score.is-poor .cms-seo-score-ring { border-color: #dc2626; }
.cms-seo-score.is-ok .cms-seo-score-ring { border-color: #d97706; }
.cms-seo-score.is-good .cms-seo-score-ring { border-color: #2563eb; }
.cms-seo-score.is-top .cms-seo-score-ring { border-color: #16a34a; }

.cms-seo-score-ring strong {
    font-size: 22px;
    line-height: 1;
    color: #dc2626;
}
.cms-seo-score.is-poor .cms-seo-score-ring strong { color: #dc2626; }
.cms-seo-score.is-ok .cms-seo-score-ring strong { color: #d97706; }
.cms-seo-score.is-good .cms-seo-score-ring strong { color: #2563eb; }
.cms-seo-score.is-top .cms-seo-score-ring strong { color: #16a34a; }

.cms-seo-score-ring span {
    font-size: 10px;
    color: #6b7280;
}

.cms-seo-score-copy p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

#cmsSeoScoreLabel {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin-bottom: 4px;
}

.cms-seo-todos {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cms-seo-todos li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 13px;
    padding: 7px 0;
    border-bottom: 1px solid #f3f4f6;
    color: #6b7280;
    line-height: 1.4;
}

.cms-seo-todos li:last-child {
    border-bottom: none;
}

.cms-seo-todos li.is-done {
    color: #15803d;
}

.cms-seo-todo-mark {
    width: 16px;
    flex-shrink: 0;
    font-weight: 700;
}

.cms-seo-preview-col {
    position: sticky;
    top: 0;
    align-self: start;
}

.cms-seo-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.cms-seo-field span {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.cms-seo-field input,
.cms-seo-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
}

.cms-seo-field em {
    font-style: normal;
    font-size: 11px;
    color: #6b7280;
    align-self: flex-end;
}

.cms-seo-field em.is-over {
    color: #dc2626;
    font-weight: 600;
}

.cms-seo-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin: 4px 0 16px;
}

.cms-seo-og-row {
    display: flex;
    gap: 8px;
}

.cms-seo-og-row input {
    flex: 1;
}

.cms-google-serp {
    font-family: Arial, sans-serif;
    padding: 8px 4px 4px;
}

.cms-seo-ai-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.cms-seo-ai-label {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #2563eb;
}

.cms-seo-ai-box p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #111;
}

.cms-seo-ai-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.cms-seo-ai-chips span {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #1e3a8a;
}

.cms-seo-ai-box #cmsSeoAiPreview > p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #111;
}

.cms-seo-ai-faqs {
    margin: 12px 0 0;
}

.cms-seo-ai-faqs dt {
    font-weight: 600;
    font-size: 13px;
    margin-top: 8px;
    color: #111;
}

.cms-seo-ai-faqs dd {
    margin: 2px 0 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.45;
}

.cms-seo-og-preview {
    margin-top: 14px;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 12px;
}

.cms-seo-og-preview img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

@media (max-width: 900px) {
    .cms-seo-body {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .cms-seo-header {
        padding: 14px 16px;
    }

    .cms-seo-google-wrap {
        padding: 12px 16px 16px;
    }
}

/* ---- Homepage showcase add / delete (edit mode only) ---- */
.showcase-card-placeholder {
    position: absolute;
    inset: 0;
    background: #1f2937;
}

.showcase-add-card {
    appearance: none;
    -webkit-appearance: none;
    border: 2px dashed rgba(255, 255, 255, 0.35);
    background: #111;
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    box-shadow: none;
    font: inherit;
    padding: 0;
}

body.cms-edit-active .showcase-card.showcase-slide.showcase-add-card {
    display: flex;
}

.showcase-add-card::before {
    display: none;
}

.showcase-add-plus {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    line-height: 1;
    font-weight: 400;
}

.showcase-add-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.showcase-add-card:hover {
    border-color: #2563eb;
    background: #151515;
}

.cms-showcase-del,
.cms-showcase-edit {
    position: absolute;
    top: 10px;
    z-index: 12;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

body.cms-edit-active .cms-showcase-del,
body.cms-edit-active .cms-showcase-edit {
    display: flex;
}

.cms-showcase-del {
    left: 10px;
    background: rgba(185, 28, 28, 0.92);
    font-size: 20px;
    line-height: 1;
}

.cms-showcase-edit {
    right: 10px;
    background: rgba(17, 17, 17, 0.82);
}

.cms-showcase-del:hover {
    background: #dc2626;
}

.cms-showcase-edit:hover {
    background: #2563eb;
}

.cms-showcase-modal {
    position: fixed;
    inset: 0;
    z-index: 10120;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cms-showcase-modal.is-open {
    display: flex;
}

.cms-showcase-panel {
    width: min(440px, 100%);
    background: #fff;
    color: #111;
    border-radius: 14px;
    padding: 22px 22px 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.cms-showcase-panel h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.cms-showcase-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.cms-showcase-field input[type="text"],
.cms-showcase-field textarea {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 400;
    color: #111;
    font-family: inherit;
}
.cms-showcase-field input[type="text"] {
    height: 40px;
}
.cms-showcase-field textarea {
    min-height: 72px;
    padding: 10px 12px;
    resize: vertical;
    line-height: 1.4;
}

.cms-showcase-img-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cms-showcase-img-preview {
    width: 88px;
    height: 88px;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 500;
}

.cms-showcase-img-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cms-showcase-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.cms-showcase-btn {
    height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.cms-showcase-btn:hover {
    background: #f9fafb;
}

.cms-showcase-btn--save {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.cms-showcase-btn--save:hover {
    background: #15803d;
}
