/* ========================================
   Mattress Topper Australia - Styles
   Modern, Responsive CSS for 2026
   ======================================== */

/* CSS Variables */
:root {
    /* Colors */
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --secondary: #10B981;
    --secondary-dark: #059669;
    --accent: #F59E0B;
    --accent-light: #FCD34D;

    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Semantic */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;

    /* Container */
    --container-max: 1280px;
    --container-padding: 1.5rem;
}

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

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

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul, ol {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: var(--shadow-md), 0 0 0 0 var(--primary-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 20px var(--primary-light);
}

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

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

.btn-success {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: var(--white);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

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

.header.scrolled {
    box-shadow: var(--shadow-md);
}

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

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

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

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

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

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

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

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

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

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

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

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 72px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.hero-content {
    position: relative;
    text-align: center;
    color: var(--white);
    padding: var(--space-3xl) 0;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    backdrop-filter: blur(5px);
}

.hero h1 {
    color: var(--white);
    margin-bottom: var(--space-lg);
}

.hero .highlight {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-3xl);
}

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

.hero-cta .btn-primary:hover {
    background: var(--gray-100);
}

.hero-cta .btn-secondary {
    background: var(--white);
    border-color: var(--white);
    color: var(--primary);
}

.hero-cta .btn-secondary:hover {
    background: var(--gray-100);
    color: var(--primary-dark);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-3xl);
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--white);
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.hero-scroll span {
    font-size: 0.75rem;
    display: block;
    margin-bottom: 0.5rem;
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid var(--white);
    border-radius: 12px;
    margin: 0 auto;
    position: relative;
}

.scroll-indicator::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--white);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 20px; }
}

/* ========================================
   FILTER BAR
   ======================================== */
.filter-bar {
    background: var(--white);
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 72px;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.filter-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

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

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

.filter-select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
    transition: all var(--transition);
}

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

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.filter-btn {
    margin-left: auto;
}

/* ========================================
   PRODUCTS SECTION
   ======================================== */
.products {
    padding: var(--space-3xl) 0;
    background: var(--gray-50);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-header h2 {
    margin-bottom: var(--space-sm);
}

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

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

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

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

.badge-deal {
    background: var(--error);
    color: var(--white);
}

.product-image {
    position: relative;
    padding-top: 66.67%;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    overflow: hidden;
}

.product-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}

.product-actions {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateY(0);
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
}

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

.product-content {
    padding: var(--space-lg);
}

.product-brand {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

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

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

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

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

.feature-tag {
    padding: 0.25rem 0.5rem;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--gray-600);
}

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

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

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

.discount {
    font-size: 0.875rem;
    color: var(--error);
    font-weight: 600;
}

.product-cta {
    display: flex;
    gap: 0.5rem;
}

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

.btn-compare {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--gray-100);
    color: var(--gray-600);
}

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

/* No Results */
.no-results {
    text-align: center;
    padding: var(--space-3xl);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
}

.no-results h3 {
    margin-bottom: var(--space-sm);
}

.no-results p {
    color: var(--gray-600);
    margin-bottom: var(--space-lg);
}

/* ========================================
   COMPARE SECTION
   ======================================== */
.compare-section {
    padding: var(--space-3xl) 0;
    background: var(--white);
}

.compare-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.compare-slot {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-xl);
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    position: relative;
}

.compare-slot.filled {
    border-style: solid;
    border-color: var(--primary);
}

.compare-slot-empty {
    text-align: center;
    color: var(--gray-400);
    cursor: pointer;
    padding: var(--space-xl);
}

.compare-slot-empty:hover {
    color: var(--primary);
}

.plus-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--space-sm);
}

.compare-slot-product {
    width: 100%;
    padding: var(--space-lg);
}

.remove-compare {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--error);
    color: var(--white);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

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

.compare-table th:first-child {
    width: 150px;
    font-weight: 600;
    color: var(--gray-600);
}

.compare-table td {
    text-align: center;
}

.compare-highlight {
    background: var(--primary-light);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* ========================================
   GUIDE SECTION
   ======================================== */
.guide-section {
    padding: var(--space-3xl) 0;
    background: var(--gray-50);
}

.guide-tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.guide-tab {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-300);
    transition: all var(--transition);
}

.guide-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.guide-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.guide-panel {
    display: none;
}

.guide-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.guide-card {
    background: var(--white);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

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

.guide-card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.guide-card h3 {
    margin-bottom: var(--space-sm);
}

.guide-card p {
    color: var(--gray-600);
    margin-bottom: var(--space-md);
}

.guide-card ul {
    font-size: 0.875rem;
}

.guide-card li {
    padding: 0.25rem 0;
    color: var(--gray-600);
}

/* Materials Panel */
.materials-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.material-item {
    background: var(--white);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.material-item h3 {
    margin-bottom: var(--space-md);
}

.material-specs {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.spec {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Sizes Panel */
.sizes-table-wrapper {
    overflow-x: auto;
    margin-bottom: var(--space-lg);
}

.sizes-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.sizes-table th,
.sizes-table td {
    padding: 1rem 1.5rem;
    text-align: left;
}

.sizes-table thead {
    background: var(--primary);
    color: var(--white);
}

.sizes-table tbody tr:nth-child(even) {
    background: var(--gray-50);
}

.sizes-table tbody tr:hover {
    background: var(--primary-light);
    color: var(--white);
}

.size-tip {
    background: var(--accent-light);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    color: var(--gray-800);
}

/* Care Panel */
.care-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
}

.care-item {
    display: flex;
    gap: var(--space-md);
    background: var(--white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.care-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.care-item h4 {
    margin-bottom: 0.25rem;
}

.care-item p {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ========================================
   FAQ SECTION
   ======================================== */
.faq-section {
    padding: var(--space-3xl) 0;
    background: var(--white);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--gray-200);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) 0;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--gray-900);
    transition: color var(--transition);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding-bottom: var(--space-lg);
    color: var(--gray-600);
    line-height: 1.8;
}

/* ========================================
   SEO SECTION
   ======================================== */
.seo-section {
    padding: var(--space-3xl) 0;
    background: var(--gray-50);
}

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

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

.seo-content h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    color: var(--gray-800);
}

.seo-content p {
    margin-bottom: var(--space-md);
    color: var(--gray-700);
    line-height: 1.8;
}

/* ========================================
   NEWSLETTER SECTION
   ======================================== */
.newsletter-section {
    padding: var(--space-3xl) 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
}

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

.newsletter-content h2 {
    color: var(--white);
    margin-bottom: var(--space-sm);
}

.newsletter-content > p {
    opacity: 0.9;
    margin-bottom: var(--space-xl);
}

.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.newsletter-form .btn {
    flex-shrink: 0;
}

.newsletter-disclaimer {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: var(--space-3xl) 0 var(--space-lg);
}

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

.footer-brand .logo {
    margin-bottom: var(--space-md);
}

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

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

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

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

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

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

.affiliate-disclosure {
    margin-top: var(--space-sm);
    font-size: 0.75rem;
    opacity: 0.7;
}

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

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

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

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

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

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

.modal-body {
    padding: var(--space-xl);
}

/* ========================================
   COMPARE DRAWER (Mobile)
   ======================================== */
.compare-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    z-index: 500;
    transform: translateY(calc(100% - 60px));
    transition: transform var(--transition);
    display: none;
}

.compare-drawer.active {
    transform: translateY(0);
}

.compare-drawer.has-items {
    display: block;
}

.compare-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    font-weight: 600;
    cursor: pointer;
}

.compare-drawer-toggle {
    transition: transform var(--transition);
}

.compare-drawer.active .compare-drawer-toggle {
    transform: rotate(180deg);
}

.compare-drawer-items {
    display: flex;
    gap: var(--space-sm);
    padding: 0 var(--space-lg) var(--space-md);
    overflow-x: auto;
}

.compare-drawer-btn {
    margin: 0 var(--space-lg) var(--space-lg);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .compare-slots {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }

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

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--space-xl);
        gap: var(--space-lg);
        border-bottom: 1px solid var(--gray-200);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

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

    .hero-stats {
        gap: var(--space-xl);
    }

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

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

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

    .filter-btn {
        margin-left: 0;
        margin-top: var(--space-sm);
    }

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

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

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

    .footer-brand .logo {
        justify-content: center;
    }

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

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

    .compare-drawer {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hero-scroll {
        display: none;
    }

    .guide-tabs {
        flex-direction: column;
        width: 100%;
    }

    .guide-tab {
        width: 100%;
        text-align: center;
    }

    .care-tips {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ANIMATIONS & UTILITIES
   ======================================== */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-up {
    animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Print Styles */
@media print {
    .header,
    .filter-bar,
    .newsletter-section,
    .compare-drawer,
    .modal {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
        background: none;
        color: var(--gray-900);
    }

    .hero h1, .hero-subtitle {
        color: var(--gray-900);
    }

    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}
