/* ================================================
   FINAL AGGRESSIVE FIXES - STRONG OVERRIDES
   This will definitely fix all spacing and button issues
   ================================================ */

/* ===== HIDE SCROLL BUTTON COMPLETELY ===== */
#scrollTopBtn,
button[onclick*="scrollToTop"],
.scroll-to-top,
[title="Scroll to Top"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ===== HEADER BUTTONS - FORCE SMALL SIZE ===== */
header button,
header .btn,
header .btn-primary,
header .btn-outline,
header a.btn-primary,
header a.btn-outline {
    padding: 8px 16px !important;
    font-size: 14px !important;
    min-width: auto !important;
    max-width: 150px !important;
    height: auto !important;
    line-height: 1.4 !important;
}

/* Get Quote button */
header a[href*="get-quote"],
header a[href*="quote"] {
    padding: 8px 20px !important;
    font-size: 14px !important;
}

/* Call button */
header a[href^="tel"] {
    padding: 8px 12px !important;
    font-size: 14px !important;
}

/* Cart button */
header a[href*="cart"] {
    padding: 8px 12px !important;
}

/* Account button */
header #accountButton,
header button[onclick*="Account"] {
    padding: 8px 12px !important;
}

/* ===== CONTAINER WIDTH - FORCE WIDER ===== */
.container-custom,
.container {
    max-width: 1400px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

@media (max-width: 768px) {
    .container-custom,
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* ===== SECTION SPACING - CLEAN & CONSISTENT ===== */
section,
.section {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
    margin: 0 !important;
}

/* First section after header */
section:first-of-type,
.pt-32 {
    padding-top: 7rem !important;
}

@media (max-width: 768px) {
    section,
    .section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    section:first-of-type,
    .pt-32 {
        padding-top: 5rem !important;
    }
}

/* ===== PRODUCT GRID - FORCE 4 COLUMNS ===== */
#productsGrid,
.products-grid,
.grid.lg\:grid-cols-3 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
}

@media (min-width: 640px) {
    #productsGrid,
    .products-grid,
    .grid.lg\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

@media (min-width: 1024px) {
    #productsGrid,
    .products-grid,
    .grid.lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2rem !important;
    }
}

@media (min-width: 1400px) {
    #productsGrid,
    .products-grid,
    .grid.lg\:grid-cols-3 {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 2.5rem !important;
    }
}

/* ===== CARDS - BETTER PROPORTIONS ===== */
.card {
    background: white !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
}

.card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.12) !important;
}

/* Card images */
.card .bg-gray-100,
.card-image {
    height: 250px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f3f4f6 !important;
}

/* Card content padding */
.card > div:not(.bg-gray-100) {
    padding: 1.5rem !important;
}

/* ===== HERO SECTION - FULL WIDTH ===== */
.hero,
.hero-section {
    width: 100% !important;
    padding: 5rem 0 !important;
}

@media (min-width: 1024px) {
    .hero,
    .hero-section {
        padding: 6rem 0 !important;
    }
}

/* Hero buttons */
.hero .btn-primary,
.hero-section .btn-primary {
    padding: 14px 32px !important;
    font-size: 16px !important;
}

/* ===== HEADING SPACING ===== */
h1 {
    margin-bottom: 1.5rem !important;
    line-height: 1.2 !important;
}

h2 {
    margin-bottom: 1.25rem !important;
    line-height: 1.3 !important;
}

h3 {
    margin-bottom: 1rem !important;
    line-height: 1.4 !important;
}

.text-center.mb-16 {
    margin-bottom: 3rem !important;
}

@media (min-width: 768px) {
    .text-center.mb-16 {
        margin-bottom: 4rem !important;
    }
}

/* ===== FLOATING BUTTONS - CLEAN ===== */
.floating-button {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.fixed.bottom-6.right-6 {
    bottom: 1.5rem !important;
    right: 1.5rem !important;
    gap: 0.75rem !important;
}

@media (max-width: 768px) {
    .floating-button {
        width: 44px !important;
        height: 44px !important;
    }
    
    .fixed.bottom-6.right-6 {
        bottom: 1rem !important;
        right: 1rem !important;
    }
}

/* ===== BUTTON GROUPS - CLEAN SPACING ===== */
.flex.flex-wrap.justify-center {
    gap: 1rem !important;
    margin-bottom: 3rem !important;
}

.flex.flex-wrap.justify-center button,
.flex.flex-wrap.justify-center .btn {
    padding: 10px 20px !important;
    font-size: 14px !important;
}

/* ===== REMOVE EXTRA WHITESPACE ===== */
* {
    margin: 0;
    padding: 0;
}

*,
*::before,
*::after {
    box-sizing: border-box !important;
}

/* ===== PREVENT HORIZONTAL SCROLL ===== */
body,
html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* ===== FOOTER SPACING ===== */
footer {
    padding: 4rem 0 2rem !important;
}

footer .container-custom {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* ===== FORM ELEMENTS ===== */
input,
textarea,
select {
    padding: 12px !important;
    font-size: 14px !important;
}

/* ===== CLEAN MARGINS ===== */
.mb-4 { margin-bottom: 1rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }
.mb-12 { margin-bottom: 3rem !important; }
.mb-16 { margin-bottom: 4rem !important; }

.mt-4 { margin-top: 1rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.mt-8 { margin-top: 2rem !important; }

.p-4 { padding: 1rem !important; }
.p-6 { padding: 1.5rem !important; }
.p-8 { padding: 2rem !important; }

/* ===== GRID UTILITIES ===== */
.gap-4 { gap: 1rem !important; }
.gap-6 { gap: 1.5rem !important; }
.gap-8 { gap: 2rem !important; }

/* ===== TEXT ALIGNMENT ===== */
.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 640px) {
    .hidden-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ===== CLEAN BORDERS ===== */
.card {
    border: 1px solid rgba(0,0,0,0.05) !important;
}

/* ===== SHADOWS ===== */
.shadow-sm {
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

.shadow {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

.shadow-lg {
    box-shadow: 0 10px 24px rgba(0,0,0,0.12) !important;
}

/* ===== FORCE CLEAN LAYOUT ===== */
section > .container-custom {
    width: 100% !important;
}

/* Remove any weird margins */
section > * {
    margin-top: 0 !important;
}

section > *:last-child {
    margin-bottom: 0 !important;
}

/* ===== STATS SECTION ===== */
.stats-section {
    padding: 5rem 0 !important;
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 5rem 0 !important;
}

/* ===== ENSURE EVERYTHING FITS ===== */
img {
    max-width: 100% !important;
    height: auto !important;
}

/* ===== TYPOGRAPHY ===== */
p {
    line-height: 1.7 !important;
    margin-bottom: 1rem !important;
}

/* ===== LINKS ===== */
a {
    text-decoration: none !important;
}

/* ===== HERO HEADING COLORS - PRESERVE IN BOTH THEMES ===== */
/* These colors MUST stay the same in both light and dark mode */
h1 .hero-word-blue,
span.hero-word-blue,
h1 span.hero-word-blue {
    color: #3b82f6 !important; /* Blue for ONE */
}

h1 .hero-word-pink,
span.hero-word-pink,
h1 span.hero-word-pink {
    color: #ec4899 !important; /* Pink for STOP */
}

h1 .hero-word-yellow,
span.hero-word-yellow,
h1 span.hero-word-yellow {
    color: #fbbf24 !important; /* Yellow for FOR */
}

/* Dark mode - same colors */
[data-theme="dark"] h1 .hero-word-blue,
[data-theme="dark"] span.hero-word-blue,
[data-theme="dark"] h1 span.hero-word-blue {
    color: #3b82f6 !important;
}

[data-theme="dark"] h1 .hero-word-pink,
[data-theme="dark"] span.hero-word-pink,
[data-theme="dark"] h1 span.hero-word-pink {
    color: #ec4899 !important;
}

[data-theme="dark"] h1 .hero-word-yellow,
[data-theme="dark"] span.hero-word-yellow,
[data-theme="dark"] h1 span.hero-word-yellow {
    color: #fbbf24 !important;
}

/* ===== FORCE OVERRIDE INLINE STYLES ===== */
/* All inline styles will be overridden by !important rules above */

/* ===== ABSOLUTE FINAL BUTTON COLOR OVERRIDE ===== */
/* Make every primary/outline button use the purple→blue palette */

.btn-primary,
.card .btn-primary,
.product-item .btn-primary,
button.btn-primary,
button[class*="btn-primary"],
a.btn-primary,
a[class*="btn-primary"] {
    background: linear-gradient(135deg, var(--secondary), var(--primary)) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

.btn-primary:hover,
.card .btn-primary:hover,
.product-item .btn-primary:hover,
button.btn-primary:hover,
a.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(37, 117, 252, 0.35) !important;
}

.btn-outline,
.card .btn-outline,
.product-item .btn-outline,
button.btn-outline,
a.btn-outline {
    background: transparent !important;
    color: var(--primary) !important;
    border: 2px solid var(--primary) !important;
}

.btn-outline:hover,
.card .btn-outline:hover,
.product-item .btn-outline:hover,
button.btn-outline:hover,
a.btn-outline:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary)) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}
