/* ======================================
   Doctor Mattress Elementor Widgets CSS
   All classes prefixed with dm- to avoid conflicts
   ====================================== */

:root {
    /* Primary Colors */
    --dm-color-primary: #E1292D;
    --dm-color-primary-dark: #C62125;
    --dm-color-primary-light: #FFEBEE;
    --dm-color-secondary: #004D40;
    --dm-color-secondary-light: #E0F2F1;

    /* Neutral Colors */
    --dm-color-text: #222222;
    --dm-color-text-muted: #666666;
    --dm-color-bg-light: #F8F9FA;
    --dm-color-white: #FFFFFF;
    --dm-color-border: #E0E0E0;

    /* Spacing */
    --dm-spacing-xs: 0.5rem;
    --dm-spacing-sm: 1rem;
    --dm-spacing-md: 1.5rem;
    --dm-spacing-lg: 2rem;
    --dm-spacing-xl: 3rem;

    /* Layout */
    --dm-container-width: 1400px;
    --dm-boundary-padding: 2rem;

    /* Effects */
    --dm-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --dm-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --dm-border-radius: 12px;
    --dm-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Base Wrapper ---- */
.dm-wrapper {
    font-family: 'Montserrat', sans-serif;
    color: var(--dm-color-text);
    line-height: 1.6;
}

.dm-wrapper *,
.dm-wrapper *::before,
.dm-wrapper *::after {
    box-sizing: border-box;
}

.dm-wrapper img {
    max-width: 100%;
    display: block;
}

.dm-wrapper a {
    text-decoration: none;
    color: inherit;
    transition: var(--dm-transition);
}

.dm-wrapper h1,
.dm-wrapper h2,
.dm-wrapper h3,
.dm-wrapper h4,
.dm-wrapper h5,
.dm-wrapper h6 {
    font-family: "Montserrat Alternates", sans-serif;
    font-weight: 700;
    margin: 0;
}

.dm-wrapper ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dm-container {
    max-width: var(--dm-container-width);
    margin: 0 auto;
    padding: 0 var(--dm-boundary-padding);
}

.dm-container-full {
    max-width: 100%;
    padding: 0 var(--dm-spacing-lg);
}

/* ===================
   SALE TICKER WIDGET
   =================== */
.dm-sale-ticker {
    background-color: var(--dm-color-primary);
    color: white;
    padding: 12px 0;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.dm-ticker-content {
    display: flex;
    align-items: center;
    gap: 40px;
    animation: dm-ticker 30s linear infinite;
    width: max-content;
}

.dm-ticker-item {
    font-size: 1rem;
    font-weight: 500;
    font-family: "Montserrat Alternates", sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dm-ticker-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    flex-shrink: 0;
}

@keyframes dm-ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===================
   HERO BANNER WIDGET
   =================== */
.dm-hero {
    width: 100%;
}

.dm-hero img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===================
   PRODUCT CARD WIDGET
   =================== */
.dm-section-title {
    font-size: 2.25rem;
    margin-bottom: var(--dm-spacing-xl);
    font-family: "Montserrat Alternates", sans-serif;
    font-weight: 700;
}

.dm-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.dm-product-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.08);
    border: 1.5px solid #F1F1F1;
    transition: var(--dm-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.dm-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 15px 15px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--dm-color-primary);
}

.dm-p-img-box {
    width: 100%;
    aspect-ratio: 1.35;
    background: #F2F2F2;
}

.dm-p-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dm-p-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.dm-p-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.dm-p-name {
    color: var(--dm-color-primary);
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.3;
}

.dm-wishlist-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    transition: var(--dm-transition);
    padding: 0;
}

.dm-wishlist-btn:hover {
    color: var(--dm-color-primary);
}

.dm-p-ratings {
    display: flex;
    gap: 4px;
    margin-bottom: 15px;
}

.dm-p-ratings i {
    color: #FFB800;
    font-size: 1.1rem;
}

.dm-p-ratings i.empty {
    color: #DDD;
}

.dm-p-pricing {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.dm-p-price-cur {
    color: var(--dm-color-primary);
    font-size: 1.35rem;
    font-weight: 700;
}

.dm-p-price-old {
    color: #9F9F9F;
    text-decoration: line-through;
    font-size: 1rem;
}

.dm-p-tag {
    background: #2F00FF;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.dm-p-desc {
    font-size: 0.9rem;
    margin-bottom: 25px;
    color: #333;
    display: flex;
    flex-direction: column;
    gap: 12px;
    line-height: 1.5;
}

.dm-p-bullet {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dm-p-bullet i {
    color: var(--dm-color-primary);
    margin-top: 4px;
    font-size: 0.85rem;
}

.dm-p-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.dm-btn-p {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 600;
    transition: var(--dm-transition);
    display: inline-block;
}

.dm-btn-p-outline {
    border: 1.5px solid var(--dm-color-primary);
    color: var(--dm-color-primary);
    background: transparent;
}

.dm-btn-p-outline:hover {
    background: var(--dm-color-primary-light);
}

.dm-btn-p-solid {
    background: var(--dm-color-primary);
    color: white;
    border: 1.5px solid var(--dm-color-primary);
}

.dm-btn-p-solid:hover {
    background: var(--dm-color-primary-dark);
    border-color: var(--dm-color-primary-dark);
}

/* ======================
   FEATURES CAROUSEL WIDGET
   ====================== */
.dm-features-boundary {
    border: 1.5px solid var(--dm-color-primary);
    border-radius: 24px;
    padding: 25px;
    margin-bottom: var(--dm-spacing-xl);
    overflow: hidden;
}

.dm-features-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--dm-color-primary) #f0f0f0;
}

.dm-features-scroll::-webkit-scrollbar {
    height: 6px;
}

.dm-features-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.dm-features-scroll::-webkit-scrollbar-thumb {
    background-color: var(--dm-color-primary);
    border-radius: 10px;
}

.dm-feature-card {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dm-feature-card img {
    width: 100%;
    border-radius: 16px;
    object-fit: cover;
    aspect-ratio: 1.5;
}

.dm-feature-label {
    background: var(--dm-color-primary);
    color: white;
    text-align: center;
    padding: 10px 5px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

/* =====================
   CATEGORY GRID WIDGET
   ===================== */
.dm-category-section {
    padding: var(--dm-spacing-xl) 0;
}

.dm-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.dm-cat-card {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 10px 10px 25px rgba(0, 0, 0, 0.1);
    background: var(--dm-color-primary);
    transition: var(--dm-transition);
    cursor: pointer;
}

.dm-cat-card:hover {
    transform: scale(1.03);
    box-shadow: 15px 15px 35px rgba(0, 0, 0, 0.15);
}

.dm-cat-img {
    width: 100%;
    aspect-ratio: 1.7;
    object-fit: cover;
    display: block;
}

.dm-cat-name {
    padding: 20px;
    color: white;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 600;
}

/* ========================
   STORE LOCATOR WIDGET
   ======================== */
.dm-store-locator {
    background: var(--dm-color-secondary);
    padding: var(--dm-spacing-xl) 0;
}

.dm-store-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 0;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.dm-store-map {
    background: #f8f8f8;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #ddd;
}

.dm-store-map img {
    max-width: 100%;
    height: auto;
}

.dm-store-info {
    padding: 40px;
    background: white;
}

.dm-store-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
}

.dm-store-col {
    padding: 0 25px;
    position: relative;
}

.dm-store-col:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: #bbb;
}

.dm-state-header {
    color: var(--dm-color-primary);
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 30px;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 8px;
    letter-spacing: 0.5px;
}

.dm-branch-list {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.dm-branch-item {
    display: grid;
    grid-template-columns: 35px 1fr;
    gap: 10px;
    align-items: flex-start;
}

.dm-pin-icon {
    width: 28px;
    height: 28px;
    background: var(--dm-color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    margin-top: 2px;
}

.dm-branch-details h4 {
    font-size: 1rem;
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.dm-branch-details p {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #444;
    font-weight: 500;
    margin: 0;
}

/* =====================
   FOOTER CTA WIDGET
   ===================== */
.dm-footer {
    color: #FFFFFF;
}

.dm-footer-cta {
    display: grid;
    grid-template-columns: 350px 1fr;
    background: #000;
}

.dm-footer-logo-block {
    background: #fff;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dm-footer-cta-content {
    background: #000;
    position: relative;
    padding: 60px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: center;
}

.dm-footer-cta-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.dm-cta-social {
    position: relative;
    z-index: 1;
}

.dm-cta-form {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    text-align: right;
}

.dm-social-circle {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-size: 1.25rem;
    transition: var(--dm-transition);
}

.dm-social-circle:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.dm-social-icons-footer {
    display: flex;
    gap: 35px;
}

.dm-cta-social h4 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-weight: 400;
}

.dm-cta-form h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 25px;
    font-weight: 500;
}

.dm-form-grid-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.dm-footer-input,
.dm-footer-textarea {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 15px;
    color: white;
    border-radius: 2px;
    font-size: 0.85rem;
    width: 100%;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
}

.dm-footer-textarea {
    height: 100px;
    resize: none;
}

.dm-footer-input::placeholder,
.dm-footer-textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.dm-btn-send {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 10px;
}

.dm-btn-send:hover {
    background: #0056b3;
}

/* Footer Tier 2: Main Links */
.dm-footer-main {
    background: #000;
    padding: 80px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dm-footer-main-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 100%;
    padding: 0 60px;
}

.dm-footer-contact-block {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dm-contact-item-footer {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dm-contact-item-footer i {
    font-size: 2rem;
    color: white;
    width: 50px;
    text-align: center;
}

.dm-contact-text-footer {
    font-size: 0.9rem;
    line-height: 1.6;
    color: white;
}

.dm-contact-text-footer strong {
    font-weight: 700;
}

.dm-footer-col h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 30px;
    font-weight: 700;
}

.dm-footer-col ul {
    list-style: none;
    padding: 0;
}

.dm-footer-col ul li {
    margin-bottom: 12px;
}

.dm-footer-col ul li a {
    color: #999;
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--dm-transition);
}

.dm-footer-col ul li a:hover {
    color: white;
}

/* Footer Tier 3: Bottom Strip */
.dm-footer-bottom-strip {
    background: var(--dm-color-primary);
    height: 60px;
    width: 100%;
}

/* ======================
   RESPONSIVE MEDIA QUERIES
   ====================== */
@media (max-width: 1200px) {
    .dm-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dm-store-grid {
        grid-template-columns: 1fr;
    }

    .dm-store-map {
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .dm-footer-main-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 1000px) {
    .dm-footer-cta {
        grid-template-columns: 1fr;
    }

    .dm-footer-cta-content {
        grid-template-columns: 1fr;
        padding: 40px 20px;
        text-align: center;
    }

    .dm-cta-form {
        text-align: center;
    }

    .dm-social-icons-footer {
        justify-content: center;
    }
}

@media (max-width: 900px) {
    .dm-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dm-store-columns {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .dm-store-col {
        padding: 0;
    }

    .dm-store-col:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 600px) {
    .dm-product-grid {
        grid-template-columns: 1fr;
    }

    .dm-section-title {
        font-size: 1.75rem;
    }

    .dm-cat-grid {
        grid-template-columns: 1fr;
    }

    .dm-footer-main-grid {
        grid-template-columns: 1fr;
    }
}
