/* --- Desktop: Side-by-Side --- */
.dm-section { width: 100%; background: #fff; }
.dm-flex-wrapper { display: flex; min-height: 700px; }
.dm-col, .dm-content-col, .dm-image-col { flex: 1; width: 50%; }

.dm-content-col {
    background-color: #e5e2df; /* Beige desktop side */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 60px 12% 60px 0%;
}

.dm-mobile-white-title { display: none; }

.dm-opaque-box { max-width: 460px; }
.dm-eyebrow { display: block; font-family: 'Playfair Display', serif; font-size: 20px; color: #8b7d7b; margin-bottom: 15px; }
.dm-desktop-title { font-family: 'Playfair Display', serif; font-size: 48px; line-height: 1.1; color: #4a403d; margin-bottom: 25px; }
.dm-text { font-family: 'Inter', sans-serif; font-size: 15px; line-height: 1.6; color: #555; margin-bottom: 30px; }
.dm-btn { display: inline-block; padding: 14px 28px; background-color: #4a403d; color: #fff; font-size: 11px; letter-spacing: 0.1em; text-decoration: none; border: 1px solid #4a403d; }

.dm-image-placeholder { width: 100%; height: 100%; background-size: cover; background-position: center; background-color: #f4f1ee; }

/* Replace .dm-image-placeholder with this */
.dm-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This keeps the mattress from looking stretched */
    transform: scale(1.3);
    display: block;
    object-position: 27%; /* Adjust to 'left' or 'right' if the focal point is off-center */
}

/* Ensure the container allows the image to fill it */
.dm-image-col {
    overflow: hidden;
    line-height: 0; /* Prevents tiny white gaps at the bottom of the image */
}

/* TABLET OPTIMIZATION (720px WP Preview) */
@media (max-width: 1024px) {
    .dm-flex-wrapper { 
        min-height: 600px; }

    .dm-hero-image {
        transform: none;
        object-position: 27%;
    }

    .dm-content-col {
        padding: 60px 5% 60px 8%;
    }
}

/* --- Mobile: Exact Screenshot Match --- */
@media (max-width: 480px) {
    .dm-flex-wrapper {
        display: block;
        position: relative;
        width: 100%;
        /* Adjusted height: Uses aspect ratio of a portrait image (e.g., 4:5) 
           to prevent it from feeling "too long" */
        aspect-ratio: 3 / 4; 
        min-height: 610px;
        overflow: hidden;
    }

    .dm-image-col {
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        z-index: 1;
    }

    .dm-hero-image {
        transform: none;
        object-position: 27%;
    }

    .dm-content-col {
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        z-index: 2;
        background: transparent;
        display: block; /* Stack title top, box bottom */
        padding: 0;
    }

    /* White Title: Positioned at top-left, strictly left-aligned */
    .dm-mobile-white-title {
        display: block;
        color: #fff;
        font-family: 'Playfair Display', serif;
        font-size: 33px;
        line-height: 1.2;
        text-align: right;
        padding: 97px 10px 0 40px; /* Aligned to left edge */
    }

    .dm-desktop-title { display: none; }

    /* Opaque Box: Positioned at bottom-left, strictly left-aligned */
    .dm-opaque-box {
        position: absolute;
        top: 85%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: #4a403d; /* Solid opaque brown */
        padding: 10px 20px 10px 10px;
        width: 85%; /* Does not span full width, hangs left */
        max-width: none;
        opacity: 83%;
    }

    .dm-eyebrow, .dm-text { color: #fff; text-align: left; }
    .dm-eyebrow { font-size: 18px; margin-bottom: 8px; }
    .dm-text { font-size: 14px; margin-bottom: 20px; line-height: 1.4; }

    .dm-btn {
        background: transparent;
        border: 1px solid #fff;
        color: #fff;
        padding: 10px 20px;
        font-size: 12px;
    }
}

/* Claude's Connector Line Implementation */
#bedmatch fieldset::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 2px;
    height: 100px;
    background-color: #CFB994; /* jwbs gold */
    transform: translateX(-50%);
}