/* ===== CSS Variables ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    --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;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul {
    list-style: none;
}

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

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

/* ===== Utility Classes ===== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    color: var(--secondary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 48px;
}

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

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

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

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

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

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

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

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

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

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

.nav {
    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(--secondary);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    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(--text);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 72px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #dbeafe 0%, #fef3c7 50%, #fce7f3 100%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
}

.hero-content {
    text-align: center;
    padding: 60px 0;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-title-line {
    display: block;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

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

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

.stat {
    text-align: center;
}

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

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

/* ===== Categories Section ===== */
.categories {
    background: var(--surface);
}

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

.category-card {
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

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

.category-card.active {
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
}

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

.category-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary);
}

.category-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== Products Section ===== */
.products {
    background: var(--background);
}

.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

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

.filter-group label {
    font-weight: 500;
    color: var(--text-muted);
}

.select-input {
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    background: var(--surface);
    cursor: pointer;
    transition: var(--transition);
}

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

.results-count {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

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

/* ===== Product Card ===== */
.product-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--accent);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
}

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

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

.product-image {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    overflow: hidden;
}

.product-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.02) 100%);
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.overlay-btn {
    background: white;
    color: var(--text);
    padding: 12px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

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

.product-info {
    padding: 20px;
}

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

.product-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--secondary);
    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.8125rem;
    color: var(--text-muted);
}

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

.current-price {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--secondary);
}

.original-price {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.discount-tag {
    background: #fef2f2;
    color: var(--error);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-cta {
    display: grid;
    gap: 8px;
}

.product-cta .btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 0.9375rem;
}

/* ===== Load More ===== */
.load-more-container {
    text-align: center;
    margin-top: 48px;
}

/* ===== Features Section ===== */
.features {
    background: var(--surface);
}

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

.feature-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    background: var(--background);
    transition: var(--transition);
}

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

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

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary);
}

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

/* ===== Newsletter Section ===== */
.newsletter {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
}

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

.newsletter-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.newsletter-content p {
    opacity: 0.9;
    margin-bottom: 32px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
}

.newsletter-input:focus {
    outline: 3px solid rgba(255, 255, 255, 0.3);
}

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

.newsletter-form .btn-primary:hover {
    background: var(--background);
}

/* ===== About/SEO Section ===== */
.about {
    background: var(--surface);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 24px;
    text-align: center;
}

.about-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 32px 0 16px;
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-content strong {
    color: var(--text);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--text-light);
    margin-top: 16px;
    max-width: 300px;
}

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

.footer-links h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-light);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 4px;
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

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

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

/* ===== Modal ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--background);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--border);
}

.modal-body {
    padding: 32px;
}

.modal-product-image {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    margin-bottom: 24px;
}

.modal-product-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal-product-description {
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.7;
}

.modal-product-features {
    margin-bottom: 24px;
}

.modal-product-features li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-muted);
}

.modal-product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--secondary);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    opacity: 0;
    transition: var(--transition);
}

.toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

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

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

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.15s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.25s; }
.product-card:nth-child(5) { animation-delay: 0.3s; }
.product-card:nth-child(6) { animation-delay: 0.35s; }

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

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

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

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-stats {
        gap: 32px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .footer-brand p {
        margin: 16px auto 0;
    }

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

    .filter-group {
        justify-content: space-between;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
    }

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

    .category-card {
        padding: 20px 16px;
    }

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

    .modal-body {
        padding: 24px;
    }
}

/* ===== Print Styles ===== */
@media print {
    .header,
    .hero-cta,
    .newsletter,
    .product-overlay,
    .modal,
    .toast {
        display: none !important;
    }
}
