/* =============================================
   HEADER NAV — remove Elementor Pro vertical divider between menu items
   (the `|` pipes shown between "Bygg din dörr | Produkter | …")
   ============================================= */
.elementor-nav-menu--main .elementor-nav-menu>li:not(:last-child):after,
.elementor-nav-menu--layout-horizontal .elementor-nav-menu>li:not(:last-child):after {
    content: none !important;
    border: 0 !important;
}

/* =============================================
   DESIGN YOUR DOOR - MAIN LAYOUT
   ============================================= */
.dyd-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: inherit;
}

.dyd-header {
    text-align: center;
    margin-bottom: 30px;
}

.dyd-header h1 {
    font-size: 42px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.dyd-header p {
    font-size: 17px;
    color: #777;
    margin: 0;
}

.dyd-main {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* =============================================
   LEFT PANEL - CANVAS / PREVIEW
   ============================================= */
.dyd-preview-panel {
    flex: 1;
    min-width: 0;
}

.dyd-canvas-wrapper {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid #d6e4f0;
    background: #f0f0f0;
    cursor: crosshair;
    aspect-ratio: 4 / 3;
}

.dyd-canvas-wrapper img.dyd-env-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f0f0f0;
    display: block;
    user-select: none;
    pointer-events: none;
    transform-origin: center center;
    transition: transform 0.15s ease;
    will-change: transform;
}

/* Placed door overlay */
.dyd-door-overlay {
    position: absolute;
    border: 2px dashed transparent;
    cursor: move;
    display: none;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    /* Disable native touch gestures so drag/resize fire cleanly on mobile */
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.dyd-resize-handle {
    touch-action: none;
}

.dyd-door-overlay.selected {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.dyd-door-overlay img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    pointer-events: none;
    user-select: none;
}

.dyd-door-overlay.active {
    display: block;
}

/* Resize handles */
.dyd-resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid #D0AD79;
    border-radius: 50%;
    z-index: 10;
    display: none;
}

.dyd-door-overlay.selected .dyd-resize-handle {
    display: block;
}

.dyd-resize-handle.top-left {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.dyd-resize-handle.top-right {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.dyd-resize-handle.bottom-left {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.dyd-resize-handle.bottom-right {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

.dyd-resize-handle.top-center {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: n-resize;
}

.dyd-resize-handle.bottom-center {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: s-resize;
}

.dyd-resize-handle.middle-left {
    top: 50%;
    left: -6px;
    transform: translateY(-50%);
    cursor: w-resize;
}

.dyd-resize-handle.middle-right {
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    cursor: e-resize;
}

/* Zoom controls (top-right of canvas) */
.dyd-zoom-controls {
    position: absolute;
    top: 14px;
    right: 14px;
    display: none;
    flex-direction: row;
    gap: 6px;
    z-index: 25;
}

.dyd-zoom-controls.visible {
    display: flex;
}

.dyd-zoom-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    padding: 0;
}

.dyd-zoom-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.08);
}

/* Canvas Toolbar */
.dyd-canvas-toolbar {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 20;
}

.dyd-canvas-toolbar.visible {
    display: flex;
}

.dyd-toolbar-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: none;
}

.dyd-toolbar-btn:hover {
    background: transparent;
    transform: scale(1.08);
}

.dyd-toolbar-btn:disabled {
    opacity: 0.35;
    cursor: default;
    transform: none;
}

.dyd-toolbar-btn .dyd-toolbar-svg {
    width: 22px;
    height: 22px;
    color: #fff;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* PNG variant of toolbar icons (undo/redo) — render white */
.dyd-toolbar-btn .dyd-toolbar-icon {
    width: 22px;
    height: 22px;
    display: block;
    filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.dyd-delete-all-btn .dyd-toolbar-svg {
    color: #e04040;
}

/* Save Picture Button */
.dyd-save-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(208, 173, 121, 0.9);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    backdrop-filter: blur(4px);
}

.dyd-save-btn:hover {
    background: rgba(185, 148, 95, 0.95);
}

.dyd-save-btn:disabled,
.dyd-save-btn.dyd-disabled {
    background: #c9c9c9 !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 0.7;
    pointer-events: none;
}

.dyd-save-btn svg {
    width: 20px;
    height: 20px;
}

/* =============================================
   PRESET THUMBNAILS CAROUSEL
   ============================================= */
.dyd-presets-carousel {
    position: relative;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: visible;
}

.dyd-presets-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 5px 0;
    flex: 1 1 auto;
    min-width: 0;
}

.dyd-presets-track::-webkit-scrollbar {
    display: none;
}

.dyd-preset-thumb {
    flex: 0 0 auto;
    width: 140px;
    height: 95px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.3s, transform 0.2s;
}

.dyd-preset-thumb:hover {
    transform: scale(1.03);
}

.dyd-preset-thumb.active {
    border-color: #D0AD79;
}

.dyd-preset-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dyd-carousel-arrow {
    position: relative;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: opacity 0.2s, transform 0.15s;
    padding: 0;
}

.dyd-carousel-arrow:hover {
    opacity: 0.7;
    background: none;
    transform: scale(1.1);
}

.dyd-arrow-icon {
    width: 28px;
    height: 28px;
    display: block;
    pointer-events: none;
}

/* =============================================
   RIGHT PANEL - CONTROLS
   ============================================= */
.dyd-controls-panel {
    width: 380px;
    flex-shrink: 0;
}

/* Toggle Buttons (Preset / Upload) */
.dyd-toggle-buttons {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
}

.dyd-toggle-btn {
    flex: 1;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: none;
}

.dyd-toggle-buttons {
    gap: 0 !important;
}

.dyd-toggle-btn {
    border-right: none !important;
    border-left: none !important;
}

.dyd-toggle-btn:first-child {
    border-radius: 8px 0 0 8px;
    border-left: 1px solid #ddd !important;
}

.dyd-toggle-btn:last-child {
    border-radius: 0 8px 8px 0;
    border-right: 1px solid #ddd !important;
}

.dyd-toggle-btn.active {
    border-left: none !important;
    border-right: none !important;
}

.dyd-toggle-btn:first-child.active {
    border-left: 1px solid #D0AD79 !important;
}

.dyd-toggle-btn:last-child.active {
    border-right: 1px solid #D0AD79 !important;
}

.dyd-toggle-btn.active {
    background: #D0AD79;
    color: #fff;
    border-color: #D0AD79;
}

.dyd-toggle-btn:hover:not(.active) {
    background: #FCF9F3;
    border-color: #D0AD79;
}

/* Select a Door Section */
.dyd-door-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    margin-bottom: 14px;
}

/* Category Tabs */
.dyd-category-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 18px;
    width: 100%;
}

.dyd-cat-tab {
    width: 100%;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #e0d5c3;
    border-radius: 6px;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
    text-align: center;
}

.dyd-cat-tab:hover {
    background: #FCF9F3;
    border-color: #D0AD79;
    color: #333;
}

.dyd-cat-tab.active {
    background: #D0AD79;
    color: #fff;
    border-color: #D0AD79;
}

/* Products Grid */
.dyd-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.dyd-products-grid::-webkit-scrollbar {
    width: 4px;
}

.dyd-products-grid::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 2px;
}

.dyd-products-grid::-webkit-scrollbar-thumb {
    background: #D0AD79;
    border-radius: 2px;
}

.dyd-product-card {
    cursor: pointer;
    text-align: center;
    transition: all 0.25s;
    border-radius: 8px;
    border: 2px solid transparent;
}

.dyd-product-card:hover {
    border-color: #e0d5c3;
}

.dyd-product-card.selected {
    border-color: #D0AD79;
}

.dyd-product-card-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 6px;
    overflow: hidden;
    background: #f9f7f4;
    border: 1px solid #eee;
    margin-bottom: 6px;
}

.dyd-product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 10px;
}

.dyd-product-card-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    margin-bottom: 2px;
}

.dyd-product-card.selected .dyd-product-card-name {
    color: #D0AD79;
}

.dyd-product-card-price {
    font-size: 11px;
    color: #999;
}

.dyd-product-card.selected .dyd-product-card-price {
    color: #D0AD79;
}

/* Go to Product Button */
.dyd-goto-product-btn {
    display: none;
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    background: #D0AD79;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    margin-top: 10px;
}

.dyd-goto-product-btn:hover {
    background: #c09a65;
    color: #fff;
    text-decoration: none;
}

.dyd-goto-product-btn.visible {
    display: block;
}

/* Loading spinner */
.dyd-loading {
    text-align: center;
    padding: 40px 0;
    color: #999;
    font-size: 14px;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dyd-loading .dyd-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #eee;
    border-top-color: #D0AD79;
    border-radius: 50%;
    animation: dyd-spin 0.7s linear infinite;
    margin-bottom: 8px;
}

@keyframes dyd-spin {
    to {
        transform: rotate(360deg);
    }
}

/* No products message */
.dyd-no-products {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 14px;
    grid-column: 1 / -1;
}

/* =============================================
   MODAL OVERLAY
   ============================================= */
.dyd-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.dyd-modal-overlay.open {
    display: flex;
}

.dyd-modal {
    background: #fff;
    border-radius: 16px;
    padding: 35px 40px;
    max-width: 660px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: dyd-modal-in 0.3s ease;
}

@keyframes dyd-modal-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.dyd-modal-title {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    color: #222;
    margin-bottom: 6px;
}

.dyd-modal-subtitle {
    font-size: 14px;
    color: #888;
    text-align: center;
    margin-bottom: 25px;
}

.dyd-modal-close {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.dyd-modal-close:hover {
    background: transparent;
    transform: translateX(-50%) scale(1.1);
}

.dyd-modal-close .dyd-close-icon-img {
    width: 44px;
    height: 44px;
    display: block;
    pointer-events: none;
}

/* Preset modal pager (3x2 grid, slide between pages) */
.dyd-preset-modal {
    max-width: 720px;
}

.dyd-preset-pager {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dyd-preset-viewport {
    flex: 1;
    overflow: hidden;
}

.dyd-preset-pages {
    display: flex;
    transition: transform 0.4s ease;
}

.dyd-preset-page {
    flex: 0 0 100%;
}

.dyd-preset-nav {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, transform 0.15s;
}

.dyd-preset-nav:hover {
    transform: scale(1.1);
}

.dyd-preset-nav:disabled {
    opacity: 0.25;
    cursor: default;
    transform: none;
}

.dyd-preset-nav img {
    width: 28px;
    height: 28px;
    display: block;
    pointer-events: none;
}

.dyd-preset-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.dyd-preset-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.2s;
}

.dyd-preset-dot.active {
    background: #D0AD79;
}

/* Preset Grid in Modal */
.dyd-preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.dyd-preset-option {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
    aspect-ratio: 4 / 3;
}

.dyd-preset-option:hover {
    transform: scale(1.02);
    border-color: #d6e4f0;
}

.dyd-preset-option.selected {
    border-color: #D0AD79;
}

.dyd-preset-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Upload Modal */
.dyd-upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}

.dyd-upload-area:hover,
.dyd-upload-area.dragover {
    border-color: #D0AD79;
    background: #FDF9F3;
}

.dyd-upload-icon {
    font-size: 50px;
    margin-bottom: 12px;
    display: block;
}

.dyd-upload-icon-img {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.dyd-upload-title {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
}

.dyd-upload-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
}

.dyd-upload-formats {
    font-size: 14px;
    color: #aaa;
}

.dyd-upload-input {
    display: none;
}


.dyd-presets-carousel.hidden {
    display: none;
}

/* Empty upload state shown inside canvas */
.dyd-upload-empty {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background: #f7f7f7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #888;
    z-index: 5;
    cursor: pointer;
}

/* Pending-delete visual state on the environment image (first trash click) */
.dyd-canvas-wrapper.dyd-env-pending-delete {
    box-shadow: inset 0 0 0 3px #e04040;
}

.dyd-upload-empty-icon {
    width: 64px;
    height: 64px;
    opacity: 0.6;
}

.dyd-upload-empty-text {
    font-size: 16px;
    font-weight: 500;
}

.dyd-upload-empty-title {
    font-size: 22px;
    font-weight: 600;
    color: #222;
}

.dyd-upload-empty-desc {
    font-size: 16px;
    color: #666;
    margin-top: -6px;
}

.dyd-upload-empty-formats {
    font-size: 14px;
    color: #aaa;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .dyd-main {
        flex-direction: column;
    }

    .dyd-controls-panel {
        width: 100%;
    }

    .dyd-products-grid {
        max-height: 360px;
    }
}

/* Enlarge resize handles on touch devices so they're actually tappable. */
@media (hover: none) and (pointer: coarse) {
    .dyd-resize-handle {
        width: 22px;
        height: 22px;
        border-width: 2px;
    }

    .dyd-resize-handle.top-left {
        top: -11px;
        left: -11px;
    }

    .dyd-resize-handle.top-right {
        top: -11px;
        right: -11px;
    }

    .dyd-resize-handle.bottom-left {
        bottom: -11px;
        left: -11px;
    }

    .dyd-resize-handle.bottom-right {
        bottom: -11px;
        right: -11px;
    }

    .dyd-resize-handle.top-center {
        top: -11px;
    }

    .dyd-resize-handle.bottom-center {
        bottom: -11px;
    }

    .dyd-resize-handle.middle-left {
        left: -11px;
    }

    .dyd-resize-handle.middle-right {
        right: -11px;
    }

    /* Keep the canvas itself from hijacking vertical scroll while still letting
       the door overlay receive touchstart. The overlay sets its own touch-action: none. */
    .dyd-canvas-wrapper {
        cursor: default;
    }
}

@media (max-width: 768px) {
    .dyd-container {
        padding: 0 16px;
    }

    .dyd-header {
        margin-bottom: 20px;
    }

    .dyd-header h1 {
        font-size: 26px;
    }

    .dyd-header p {
        font-size: 14px;
        line-height: 1.45;
        max-width: 90%;
        margin: 0 auto;
    }

    /* Flatten panels so we can reorder children freely */
    .dyd-main {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .dyd-main>* {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .dyd-preview-panel,
    .dyd-controls-panel {
        display: contents;
    }

    .dyd-toggle-buttons {
        order: 1;
        margin-bottom: 16px;
        gap: 10px !important;
    }

    .dyd-toggle-btn {
        padding: 14px 10px;
        font-size: 14px;
        border-radius: 8px !important;
        border: 1px solid #ddd !important;
    }

    .dyd-toggle-btn.active {
        border-color: #D0AD79 !important;
    }

    .dyd-canvas-wrapper {
        order: 2;
        aspect-ratio: 4 / 3;
        border-width: 2px;
        border-radius: 12px;
    }

    .dyd-presets-carousel {
        order: 3;
        margin-top: 12px;
        margin-bottom: 18px;
        gap: 6px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow: hidden;
    }

    .dyd-presets-track {
        flex: 1 1 0;
        min-width: 0;
        max-width: 100%;
    }

    .dyd-preset-thumb {
        width: 95px;
        height: 70px;
        border-width: 2px;
    }

    .dyd-carousel-arrow {
        width: 26px;
        height: 26px;
    }

    .dyd-arrow-icon {
        width: 20px;
        height: 20px;
    }

    .dyd-door-section-title {
        order: 4;
        text-align: center;
        font-size: 20px;
        margin-bottom: 14px;
    }

    .dyd-category-tabs {
        order: 5;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 16px;
    }

    .dyd-cat-tab {
        padding: 12px 10px;
        font-size: 12px;
        text-align: center;
        width: 100%;
    }

    .dyd-products-grid {
        order: 6;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-height: none;
    }

    .dyd-save-btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .dyd-save-btn svg {
        width: 16px;
        height: 16px;
    }

    .dyd-goto-product-btn {
        order: 7;
        padding: 16px;
        font-size: 16px;
        border-radius: 10px;
    }

    /* Fixed sticky version for mobile */
    .dyd-goto-product-btn.fixed-mobile {
        position: fixed !important;
        bottom: 74px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 10000 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    }

    .dyd-preset-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .dyd-preset-nav {
        width: 24px;
    }

    .dyd-preset-nav img {
        width: 18px;
        height: 18px;
    }

    .dyd-upload-subtitle {
        font-size: 14px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        max-width: 100%;
        line-height: 1.4;
    }

    .dyd-modal {
        padding: 25px 20px;
    }
}

@media (max-width: 480px) {
    .dyd-header h1 {
        font-size: 22px;
    }

    .dyd-category-tabs {
        gap: 8px;
    }

    .dyd-cat-tab {
        padding: 11px 8px;
        font-size: 11px;
    }

    .dyd-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .dyd-preset-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .dyd-preset-thumb {
        width: 88px;
        height: 64px;
    }
}

/* =============================================
   TYPOGRAPHY OVERRIDES (design spec)
   ============================================= */
/* 3. Main Heading */
.dyd-header h1 {
    font-size: 40px;
}

/* 4. Description */
.dyd-header p {
    font-size: 20px;
    color: #000000;
}

/* 2. Preset / Upload toggle buttons */
.dyd-toggle-btn {
    font-size: 18px;
}

/* Save Picture button */
.dyd-save-btn {
    font-size: 20px;
}

/* Remove hover color change on toggle */
.dyd-toggle-btn:hover:not(.active) {
    background: #fff;
    color: #333;
    border-color: #ddd;
}

.dyd-save-btn:hover {
    background: rgba(208, 173, 121, 0.9);
    color: #fff;
}

/* 1. Select a Door filters */
.dyd-door-section-title {
    font-size: 18px;
    color: #000000;
}

.dyd-cat-tab {
    font-size: 18px;
    color: #000000;
}

.dyd-cat-tab.active {
    color: #FFFFFF;
}

/* Product card name */
.dyd-product-card-name {
    font-size: 17px;
    color: #000000;
}

/* 5. Choose a Preset popup */
.dyd-preset-modal .dyd-modal-title,
.dyd-modal-title {
    font-size: 25px;
    font-weight: 700;
    color: #000000;
}

.dyd-modal-subtitle {
    font-size: 19px;
    color: #000000;
}

/* All popup text → #000 */
.dyd-modal,
.dyd-modal p,
.dyd-modal span,
.dyd-modal div,
.dyd-modal a,
.dyd-modal label,
.dyd-modal li {
    color: #000000;
}

/* 6. Upload Your Space */
.dyd-upload-title {
    font-size: 25px;
}

.dyd-upload-subtitle {
    font-size: 20px;
}

.dyd-upload-formats {
    font-size: 19px;
}

/* Responsive tweaks (keep readable on mobile) */
@media (max-width: 768px) {
    .dyd-header h1 {
        font-size: 28px;
    }

    .dyd-header p {
        font-size: 16px;
    }

    .dyd-toggle-btn {
        font-size: 16px;
    }

    .dyd-door-section-title {
        font-size: 16px;
    }

    .dyd-cat-tab {
        font-size: 14px;
    }

    .dyd-product-card-name {
        font-size: 14px;
    }

    .dyd-modal-title {
        font-size: 20px;
    }

    .dyd-modal-subtitle {
        font-size: 15px;
    }

    .dyd-upload-title {
        font-size: 20px;
    }

    .dyd-upload-subtitle {
        font-size: 16px;
    }

    .dyd-upload-formats {
        font-size: 14px;
    }
}