/* ============================================
   Location Page (Full Width) Layout Fix
   Restores display values that wp_kses strips.
   Uses attribute selectors - most sections have
   no class names, only inline styles.
   ============================================ */

/* ---- Badge pill: restore inline-block so it doesn't stretch full width ---- */
.location-page-full .ts-hero div[style*="border-radius:20px"] {
    display: inline-block !important;
}

/* ---- Restore display:grid for any element with grid-template-columns ---- */
/* Catches: product grid, How It Works, Why Choose, Pricing */
.location-page-full [style*="grid-template-columns"] {
    display: grid !important;
}

/* ---- Restore display:flex for FAQ accordion list ---- */
.location-page-full [style*="flex-direction:column"] {
    display: flex !important;
}

/* ---- Stats bar inner row ---- */
.location-page-full .ts-dbar > div {
    display: flex !important;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* ---- All button rows (hero CTA + bottom CTA + any justify-content:center flex row) ---- */
.location-page-full [style*="justify-content:center"][style*="gap:12px"],
.location-page-full [style*="gap:12px"][style*="flex-wrap:wrap"] {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* ---- WhatsApp button: keep green (brand-standard, users recognise it instantly) ---- */
.location-page-full a[href*="wa.me"] {
    display: inline-flex !important;
    align-items: center;
}
.location-page-full .bc-btn-wa,
.location-page-full a.bc-btn-wa {
    background: #25D366 !important;
    color: #fff !important;
}

/* ---- Call button: solid white so it reads as a real button ---- */
.location-page-full a[href^="tel:"] {
    display: inline-flex !important;
    align-items: center;
}
.location-page-full .bc-btn-call,
.location-page-full a.bc-btn-call {
    background: #fff !important;
    color: #1E3A5F !important;
    border: 2px solid rgba(255,255,255,0.6) !important;
}

/* ---- Product cards: Order Now button block ---- */
.location-page-full .ts-card a {
    display: block !important;
    text-align: center;
}

/* ---- BC product card images: taller so products show clearly ---- */
.location-page-full .bc-card-img {
    height: 150px !important;
}
.location-page-full .bc-card-img img {
    height: 150px !important;
}

/* ---- BC trust chips: slightly larger text for readability ---- */
.location-page-full .bc-chip {
    font-size: 13px !important;
    padding: 6px 16px !important;
}

/* ---- BC hero: add product image on desktop via right padding + pseudo ---- */
@media (min-width: 769px) {
    .location-page-full .bc-hero {
        position: relative;
        padding-right: 300px !important;
        min-height: 240px;
    }
    .location-page-full .bc-hero::after {
        content: '';
        position: absolute;
        right: 24px;
        top: 50%;
        transform: translateY(-50%);
        width: 240px;
        height: 180px;
        background: url('https://www.printigly.in/wp-content/uploads/2024/05/Standard-Visiting-Cards.webp') center/cover no-repeat;
        border-radius: 14px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.35);
        opacity: 0.92;
    }
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 768px) {
    /* Product grid: 2 columns */
    .location-page-full .ts-products [style*="grid-template-columns"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* How It Works: 2 columns on tablet */
    .location-page-full [style*="grid-template-columns:repeat(auto-fit,minmax(200px"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    .location-page-full .ts-dbar > div {
        gap: 16px;
    }

    /* BC product grid: 2 columns */
    .location-page-full .bc-products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* BC chip: wrap nicely */
    .location-page-full .bc-chips {
        gap: 6px !important;
    }
    .location-page-full .bc-chip {
        font-size: 12px !important;
        padding: 5px 12px !important;
    }

    /* BC card images: slightly shorter on tablet */
    .location-page-full .bc-card-img,
    .location-page-full .bc-card-img img {
        height: 130px !important;
    }
}

@media (max-width: 480px) {
    /* Product grid: still 2 columns */
    .location-page-full .ts-products [style*="grid-template-columns"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    /* How It Works: 1 column on small mobile */
    .location-page-full [style*="grid-template-columns:repeat(auto-fit,minmax(200px"] {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }

    /* CTA buttons: stack on very small screens */
    .location-page-full [style*="justify-content:center"][style*="gap:12px"],
    .location-page-full [style*="gap:12px"][style*="flex-wrap:wrap"] {
        flex-direction: column;
        align-items: center;
    }

    /* BC: stack CTA buttons */
    .location-page-full .bc-ctas,
    .location-page-full .bc-bottom-ctas {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .location-page-full .bc-btn-wa,
    .location-page-full .bc-btn-call {
        justify-content: center;
        text-align: center;
    }

    /* BC card images on mobile */
    .location-page-full .bc-card-img,
    .location-page-full .bc-card-img img {
        height: 100px !important;
    }

    /* BC FAQ: single column */
    .location-page-full .bc-faq-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ORDER ONLINE cards: 2 cols on mobile */
@media (max-width: 480px) {
    /* Product cards in ORDER ONLINE section */
    .location-page-full div[style*="grid-template-columns:repeat(auto-fit,minmax(190px"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    /* Product card images: reduce height on mobile */
    .location-page-full div[style*="border:2px solid #fed7aa"] img {
        height: 80px !important;
    }
    /* Ensure text in cards is readable */
    .location-page-full div[style*="border:2px solid #fed7aa"] h3 {
        font-size: 0.8rem !important;
    }
}

/* Fix: suppress empty wpautop paragraphs that create white space before ORDER ONLINE section */
.location-page-full .entry-content > p:empty,
.location-page-full .entry-content > p:last-of-type:has(br),
.location-page-full .entry-content > p:last-of-type:has(script) {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    height: 0 !important;
    display: block !important;
    overflow: hidden !important;
}
