/**
 * Template: Template Home Fitness Gear
 * Website: repcave.com
 * Description: A modern, stylish, and aesthetically pleasing page.
 */

/* ==========================================================================
   1. FONT IMPORT & DESIGN SYSTEM (VARIABLES)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@600;700&display=swap');

:root {
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    --color-primary: #E53935;
    --color-primary-dark: #C62828;
    --color-secondary: #1E88E5;
    --color-text-dark: #2c3e50;
    --color-text-light: #5a6a7a;
    --color-bg-light: #FFFFFF;
    --color-bg-alt: #F9FAFB;
    --color-border: #EAECEF;
    --section-padding: 6rem;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}


/* ==========================================================================
   2. GLOBAL STYLES & THE FULL-WIDTH TACTIC
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.full-width-background {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

h1, h2, h3, h4 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-dark);
}

h1 span, h2 span, h3 span { color: var(--color-primary); }

p { margin-bottom: 1rem; color: var(--color-text-light); }
p:last-child { margin-bottom: 0; }

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

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

.section-title { font-size: 2.8rem; text-align: center; margin-bottom: 1.25rem; }
.section-subtitle { font-size: 1.1rem; text-align: center; color: var(--color-text-light); margin-bottom: 3.5rem; max-width: 700px; margin-left: auto; margin-right: auto; }

.button { display: inline-block; padding: 14px 32px; font-size: 1rem; font-family: var(--font-secondary); text-decoration: none; border-radius: 8px; transition: all 0.3s ease; font-weight: 600; cursor: pointer; letter-spacing: 0.5px; text-align: center; border: 2px solid transparent; }


/* ==========================================================================
   3. HERO SECTION 
   ========================================================================== */

.gear-hero-section {
    background-color: var(--color-bg-alt);
    padding: var(--section-padding) 0;
    text-align: center;
}

.gear-hero-section .hero-title {
    font-size: 3.8rem;
    color: var(--color-text-dark);
    margin-bottom: 1.5rem;
}

.gear-hero-section .hero-description {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.7;
    color: var(--color-text-light);
}

.primary-button { 
    background-color: var(--color-primary); 
    color: #fff; 
    border-color: var(--color-primary);
}
.primary-button:hover { 
    background-color: var(--color-primary-dark); 
    border-color: var(--color-primary-dark);
    transform: translateY(-3px); 
    box-shadow: var(--shadow-lg); 
}


/* ==========================================================================
   4. CARD & GRID SECTIONS (UPDATED)
   ========================================================================== */

.featured-gear-section {
    padding: var(--section-padding) 0;
    background-color: var(--color-bg-light);
}

.all-gear-section {
    background-color: var(--color-bg-alt);
    padding: var(--section-padding) 0;
}

/* --- Grid System --- */
.features-grid, .gear-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* --- .feature Card (Editor's Picks) --- */
.feature {
    background-color: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.feature:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}
.feature .feature-icon { font-size: 2.5rem; color: var(--color-primary); margin-bottom: 1.25rem; }
.feature .feature-title { font-size: 1.4rem; margin-bottom: 0.75rem; }
.feature .feature-description { color: var(--color-text-light); flex-grow: 1; margin-bottom: 1.5rem; }
.feature .button.explore-now {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-border);
}
.feature .button.explore-now:hover {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* --- .gear-item Card (Product Listing) --- */
.gear-item {
    background-color: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.gear-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}
.gear-item .gear-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.gear-item .gear-title,
.gear-item .gear-description,
.gear-item .button.learn-more {
    margin-left: 30px;
    margin-right: 30px;
    text-align: left;
}
.gear-item .gear-title {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.gear-item .gear-description {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.gear-item .button.learn-more {
    margin-top: auto;
    margin-bottom: 30px;
    background-color: #fff;
    color: var(--color-text-dark);
    border-color: var(--color-border);
}
.gear-item .button.learn-more:hover {
    background-color: var(--color-text-dark);
    color: #fff;
    border-color: var(--color-text-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* --- Section Category Headings --- */
.all-gear-section .category-heading {
    text-align: center;
    font-weight: 600;
    font-size: 1.8rem;
    margin: 4rem auto 1.5rem auto;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
    max-width: 500px;
}
.all-gear-section .category-heading:first-of-type {
    margin-top: 0;
}


/* ==========================================================================
   5. GEAR QUIZ SECTION
   ========================================================================== */

.gear-quiz-section { padding: var(--section-padding) 0; background: linear-gradient(135deg, var(--color-bg-light) 0%, var(--color-bg-alt) 100%); }
.gear-quiz-section .quiz-content-wrapper { display: flex; align-items: center; gap: 4rem; background-color: #fff; padding: 4rem; border-radius: 16px; border: 1px solid var(--color-border); box-shadow: var(--shadow-lg); }
.gear-quiz-section .quiz-icon { font-size: 6rem; color: var(--color-primary); flex-shrink: 0; }
.gear-quiz-section .quiz-text-content .section-title,
.gear-quiz-section .quiz-text-content .section-subtitle { text-align: left; margin-left: 0; margin-right: 0; }
.gear-quiz-section .quiz-text-content .section-subtitle { max-width: none; margin-bottom: 2rem; }
.gear-quiz-section .button.primary-button { background-color: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.gear-quiz-section .button.primary-button:hover { background-color: var(--color-primary-dark); border-color: var(--color-primary-dark); transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ==========================================================================
   6. FINAL CTA SECTION 
   ========================================================================== */

.gear-cta-section {
    padding: var(--section-padding) 0;
    background-color: var(--color-text-dark);
    text-align: center;
}

.gear-cta-section .section-title, .gear-cta-section .section-subtitle { color: #fff; }
.gear-cta-section .cta-buttons { display: flex; justify-content: center; gap: 1.5rem; margin-top: 2.5rem; flex-wrap: wrap; }
.gear-cta-section .button.start-exploring { background-color: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.gear-cta-section .button.start-exploring:hover { background-color: var(--color-primary-dark); border-color: var(--color-primary-dark); transform: translateY(-3px); }
.gear-cta-section .button.explore { background-color: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.gear-cta-section .button.explore:hover { background-color: #fff; color: var(--color-text-dark); border-color: #fff; }

/* ==========================================================================
   7. RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 992px) {
    :root { --section-padding: 4.5rem; }
    .section-title { font-size: 2.5rem; }
    .gear-hero-section .hero-title { font-size: 3rem; }
    .gear-quiz-section .quiz-content-wrapper { gap: 2.5rem; padding: 3rem; }
    .gear-quiz-section .quiz-icon { font-size: 5rem; }
}

@media (max-width: 768px) {
    :root { --section-padding: 3.5rem; }
    .section-title { font-size: 2.2rem; }
    .section-subtitle { margin-bottom: 2.5rem; }
    .gear-hero-section { min-height: 50vh; }
    .gear-hero-section .hero-title { font-size: 2.5rem; }
    .gear-hero-section .hero-description { font-size: 1.1rem; }
    .gear-quiz-section .quiz-content-wrapper { flex-direction: column; text-align: center; padding: 3rem 2rem; }
    .gear-quiz-section .quiz-text-content .section-title,
    .gear-quiz-section .quiz-text-content .section-subtitle { text-align: center; }
    .gear-cta-section .cta-buttons { flex-direction: column; align-items: center; gap: 1rem; }
    .gear-cta-section .cta-buttons .button { width: 100%; max-width: 320px; }
}

/* General Styling - Fix Overflow */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #fff;
    overflow-x: hidden; /* Ensure no horizontal overflow */
    width: 100%; /* Explicitly set body width */
}

/* Full-Width Background Fix */
.full-width-background {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    /* Add this to handle scrollbar width on desktop */
    margin-right: calc(-50vw + 8px); /* Adjust for scrollbar width (typically 8px on desktop) */
}

/* Container Adjustment */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%; /* Ensure container doesn’t exceed viewport */
}

@media (max-width: 768px) {
    .full-width-background {
        margin-right: -50vw; /* Reset margin on mobile to avoid unnecessary adjustment */
    }
}

/* Ensure No Unintended Widths or Margins */
.site-main {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Additional Debugging - Remove if Not Needed */
* {
    box-sizing: border-box;
    /* Uncomment to debug and identify overflow elements */
    /* outline: 1px solid red; */
}
