/* ── Blocks system ──────────────────────────────────── */
.blocks-tab-body {
    padding: 8px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.blocks-hint {
    font-size: 12px;
    color: rgba(255,255,255,0.38);
    margin: 0 0 12px;
    line-height: 1.6;
}
.blocks-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.block-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    cursor: grab;
    user-select: none;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    transition: background 0.15s, border-color 0.15s;
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

.block-thumb > span:last-child {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 14px;
    line-height: 14px;
    text-align: center;
}
.block-thumb:hover {
    background: rgba(59,130,246,0.18);
    border-color: rgba(59,130,246,0.5);
    color: rgba(255,255,255,0.9);
}
.block-thumb:active { cursor: grabbing; }
.block-thumb-inner {
    width: 52px;
    height: 52px;
    background: rgba(59,130,246,0.22);
    border: 2px solid rgba(59,130,246,0.55);
    border-radius: 5px;
}

.block-thumb-inner--banner {
    width: 56px;
    height: 18px;
    background: linear-gradient(90deg, rgba(59,130,246,0.95), rgba(29,78,216,0.95));
    border: 1px solid rgba(147,197,253,0.7);
    position: relative;
    overflow: hidden;
}

.block-thumb-inner--animated::after {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: rgba(255,255,255,0.28);
    filter: blur(0.8px);
    animation: blockThumbBannerMove 1.2s linear infinite;
}

@keyframes blockThumbBannerMove {
    from { left: -40%; }
    to   { left: 100%; }
}

.placed-banner-block {
    position: relative;
    width: 100%;
    height: 0;
    margin: 0;
    overflow: hidden;
    transition: height 0.28s ease, margin 0.28s ease, opacity 0.28s ease;
    opacity: 0;
    z-index: 4;
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
}

.placed-banner-block.banner-mounted {
    height: 56px;
    margin: 0;
    opacity: 1;
    background: transparent;
}

.banner-block-inner {
    width: 100%;
    max-width: 100%;
    height: 56px;
    margin: 0 auto;
    background: transparent;
    overflow: hidden;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: width 0.2s ease;
    box-sizing: border-box;
}

.banner-block-track {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
}

.banner-block-text {
    display: inline-block;
    padding: 0 18px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.35px;
    line-height: 56px;
    font-family: "Montserrat", sans-serif;
    white-space: nowrap;
}

.placed-banner-static .banner-block-text {
    animation: none;
}

.placed-banner-animated .banner-block-text {
    padding-left: 100%;
    animation: placedBannerMarquee 12s linear infinite;
}

.placed-banner-static .banner-block-text {
    animation: none;
}

.placed-banner-animated .banner-block-text {
    padding-left: 100%;
    animation: placedBannerMarquee 12s linear infinite;
}

@keyframes placedBannerMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}
/* ── Block Toolbar ───────────────────────────────────────── */
.block-toolbar-group {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.block-toolbar-group-title {
    display: none;
}

.block-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 12px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px;
}

.block-toolbar--panel {
    width: 100%;
    box-sizing: border-box;
}

/* ── Rows inside the toolbar ── */
.block-toolbar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.block-toolbar-row--secondary {
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.07);
    gap: 8px;
}

.block-toolbar-divider--v {
    width: 1px;
    height: 22px;
    background: rgba(255,255,255,0.13);
    flex-shrink: 0;
}

.block-toolbar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #c9d1e0;
    font-size: 12px;
}

/* ── Swatch label (Background / Width) ── */
.block-toolbar-swatch-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
}

/* ── Color swatch wrapper ── */
.block-toolbar-swatch-wrap {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.block-toolbar-swatch-wrap input[type="color"] {
    position: absolute;
    width: 28px;
    height: 28px;
    opacity: 0;
    cursor: pointer;
    border: none;
    padding: 0;
}

.block-toolbar-swatch-preview {
    display: block;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: #3b82f6;
    border: 2px solid rgba(255,255,255,0.18);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    pointer-events: none;
    transition: background 0.1s;
}

/* ── Width slider ── */
.block-toolbar-item input[type="range"] {
    width: 80px;
    accent-color: #3b82f6;
}

.block-toolbar-width-label {
    font-size: 11px;
    color: #93c5fd;
    min-width: 32px;
}

/* ── Image / Clear buttons ── */
.block-toolbar-img-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 11px;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.block-toolbar-img-btn:hover {
    background: rgba(59,130,246,0.25);
    border-color: rgba(59,130,246,0.45);
    color: #fff;
}

.block-toolbar-clear-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: background 0.15s;
}

.block-toolbar-clear-btn:hover {
    background: rgba(239,68,68,0.22);
    border-color: rgba(239,68,68,0.45);
    color: #fca5a5;
}

/* ── Banner font dropdown ────────────────────────────────── */
.block-banner-font-dropdown {
    position: relative;
    flex: 1;
    min-width: 0;
    font-size: 12px;
}

.block-banner-font-selected {
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s;
}

.block-banner-font-selected:hover {
    background: rgba(255,255,255,0.13);
}

.block-banner-font-options {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    background: rgba(18,22,32,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    max-height: 200px;
    overflow-y: auto;
    padding: 6px;
    z-index: 99999;
}

.block-banner-font-options [data-font] {
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: #c9d1e0;
    font-size: 12px;
    transition: background 0.12s;
}

.block-banner-font-options [data-font]:hover {
    background: rgba(255,255,255,0.10);
    color: #fff;
}

.block-banner-font-options::-webkit-scrollbar { width: 2px; }
.block-banner-font-options::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
}

/* ── Banner text edit modal ──────────────────────────────── */
.block-text-edit-modal {
    margin-top: 8px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
}

.block-text-edit-input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-size: 13px;
    outline: none;
    margin-bottom: 8px;
    transition: border-color 0.15s;
}

.block-text-edit-input:focus {
    border-color: rgba(59,130,246,0.6);
    background: rgba(255,255,255,0.10);
}

.block-text-edit-actions {
    display: flex;
    gap: 8px;
}

/* ── Block selected ring ─────────────────────────────────── */
.placed-block.block-selected {
    outline: 2px solid #3b82f6 !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.18);
}

.placed-banner-block.block-selected {
    outline: 2px solid #3b82f6 !important;
    outline-offset: -2px;
    box-shadow: inset 0 0 0 2px rgba(147,197,253,0.45);
}

.block-drop-hover {
    outline: 2px dashed rgba(59,130,246,0.65) !important;
    outline-offset: -3px;
}

.shape-drop-hover {
    outline: 2px dashed #a78bfa !important;
    outline-offset: -3px;
}

.placed-block:hover {
    outline: 2px solid rgba(59,130,246,0.9);
    outline-offset: -2px;
}

#logoContainer {
    position: absolute;
    z-index: 5; /* Make sure it's above hero */
}

body.edit-mode ::-webkit-scrollbar,
body.edit-mode::-webkit-scrollbar,
html:has(body.edit-mode)::-webkit-scrollbar {
    width: 0px !important;
    height: 0px !important;
    background: transparent !important;
}

html {
    scrollbar-gutter: stable;
}

body.edit-mode,
html:has(body.edit-mode) {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}

#logoImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease;
    width: 100%;
}

.carousel-image {
    width: 100%;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 20px;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    font-size: 28px;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
}

.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #888;
    cursor: pointer;
}

.carousel-dot.active {
    background: white;
}

.image-add-btn {
    position: absolute;
    inset: 0;
    margin: auto;

    width: 80px;
    height: 80px;

    border-radius: 16px;
    border: 2px dashed rgba(255,255,255,0.25);

    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(6px);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 38px;
    font-weight: 300;
    color: rgba(255,255,255,0.7);

    cursor: pointer;
    transition: 0.2s ease;
}

.image-add-btn:hover {
    background: rgba(255,255,255,0.06);
    transform: scale(1.05);
}

.logo-add-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    width: 60px;
    height: 60px;
    border-radius: 50%;
    
    border: 2px solid rgba(255,255,255,0.6);
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(8px);
    
    color: #fff;
    font-size: 32px;
    font-weight: 600;
    
    cursor: pointer;
    z-index: 5;
    
    transition: 0.2s ease;
}

.logo-add-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(0,0,0,0.6);
}

/* Hidden by default */
.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 3px;
    z-index: 20;
    display: none;
}

/* Only visible in edit mode */
body.edit-mode .resize-handle {
    display: block;
}

.top-left { top: -6px; left: -6px; cursor: nwse-resize; }
.top-right { top: -6px; right: -6px; cursor: nesw-resize; }
.bottom-left { bottom: -6px; left: -6px; cursor: nesw-resize; }
.bottom-right { bottom: -6px; right: -6px; cursor: nwse-resize; }

.flex-section {
    position: relative;
    background: var(--flex-bg, #181f2b);
}

.flex-section::before {
    display: none;
}

/* =========================
   UI TYPOGRAPHY SYSTEM
========================= */

#editorPanel,
#editorPanel * {
    font-family: "Inter", sans-serif !important;
}

/* === Accordion Layout === */

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.setting-row span {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
}

.color-swatch {
    flex: 1;
    height: 36px;

    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);

    cursor: pointer;
    transition: 0.2s ease;
}

.color-swatch:hover {
    border-color: rgba(255,255,255,0.25);
}

/* =========================
   Flat Accordion Sections
========================= */

.editor-section {
    position: relative;
    border-radius: 10px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.04);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255,255,255,0.10);
    transition: background 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.editor-section:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.16);
}

.editor-section.open {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.20);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.editor-section + .editor-section {
    margin-top: 0px;
}

.section-toggle {
    width: 100%;
    padding: 11px 12px;

    background: transparent;
    border: none;
    color: rgba(255,255,255,0.85);

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;

    display: flex;
    align-items: center;
    justify-content: space-between;

    cursor: pointer;
}

.section-toggle::after {
    content: "";
    width: 7px;
    height: 7px;

    border-right: 2px solid rgba(255,255,255,0.7);
    border-bottom: 2px solid rgba(255,255,255,0.7);

    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.section-toggle-label {
    cursor: text;
    border-bottom: 3px dashed rgba(255, 255, 255, 0.35);
    padding-bottom: 1px;
    transition: border-color 0.2s ease;
}

.section-toggle-label:hover {
    border-bottom-color: rgba(255, 255, 255, 0.75);
}

/* Smooth accordion animation */
.section-content {
    overflow: hidden;
    height: 0;
    opacity: 0;
    transition: height 0.3s ease, opacity 0.2s ease;
}

.section-content input,
.section-content select,
.section-content textarea {
    width: 100%;
    box-sizing: border-box;
}

.editor-section.open .section-content {
    padding: 4px 12px 16px 12px;
    opacity: 1;
}

/* Better field spacing */
.section-content label {
    display: block;
    margin-top: 13px;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
    opacity: 1;
    color: rgba(255,255,255,0.85);
}

.section-content h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Clean field row */
.field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* Rounded color inputs */
input[type="color"] {
    width: 90px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    background: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

input[type="color"]:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

select,
input[type="file"],
input[type="range"] {
    transition: background 0.2s ease, border 0.2s ease;
}

select:hover,
input[type="file"]:hover {
    border-color: rgba(255,255,255,0.3);
}

.editor-section.open .section-content > * {
    opacity: 0;
    transform: translateY(6px);
    animation: fadeSlideIn 0.35s ease forwards;
}

.editor-section.open .section-content > *:nth-child(1) { animation-delay: 0.03s; }
.editor-section.open .section-content > *:nth-child(2) { animation-delay: 0.06s; }
.editor-section.open .section-content > *:nth-child(3) { animation-delay: 0.09s; }
.editor-section.open .section-content > *:nth-child(4) { animation-delay: 0.12s; }

@keyframes fadeSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= HERO PERMANENT FADE ================= */

.hero {
  position: relative;
  overflow: visible;
}

.hero .hero-image-layer,
.hero::before {
  overflow: hidden;
}




#textFont option[value="Montserrat"] { font-family: "Montserrat"; }
#textFont option[value="Poppins"] { font-family: "Poppins"; }
#textFont option[value="Playfair Display"] { font-family: "Playfair Display"; }
#textFont option[value="Inter"] { font-family: "Inter"; }
#textFont option[value="DM Sans"] { font-family: "DM Sans"; }
#textFont option[value="Raleway"] { font-family: "Raleway"; }
#textFont option[value="Oswald"] { font-family: "Oswald"; }
#textFont option[value="Lora"] { font-family: "Lora"; }
#textFont option[value="Bebas Neue"] { font-family: "Bebas Neue"; }

#textFont {
    display: none;
}

/* ================= FONT DROPDOWN (CLEAN PANEL STYLE) ================= */

.font-dropdown {
    position: relative;
    width: 158px;
    font-size: 13px;
}

/* Closed state */
.font-selected {
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    transition: background 0.18s ease, border-color 0.18s ease;
    user-select: none;
}

.font-selected:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
}

.font-chevron {
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.font-dropdown.open .font-chevron {
    transform: rotate(180deg);
}

/* Dropdown panel */
.font-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: rgba(14, 18, 28, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 16px 48px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3);
    display: none;
    max-height: 260px;
    overflow-y: auto;
    padding: 5px;
    z-index: 99999;
    transform-origin: top center;
    animation: fontDropDown 0.22s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fontDropDown {
    from {
        opacity: 0;
        transform: scaleY(0.88) translateY(-6px);
    }
    to {
        opacity: 1;
        transform: scaleY(1) translateY(0);
    }
}

/* Options */
.font-options div {
    padding: 9px 12px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255,255,255,0.82);
    transition: background 0.13s ease, color 0.13s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.font-options div:hover {
    background: rgba(255,255,255,0.09);
    color: #fff;
}

/* Scrollbar styling */
.font-options::-webkit-scrollbar {
    width: 3px;
}

.font-options::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 999px;
}

.glass {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}

.popup-box.glass input,
.popup-box.glass textarea {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
}

/* ============================================================
   PREORDER POPUP — GLASSMORPHISM REVAMP
============================================================ */

.preorder-overlay {
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}

.preorder-box {
    width: 100%;
    max-width: 480px;
    border-radius: 24px;
    padding: 36px 32px 28px;

    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(40px) saturate(160%);
    -webkit-backdrop-filter: blur(40px) saturate(160%);

    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);

    animation: preorderSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes preorderSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.preorder-header {
    text-align: center;
    margin-bottom: 28px;
}

.preorder-icon {
    font-size: 38px;
    margin-bottom: 10px;
}

.preorder-title {
    font-size: 22px;
    font-weight: 900;
    color: white;
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

.preorder-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    margin: 0;
}

.preorder-field-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.preorder-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.preorder-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.preorder-optional {
    font-weight: 400;
    text-transform: none;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0;
}

.preorder-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.preorder-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.preorder-input:focus {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.10);
}

.preorder-textarea {
    resize: vertical;
    min-height: 80px;
}

.preorder-actions {
    display: flex;
    gap: 10px;
}

.preorder-cancel-btn {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.preorder-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.09);
}

.preorder-submit-btn {
    flex: 2;
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--accent, #3b82f6), var(--accent2, #1d4ed8));
    border: none;
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    letter-spacing: 0.2px;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

/* ============================================================
   PREORDER SUCCESS POPUP — GLASSMORPHISM
============================================================ */

.preorder-success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preorder-success-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    border-radius: 28px;
    padding: 48px 36px 40px;
    text-align: center;
    overflow: hidden;

    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);

    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 40px 90px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);

    animation: successPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPopIn {
    from { opacity: 0; transform: scale(0.88) translateY(16px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* Soft ambient glow behind the icon */
.preorder-success-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 70%);
    pointer-events: none;
}

.preorder-success-icon {
    font-size: 52px;
    margin-bottom: 16px;
    position: relative;
}

.preorder-success-title {
    font-size: 24px;
    font-weight: 900;
    color: white;
    margin: 0 0 12px 0;
    letter-spacing: -0.4px;
}

.preorder-success-body {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.60);
    line-height: 1.7;
    margin: 0 0 28px 0;
}

.preorder-success-close {
    display: inline-block;
    padding: 13px 36px;
    background: linear-gradient(135deg, var(--accent, #3b82f6), var(--accent2, #1d4ed8));
    border: none;
    color: white;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    letter-spacing: 0.2px;
    font-family: inherit;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preorder-success-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.55);
}
/* ================= FLEX SECTION ================= */

.flex-section {
    position: relative;
    padding: 0;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: var(--flex-bg, #1a3a6b);
    z-index: 2;
}

.flex-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.flex-text h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

.flex-text p {
    font-size: 18px;
    line-height: 1.7;
    opacity: 0.9;
}

.flex-media img {
    width: 100%;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: none;
}

/* Glass card effect */
.flex-container {
    backdrop-filter: blur(10px);
}

.flex-media {
    position: relative;
}

.flex-image-container {
    position: relative;
    width: 350px;
    height: auto;
    max-width: 100%;
}

.flex-image-container,
.product-image-container {
    position: relative;
}

.top-left { top: -6px; left: -6px; cursor: nwse-resize; }
.top-right { top: -6px; right: -6px; cursor: nesw-resize; }
.bottom-left { bottom: -6px; left: -6px; cursor: nesw-resize; }
.bottom-right { bottom: -6px; right: -6px; cursor: nwse-resize; }

.flex-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

.flex-resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 3px;
    z-index: 20;
    display: none;
}

body.edit-mode .flex-resize-handle {
    display: block;
}


/* Responsive */
@media (max-width: 900px) {
    .flex-container {
        grid-template-columns: 1fr;
    }
}

html, body {
    margin: 0;
    padding: 0;
}

.product-image-container {
    position: relative;
}


.product-resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 3px;
    z-index: 20;
    display: none;
}

body.edit-mode .product-resize-handle {
    display: block;
}

.product-resize-handle.top-left { top: -6px; left: -6px; cursor: nwse-resize; }
.product-resize-handle.top-right { top: -6px; right: -6px; cursor: nesw-resize; }
.product-resize-handle.bottom-left { bottom: -6px; left: -6px; cursor: nesw-resize; }
.product-resize-handle.bottom-right { bottom: -6px; right: -6px; cursor: nwse-resize; }

.product-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
}

#productResize {
    position: absolute;
    right: -8px;
    bottom: -8px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: nwse-resize;
    box-shadow: 0 0 6px rgba(0,0,0,0.2);
    display: none;
}

body.edit-mode #productResize {
    display: block;
}
/* =========================
   TOP EDITOR BAR FIX
========================= */

.top-editor-bar {

  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  height: 64px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0px 16px;

  background: #111318;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  border-bottom: 1px solid rgba(255,255,255,0.08);

  box-shadow: none;

  z-index: 99999;

  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  overflow: visible;
  gap: 8px;

  transition: transform 0.25s ease, opacity 0.25s ease;
}

.editor-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    flex: 1;
    min-width: 0;
}

.editor-title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0.9;
    letter-spacing: 0.02em;
}

/* controls styling */
.top-editor-bar select,
.top-editor-bar input,
.top-editor-bar button {
  background: #1a1d24;
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
}

#textColor {
  width: 36px;
  height: 30px;
  padding: 2px;
  cursor: pointer;
}

/* buttons */
#topSaveBtn,
#topExitBtn {

  cursor: pointer;

  transition: 0.2s;

}

#topSaveBtn:hover,
#topExitBtn:hover {

  background: rgba(255,255,255,0.12);

}

body.edit-mode .top-editor-bar {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  right: 420px;
}

/* Hide floating edit button while in edit mode */
body.edit-mode .edit-page-btn {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

/* ===== NEW PAGE BUTTON ===== */
.editor-right {
  display: none;
}

#pageNavMount{
  margin-bottom: 2px;
}

.editor-page-actions{
  display:none;
}

body.edit-mode .page-carousel {
  display: flex;
}

/* ===== PAGES TRACK ===== */
.pages-track {
  display: block;
  width: 100%;
}

.page-canvas {
  width: 100%;
  min-height: 100vh;
  position: relative;
  overflow: visible;
  flex-shrink: 0;
}

.page-canvas.page-blank {
  height: 1080px;
  min-height: unset;
  overflow: hidden;
  background: #ffffff;
}

body.edit-mode .page-canvas {
  width: 100%;
  min-width: 900px;
  overflow: visible;
}

/* .page-divider removed — single-mount system no longer needs labels */

/* ===== PAGE CAROUSEL NAV ===== */
.page-carousel {
  position: fixed;
  top: 80px;
  left: 550px;
  right: 10px;
  z-index: 99998;
  display: none;
  justify-content: flex-start;
  align-items: center;
  height: 26px;
  background: transparent;
  pointer-events: none;
}

body.edit-mode .page-carousel {
  display: flex;
}

body:not(.edit-mode) .page-carousel {
  display: none !important;
}

.page-carousel-inner {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  background: #f0efed;
  border-radius: 999px;
  padding: 5px 10px;
  pointer-events: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.page-dot {
  width: 11px;
  height: 11px;
  max-width: 13px;
  max-height: 13px;
  border-radius: 50%;
  border: 1.5px solid #333;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  display: block;
}

.page-dot.active {
  background: #222;
  border-color: #222;
}

/* Responsive: shrink carousel right edge on smaller screens */
@media (max-width: 1400px) {
  .page-carousel { right: 360px; }
}
@media (max-width: 1200px) {
  .page-carousel { right: 320px; }
}
@media (max-width: 1024px) {
  .page-carousel { right: 0; }
}

.file-btn {

  cursor: pointer;

}

.file-btn input {

  display: none;

}


.edit-mode .editable {

  outline: 1px dashed rgba(255,255,255,0.2);
  cursor: text;

}

.edit-mode .editable:hover {

  outline: 1px dashed var(--accent);

}

.inline-toolbar {

  position: fixed;
  display: none;

  background: #1a1f2b;
  padding: 8px;

  border-radius: 8px;

  z-index: 9999;

}

.inline-toolbar.show {
  display: block;
}

.inline-toolbar {

  position: fixed;
  display: none;

  background: #1a1f2b;
  border: 1px solid rgba(255,255,255,0.1);

  padding: 8px;
  border-radius: 8px;

  z-index: 9999;

  box-shadow: 0 10px 30px rgba(0,0,0,0.4);

}

.inline-toolbar.show {
  display: block;
}

.inline-toolbar select,
.inline-toolbar input {

  margin: 4px 0;
  width: 120px;

}

/*------------------HER0 POSITION*/

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  min-height: 70vh;
}

[data-edit]{

  pointer-events: auto;
  cursor: text;
  user-select: text;

  outline: none;

}

/* stronger when selected */
[data-edit].selected{
  outline: 2px solid #7c3aed;
}
/* LEFT (default) */

.hero-left-layout {
  flex-direction: row;
  text-align: left;
}

.hero-left-layout .hero-left {
  align-items: flex-start;
}

/* CENTER */

.hero-center-layout {
  flex-direction: column;
  text-align: center;
  justify-content: center;
}

.hero-center-layout .hero-left {
  align-items: center;
}

.hero-center-layout .hero-right {
  margin-top: 30px;
}

/* RIGHT */

.hero-right-layout {
  flex-direction: row-reverse;
  text-align: left;
}

.hero-right-layout .hero-left {
  align-items: flex-start;
}

:root{

  /* ===== BASE BACKGROUND ===== */
  --bg-color: #000000;        /* hero blue */
  --bg: #000000;

  /* ===== DEFAULT HERO GRADIENT ===== */
  --grad-tl: #68696d;         /* deep blue */
  --grad-tr: #5a5c5f;         /* electric brand blue */
  --grad-size: 600px;

  /* ===== UI PANELS ===== */
  --panel: #111821;
  --panel2: #0e141c;
  --card: rgba(255,255,255,0.05);
  --card2: rgba(255,255,255,0.02);
  --stroke: rgba(255,255,255,0.08);
  --muted: rgba(255,255,255,0.75);

  /* ===== BRAND ACCENTS ===== */
  --accent: #2563eb;          /* primary blue */
  --accent2: #1d4ed8;         /* darker blue */
}

* { box-sizing: border-box; }

html{
  scroll-behavior: smooth;
}

body{
  margin: 0;
  padding: 0;
  padding-top: 0;
  background: var(--bg);
  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: white;
} 

body.edit-mode {
  padding-top: 64px;
  background: #e8e6e3 !important;
}






.bg-layer::before {
  background: var(--grad-tl);
  top: -200px;
  left: -200px;
}

.bg-layer::after {
  background: var(--grad-tr);
  top: -200px;
  right: -200px;
}

/* Shrink gradients in edit mode */
body.edit-mode .bg-layer::before,
body.edit-mode .bg-layer::after {
  opacity: 0;
}

.bg-layer::before{
  background: var(--grad-tl);
  top:-200px;
  left:-200px;
}

.bg-layer::after{
  background: var(--grad-tr);
  top:-200px;
  right:-200px;
}

.hero-image-layer {
  position: absolute;
  inset: 0;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  filter: blur(var(--hero-blur, 0px));
  opacity: var(--hero-opacity, 1);

  z-index: 1; /* CHANGE FROM 0 → 1 */
  pointer-events: none;
}



#main {
  position: relative;
}

.bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero,
.client-product {
  position: relative;
  z-index: 999;
  background: transparent;
}

/* ================= EDIT MODE VISUALS ================= */

.edit-mode [data-edit] {

  pointer-events: auto;
  cursor: text;
  user-select: text;

  position: relative;

  outline: 1px dashed rgba(255,255,255,0.35);
  outline-offset: 3px;

  border-radius: 6px;
  padding: 0;

  background: none;

}

.edit-mode [data-edit]:hover {
    outline: 1px solid var(--accent);
  background: rgba(255,255,255,0.05);
}

.edit-mode [data-edit]::after {
  content: "Click to edit";
  position: absolute;
  top: -22px;
  right: 0;
  font-size: 11px;
  padding: 2px 6px;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.edit-mode [data-edit]:hover::after {
  opacity: 1;
}

/* ---------------------------------- Buttons  */
.btn-primary{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 18px;
  border-radius: 10px;

  color: white;
  text-decoration: none;
  font-weight: 700;

  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: 1px solid rgba(255,255,255,0.12);

  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.btn-secondary{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 18px;
  border-radius: 10px;

  color: white;
  text-decoration: none;
  font-weight: 700;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);

  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-secondary:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.12);
}

.primary-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 18px;
  border-radius: 10px;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);

  color: white;
  text-decoration: none;
  font-weight: 700;
}
.primary-btn:hover{
  background: rgba(255,255,255,0.12);
}

.ghost-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 14px;
  border-radius: 10px;

  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: white;

  cursor: pointer;
  font-weight: 700;
}
.ghost-btn:hover{
  background: rgba(255,255,255,0.06);
}
.filelike{
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.filelike input{
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ------------------------------------------------------ Edit button -------- */
.edit-page-btn{
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;

  padding: 15px 25px;

  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.5px;

  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);

  color: rgb(255, 255, 255);
  cursor: pointer;

  background: linear-gradient(
    135deg,
    var(--accent),
    var(--accent2)
  );

  box-shadow:
    0 15px 35px rgba(37,99,235,0.45),
    0 5px 12px rgba(0,0,0,0.35);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}


.edit-page-btn:hover{
  transform: translateY(-3px) scale(1.03);

  box-shadow:
    0 25px 55px rgba(37,99,235,0.6),
    0 10px 20px rgba(0,0,0,0.4);

  filter: brightness(1.1);
}

/* ---------------------------------- Hero -------- */
.hero {
  position: relative;
  width: 100%;
  min-height: 85vh;

  margin: 0;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  z-index: 1;
}

body.edit-mode .hero {
  min-height: 85vh;
}

.hero-inner {
  position: relative;
  z-index: 3;

  width: 100%;
  max-width: 1200px;

  margin: 0 auto;
  padding: 40px;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

.hero-left{
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.badge{
  display: inline-flex;
  width: fit-content;

  margin-bottom: 16px;
  padding: 8px 12px;

  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);

  font-weight: 700;
  color: rgba(255,255,255,0.85);
}

.hero-left h1{
  font-size: 54px;
  font-weight: 800;
  margin: 0 0 18px 0;
}

.hero-left p{
  font-size: 20px;
  margin: 0 0 26px 0;
  color: rgba(255,255,255,0.86);
  line-height: 1.45;
}

.hero-buttons{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.mini-meta{
  margin-top: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: rgba(255,255,255,0.72);
  font-weight: 600;
}
.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.18);
}

.hero-right{
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-box{
  width: 180px;
  height: 180px;
  border-radius: 26px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
}

.logo-box img{
  width: 72%;
  height: auto;
}

/* -------------------------------------------------------- Product Section -------- */
.client-product{
  padding: 0;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: var(--product-bg, #0f3460);
}

.product-wrapper{
  display: flex;
  align-items: center;
  gap: 100px;
  max-width: 1200px;
  margin: 0 auto;
}

.product-image img{
  width: 100%;
  max-width: 520px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}

.product-card{
  background: linear-gradient(145deg, var(--card), var(--card2));
  padding: 50px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  max-width: 520px;
}

.product-card p{
  opacity: 0.86;
  line-height: 1.6;
}

/* ----------------------------------------------------Ads Section -------- */
.ads-section{
  padding: 80px 5%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.00), rgba(255,255,255,0.02));
}

.section-head{
  max-width: 1200px;
  margin: 0 auto 26px auto;
}
.section-head h2{
  margin: 0 0 10px 0;
  font-size: 34px;
}
.section-head p{
  margin: 0;
  color: rgba(255,255,255,0.78);
  max-width: 70ch;
  line-height: 1.55;
}

.ads-grid{
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ad-card{
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}

.ad-img{
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: rgba(255,255,255,0.05);
}

.ad-body{
  padding: 18px;
}

.ad-body h3{
  margin: 0 0 8px 0;
  font-size: 18px;
}

.ad-body p{
  margin: 0 0 14px 0;
  color: rgba(255,255,255,0.78);
  line-height: 1.45;
  min-height: 44px;
}

.ad-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ad-price{
  font-weight: 800;
  color: rgba(255,255,255,0.92);
}

.ad-btn{
  text-decoration: none;
  font-weight: 800;
  color: #0b0f16;

  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  padding: 10px 14px;
}

/* -------- --------------------------------------Support Section -------- */
.support-section{
  padding: 80px 5%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
}

.support-inner{
  max-width: 1200px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: start;
}

.support-copy h2{
  margin: 0 0 10px 0;
  font-size: 34px;
}

.support-copy p{
  margin: 0 0 18px 0;
  color: rgba(255,255,255,0.80);
  line-height: 1.55;
  max-width: 70ch;
}

.support-list{
  margin: 0 0 22px 0;
  padding-left: 18px;
  color: rgba(255,255,255,0.82);
  line-height: 1.7;
}

.support-card{
  background: linear-gradient(145deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  padding: 22px;
}

.support-pillrow{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pill{
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}

/* -------- Editor Panel -------- */
.editor-panel{
  position: fixed;
  top: 0;
  right: 0;

   width: 420px;
  height: 100vh;
height: 100vh;
  padding: 22px;
  

  background: #111318;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  border-left: 1px solid rgba(255,255,255,0.18);



  transform: translateX(100%);
    transition: transform 0.35s ease;

  z-index: 999999;
  
    display: flex;

      flex-direction: column;
         overflow-x: hidden;
    overflow-y: auto;
}

.editor-panel *,
.editor-panel input,
.editor-panel select,
.editor-panel textarea {
    max-width: 100%;
    box-sizing: border-box;
}

body.edit-mode {
    overflow-x: hidden;
}

.editor-panel {
    pointer-events: auto;
}

.editor-panel:not(.open) {
    pointer-events: none;
}

.tab-btn{
  background: transparent;
  border: none;
  backdrop-filter: none;
}

.tab-btn.active{
  background: rgba(59,130,246,0.35);
  border-color: rgba(59,130,246,0.55);
}

.editor-panel::-webkit-scrollbar{
  width: 8px;
}

.editor-panel::-webkit-scrollbar-track{
  background: transparent;
}

.editor-panel::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
}

.editor-panel::-webkit-scrollbar-thumb:hover{
  background: rgba(255,255,255,0.25);
}
.editor-panel label:first-of-type{
  margin-top:0;
}

.editor-panel label.section-title{
  font-size:13px;
  font-weight:900;
  color:white;
  margin-top:18px;
}





.editor-highlight {
  outline: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
  transition: 0.3s;
}

.editor-panel.open{
  transform: translateX(0);
}

.editor-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.editor-header h2{
  margin: 0;
  font-size: 18px;
}
.icon-btn{
  border: 1px solid rgba(255,255,255,0.1);
  background: #1a1d24;
  color: white;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
}
.icon-btn:hover{
  background: #22262f;
}

#pageNavMount{
  margin-bottom: 2px;
  flex-shrink: 0;
}

.editor-tabs{
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 -2px 14px;
  padding: 0 2px 6px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
  flex-shrink: 0;
}


.editor-tabs::-webkit-scrollbar{
  height: 4px;
}

.editor-tabs::-webkit-scrollbar-track{
  background: transparent;
  margin: 0 10px;
}

.editor-tabs::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.10);
  border-radius: 999px;
}

.editor-tabs::-webkit-scrollbar-thumb:hover{
  background: rgba(255,255,255,0.18);
}

.tab-btn{
  flex: 0 0 auto;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(255,255,255,0.7);
  border-radius: 0;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3px;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.tab-btn.active{
  border-bottom-color: #3b82f6;
  color: white;
  background: transparent;
}

.tab-panel{
  display: none;
  padding-top: 8px;
}
.tab-panel.active{
  display: block;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.new-section-btn{
  width: 100%;
  margin: 0 0 10px 0;
  padding: 10px 12px;
  border: 1px solid rgba(59,130,246,0.35);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(59,130,246,0.22), rgba(37,99,235,0.16));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.new-section-btn:hover{
  background: linear-gradient(135deg, rgba(59,130,246,0.32), rgba(37,99,235,0.24));
  border-color: rgba(59,130,246,0.55);
  transform: translateY(-1px);
}

.custom-section-delete-btn{
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: 8px;
  background: rgba(239,68,68,0.12);
  color: #fca5a5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.custom-section-delete-btn:hover{
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.55);
  transform: translateY(-1px);
}

.editor-panel label{
  display: block;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.3px;
  margin: 12px 0 6px 0;
  color: rgba(255,255,255,0.95);
}

.editor-panel input,
.editor-panel textarea,
.editor-panel select{
  width: 100%;
  padding: 8px 10px;

  background: #22273a;
  border: 1px solid rgba(255,255,255,0.2);

  border-radius: 5px;

  color: white;

  transition: border-color 0.15s ease;
}

.editor-panel input:focus,
.editor-panel textarea:focus,
.editor-panel select:focus{
  border-color: rgba(59,130,246,0.6);
  box-shadow: none;
  outline: none;
} 

.editor-panel input[type="color"] {
  -webkit-appearance: none;
  appearance: none;

  width: 100%;
  height: 36px;
  padding: 0;

  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.15);

  background: none;
  cursor: pointer;
  transition: border 0.2s ease, transform 0.15s ease;
}

/* Small vertical rhythm inside editor sections */
.editor-section .section-content > * {
  margin-bottom: 12px;
}

/* Slightly more breathing room after hint text */
.editor-section .section-content .hint {
  margin-bottom: 16px;
}

/* Remove extra space after last item */
.editor-section .section-content > *:last-child {
  margin-bottom: 0;
}

/* Chrome */
.editor-panel input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.editor-panel input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 5px;
}

/* Firefox */
.editor-panel input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 5px;
}

/* Hover */
.editor-panel input[type="color"]:hover {
  border-color: rgba(255,255,255,0.3);
  transform: scale(1.02);
}

.editor-panel textarea{
  resize: vertical;
}

.editor-panel select option {
  color: #111;
  background: #fff;
} 

/* Fix dropdown option readability */
.top-editor-bar select option {
  color: #111;
  background: #fff;
}

.hint{
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,0.78);
  font-size: 12px;
  line-height: 1.35;
}

.two-col{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sep{
  border: none;
  height: 1px;
  background: rgba(255,255,255,0.18);
  margin: 14px 0;
}

/* ============================================================
   PUBLISH TAB — REVAMP
============================================================ */

.pub-section {
  margin-bottom: 6px;
}

.pub-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
  margin: 0 0 10px 0;
}

.pub-live-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.pub-live-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.pub-live-title {
  font-size: 17px;
  font-weight: 800;
  color: white;
  margin: 0 0 8px 0;
}

.pub-live-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin: 0 0 18px 0;
}

.pub-live-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: white;
  font-size: 14px;
  font-weight: 900;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 24px rgba(239,68,68,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pub-live-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(239,68,68,0.5);
}

.pub-live-btn-icon {
  font-size: 16px;
}

/* ---- Confirm Overlay ---- */

.pub-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.80);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pub-confirm-overlay.open {
  display: flex;
}

.pub-confirm-box {
  background: linear-gradient(160deg, #12161f, #0d1018);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 36px 32px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.7);
  animation: confirmSlideIn 0.3s ease;
}

@keyframes confirmSlideIn {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.pub-confirm-icon {
  font-size: 40px;
  margin-bottom: 14px;
  text-align: center;
}

.pub-confirm-title {
  font-size: 22px;
  font-weight: 900;
  color: white;
  text-align: center;
  margin: 0 0 12px 0;
}

.pub-confirm-body {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  text-align: center;
  line-height: 1.6;
  margin: 0 0 20px 0;
}

.pub-confirm-body strong {
  color: white;
}

.pub-confirm-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pub-confirm-checklist li {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 9px 14px;
}

.pub-confirm-warning {
  font-size: 11px;
  color: rgba(239,68,68,0.85);
  text-align: center;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0 0 24px 0;
}

.pub-confirm-actions {
  display: flex;
  gap: 12px;
}

.pub-confirm-cancel {
  flex: 1;
  padding: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pub-confirm-cancel:hover {
  background: rgba(255,255,255,0.1);
}

.pub-confirm-go {
  flex: 2;
  padding: 12px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border: none;
  color: white;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(239,68,68,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ============================================================
   PUBLISH SUCCESS POPUP — GLASSMORPHISM
============================================================ */

.pub-success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.70);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pub-success-box {
    position: relative;
    width: 100%;
    max-width: 440px;
    border-radius: 28px;
    padding: 52px 36px 44px;
    text-align: center;
    overflow: hidden;

    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);

    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 40px 90px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);

    animation: pubSuccessIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pubSuccessIn {
    from { opacity: 0; transform: scale(0.88) translateY(20px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

.pub-success-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.15), transparent 70%);
    pointer-events: none;
}

.pub-success-icon {
    font-size: 56px;
    margin-bottom: 18px;
    position: relative;
}

.pub-success-title {
    font-size: 26px;
    font-weight: 900;
    color: white;
    margin: 0 0 12px 0;
    letter-spacing: -0.4px;
}

.pub-success-body {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.58);
    line-height: 1.75;
    margin: 0 0 32px 0;
}

.pub-success-close {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border: none;
    color: white;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.2px;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pub-success-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.58);
}

.publish-box h3{
  margin: 0 0 6px 0;
}
.muted{
  color: rgba(255,255,255,0.72);
  line-height: 1.5;
  margin: 0 0 10px 0;
}

.publish-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

/* Save / Reset buttons */
.reset-btn{
  padding: 10px 14px;
  background: #2a2f3a;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}
.reset-btn:hover{ background: #3a404c; }

.save-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.save-btn:hover  { background: #1d4ed8; box-shadow: 0 4px 14px rgba(37,99,235,0.35); }
.save-btn:active { transform: scale(0.97); }
.save-btn.saving { background: #374151; cursor: wait; }
.save-btn.saved  { background: #16a34a; }


/* Ads editor */
.ads-tools{
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.ads-editor-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ad-editor-item{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  padding: 12px;
}

.ad-editor-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ad-editor-actions{
  display: flex;
  gap: 8px;
}

.tiny-btn{
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: white;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 900;
  font-size: 12px;
}
.tiny-btn:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}
.tiny-btn:hover{
  background: rgba(255,255,255,0.10);
}
.tiny-btn.danger{
  border-color: rgba(239,68,68,0.55);
  background: rgba(239,68,68,0.16);
}
.tiny-btn.danger:hover{
  background: rgba(239,68,68,0.25);
}

.thumb-row{
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}
.thumb{
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
}

/* Toast */
.toast{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);

  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.toast.show{
  opacity: 1;
  transform: translateY(0);
}

/* -------- Popups -------- */
.popup-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.70);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  padding: 20px;
}

.popup-box{
  background: #0f1218;
  padding: 22px;
  border-radius: 16px;
  width: 100%;
  max-width: 460px;

  border: 1px solid rgba(255,255,255,0.12);
}

.popup-box h2{
  margin: 0 0 8px 0;
}

.popup-box p{
  margin: 0 0 12px 0;
  color: rgba(255,255,255,0.78);
  line-height: 1.5;
}

.popup-box input,
.popup-box textarea{
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 10px;
  background: rgba(255,255,255,0.06);
  color: white;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
}

.popup-actions{
  display: flex;
  gap: 10px;
}

.submit-btn{
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 14px;
  border-radius: 12px;
  width: 100%;
  cursor: pointer;
  font-weight: 900;
}

.close-btn{
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 12px 14px;
  border-radius: 12px;
  width: 100%;
  cursor: pointer;
  font-weight: 900;
}

/*---------------------------------------------------------------------------------------------SIDENAV------------------------*/
body.nav-open .sitelogo {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.sitelogo {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

body.nav-open{
  overflow: hidden;
}



/* -------- Templates (aesthetic constraints) -------- */
/* MODERN */
.layout-modern .hero-left h1{ font-size: 64px; font-weight: 800; }

/* MINIMAL */
.layout-minimal .hero-left h1{ font-size: 48px; font-weight: 600; }
.layout-minimal .badge{ opacity: 0.85; }

/* BOLD */
.layout-bold .hero-left h1{ font-size: 72px; font-weight: 900; letter-spacing: -1px; }

/* ELEGANT */
.layout-elegant .hero-left h1{
  font-size: 56px;
  font-weight: 400;
  letter-spacing: 1px;
}

/* -------- Responsive -------- */
@media (max-width: 980px){
  .hero-inner{
    flex-direction: column;
    text-align: center;
  }
  .hero-left{
    align-items: center;
  }
  .product-wrapper{
    flex-direction: column;
    text-align: center;
  }
  .ads-grid{
    grid-template-columns: 1fr 1fr;
  }
  .support-inner{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px){
  .hero-left h1{ font-size: 42px; }
  .ads-grid{ grid-template-columns: 1fr; }
  .editor-panel{ width: 92vw; }
  .two-col{ grid-template-columns: 1fr; }
}


/* MOBILE OVERRIDE -------------*/

@media (max-width: 768px) {

  .hero-inner {
    flex-direction: column !important;
    text-align: center !important;
    gap: 30px;
  }

  .hero-left,
  .hero-right {
    width: 100%;
    align-items: center !important;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .logo-box {
    max-width: 220px;
    margin: 0 auto;
  }

  /* PRODUCT SECTION */

  .product-wrapper {
    flex-direction: column;
    gap: 30px;
  }

  .product-image img {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .product-card {
    text-align: center;
  }

  /* EDITOR PANEL MOBILE FIX */

  .editor-panel {
    width: 100%;
  }

}

.hero-left .hero-inner {
  display:flex;
  justify-content:space-between;
}

.hero-center .hero-inner {
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}

.logo-container{

  position:absolute;
  z-index:20;

  background: rgba(255,255,255,0.06);
  border: 1px dashed rgba(255,255,255,0.25);

  backdrop-filter: blur(4px);

  border-radius: 10px;

  display:flex;
  align-items:center;
  justify-content:center;

}

.logo-container.has-logo {
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
}

body.edit-mode .logo-container.top-right {
  top: 100px !important;
}

.logo-container::before{


  font-size:12px;
  color:rgba(255,255,255,0.35);

  position:absolute;

}

.logo-container.has-logo::before{
  display:none;
}



.logo-image{
  width:100%;
  height:100%;
  object-fit:contain;
  pointer-events:none;
  user-select:none;
}

.logo-resize-handle{
  position:absolute;
  right:-6px;
  bottom:-6px;
  width:14px;
  height:14px;
  background:white;
  border-radius:3px;
  cursor:nwse-resize;
}

/* ============================= */
/* MOBILE CONSOLIDATED LAYER    */
/* ============================= */

.logo-resize-handle{
  display:none;
}

.edit-mode .logo-resize-handle{
  display:block;
}

.logo-container{
  outline:none;
}

.edit-mode .logo-container{
  outline:2px dashed rgba(255,255,255,0.5);
}

/* =========================
   MAGNIFY RANGE SLIDER
========================= */

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;

  width: 100%;
  height: 8px;

  background: rgba(255,255,255,0.12);
  border-radius: 999px;

  outline: none;
  cursor: pointer;
}

/* Track (Chrome) */
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}

/* Thumb (Chrome) */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;

  width: 20px;
  height: 20px;
  border-radius: 50%;

  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: 2px solid white;

  box-shadow:
    0 0 0 6px rgba(59,130,246,0.15),
    0 6px 16px rgba(59,130,246,0.45);

  margin-top: -6px;
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

/* Firefox */
input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid white;

  background: linear-gradient(135deg, var(--accent), var(--accent2));

  box-shadow:
    0 0 0 6px rgba(59,130,246,0.15),
    0 6px 16px rgba(59,130,246,0.45);

  transition: transform 0.15s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.12);
}

/* Track fill illusion */
input[type="range"]::-webkit-slider-runnable-track{
  height: 6px;
  border-radius: 999px;
}

/* Thumb */
input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid rgba(255,255,255,0.8);
  box-shadow: 0 4px 14px rgba(59,130,246,0.45);
  cursor: pointer;
  margin-top: -6px;
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover{
  transform: scale(1.1);
}

/* ============================= */
/* ALLOWED LOGO POSITIONS SYSTEM */
/* ============================= */

/* TOP RIGHT */
.logo-container.top-right {
  top: 40px;
  right: 40px;
}

/* CENTER LEFT */
.logo-container.center-left {
  top: 50%;
  left: 40px;
  transform: translateY(-50%);
}

/* BOTTOM LEFT */
.logo-container.bottom-left {
  bottom: 40px;
  left: 40px;
}

/* BOTTOM CENTER */
.logo-container.bottom-center {
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

/* BOTTOM RIGHT */
.logo-container.bottom-right {
  bottom: 40px;
  right: 40px;
}

/* ===================================== */
/* EDIT MODE LAYOUT SHIFT SYSTEM */
/* ===================================== */



.editor-panel {
  width: 420px;
}



/* ============================= */
/* STYLE WORKSPACE SYSTEM */
/* ============================= */



body.edit-mode #workspace {
  background: #e8e6e3; /* warm neutral grey */
  padding: 10px 20px;
  padding-top: 90px;
  padding-right: 20px;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* The actual page becomes a canvas */
body.edit-mode #main {
  border-radius: 18px;
  margin: 0;
  max-width: unset;
  overflow: visible;
}

body.edit-mode #main {
  filter: none;
}
  
/* ===================================== */
/* EDIT MODE PANEL SPACE SYSTEM */
/* ===================================== */

.editor-panel {
  width: 420px;
}

#workspace {
    transition: transform 0.35s ease;
    transform-origin: top left;
}

#preview-scaler {
    display: block;
    width: 100%;
    transform-origin: top left;
    will-change: transform;
    margin: 0;
    padding: 0;
}

body:not(.edit-mode) #preview-scaler {
    transform: none !important;
    margin-bottom: 0 !important;
    width: auto !important;
}

.file-row{
  display:flex;
  gap:8px;
  align-items:center;
}

.file-row input[type="file"]{
  flex:1;
}

/* Desktop edit mode: #main is the live page root — NO scaling here.
   Scaling is applied only via #preview-scaler wrapper (JS-driven). */

/* ── Custom file upload button ─────────────────────── */
.custom-file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(99,102,241,0.15));
    border: 1px solid rgba(99,102,241,0.4);
    border-radius: 8px;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    white-space: nowrap;
    flex: 1;
}
.custom-file-upload-btn:hover {
    background: linear-gradient(135deg, rgba(59,130,246,0.28), rgba(99,102,241,0.28));
    border-color: rgba(99,102,241,0.7);
    transform: translateY(-1px);
}
.custom-file-upload-btn:active {
    transform: translateY(0);
}
.custom-file-upload-btn input[type="file"] {
    display: none;
}
.custom-file-upload-btn svg {
    opacity: 0.8;
    flex-shrink: 0;
    position: relative;
    top: 4px;
}

/* ── Preview scaler wrapper ────────────────────────────────
   JS wraps #main in #preview-scaler in edit mode.
   The scale lives here; #main itself is never transformed. */
#preview-scaler {
  transform-origin: top left;
  /* transform is set via JS: style.transform = scale(N) */
  transition: transform 0.2s ease;
}

/* Standard desktop / iPad landscape */
@media (max-width: 1400px) {
  .editor-panel {
    width: 360px;
  }
}

/* Smaller desktop / large tablet */
@media (max-width: 1200px) {
  .editor-panel {
    width: 320px;
  }
}

/* Tablet portrait & below → overlay mode */
@media (max-width: 1024px) {
  .editor-panel {
    width: 100%;
  }
}

/* Removed: #main must not be scaled in edit mode. */

/* ===== Clean Color Swatch ===== */
.top-editor-bar input[type="color"] {
  -webkit-appearance: none;
  appearance: none;

  width: 80px;
  height: 36px;
  padding: 0;

  border-radius: 5px;
  border: 2px solid rgba(255,255,255,0.4);

  background: none;
  cursor: pointer;
  overflow: hidden;
}

/* Chrome */
.top-editor-bar input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
.top-editor-bar input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

/* Firefox */
.top-editor-bar input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 8px;
}

/* ================= SECTION LAYOUT SYSTEM ================= */

.layout-split .flex-container {
    display: flex;
    gap: 60px;
    align-items: center;
}

.layout-stacked .flex-container {
    flex-direction: column;
}

.layout-centered .flex-container {
    flex-direction: column;
    text-align: center;
}

.layout-right .product-wrapper {
    flex-direction: row;
}

.layout-left .product-wrapper {
    flex-direction: row-reverse;
}

.layout-centered .product-wrapper {
    flex-direction: column;
}

/* Floating animation */

.floating-enabled .product-card,
.floating-enabled .flex-text {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Mobile safety */

@media (max-width: 900px) {

    .layout-split .flex-container,
    .layout-right .product-wrapper,
    .layout-left .product-wrapper {
        flex-direction: column;
    }

    .floating-enabled .product-card,
    .floating-enabled .flex-text {
        animation: none;
    }
}

/* mobile rules moved to consolidated block below */

/* ===== TOOLBAR ADDITIONS ===== */
.toolbar-divider {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.15);
    margin: 0 6px;
}

.toolbar-align-btn,
.toolbar-style-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.toolbar-align-btn:hover,
.toolbar-style-btn:hover {
    background: rgba(59,130,246,0.3);
    border-color: rgba(59,130,246,0.5);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    background: var(--contact-bg, #0a2550);
    padding: 0;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 999;
}


.contact-inner {
    max-width: 600px;
    margin: 0 auto;
}

.contact-inner h2 {
    font-size: 32px;
    margin-bottom: 12px;
    color: white;
}

.contact-inner p {
    color: #94a3b8;
    margin-bottom: 32px;
    font-size: 16px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.contact-link {
    color: #60a5fa;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    transition: background 0.2s;
    min-width: 260px;
    justify-content: center;
}

.contact-link:hover {
    background: rgba(59,130,246,0.12);
    border-color: rgba(59,130,246,0.3);
}

/* ===== TEXT INPUT IN EDITOR ===== */
.text-input {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: white;
    font-size: 13px;
    margin-bottom: 8px;
}

.text-input:focus {
    outline: none;
    border-color: rgba(59,130,246,0.5);
}

/* ========================= CAROUSEL SECTION ========================= */
.carousel-section {
    padding: 80px 5%;
    background: var(--contact-bg, #0d1117);
}
.carousel-section-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.carousel-heading {
    text-align: center;
    font-size: 32px;
    margin-bottom: 32px;
    color: white;
}

.page-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
}
.page-carousel-slide {
    min-width: 100%;
    width: 100%;
    height: 520px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}
.page-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.page-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    font-size: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}
.page-carousel-arrow:hover { background: rgba(255,255,255,0.15); }
.page-carousel-arrow.prev { left: 16px; }
.page-carousel-arrow.next { right: 16px; }
.page-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 14px 0 10px;
}
.page-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.page-carousel-dot.active {
    background: white;
    transform: scale(1.3);
}

/* ========================= CAROUSEL IMAGE LIST (editor) ========================= */
.carousel-image-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.carousel-list-item {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
}
.carousel-list-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.carousel-list-item .tiny-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    font-size: 10px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}
.carousel-list-item:hover .tiny-btn { opacity: 1; }

/* ========================= SECTION BG IMAGE LAYERS ========================= */
.flex-bg-image-layer,
.product-bg-image-layer,
.custom-section-bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    opacity: var(--section-bg-opacity, 0.3);
    pointer-events: none;
}

.custom-section-bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

.custom-builder-section {
    position: relative;
    overflow: hidden;
    background: #181f2b;
}

.custom-builder-section > *:not(.custom-section-bg-layer):not(.section-drag-handle):not(.section-resize-handle):not(.section-color-bar):not(.section-color-input) {
    position: relative;
    z-index: 1;
}

.custom-builder-section {
    width: 100%;
    min-height: 280px;
    padding: 120px 0;
    display: block;
}

/* ========================= PRODUCT PHOTO CAROUSEL ========================= */
.product-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    width: 100%;
}

.product-photo-track {
    display: flex;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    will-change: transform;
}

.product-photo-slide {
    width: 100%;
    min-width: 100%;
    flex-shrink: 0;
    flex-grow: 0;
    flex-basis: 100%;
    overflow: hidden;
}

.product-photo-slide img {
    width: 100%;
    height: 420px;
    display: block;
    object-fit: cover;
    border-radius: 0;
}

.product-photo-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: background 0.2s;
    padding: 0;
}
.product-photo-arrow:hover { background: rgba(255,255,255,0.2); }
.product-photo-arrow.prev { left: 10px; top: calc(50% - 19px); }
.product-photo-arrow.next { right: 10px; top: calc(50% - 19px); }

.product-photo-dots {
    position: relative;
    bottom: auto;
    margin-top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 20;
}

.product-photo-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.product-photo-dot.active {
    background: white;
    transform: scale(1.3);
}

/* =====================================================================
   MAGNIFY MOBILE OPTIMIZATION — SINGLE AUTHORITATIVE LAYER
   Handles ALL screen sizes ≤768px.
   Written to survive any user customisation:
     - JS-set inline widths on images
     - User-set font sizes via toolbar
     - Any logo anchor position
     - Any section layout (split / stacked / centered / right / left)
     - Product photo carousel
     - Contact section
     - Floating cards
   Lives at the absolute bottom of the file so nothing overrides it.
===================================================================== */

/* ── 1. GLOBAL CONTAINMENT ─────────────────────────────────────────── */
@media (max-width: 768px) {

  html, body {
    width: 100%;
    overflow-x: hidden !important;
  }

  /* Contain every element without breaking flex children.
     Instead of the dangerous  * { max-width:100% }  we target
     only the things that actually escape the viewport. */
  img, video, iframe, canvas, svg {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Sections never overflow */
  .hero,
  .flex-section,
  .client-product,
  .ads-section,
  .support-section,
  .contact-section {
    box-sizing: border-box !important;
    width: 100% !important;
    overflow-x: hidden !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* ── 2. HERO ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  .hero {
    min-height: 85vh !important;
    padding-top: 60px !important;
    padding-bottom: 60px !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }

  .hero-image-layer {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
  }

  .hero-inner {
    width: 100% !important;
    padding: 0 !important;
    gap: 24px !important;
    position: relative !important;
    z-index: 2 !important;
    box-sizing: border-box !important;
  }

  /* Left + right both go full-width and center */
  .hero-left,
  .hero-right {
    width: 100% !important;
    align-items: center !important;
    text-align: center !important;
    flex-direction: column !important;
  }

  /* Clamp font sizes — respects user-set inline sizes but prevents extreme values */
  .hero-left h1,
  #businessName {
    font-size: clamp(26px, 7vw, 48px) !important;
    line-height: 1.15 !important;
    word-break: break-word !important;
  }

  .hero-left p,
  #businessDesc {
    font-size: clamp(14px, 4vw, 18px) !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
  }

  .hero-buttons {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  /* Buttons go full-width but not wider than the viewport */
  .btn-primary,
  .btn-secondary,
  .primary-btn,
  .ghost-btn {
    width: 100% !important;
    max-width: 320px !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
}

/* ── 3. LOGO — neutralise ALL JS-set absolute positioning ────────────── */
@media (max-width: 768px) {

  .logo-container {
    /* Pull out of absolute flow completely */
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;

    /* Responsive size — never tiny, never massive */
    width:  clamp(72px, 24vw, 130px) !important;
    height: clamp(72px, 24vw, 130px) !important;

    margin: 0 auto 20px auto !important;

    /* Remove edit-mode dashed border on mobile — looks messy */
    outline: none !important;
    border: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
  }

  /* Hide all resize handles */
  .resize-handle,
  .logo-resize-handle,
  .flex-resize-handle,
  .product-resize-handle,
  #productResize {
    display: none !important;
  }
}

/* ── 4. FLEX / TELL YOUR STORY ───────────────────────────────────────── */
@media (max-width: 768px) {

  /* All layouts collapse to single column */
  .flex-container,
  .layout-split  .flex-container,
  .layout-stacked .flex-container,
  .layout-centered .flex-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 28px !important;
    text-align: center !important;
  }

  /* JS sets width in px — override to full width */
  .flex-image-container,
  #flexImageContainer {
    width: 100% !important;
    max-width: 100% !important;
  }

  .flex-image,
  .flex-image-container img {
    width: 100% !important;
    height: auto !important;
    border-radius: 14px !important;
  }

  .flex-text {
    width: 100% !important;
    text-align: center !important;
  }

  .flex-text h2 {
    font-size: clamp(22px, 6vw, 30px) !important;
    word-break: break-word !important;
  }

  .flex-text p {
    font-size: clamp(13px, 4vw, 16px) !important;
    word-break: break-word !important;
  }

  /* Floating card — remove float on mobile, just stack */
  .floating-enabled .flex-text {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    animation: none !important;
    width: 100% !important;
  }
}

/* ── 5. PRODUCT / ABOUT ──────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* All layouts collapse to single column */
  .product-wrapper,
  .layout-right .product-wrapper,
  .layout-left  .product-wrapper,
  .layout-centered .product-wrapper {
    flex-direction: column !important;
    align-items: center !important;
    gap: 28px !important;
    text-align: center !important;
  }

  /* Product media fills width — JS-set pixel width is overridden */
  .product-media,
  .product-image-container,
  #productImageContainer {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Photo carousel slides fill container */
  .product-photo-track {
    width: 100% !important;
  }

  .product-photo-slide img {
    width: 100% !important;
    height: clamp(220px, 60vw, 380px) !important;
    object-fit: cover !important;
  }

  /* Product card — comfortable mobile padding */
  .product-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: clamp(20px, 5vw, 36px) !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  .product-card h2 {
    font-size: clamp(20px, 5.5vw, 28px) !important;
    word-break: break-word !important;
  }

  .product-card p {
    font-size: clamp(13px, 3.8vw, 15px) !important;
  }

  /* Floating card — stack normally */
  .floating-enabled .product-card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    animation: none !important;
    width: 100% !important;
  }

  /* Carousel arrows — keep visible and tappable */
  .product-photo-arrow {
    width: 36px !important;
    height: 36px !important;
    font-size: 14px !important;
  }
}

/* ── 6. CONTACT SECTION ─────────────────────────────────────────────── */
@media (max-width: 768px) {

  .contact-section {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
  }

  .contact-inner h2 {
    font-size: clamp(22px, 6vw, 30px) !important;
    word-break: break-word !important;
  }

  .contact-inner p {
    font-size: 14px !important;
  }

  .contact-links {
    width: 100% !important;
    align-items: stretch !important;
  }

  .contact-link {
    min-width: unset !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
  }
}

/* ── 7. ADS + SUPPORT GRIDS ─────────────────────────────────────────── */
@media (max-width: 768px) {

  .ads-grid {
    grid-template-columns: 1fr !important;
  }

  .support-inner {
    grid-template-columns: 1fr !important;
  }
}

/* ── 8. EDITOR PANEL (edit mode on mobile) ───────────────────────────── */
@media (max-width: 768px) {

  .editor-panel {
    width: 100vw !important;
    border-radius: 0 !important;
    /* Panel slides in from the right — keep it usable */
    max-height: 80vh !important;
    overflow-y: auto !important;
  }

  /* Top bar wraps instead of overflowing */
  body.edit-mode .top-editor-bar {
    right: 0 !important;
    flex-wrap: wrap !important;
    height: auto !important;
    padding: 8px !important;
    gap: 6px !important;
  }

  .two-col {
    grid-template-columns: 1fr !important;
  }

  .editor-tabs,
  .tab-btn {
    width: 100% !important;
  }
}

/* ── 9. SIDENAV ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  body.nav-open .sidenav {
    width: 100vw !important;
  }
}

/* ========================= SECTION DRAG REORDER ========================= */

/* SECTION DRAG HANDLE — LEFT SIDE, CENTERED */
.section-drag-handle {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 64px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(30,36,50,0.95), rgba(18,22,32,0.98));
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 8px 28px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 99998;
    transition: background 0.2s ease, box-shadow 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.section-drag-handle:hover {
    background: linear-gradient(135deg, rgba(59,130,246,0.5), rgba(37,99,235,0.6));
    border-color: rgba(59,130,246,0.8);
    box-shadow: 0 10px 32px rgba(59,130,246,0.4), inset 0 1px 0 rgba(255,255,255,0.12);
    transform: translateY(-50%) scale(1.08);
}

.section-drag-handle:active {
    cursor: grabbing;
    transform: translateY(-50%) scale(0.94);
}

body.edit-mode .section-drag-handle {
    display: flex;
}


.section-drag-handle svg {
    pointer-events: none;
}


/* Section being dragged — fades out in place */
.section-dragging {
    opacity: 0.25;
    outline: 2px dashed rgba(59, 130, 246, 0.6) !important;
    outline-offset: -3px;
    transition: none !important;
}

/* Drop zone highlight */
.section-drop-target {
    outline: 2px solid rgba(59, 130, 246, 0.85) !important;
    outline-offset: -3px;
    transition: outline 0.12s ease;
}

/* Blue insertion line */
.section-drop-line {
    position: absolute;
    left: 0;
    right: 440px;
    height: 4px;
    border-radius: 999px;
    background: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.25), 0 0 18px rgba(59,130,246,0.6);
    z-index: 99999;
    pointer-events: none;
    display: none;
}

/* Ghost preview card that follows the cursor */
.section-drag-ghost {
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 99997;
    border-radius: 12px;
    border: 2px solid rgba(59,130,246,0.7);
    background: rgba(59,130,246,0.08);
    backdrop-filter: blur(4px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,130,246,0.3);
    display: none;
    overflow: hidden;
    transition: none;
}

.section-drag-ghost-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(59,130,246,0.9);
    color: white;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
    letter-spacing: 0.3px;
}

/* Smooth section reorder animation */
.page-canvas > section {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.is-reordering .page-canvas > section {
    transition: none !important;
}

@media (max-width: 768px) {
    body.edit-mode .section-drag-handle {
        display: none !important;
    }
}

/* Selected section outline in edit mode */
body.edit-mode .section-selected {
    outline: 10px solid #3b82f6;
    outline-offset: -3px;
    z-index: 9999;
}

/* Section color toolbar — floats to the left of a selected section */
.section-color-bar {
    position: absolute !important;
    left: 16px;
    top: calc(50% + 44px);
    transform: translateY(0);
    width: 36px;
    padding: 8px 0;
    border-radius: 8px;
    background: #2a2d35;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999 !important;
    pointer-events: all;
}

body.edit-mode .section-selected .section-color-bar {
    display: flex;
}

.section-color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: 2px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.section-color-swatch:hover {
    border-color: rgba(255,255,255,0.55);
    transform: scale(1.1);
}

/* Hidden native color picker attached to each bar */
.section-color-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* ========================= TEXT BOX RESIZE HANDLES ========================= */

[data-edit] {
    position: relative;
}

/* Handles use z-index to sit above content */
body.edit-mode [data-edit] {
    z-index: 1;
}



/* Section vertical resize handle */
.section-resize-handle {
    display: none;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 14px;
    background: #3b82f6;
    border-radius: 6px 6px 0 0;
    cursor: ns-resize;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.section-resize-handle::after {
    content: '';
    display: block;
    width: 28px;
    height: 3px;
    background: rgba(255,255,255,0.6);
    border-radius: 2px;
}

body.edit-mode .section-selected .section-resize-handle {
    display: flex;
}

/* ── Mobile Preview Button ────────────────────────────────── */
.mobile-preview-btn {
    position: fixed;
    top: 114px; /* below top bar (70px) + block toolbar (44px) */
    left: 16px;
    z-index: 1300;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: #1a1d24;
    color: rgba(255,255,255,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

body.edit-mode .mobile-preview-btn {
    display: flex;
}

.mobile-preview-btn:hover {
    background: rgba(59,130,246,0.18);
    border-color: rgba(59,130,246,0.5);
    color: #93c5fd;
}

.mobile-preview-btn.active {
    background: rgba(59,130,246,0.28);
    border-color: #3b82f6;
    color: #fff;
}

/* ── Mobile canvas override ───────────────────────────────── */
body.edit-mode.mobile-preview #main {
    width: 430px !important;
    min-height: 932px !important;
    transform-origin: top left !important;
    border-radius: 44px !important;
    overflow: hidden !important;
    box-shadow: 0 0 0 10px #1a1a1a, 0 0 0 12px #3a3a3a, 0 30px 80px rgba(0,0,0,0.6) !important;
    margin-bottom: 0 !important;
}

body.edit-mode.mobile-preview #workspace {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 40px 0 40px 80px;
    overflow-y: auto;
}

/* ── Page nav bar (inside editor panel) ── */
#pageNavBar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 -2px 14px;
  padding: 0 2px 6px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;

  mask-image: linear-gradient(
    to right,
    transparent 0,
    black 10px,
    black calc(100% - 10px),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    black 10px,
    black calc(100% - 10px),
    transparent 100%
  );
}

#pageNavBar button,
#pageNavBar .page-add-btn {
  flex: 0 0 auto;
}

#pageNavBar::-webkit-scrollbar {
  height: 6px;
}

#pageNavBar::-webkit-scrollbar-track {
  background: transparent;
}

#pageNavBar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
}

#pageNavBar button:hover,
#pageNavBar .page-add-btn:hover {
  background: rgba(59,130,246,0.4) !important;
}

/* ═══════════════════════════════════════════════
   QUICK NAV SYSTEM
   ─────────────────────────────────────────────── */

.qnav-bar {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    min-height: 52px;
    background: rgba(13,17,23,0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-sizing: border-box;
    width: 100%;
    flex-shrink: 0;
}

body.edit-mode .qnav-bar.qnav-selected {
    outline: 10px solid #3b82f6;
    outline-offset: -3px;
    z-index: 9999;
}

/* desktop inline links */
.qnav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    flex: 1;
}

.qnav-link {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: opacity 0.15s;
    white-space: nowrap;
    font-family: "Montserrat", sans-serif;
}
.qnav-link:hover { opacity: 0.7; }

/* hamburger — hidden on desktop, shown on mobile */
.qnav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    padding: 6px;
    border-radius: 6px;
    line-height: 0;
    transition: background 0.15s;
}
.qnav-hamburger:hover { background: rgba(255,255,255,0.08); }

/* mobile drawer — hidden by default, only opens in real mobile / mobile-preview */
.qnav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: #0d1117;
    border-right: 1px solid rgba(255,255,255,0.1);
    z-index: 9000;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    box-sizing: border-box;
    /* hidden by default — no strip, no offset, fully out of layout */
    transform: translateX(-100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.28s linear;
}
/* Open state — only reachable in mobile/mobile-preview (enforced by JS guard) */
.qnav-drawer.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}
/* In desktop edit mode, drawer is always fully suppressed */
body.edit-mode .qnav-drawer {
    display: none !important;
}

.qnav-drawer-close {
    align-self: flex-end;
    background: none;
    border: none;
    color: rgba(255,255,255,0.55);
    font-size: 22px;
    cursor: pointer;
    margin-bottom: 16px;
    line-height: 1;
}
.qnav-drawer-close:hover { color: #fff; }

.qnav-drawer-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.qnav-drawer-link {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.15s;
    font-family: "Montserrat", sans-serif;
}
.qnav-drawer-link:hover { background: rgba(59,130,246,0.14); }

/* responsive breakpoint */
@media (max-width: 768px) {
    .qnav-links { display: none; }
    .qnav-hamburger { display: flex; }
}

body.mobile-preview .qnav-links { display: none; }
body.mobile-preview .qnav-hamburger { display: flex; }

/* quick nav editor panel inside editor sidebar */
#qnavEditorPanel {
    animation: qnavFadeIn 0.18s ease;
    display: block;
    width: 100%;
    box-sizing: border-box;
}
@keyframes qnavFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Quick Nav editor panel wrapper ───────────────────── */
.qnav-editor-wrap {
    padding: 0;
    margin: 0;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* ── Quick Nav editor section title ──────────────────── */
.qnav-editor-title {
    display: none;
}

/* ── Setting row (label + control side by side) ──────── */
.qnav-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}
.qnav-setting-label {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    flex-shrink: 0;
}

/* ── Color picker inside Quick Nav editor ─────────────── */
.qnav-color-picker {
    width: 36px !important;
    min-width: 36px;
    max-width: 36px;
    height: 36px;
    border: 2px solid rgba(255,255,255,0.18);
    background: none;
    cursor: pointer;
    border-radius: 8px;
    padding: 2px;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* ── Alignment select inside Quick Nav editor ─────────── */
.qnav-align-select {
    font-size: 12px;
    background: #161b27;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 6px;
    padding: 5px 8px;
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
}
.qnav-align-select:focus {
    outline: none;
    border-color: rgba(59,130,246,0.6);
}

.qnav-font-select {
    min-width: 0;
    flex: 1;
}

.qnav-setting-row-stack {
    align-items: center;
    flex-direction: row;
}

.qnav-size-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.qnav-size-value {
    min-width: 42px;
    font-size: 12px;
    color: rgba(255,255,255,0.72);
    text-align: right;
}

.qnav-size-slider {
    flex: 1;
    width: 100%;
}

/* ── Nav items section heading ────────────────────────── */
.qnav-items-heading {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.45);
    margin: 18px 0 10px;
}

/* ── Group boxes (Color / Text / Content) ──────────────── */
.qnav-group-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px 16px 10px;
    margin-bottom: 12px;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

/* ── Group section headers ──────────────────────────────── */
.qnav-group-header {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
#qnavEditorPanel .qnav-group-header:first-child {
    padding-top: 0;
}

/* ── Nav item card rows ───────────────────────────────── */
.qnav-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    transition: border-color 0.15s, background 0.15s;
}
.qnav-item-row:hover {
    background: transparent;
}
.qnav-item-row-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}
.qnav-item-label-input {
    flex: 1 1 0;
    min-width: 0;
    font-size: 13px;
    background: rgba(59,130,246,0.07);
    color: #fff;
    border: 1px solid rgba(59,130,246,0.45);
    border-radius: 6px;
    padding: 8px 12px;
    box-sizing: border-box;
}
.qnav-item-label-input:focus {
    outline: none;
    border-color: rgba(59,130,246,0.6);
    background: #111827;
}
.qnav-item-page-select {
    flex: 0 0 80px;
    width: 80px;
    font-size: 12px;
    background: rgba(59,130,246,0.07);
    color: #fff;
    border: 1px solid rgba(59,130,246,0.45);
    border-radius: 6px;
    padding: 8px 8px;
    box-sizing: border-box;
}
.qnav-item-page-select:focus {
    outline: none;
    border-color: rgba(59,130,246,0.6);
}
.qnav-item-del-btn {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    font-size: 16px;
    line-height: 1;
    background: transparent;
    color: rgba(239,68,68,0.6);
    border: none;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}
.qnav-item-del-btn:hover {
    color: #ef4444;
    background: rgba(239,68,68,0.12);
}

/* ── Add Nav Item button ──────────────────────────────── */
.qnav-add-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 9px 0;
    font-size: 12px;
    font-weight: 600;
    background: rgba(59,130,246,0.12);
    color: #3b82f6;
    border: 1px dashed rgba(59,130,246,0.35);
    border-radius: 7px;
    cursor: pointer;
    text-align: center;
    letter-spacing: 0.3px;
    transition: background 0.15s, border-color 0.15s;
}
.qnav-add-btn:hover {
    background: rgba(59,130,246,0.22);
    border-color: rgba(59,130,246,0.6);
}

/* ── Quick Nav vertical resize handle ─────────────────── */
.qnav-resize-handle {
    display: none;
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 14px;
    background: #3b82f6;
    border-radius: 0 0 6px 6px;
    cursor: ns-resize;
    z-index: 60;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.qnav-resize-handle::after {
    display: none;
}

.qnav-resize-handle:hover::after {
    background: rgba(255,255,255,0.9);
}
body.edit-mode .qnav-bar.qnav-selected .qnav-resize-handle {
    display: block;
    z-index: 100000;
}
/* Ensure bar has relative positioning for the handle */
/* =============================================
   SHOP TEMPLATE STYLES
   ============================================= */

/* Background image layer — shared by both shop-hero and shop-grid sections */
.shop-section-bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

/* Ensure shop sections create a stacking context for the bg layer */
.shop-hero-section,
.shop-grid-section {
    position: relative;
    overflow: hidden;
}

/* Lift all direct children above the bg layer */
.shop-hero-section > *:not(.shop-section-bg-layer),
.shop-grid-section > *:not(.shop-section-bg-layer) {
    position: relative;
    z-index: 1;
}

/* Accordion controls for shop section bg images */
.shop-section-bg-wrap {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.shop-section-bg-label,
.shop-section-bg-opacity-label {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    display: block;
    margin-bottom: 4px;
}

.shop-section-bg-opacity-label {
    margin-top: 8px;
}

.shop-section-color-picker {
    width: 100%;
    height: 32px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 10px;
    display: block;
}

.shop-section-label {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    display: block;
    margin-bottom: 4px;
}

.shop-grid-section {
    background: #0f1115;
    padding: 60px 40px;
    min-height: 400px;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

.product-card {
    background: #161b27;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.product-card-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-img-placeholder::after {
    content: '📷';
    font-size: 36px;
    opacity: 0.3;
}

.product-card-body {
    padding: 18px 20px 22px;
}

.add-product-btn {
    display: none;
    width: 100%;
    min-height: 200px;
    background: rgba(59,130,246,0.06);
    border: 2px dashed rgba(59,130,246,0.35);
    border-radius: 16px;
    color: rgba(59,130,246,0.8);
    font-size: 22px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
    align-items: center;
    justify-content: center;
}

.add-product-btn:hover {
    background: rgba(59,130,246,0.13);
    border-color: rgba(59,130,246,0.6);
    color: #3b82f6;
}

body.edit-mode .add-product-btn {
    display: flex;
}

.shop-hero-section {
    background: #0d1117;
    padding: 80px 40px;
    text-align: center;
}

/* ===================================================
   TEXT BOXES ENGINE
=================================================== */

/* Container for a free-placed text box */
.tb-box {
    position: absolute;
    cursor: text;
    box-sizing: border-box;
    pointer-events: auto;
}

body.edit-mode .tb-box {
    pointer-events: all;
    cursor: move;
}

/* Selection ring */
body.edit-mode .tb-box.tb-selected {
    outline: 2px solid rgba(59,130,246,0.9);
    outline-offset: 2px;
}

/* Hover ring (non-selected) */
body.edit-mode .tb-box:hover:not(.tb-selected) {
    outline: 1px dashed rgba(59,130,246,0.5);
    outline-offset: 2px;
}

/* Inner editable content area */
.tb-inner {
    outline: none;
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.2;
    padding: 4px;
    min-height: 1em;
    caret-color: currentColor;
    cursor: text;
    pointer-events: auto;
    user-select: text;
}

body.edit-mode .tb-box:not(.tb-editing) .tb-inner {
    pointer-events: none;
    user-select: none;
    cursor: inherit;
}

body.edit-mode .tb-box.tb-editing .tb-inner {
    pointer-events: auto !important;
    cursor: text;
    user-select: text;
}

body.edit-mode .tb-box.tb-editing {
    cursor: text;
    outline: 2px solid #3b82f6;
}

/* Double-click hint tooltip on hover (not while editing) */
body.edit-mode .tb-box:hover:not(.tb-editing)::after {
    content: 'Double-click to edit';
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30,30,30,0.82);
    color: #fff;
    font-size: 11px;
    font-family: sans-serif;
    padding: 3px 7px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    animation: tb-hint-fade 0.18s ease 0.45s forwards;
}

@keyframes tb-hint-fade {
    to { opacity: 1; }
}

/* Hint cursor: selected box hovering = show text cursor to hint editability */
body.edit-mode .tb-box.tb-selected:hover:not(.tb-editing) {
    cursor: text;
}

/* Resize handles — 4 corners */
.tb-resize-handle {
    display: none;
    position: absolute;
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border: 2px solid #fff;
    border-radius: 3px;
    z-index: 40;
}

.tb-resize-handle.tb-rh-br { bottom: -6px; right:  -6px; cursor: nwse-resize; }
.tb-resize-handle.tb-rh-bl { bottom: -6px; left:   -6px; cursor: nesw-resize; }
.tb-resize-handle.tb-rh-tr { top:    -6px; right:  -6px; cursor: nesw-resize; }
.tb-resize-handle.tb-rh-tl { top:    -6px; left:   -6px; cursor: nwse-resize; }

body.edit-mode .tb-box.tb-selected .tb-resize-handle {
    display: block;
}

/* Drag-in-progress — prevent text selection */
body.tb-dragging {
    user-select: none;
    cursor: move !important;
}

body.edit-mode .tb-box.tb-live-drag {
    z-index: 9999;
    transition: none !important;
    will-change: transform;
}

body.edit-mode .tb-box.tb-live-drag .tb-inner {
    user-select: none;
    pointer-events: none !important;
}

/* ── Text Tab panel styles ───────────────────────────── */

.text-tab-body {
    padding: 8px 16px;
}

.text-tab-hint {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    margin: 0 0 14px;
    line-height: 1.5;
}

.text-insert-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.text-insert-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-align: left;
    width: 100%;
}

.text-insert-btn:hover {
    background: rgba(59,130,246,0.15);
    border-color: rgba(59,130,246,0.5);
}

.text-insert-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 36px;
    border-radius: 6px;
    background: rgba(59,130,246,0.2);
    color: #3b82f6;
    flex-shrink: 0;
    font-family: "Montserrat", sans-serif;
}

.text-insert-preview--title   { font-size: 20px; font-weight: 800; }
.text-insert-preview--heading { font-size: 16px; font-weight: 700; }
.text-insert-preview--subtitle{ font-size: 12px; font-weight: 400; }

.text-insert-label {
    font-size: 14px;
    font-weight: 500;
}

.text-tab-no-section {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

/* ── Images Tab ───────────────────────────────────── */

.images-tab-body {
    padding: 8px 16px;
}

.images-tab-hint {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    margin: 0 0 14px;
    line-height: 1.5;
}

.images-upload-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.images-upload-btn:hover {
    background: rgba(59,130,246,0.15);
    border-color: rgba(59,130,246,0.5);
}

.images-upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 36px;
    border-radius: 6px;
    background: rgba(255,255,255,0.07);
    color: #fff;
    flex-shrink: 0;
    font-size: 18px;
}

.images-upload-text {
    font-size: 14px;
    font-weight: 500;
}

.images-tab-no-section {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

/* ── Image Box Engine ─────────────────────────────────── */

.ib-box {
    position: absolute;
    box-sizing: border-box;
    cursor: default;
    pointer-events: none;
}

body.edit-mode .ib-box {
    pointer-events: all;
    cursor: move;
}

body.edit-mode .ib-box.ib-selected {
    outline: 2px solid rgba(59,130,246,0.9);
    outline-offset: 2px;
}

body.edit-mode .ib-box:hover:not(.ib-selected) {
    outline: 1px dashed rgba(59,130,246,0.5);
    outline-offset: 2px;
}

.ib-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
}

/* Resize handle — bottom right */
.ib-resize-handle {
    display: none;
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 14px;
    height: 14px;
    background: #3b82f6;
    border: 2px solid #fff;
    border-radius: 3px;
    cursor: nwse-resize;
    z-index: 40;
    pointer-events: all;
}

body.edit-mode .ib-box.ib-selected .ib-resize-handle {
    display: block;
}

/* Delete button — top right */
.ib-delete-btn {
    display: none;
    position: absolute;
    top: -10px;
    right: -10px;
    width: 22px;
    height: 22px;
    background: #ef4444;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    z-index: 41;
    pointer-events: all;
    align-items: center;
    justify-content: center;
    padding: 0;
}

body.edit-mode .ib-box.ib-selected .ib-delete-btn {
    display: flex;
}

body.edit-mode .ib-box.ib-live-drag {
    z-index: 9998;
    transition: none !important;
}

/* ── Text tab divider ─────────────────────────────────── */
.text-tab-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 16px 0 0;
}

/* ── Shapes gallery in Element tab ─────────────────────── */
.blocks-shapes-heading {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.shapes-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.shape-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    cursor: grab;
    user-select: none;
    padding: 12px 8px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    outline: none;
    min-width: 0;
}

.shape-thumb > span:last-child {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 14px;
    line-height: 14px;
    text-align: center;
}

.shape-thumb:hover {
    background: rgba(59,130,246,0.15);
    border-color: rgba(59,130,246,0.45);
    color: rgba(255,255,255,0.9);
    transform: translateY(-1px);
}

.shape-thumb:active { cursor: grabbing; }

.shape-thumb-preview {
    display: block;
    width: 38px;
    height: 38px;
    background: rgba(59,130,246,0.7);
    border: 2px solid rgba(59,130,246,0.9);
    box-sizing: border-box;
}

.shape-thumb-preview--square       { border-radius: 0; }
.shape-thumb-preview--circle       { border-radius: 50%; }
.shape-thumb-preview--rounded-rect { border-radius: 10px; }
.shape-thumb-preview--pill         { border-radius: 50px; height: 20px; margin-top: 9px; width: 48px; }
.shape-thumb-preview--diamond      { border-radius: 0; transform: rotate(45deg); width: 28px; height: 28px; margin-top: 5px; }

.shape-thumb-preview--triangle {
    width: 34px;
    height: 30px;
    margin-top: 4px;
    background: rgba(59,130,246,0.72);
    border: 2px solid rgba(59,130,246,0.95);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.shape-thumb-preview--hexagon {
    width: 34px;
    height: 30px;
    margin-top: 4px;
    background: rgba(59,130,246,0.72);
    border: 2px solid rgba(59,130,246,0.95);
    clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
}

.shape-thumb-preview--star {
    width: 34px;
    height: 34px;
    margin-top: 2px;
    background: rgba(59,130,246,0.72);
    border: 2px solid rgba(59,130,246,0.95);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* ── Placed shape box ───────────────────────────────────── */


body.edit-mode .sb-box {
    pointer-events: all;
    cursor: move;
}

body.edit-mode .sb-box.sb-selected {
    outline: 2px solid rgba(59,130,246,0.9);
    outline-offset: 3px;
}

body.edit-mode .sb-box:hover:not(.sb-selected) {
    outline: 1px dashed rgba(59,130,246,0.5);
    outline-offset: 3px;
}

/* Fill layer */
.sb-fill {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* ── 4-corner resize handles ────────────────────────────── */
.sb-rh {
    display: none;
    position: absolute;
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border: 2px solid #fff;
    border-radius: 3px;
    z-index: 40;
    pointer-events: all;
}

body.edit-mode .sb-box.sb-selected .sb-rh { display: block; }

.sb-rh-tl { top:    -6px; left:  -6px; cursor: nwse-resize; }
.sb-rh-tr { top:    -6px; right: -6px; cursor: nesw-resize; }
.sb-rh-bl { bottom: -6px; left:  -6px; cursor: nesw-resize; }
.sb-rh-br { bottom: -6px; right: -6px; cursor: nwse-resize; }

/* Delete button */
.sb-delete-btn {
    display: none;
    position: absolute;
    top: -10px;
    right: -10px;
    width: 22px;
    height: 22px;
    background: #ef4444;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    z-index: 41;
    pointer-events: all;
    align-items: center;
    justify-content: center;
    padding: 0;
}

body.edit-mode .sb-box.sb-selected .sb-delete-btn {
    display: flex;
}

body.edit-mode .sb-box.sb-live-drag {
    z-index: 9998;
    transition: none !important;
}

/* Non-edit mode: shapes are visible but non-interactive */
body:not(.edit-mode) .sb-box {
    pointer-events: none;
    cursor: default;
}
body:not(.edit-mode) .sb-rh,
body:not(.edit-mode) .sb-delete-btn {
    display: none !important;
}

/* ── Button Boxes ─────────────────────────────────────────── */
.btnbox {
    position: absolute;
    box-sizing: border-box;
    pointer-events: none;
    user-select: none;
    overflow: visible;
}
.edit-mode .btnbox {
    pointer-events: auto;
    outline: 2px dashed rgba(255,255,255,0.25);
    outline-offset: 2px;
}
.edit-mode .btnbox.btnbox-selected {
    outline: 2px solid #3b82f6;
}
.btnbox-inner {
    pointer-events: none;
}
.edit-mode .btnbox-inner {
    pointer-events: auto;
    cursor: move;
}
.btnbox-inner[contenteditable="true"] {
    cursor: text;
    outline: none;
}

/* Delete button — reuses .sb-delete-btn styles already in CSS */
.edit-mode .btnbox .btnbox-del {
    display: flex;
}
.btnbox .btnbox-del {
    display: none;
}

/* ── Button box resize handles (own class, no shape-system leakage) ── */
.btnbox-resize-handle {
    display: none;
    position: absolute;
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border: 2px solid #ffffff;
    border-radius: 3px;
    box-sizing: border-box;
    z-index: 10;
    pointer-events: auto;
}
/* Only show on the selected button, in edit mode */
.edit-mode .btnbox.btnbox-selected .btnbox-resize-handle {
    display: block;
}
/* Corner positions */
.btnbox-rh-tl { top: -6px;    left: -6px;   cursor: nwse-resize; }
.btnbox-rh-tr { top: -6px;    right: -6px;  cursor: nesw-resize; }
.btnbox-rh-bl { bottom: -6px; left: -6px;   cursor: nesw-resize; }
.btnbox-rh-br { bottom: -6px; right: -6px;  cursor: nwse-resize; }

/* Non-edit mode: render as real clickable button */
body:not(.edit-mode) .btnbox {
    pointer-events: auto;
    cursor: pointer;
    outline: none !important;
}
body:not(.edit-mode) .btnbox-inner {
    pointer-events: auto;
    cursor: pointer;
}
body:not(.edit-mode) .btnbox .btnbox-resize-handle,
body:not(.edit-mode) .btnbox .btnbox-del {
    display: none !important;
}

/* ── Button Settings Panel ───────────────────────────────── */
#btnSettingsPanel {
    display: none;
    margin-top: 16px;
    padding: 12px 14px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    flex-direction: column;
    gap: 10px;
}
#btnSettingsPanel.bsp-visible {
    display: flex;
}
.bsp-header {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 2px;
}
.bsp-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 26px;
}
.bsp-label {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    min-width: 76px;
    flex-shrink: 0;
}
.bsp-select,
.bsp-input {
    flex: 1;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    outline: none;
    min-width: 0;
}
.bsp-select:focus,
.bsp-input:focus {
    border-color: rgba(59,130,246,0.6);
}
.bsp-slider {
    flex: 1;
    accent-color: #3b82f6;
    cursor: pointer;
}
.bsp-slider-val {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    min-width: 28px;
    text-align: right;
}
.bsp-color {
    width: 30px;
    height: 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: none;
    padding: 0;
}
.bsp-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.07);
    margin: 2px 0;
}
#bspMappingTarget {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-top: 2px;
}
#bspMappingTarget.bsp-mt-visible {
    display: flex;
}

/* ── Per-button hover styles injected via <style> tag ───── */
/* Hover applied via JS-injected data-btn-id scoped rule    */

/* ===== PUBLISH DETAILS MODAL ===== */
.pub-details-box {
  max-width: 480px;
  width: 94%;
}
.pm-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
  text-align: left;
}
.pm-label {
  font-size: 12px;
  font-weight: 600;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pm-input {
  background: #0d1117;
  border: 1px solid #2d3748;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 14px;
  padding: 9px 12px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
.pm-input:focus {
  border-color: #3b82f6;
}
.pm-textarea {
  height: 80px;
  resize: vertical;
}
.pm-thumb-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pm-thumb-url {
  flex: 1;
}
.pm-upload-btn {
  background: #1e293b;
  border: 1px solid #2d3748;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.pm-upload-btn:hover {
  background: #2d3748;
}