/*
Theme Name: Dot Plast Custom
Description: Lightweight, responsive custom theme for Dot Plast Industries.
Version: 6.0
Author: Dot Plast
*/

/* ==========================================================================
   1. ROOT VARIABLES & GLOBAL RESET
   ========================================================================== */
:root {
    --primary-blue: #69b9e3;
    --primary-blue-dark: #4a9bc7;
    --dark-text: #2c3e50;
    --light-bg: #f8f9fa;
    --footer-bg: #333333;
    --border-color: #eaeaea;
    --body-text: #555555;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--body-text);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   2. HEADER (Top Bar, Logo, Menu, Button)
   ========================================================================== */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 5%;
}

/* --- Top Row: Email/Hours (Left) & Address/Socials (Right) --- */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
    flex-wrap: wrap;
    gap: 15px;
}

.header-top-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-top-left span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-top-left strong {
    color: var(--dark-text);
}

.header-top-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-top-right .address {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-socials {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-socials a {
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-socials a svg {
    width: 18px;
    height: 18px;
    transition: color 0.3s ease;
}

.header-socials a:hover {
    color: var(--primary-blue);
}

/* --- Main Row: Logo (Left), Menu (Center), Button (Right) --- */
.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.logo-area img {
    max-height: 70px;
    width: auto;
}

.site-title {
    font-size: 26px;
    color: var(--dark-text);
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}

.site-title a {
    color: var(--dark-text);
}

/* --- Navigation Menu --- */
.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-grow: 1;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
}

.nav-links li a {
    color: var(--dark-text);
    font-weight: 600;
    font-size: 15px;
    display: block;
    padding: 10px 0;
    white-space: nowrap;
}

.nav-links li a:hover {
    color: var(--primary-blue);
}

/* --- Dropdown Menu --- */
.nav-links .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    list-style: none;
    min-width: 230px;
    z-index: 999;
    padding: 10px 0;
    border-radius: 4px;
}

.nav-links li:hover .sub-menu {
    display: block;
}

.nav-links .sub-menu li a {
    padding: 12px 20px;
    font-weight: 500;
    font-size: 14px;
    white-space: normal;
}

.nav-links .sub-menu li a:hover {
    background: var(--light-bg);
    color: var(--primary-blue);
}

/* --- Quote Button --- */
.btn-quote {
    background: var(--primary-blue);
    color: var(--white) !important;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-block;
    text-align: center;
}

.btn-quote:hover {
    background: var(--primary-blue-dark);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--dark-text);
}

/* ==========================================================================
   3. HERO SLIDER (Homepage)
   ========================================================================== */
.hero-slider {
    position: relative;
    height: 75vh;
    overflow: hidden;
    background: #ccc;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 5%;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: -1;
}

.hero-text {
    color: var(--white);
    max-width: 900px;
    animation: slideUp 1s ease-out forwards;
}

.hero-text h2 {
    font-size: 52px;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-text p {
    font-size: 20px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   4. GLOBAL SECTIONS & HOMEPAGE
   ========================================================================== */
.section {
    padding: 90px 5%;
}

.section-title {
    text-align: center;
    font-size: 38px;
    color: var(--dark-text);
    margin-bottom: 50px;
    font-weight: 700;
}

/* --- Products Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: transparent;
}

.product-card img {
    max-height: 160px;
    margin-bottom: 25px;
    object-fit: contain;
}

.product-card h3 {
    color: var(--dark-text);
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 600;
}

.product-card p {
    font-size: 15px;
    color: #666;
}

/* --- About & Features Layouts --- */
.about-layout,
.features-layout {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.about-image,
.features-image {
    flex: 1 1 450px;
}

.about-content,
.features-content {
    flex: 1 1 450px;
}

.about-content h2,
.features-content h2 {
    font-size: 40px;
    color: var(--dark-text);
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
}

.subtitle {
    color: var(--primary-blue);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

/* --- Features List --- */
.features-list {
    list-style: none;
    margin-top: 30px;
}

.features-list li {
    margin-bottom: 30px;
    padding-left: 45px;
    position: relative;
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--white);
    font-weight: bold;
    background: var(--primary-blue);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.features-list h4 {
    color: var(--dark-text);
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 600;
}

.features-list p {
    font-size: 15px;
    color: #666;
}

/* ==========================================================================
   5. CALL TO ACTION SECTION
   ========================================================================== */
.cta-section {
    background-color: var(--primary-blue);
    background-image: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    text-align: center;
    color: var(--white);
    padding: 80px 5%;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--white);
    line-height: 1.2;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-section .cta-btn {
    background: var(--white);
    color: var(--primary-blue) !important;
    padding: 16px 40px;
    font-size: 16px;
    display: inline-block;
    transition: all 0.3s ease;
}

.cta-section .cta-btn:hover {
    background: var(--dark-text);
    color: var(--white) !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* ==========================================================================
   6. INNER PAGES (About Us, Contact, etc.)
   ========================================================================== */

/* --- Hero Section for Inner Pages --- */
.page-hero {
    position: relative;
    padding: 100px 5%;
    text-align: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--primary-blue);
    margin-bottom: 60px;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.page-hero-content {
    position: relative;
    z-index: 2;
}

.page-hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin: 0;
    color: var(--white);
    line-height: 1.2;
}

/* --- Inner Page Layout --- */
.dotplast-page-layout {
    padding: 60px 5%;
    background: var(--white);
    width: 100%;
}

.page-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* --- About Page Specific Layout --- */
.about-page-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto 80px;
}

.about-page-image {
    height: 100%;
}

.about-page-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    display: block;
}

.about-page-content .page-title {
    font-size: 38px;
    color: var(--dark-text);
    margin-top: 0;
    margin-bottom: 25px;
    line-height: 1.2;
    font-weight: 700;
}

.about-text-content p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--body-text);
    margin-bottom: 20px;
    text-align: justify;
}

/* --- Standard Page Content --- */
.page-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.page-title {
    font-size: 42px;
    color: var(--dark-text);
    font-weight: 700;
    margin: 0;
}

.page-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--body-text);
}

/* --- Why Choose Us Section --- */
.why-choose-us-section {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.why-title {
    font-size: 32px;
    color: var(--dark-text);
    margin-bottom: 20px;
    font-weight: 700;
}

.why-content p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--body-text);
    margin-bottom: 15px;
    text-align: justify;
}

/* ==========================================================================
   FOOTER STYLING
   ========================================================================== */
.site-footer {
    background: var(--footer-bg);
    color: #aaa;
    padding: 70px 5% 20px;
    font-size: 15px;
    line-height: 1.7;
}

/* Grid Layout for 4 Columns */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr; /* Wider for mission & newsletter */
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 50px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--primary-blue);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-col p {
    color: #aaa;
    font-size: 14px;
}

/* Menu Links in Footer (Column 2) */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu li a {
    color: #aaa;
    font-size: 15px;
    transition: color 0.3s;
}

.footer-menu li a:hover {
    color: var(--white);
    padding-left: 5px;
}

/* Legal Links (Column 3) */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links li a {
    color: #aaa;
    font-size: 15px;
    transition: color 0.3s;
}

.footer-links li a:hover {
    color: var(--white);
    padding-left: 5px;
}

/* Newsletter Form (Column 4) */
.newsletter-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: none;
    border-radius: 4px;
    background: #444;
    color: var(--white);
    font-size: 14px;
    box-sizing: border-box;
}

.newsletter-form input::placeholder {
    color: #888;
}

.newsletter-form button {
    width: 100%;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: var(--primary-blue-dark);
}

/* Footer Bottom: Copyright + Contact + Socials */
.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom-left p {
    margin: 0;
    font-size: 14px;
    color: #888;
}

.footer-bottom-right {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* Contact Info in Footer */
.footer-contact {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-contact a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-contact a svg {
    width: 16px;
    height: 16px;
    fill: var(--primary-blue);
}

.footer-contact a:hover {
    color: var(--white);
}

/* Social Icons in Footer */
.footer-socials {
    display: flex;
    gap: 15px;
    align-items: center;
    border-left: 1px solid #555;
    padding-left: 20px;
}

.footer-socials a {
    color: #aaa;
    transition: color 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
}

.footer-socials a svg {
    width: 18px;
    height: 18px;
}

.footer-socials a:hover {
    color: var(--primary-blue);
    transform: translateY(-2px);
}

/* ==========================================================================
   RESPONSIVE FOOTER
   ========================================================================== */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-right {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-contact {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-socials {
        border-left: none;
        padding-left: 0;
    }
}
/* ==========================================================================
   8. MOBILE BOTTOM BAR (Fixed Call/WhatsApp/Email)
   ========================================================================== */
.mobile-bottom-bar {
    display: none;
}

/* ==========================================================================
   9. RESPONSIVE / MOBILE VIEW
   ========================================================================== */
@media (max-width: 992px) {
    /* --- Mobile Header --- */
    .header-top {
        display: none !important; /* Hides the top bar on mobile */
    }

    .header-main {
        flex-wrap: wrap;
    }

    .site-title {
        font-size: 22px;
        white-space: normal;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        margin-top: 15px;
        background: var(--white);
        border-top: 1px solid #eee;
        padding-top: 15px;
    }

    .main-nav.active {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links li a {
        padding: 15px 0;
        border-bottom: 1px solid #eee;
        width: 100%;
    }

    .nav-links .sub-menu {
        position: static;
        box-shadow: none;
        padding-left: 20px;
        display: block;
        border: none;
    }

    .btn-quote {
        width: 100%;
        text-align: center;
        margin-top: 15px;
    }

    /* --- Mobile Bottom Bar --- */
    .mobile-bottom-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 9999;
        justify-content: space-around;
        align-items: center;
        padding: 10px 0;
        border-top: 1px solid #eee;
    }

    .mobile-bottom-bar a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--dark-text);
        font-size: 12px;
        font-weight: 600;
        text-decoration: none;
        flex: 1;
        gap: 5px;
    }

    .mobile-bottom-bar a svg {
        width: 20px;
        height: 20px;
        fill: var(--primary-blue);
    }

    /* --- Layout Adjustments --- */
    body {
        padding-bottom: 70px; /* Space for the bottom bar */
    }

    .hero-slider {
        height: 60vh;
    }

    .hero-text h2 {
        font-size: 32px;
    }

    .hero-text p {
        font-size: 16px;
    }

    .about-layout,
    .features-layout {
        flex-direction: column;
        gap: 40px;
    }

    .cta-content h2 {
        font-size: 28px;
    }

    .cta-content p {
        font-size: 16px;
    }

    .page-hero {
        padding: 70px 5%;
    }

    .page-hero-content h1 {
        font-size: 36px;
    }

    .about-page-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-page-image img {
        height: auto;
    }

    .about-page-content .page-title {
        font-size: 32px;
    }

    .page-title {
        font-size: 32px;
    }
}

/* --- ALTERNATING CONTENT LAYOUT FOR PRODUCT PAGES --- */
.entry-content {
    display: flex;
    flex-direction: column;
    gap: 60px; /* Space between each product block */
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* 1. Force Media & Text blocks to be full width and grid-based */
.entry-content .wp-block-media-text {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 60px !important;
    align-items: center !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-bottom: 0 !important; /* We use the flex gap above */
    padding-bottom: 40px;
    border-bottom: 1px solid #f0f0f0;
}

/* Remove border from the last item */
.entry-content .wp-block-media-text:last-child {
    border-bottom: none;
}

/* 2. Style the Images */
.entry-content .wp-block-media-text__media img {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: block;
}

/* 3. Style the Text */
.entry-content .wp-block-media-text__content {
    padding: 0 !important;
}

.entry-content .wp-block-media-text__content h2,
.entry-content .wp-block-media-text__content h3 {
    font-size: 28px;
    color: var(--dark-text);
    margin-bottom: 15px;
    margin-top: 0;
    font-weight: 700;
}

.entry-content .wp-block-media-text__content p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--body-text);
    margin-bottom: 15px;
    text-align: justify;
}

/* 4. Mobile Stacking */
@media (max-width: 992px) {
    .entry-content .wp-block-media-text {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    /* Ensures image is always on top on mobile, regardless of desktop alignment */
    .entry-content .wp-block-media-text .wp-block-media-text__media {
        order: 1;
    }
    .entry-content .wp-block-media-text .wp-block-media-text__content {
        order: 2;
    }
}

/* ==========================================================
   AUTOMATIC ALTERNATING PRODUCT LAYOUT (Classic Editor)
   ========================================================== */

/* 1. Reset the content area to be a clean container */
.entry-content {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* 2. Style Every Image as a Full-Width Block */
.entry-content img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: block;
    margin: 0 auto;
}

/* 3. Create the Alternating Grid using CSS Flexbox */
.entry-content {
    /* We use a special technique: every image and heading pairs up with the following paragraph */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

/* 4. Force the grid to alternate: 
      Even children (image 1, image 2, etc.) go on the left.
      Odd children (text 1, text 2, etc.) go on the right. */
.entry-content > *:nth-child(odd) {
    grid-column: 1 / 2; /* Left Column */
    margin-bottom: 60px;
}

.entry-content > *:nth-child(even) {
    grid-column: 2 / 3; /* Right Column */
    margin-bottom: 60px;
    padding-top: 30px; /* Nudge text down to align with image */
}

/* 5. Fix the title and breadcrumb layout */
.entry-content h1, 
.entry-content h2 {
    grid-column: 1 / -1; /* Span full width */
    font-size: 28px;
    color: var(--dark-text);
    font-weight: 700;
    margin-bottom: 15px;
    text-align: left;
}

.entry-content p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--body-text);
    margin-bottom: 20px;
    text-align: justify;
}

/* 6. Mobile View: Stack Everything */
@media (max-width: 992px) {
    .entry-content {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    .entry-content > * {
        grid-column: 1 / -1 !important;
        margin-bottom: 20px !important;
        padding-top: 0 !important;
    }
}

/* ==========================================================
   CUSTOM ALTERNATING PRODUCT LAYOUT
   ========================================================== */
.dotplast-product-layout {
    display: flex;
    flex-direction: column;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

.product-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center !important; /* Force vertical centering */
    min-height: 100%; /* Ensures row stretches properly */
}

/* Ensure the text and image cells stretch to fill the row height */
.product-row .product-image,
.product-row .product-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

/* Optional: Make the image look more balanced */
.product-row .product-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: block;
    margin: 0 auto;
}

/* Image Left, Text Right */
.product-row.image-left .product-image { grid-column: 1; }
.product-row.image-left .product-text { grid-column: 2; }

/* Image Right, Text Left */
.product-row.image-right .product-image { grid-column: 2; }
.product-row.image-right .product-text { grid-column: 1; }

/* Style the Image */
.product-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: block;
}

/* Style the Text */
.product-text h2 {
    font-size: 28px;
    color: var(--dark-text);
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
}

.product-text p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--body-text);
    margin-bottom: 15px;
    text-align: justify;
}

/* Mobile Stacking */
@media (max-width: 992px) {
    .product-row {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
    .product-row .product-image { grid-column: 1 !important; }
    .product-row .product-text { grid-column: 1 !important; }
}

/* ==========================================================
   FORCE CUSTOM PRODUCT LAYOUT (Overrides Default WordPress)
   ========================================================== */

/* 1. Reset the default WordPress block layout */
.entry-content .wp-block-media-text,
.entry-content .wp-block-image,
.entry-content .wp-block-group,
.entry-content > * {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 2. If using the Product Details meta box, force alternating layout */
.dotplast-product-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 60px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
}

.product-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 60px !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 20px !important;
}

/* 3. Alternate image positions */
.product-row.image-left .product-image {
    grid-column: 1 !important;
    grid-row: 1 !important;
}
.product-row.image-left .product-text {
    grid-column: 2 !important;
    grid-row: 1 !important;
}

.product-row.image-right .product-image {
    grid-column: 2 !important;
    grid-row: 1 !important;
}
.product-row.image-right .product-text {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

/* 4. Style the images */
.product-image img {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    display: block !important;
    margin: 0 auto !important;
}

/* 5. Style the text */
.product-text h2 {
    font-size: 28px !important;
    color: var(--dark-text) !important;
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    font-weight: 700 !important;
}

.product-text p {
    font-size: 17px !important;
    line-height: 1.8 !important;
    color: var(--body-text) !important;
    margin-bottom: 15px !important;
    text-align: justify !important;
}

/* 6. Mobile */
@media (max-width: 992px) {
    .product-row {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .product-row .product-image {
        grid-column: 1 !important;
        grid-row: 1 !important;
        order: 1 !important;
    }
    
    .product-row .product-text {
        grid-column: 1 !important;
        grid-row: 2 !important;
        order: 2 !important;
    }
}

/* ==========================================================
   MOBILE FIX FOR PRODUCT LAYOUT (Must be at the very bottom)
   ========================================================== */

@media (max-width: 992px) {
    
    /* 1. Override the desktop grid to stack everything vertically */
    .dotplast-product-layout {
        display: block !important; /* Changes from grid to block */
        padding: 20px 15px !important;
    }
    
    .product-row {
        display: flex !important;
        flex-direction: column !important; /* Stack vertically */
        grid-template-columns: 1fr !important; /* Force single column */
        gap: 20px !important;
        margin-bottom: 50px !important;
        width: 100% !important;
    }
    
    /* 2. Reset ALL grid positioning from desktop */
    .product-row.image-left .product-image,
    .product-row.image-left .product-text,
    .product-row.image-right .product-image,
    .product-row.image-right .product-text {
        grid-column: auto !important; /* Remove grid positioning */
        grid-row: auto !important;    /* Remove grid row positioning */
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }
    
    /* 3. Force image to show first, text second */
    .product-row .product-image {
        order: 1 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-bottom: 15px !important;
    }
    
    .product-row .product-image img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        display: block !important;
        border-radius: 8px !important;
    }
    
    .product-row .product-text {
        order: 2 !important;
        display: block !important;
        width: 100% !important;
    }
    
    /* 4. Fix typography for mobile */
    .product-text h2 {
        font-size: 22px !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
        word-wrap: break-word !important;
    }
    
    .product-text p {
        font-size: 15px !important;
        line-height: 1.6 !important;
        text-align: left !important;
        margin-bottom: 15px !important;
    }
}

/* ==========================================================
   CONTACT PAGE LAYOUT
   ========================================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto 60px;
    align-items: start;
}

/* Left Side: Contact Info */
.contact-info-box {
    background: var(--light-bg);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.contact-info-box h2 {
    font-size: 32px;
    color: var(--dark-text);
    margin-bottom: 20px;
    font-weight: 700;
}

.contact-info-box > p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--body-text);
    margin-bottom: 30px;
}

.contact-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-details li {
    padding: 15px 0;
    border-bottom: 1px solid #e5e5e5;
    font-size: 16px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-details li:last-child {
    border-bottom: none;
}

.contact-details strong {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-details a {
    color: var(--dark-text);
    font-weight: 500;
}

.contact-details a:hover {
    color: var(--primary-blue);
}

/* Right Side: Form */
.contact-form-box {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.contact-form-box h2 {
    font-size: 32px;
    color: var(--dark-text);
    margin-bottom: 30px;
    font-weight: 700;
}

.contact-form-box input,
.contact-form-box textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    margin-bottom: 15px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.contact-form-box input:focus,
.contact-form-box textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.contact-form-box .btn-quote {
    border: none;
    cursor: pointer;
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

/* Success / Error Messages */
.form-success {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    border-left: 4px solid #28a745;
}

.form-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    border-left: 4px solid #dc3545;
}

/* Google Map */
.contact-map {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.contact-map iframe {
    width: 100%;
    height: 400px;
    border: 0;
    display: block;
}

/* ==========================================================
   POPUP QUOTE FORM
   ========================================================== */
.quote-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.quote-popup-content {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: popupFadeIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.quote-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color 0.3s;
}

.quote-popup-close:hover {
    color: var(--dark-text);
}

.quote-popup-content h2 {
    font-size: 28px;
    color: var(--dark-text);
    margin-bottom: 25px;
    font-weight: 700;
    text-align: center;
}

.quote-popup-content input,
.quote-popup-content textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    margin-bottom: 15px;
    font-family: inherit;
}

.quote-popup-content input:focus,
.quote-popup-content textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.quote-popup-content .btn-quote {
    border: none;
    cursor: pointer;
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

/* ==========================================================
   MOBILE FIX
   ========================================================== */
@media (max-width: 992px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-info-box,
    .contact-form-box {
        padding: 30px 25px;
    }
    
    .contact-info-box h2,
    .contact-form-box h2 {
        font-size: 26px;
    }
    
    .contact-map iframe {
        height: 300px;
    }
    
    .quote-popup-content {
        padding: 30px 25px;
    }
}

/* Hide any duplicate "Send Us a Message" headings */
.contact-form-box h2:nth-of-type(2) {
    display: none !important;
}

/* ==========================================================
   FULL WIDTH GOOGLE MAP
   ========================================================== */
.contact-map-full-width {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 60px;
    margin-bottom: 0;
}

.contact-map-full-width iframe {
    width: 100% !important;
    height: 450px !important;
    border: 0;
    display: block;
}

@media (max-width: 768px) {
    .contact-map-full-width iframe {
        height: 300px !important;
    }
}

/* ==========================================================
   GLOBAL POPUP QUOTE FORM
   ========================================================== */
.quote-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.quote-popup-content {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: popupFadeIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.quote-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color 0.3s;
}

.quote-popup-close:hover {
    color: var(--dark-text);
}

.quote-popup-content h2 {
    font-size: 28px;
    color: var(--dark-text);
    margin-bottom: 10px;
    font-weight: 700;
    text-align: center;
}

.quote-popup-content > p {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 15px;
}

.quote-popup-content input,
.quote-popup-content textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    margin-bottom: 15px;
    font-family: inherit;
    box-sizing: border-box;
}

.quote-popup-content input:focus,
.quote-popup-content textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.quote-popup-content .btn-quote {
    border: none;
    cursor: pointer;
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

.quote-popup-content .form-success,
.quote-popup-content .form-error {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}