/* =========================================
   GymBag.com.au - Styles
   Modern, Clean, and Responsive Design
   ========================================= */

/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --dark: #1f2937;
    --dark-light: #374151;
    --gray: #6b7280;
    --gray-light: #9ca3af;
    --light: #f3f4f6;
    --lighter: #f9fafb;
    --white: #ffffff;
    --danger: #ef4444;
    --success: #22c55e;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

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

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 2px solid var(--light);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-amazon {
    background: #ff9900;
    color: var(--dark);
}

.btn-amazon:hover {
    background: #e68a00;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-icon {
    font-size: 1.75rem;
}

.logo-text {
    color: var(--dark);
}

.logo-au {
    color: var(--primary);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: var(--gray);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--lighter) 0%, var(--white) 100%);
}

.hero-content {
    max-width: 720px;
    text-align: center;
    margin: 0 auto;
}

.hero h1 {
    margin-bottom: 24px;
}

.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray);
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    margin-bottom: 12px;
}

.section-header p {
    color: var(--gray);
    font-size: 1.125rem;
}

/* Quiz Section */
.quiz-section {
    padding: 80px 0;
    background: var(--white);
}

.quiz-container {
    max-width: 640px;
    margin: 0 auto;
    background: var(--lighter);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.quiz-progress {
    margin-bottom: 32px;
}

.progress-bar {
    height: 8px;
    background: var(--light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 20%;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--gray);
}

.quiz-question {
    margin-bottom: 24px;
}

.quiz-question h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--white);
    border: 2px solid var(--light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.quiz-option:hover {
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.05);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.quiz-option-icon {
    font-size: 1.5rem;
}

.quiz-option-text {
    font-weight: 500;
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

.quiz-result {
    text-align: center;
}

.quiz-result h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--secondary);
}

.quiz-result p {
    margin-bottom: 24px;
    color: var(--gray);
}

.quiz-recommendations {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.quiz-recommendation {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius);
    text-align: left;
}

.quiz-emoji {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 2.5rem;
    flex-shrink: 0;
}

.quiz-recommendation-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.quiz-recommendation-info p {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 8px;
}

/* Products Section */
.products-section {
    padding: 80px 0;
    background: var(--lighter);
}

.filters {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 32px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: var(--gray);
    white-space: nowrap;
}

.filter-select {
    padding: 10px 16px;
    border: 2px solid var(--light);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:hover, .filter-select:focus {
    border-color: var(--primary);
    outline: none;
}

.view-toggle {
    display: flex;
    gap: 4px;
    margin-left: auto;
    padding: 4px;
    background: var(--light);
    border-radius: var(--radius-sm);
}

.view-btn {
    padding: 8px;
    border-radius: 6px;
    color: var(--gray);
    transition: var(--transition);
}

.view-btn:hover {
    color: var(--dark);
}

.view-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    height: 200px;
    background: var(--lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-emoji {
    font-size: 5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: var(--transition);
}

.product-card:hover .product-emoji {
    transform: scale(1.15);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
}

.product-badge.bestseller {
    background: var(--accent);
}

.product-badge.new {
    background: var(--secondary);
}

.product-content {
    padding: 20px;
}

.product-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    color: var(--accent);
    font-size: 0.875rem;
}

.rating-count {
    font-size: 0.875rem;
    color: var(--gray);
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.feature-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: var(--lighter);
    color: var(--gray);
    border-radius: 20px;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--light);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.product-actions {
    display: flex;
    gap: 8px;
}

.compare-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--light);
    border-radius: var(--radius-sm);
    color: var(--gray);
    transition: var(--transition);
}

.compare-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.compare-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Product Table */
.products-table-container {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th,
.products-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--light);
}

.products-table th {
    background: var(--lighter);
    font-weight: 600;
    color: var(--dark);
    white-space: nowrap;
}

.products-table tr:hover {
    background: var(--lighter);
}

.table-product {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-emoji {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 2rem;
    flex-shrink: 0;
}

.table-product-name {
    font-weight: 600;
}

.table-features {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Compare Section */
.compare-section {
    padding: 80px 0;
    background: var(--white);
}

.compare-container {
    max-width: 960px;
    margin: 0 auto;
}

.compare-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.compare-slot {
    min-height: 200px;
    border: 2px dashed var(--light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.compare-slot:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.compare-slot.filled {
    border-style: solid;
    border-color: var(--primary-light);
    background: var(--lighter);
    flex-direction: column;
    padding: 16px;
}

.slot-placeholder {
    text-align: center;
    color: var(--gray);
}

.plus-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
}

.compare-slot-product {
    text-align: center;
    width: 100%;
}

.compare-emoji {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 3.5rem;
}

.compare-slot-product h4 {
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.compare-slot-product p {
    font-size: 0.875rem;
    color: var(--gray);
}

.remove-compare {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--danger);
    color: var(--white);
    border-radius: 50%;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-slot.filled {
    position: relative;
}

.compare-table-wrapper {
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--lighter);
    border-radius: var(--radius);
    overflow: hidden;
}

.compare-table th,
.compare-table td {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid var(--light);
}

.compare-table th {
    background: var(--white);
    font-weight: 600;
    text-align: left;
    width: 150px;
}

.compare-table td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--gray);
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background: var(--lighter);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--gray);
    font-size: 0.9375rem;
}

/* SEO Section */
.seo-section {
    padding: 80px 0;
    background: var(--white);
}

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

.seo-content h2 {
    margin-bottom: 24px;
    font-size: 1.75rem;
}

.seo-content h3 {
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--dark);
}

.seo-content p {
    margin-bottom: 16px;
    color: var(--dark-light);
    line-height: 1.8;
}

.seo-content em {
    display: block;
    margin-top: 32px;
    padding: 16px;
    background: var(--lighter);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--gray);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 64px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--gray-light);
    margin-top: 16px;
    font-size: 0.9375rem;
}

.footer-brand .logo-text {
    color: var(--white);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-column h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer-column a {
    display: block;
    color: var(--gray-light);
    padding: 6px 0;
    transition: var(--transition);
    font-size: 0.9375rem;
}

.footer-column a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--dark-light);
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-light);
    font-size: 0.875rem;
}

.affiliate-disclosure {
    margin-top: 8px;
    font-size: 0.75rem !important;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 1.5rem;
    color: var(--gray);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--dark);
}

.modal-content h3 {
    margin-bottom: 24px;
}

.modal-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-product {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid var(--light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.modal-product:hover {
    border-color: var(--primary);
}

.modal-emoji {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.modal-product-info {
    flex: 1;
}

.modal-product-info h4 {
    font-size: 0.9375rem;
}

.modal-product-info p {
    font-size: 0.875rem;
    color: var(--gray);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        box-shadow: var(--shadow-md);
    }

    .nav.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select {
        flex: 1;
    }

    .view-toggle {
        margin-left: 0;
        justify-content: center;
    }

    .compare-slots {
        grid-template-columns: 1fr;
    }

    .compare-slot {
        min-height: 120px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .quiz-container {
        padding: 24px;
    }

    .products-table-container {
        margin: 0 -24px;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .product-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .product-actions {
        justify-content: stretch;
    }

    .product-actions .btn {
        flex: 1;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeIn 0.5s ease forwards;
}

.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.3s; }
.product-card:nth-child(5) { animation-delay: 0.4s; }
.product-card:nth-child(6) { animation-delay: 0.5s; }
