/* =====================================================
   Responsive Design - Unique Furnaces
   ===================================================== */

/* Global overflow prevention */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Large Tablets & Small Desktops */
@media (max-width: 1024px) {
    .hero h1 { font-size: 40px; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 24px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .section-header h2 { font-size: 30px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tablets */
@media (max-width: 768px) {
    /* Header */
    .main-nav, .header-cta { display: none; }
    .mobile-toggle { display: block; }
    .header-inner { height: 64px; }

    /* Mobile Menu */
    .mobile-menu {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        z-index: 999;
        padding: 20px;
        overflow-y: auto;
    }
    .mobile-menu.open { display: block; }
    .mobile-menu a {
        display: block;
        padding: 14px 0;
        font-size: 16px;
        color: var(--text-primary);
        border-bottom: 1px solid var(--border);
    }
    .mobile-menu a.active { color: var(--primary); }
    .mobile-menu .mobile-dropdown a {
        padding-left: 20px;
        font-size: 14px;
        color: var(--text-secondary);
    }
    .mobile-menu .mobile-cta {
        margin-top: 20px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* Hero */
    .hero { min-height: auto; padding: 100px 0 60px; }
    .hero h1 { font-size: 32px; word-break: break-word; }
    .hero p { font-size: 16px; }
    .hero-content { max-width: 100%; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; justify-content: center; }

    /* Stats */
    .stats-bar { margin-top: -30px; padding: 20px; gap: 16px; }
    .stat-number { font-size: 32px; }

    /* Sections */
    .section { padding: 60px 0; }
    .section-header { max-width: 100%; }
    .section-header h2 { font-size: 26px; }
    .section-header p { font-size: 15px; }

    /* Products - center align cards on mobile */
    .products-grid { grid-template-columns: 1fr; justify-items: center; }
    .product-card { max-width: 420px; width: 100%; }
    .product-card-body { text-align: center; }
    .product-card-category { text-align: center; }
    .product-card h3 { text-align: center; }
    .product-card p { text-align: center; }
    .product-card-features { justify-content: center; }
    .product-card-footer { justify-content: center; gap: 16px; }
    .product-card-image { display: block; width: 100%; aspect-ratio: 1/1; }
    .product-card-image img { width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block; }
    .categories-grid { grid-template-columns: 1fr; }
    .category-card { text-align: center; }
    .category-card h3 { text-align: center; }
    .category-card p { text-align: center; }

    /* Trust */
    .trust-grid { grid-template-columns: 1fr; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }

    /* Page Hero */
    .page-hero { padding: 100px 0 40px; }
    .page-hero h1 { font-size: 28px; word-break: break-word; }

    /* CTA */
    .cta-section h2 { font-size: 26px; }
    .cta-section p { font-size: 16px; }
    .cta-buttons { flex-direction: column; align-items: center; }
    .cta-buttons .btn { width: 100%; justify-content: center; }

    /* Product Detail */
    .product-detail-layout { grid-template-columns: 1fr !important; }
    .product-sidebar { order: -1; }

    /* Specs table */
    .specs-table { display: block; overflow-x: auto; }
    .specs-table td:first-child { width: auto; min-width: 120px; }

    /* Breadcrumb */
    .breadcrumb-bar { margin-top: 64px; }
    .page-hero { margin-top: 64px; }
    .breadcrumb { flex-wrap: wrap; font-size: 13px; }

    /* Contact page layout */
    .contact-layout { grid-template-columns: 1fr !important; }

    /* Forms */
    .inquiry-form .grid-2,
    .inquiry-form [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

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

/* Mobile Phones */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero { padding: 90px 0 50px; }
    .hero h1 { font-size: 24px; }
    .hero-badge { font-size: 12px; padding: 6px 14px; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; }
    .stat-number { font-size: 24px; }
    .stat-label { font-size: 11px; }
    .btn { padding: 10px 20px; font-size: 14px; }
    .btn-lg { padding: 12px 24px; font-size: 14px; }
    .inquiry-form { padding: 20px 16px; }
    .inquiry-form h3 { font-size: 18px; }
    .section-header h2 { font-size: 22px; }
    .section-label { font-size: 11px; }
    .product-card-image { height: 180px; }
    .product-card-body { padding: 16px; }
    .product-card h3 { font-size: 16px; }
    .category-card { padding: 24px 16px; }
    .trust-card { padding: 24px 16px; }
    .whatsapp-float { width: 48px; height: 48px; font-size: 24px; bottom: 16px; right: 16px; }
    .back-to-top { bottom: 72px; right: 16px; width: 40px; height: 40px; }
    .footer-bottom { font-size: 12px; }
    .footer-brand .logo-text { font-size: 18px !important; }
    .page-hero h1 { font-size: 24px; }
    .page-hero p { font-size: 14px; }
    .faq-question { padding: 14px 16px; font-size: 14px; }
    .faq-answer { padding: 0 16px; }
    .faq-item.active .faq-answer { padding: 0 16px 14px; }

    /* Prevent any element from causing overflow */
    *, *::before, *::after { max-width: 100%; }
    table { display: block; overflow-x: auto; width: 100%; }
    pre, code { overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
}

/* Print Styles */
@media print {
    .site-header, .site-footer, .whatsapp-float, .back-to-top, .cta-section { display: none; }
    body { color: #000; background: #fff; }
    .hero { background: none; color: #000; padding: 20px 0; min-height: auto; }
    .hero h1 { color: #000; font-size: 24px; }
    a { color: #000; }
    .section { padding: 20px 0; }
}
