/* ============================================
   EthernetCable.com.au - Styles
   Modern, clean design with great UX
   ============================================ */

/* CSS Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --dark: #1e293b;
    --dark-light: #334155;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --danger: #ef4444;
    --success: #22c55e;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --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);
    --transition: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

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

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.section-title {
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 8px;
}

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

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

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

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

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

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

.btn-sm {
    padding: 8px 16px;
    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);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.logo:hover {
    color: var(--gray-900);
}

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

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--gray-600);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

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

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

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

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

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

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

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--gray-900), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.stat {
    text-align: center;
}

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

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

/* Categories */
.categories {
    padding: 80px 0;
    background: var(--white);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

.category-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-card.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.category-card.active h3,
.category-card.active p {
    color: var(--white);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
}

.category-price {
    font-weight: 600;
    color: var(--secondary);
}

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

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    color: var(--gray-700);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.filter-group select:hover {
    border-color: var(--primary);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.view-btn {
    padding: 8px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    color: var(--gray-500);
    transition: var(--transition);
}

.view-btn:hover {
    background: var(--gray-200);
}

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

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

.products-grid.list-view {
    grid-template-columns: 1fr;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.list-view .product-card {
    flex-direction: row;
}

.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;
    text-transform: uppercase;
}

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

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

.product-image {
    position: relative;
    padding: 1.5rem;
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.list-view .product-image {
    min-width: 200px;
    max-width: 200px;
}

.product-image-placeholder {
    width: 150px;
    height: 100px;
    background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.product-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.spec-tag {
    padding: 4px 8px;
    background: var(--gray-100);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: var(--accent);
}

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

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.product-price .currency {
    font-size: 1rem;
}

.product-actions {
    margin-top: auto;
}

.affiliate-disclosure {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 2rem;
}

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

.table-wrapper {
    overflow-x: auto;
    margin-bottom: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.compare-table th,
.compare-table td {
    padding: 1rem 1.25rem;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.compare-table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
}

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

.compare-table td.highlight {
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary);
    font-weight: 500;
}

.compare-table th.highlight {
    background: var(--primary);
    color: var(--white);
}

.compare-table tbody tr:hover {
    background: var(--gray-50);
}

.rating {
    color: var(--accent);
    letter-spacing: 2px;
}

.recommendation-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
}

.recommendation-box h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

/* Quiz Section */
.quiz-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--dark-light) 100%);
    color: var(--white);
}

.quiz-section .section-title {
    color: var(--white);
}

.quiz-section .section-subtitle {
    color: var(--gray-400);
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    color: var(--gray-800);
}

.quiz-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

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

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

.quiz-question {
    margin-bottom: 2rem;
}

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

.quiz-options {
    display: grid;
    gap: 1rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.quiz-option:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

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

.quiz-option input {
    display: none;
}

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

.quiz-option-text {
    flex: 1;
}

.quiz-option-text strong {
    display: block;
    margin-bottom: 0.25rem;
}

.quiz-option-text span {
    font-size: 0.875rem;
    color: var(--gray-500);
}

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

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

.quiz-result.hidden {
    display: none;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-title {
    margin-bottom: 1rem;
}

.result-recommendation {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

.result-recommendation h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.quiz-restart {
    margin-top: 1rem;
}

/* Guide Section */
.guide-section {
    padding: 80px 0;
    background: var(--gray-50);
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.guide-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.guide-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.guide-card h3 {
    margin-bottom: 1rem;
}

.guide-card p {
    color: var(--gray-600);
    line-height: 1.7;
}

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

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

.seo-content h2 {
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.seo-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.seo-content p {
    margin-bottom: 1rem;
    color: var(--gray-600);
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.7;
}

.footer-links h4 {
    color: var(--white);
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-700);
    text-align: center;
    font-size: 0.875rem;
}

.affiliate-notice {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--gray-100);
    }

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

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .products-grid {
        grid-template-columns: 1fr;
    }

    .list-view .product-card {
        flex-direction: column;
    }

    .list-view .product-image {
        max-width: 100%;
    }

    .compare-table {
        font-size: 0.875rem;
    }

    .compare-table th,
    .compare-table td {
        padding: 0.75rem;
    }

    .quiz-container {
        padding: 1.5rem;
    }

    .guide-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    .btn {
        width: 100%;
    }
}

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

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

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

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

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
