/* ===== Dark Mode Adjustments ===== */
.dark-mode .hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.dark-mode .hero h1,
.dark-mode .hero p {
    color: white;
}

.dark-mode .affiliate-disclosure {
    background: #2d3748;
    color: #cbd5e0;
}

.dark-mode .reviews-summary,
.dark-mode .top-comparison,
.dark-mode .filters-container,
.dark-mode .comparison-tool,
.dark-mode .faq-section {
    background: rgba(26, 32, 44, 0.9);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .highlight-card {
    background: #2d3748;
}

.dark-mode .comparison-table th {
    background: var(--primary-color);
}

.dark-mode .comparison-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

.dark-mode .user-testimonials {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

.dark-mode .testimonial-card {
    background: rgba(45, 55, 72, 0.9);
    color: #e2e8f0;
}

.dark-mode .testimonial-card:before {
    color: rgba(255, 255, 255, 0.1);
}

.dark-mode .author-info p {
    color: #a0aec0;
}

.dark-mode .category-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.dark-mode .category-btn:hover {
    background: var(--primary-color);
    color: white;
}

.dark-mode .category-btn.active {
    background: var(--primary-color);
    color: white;
}

.dark-mode .product-card {
    background: rgba(26, 32, 44, 0.9);
    color: #e2e8f0;
}

.dark-mode .product-title {
    color: #e2e8f0;
}

.dark-mode .product-description,
.dark-mode .product-features li,
.dark-mode .product-footer,
.dark-mode .product-disclosure {
    color: #a0aec0;
}

.dark-mode .compare-button {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.dark-mode .compare-button:hover {
    background: var(--primary-color);
    color: white;
}

.dark-mode .comparison-product {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.dark-mode .comparison-product.selected {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.dark-mode .pagination-btn,
.dark-mode .page-number {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.2);
}

.dark-mode .pagination-btn:hover:not(:disabled),
.dark-mode .page-number:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.dark-mode .page-number.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.dark-mode .faq-question {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.dark-mode .faq-question:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dark-mode .faq-item.active .faq-question {
    background: var(--primary-color);
    color: white;
}

.dark-mode .calculator-cta h2,
.dark-mode .calculator-cta p {
    color: white;
}

/* Icons in dark mode */
.dark-mode .highlight-card i,
.dark-mode .author-rating i,
.dark-mode .stars i,
.dark-mode .calculator-feature i {
    color: inherit;
}
/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, #4a6fa5 0%, #6b48ff 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

/* ===== Affiliate Disclosure ===== */
.affiliate-disclosure {
    background: #fff8e1;
    border-left: 4px solid #ff9900;
    padding: 1rem;
    margin: 2rem auto;
    max-width: 1200px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: #5d4037;
}

.affiliate-disclosure strong {
    color: #d84315;
}

.affiliate-disclosure a {
    color: #d84315;
    font-weight: 600;
}

/* ===== Customer Reviews Summary ===== */
.reviews-summary {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 3rem;
    text-align: center;
}

.reviews-header {
    margin-bottom: 2rem;
}

.overall-rating {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.overall-stars {
    color: #ffc107;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.total-reviews {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.rating-bars {
    max-width: 600px;
    margin: 2rem auto;
}

.rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.rating-label {
    width: 60px;
    font-weight: 500;
}

.bar-container {
    flex: 1;
    height: 10px;
    background: var(--light-color);
    border-radius: 5px;
    margin: 0 1rem;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b35, #ff9900);
    border-radius: 5px;
}

.rating-count {
    width: 60px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.review-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.highlight-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: left;
}

.highlight-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ===== Top Products Comparison ===== */
.top-comparison {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 3rem;
}

.comparison-table {
    overflow-x: auto;
    margin-top: 2rem;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.comparison-table th {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-color);
}

.comparison-table tr:nth-child(even) {
    background: #f8f9fa;
}

.comparison-table .winner {
    background: #e8f5e9;
    font-weight: 600;
    color: var(--success-color);
}

.product-comparison-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-comparison-row img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

/* ===== What Our Users Say ===== */
.user-testimonials {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 4rem 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
    margin-top: 3rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
}

.testimonial-card:before {
    content: '"';
    font-size: 4rem;
    color: var(--light-color);
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: serif;
}

.testimonial-content {
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.author-info h4 {
    margin-bottom: 0.25rem;
}

.author-info p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.author-rating {
    color: #ffc107;
    margin-top: 0.5rem;
}

/* ===== Filters & Controls ===== */
.filters-container {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-group h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.category-filter, .rating-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-btn {
    padding: 0.5rem 1rem;
    background: var(--light-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid transparent;
}

.category-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.price-filter {
    padding: 0.5rem 0;
}

.price-range {
    width: 100%;
    height: 6px;
    background: var(--light-color);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.price-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.price-display {
    text-align: center;
    margin-top: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.sort-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--light-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.sort-select:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* ===== Products Grid ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-content {
    padding: 1.5rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stars {
    color: #ffc107;
    font-size: 0.9rem;
}

.rating-count {
    font-size: 0.85rem;
    color: var(--gray-color);
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.product-description {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-features {
    margin-bottom: 1rem;
}

.product-features li {
    font-size: 0.85rem;
    padding: 0.25rem 0;
    color: var(--dark-color);
}

.product-features li i {
    color: var(--success-color);
    margin-right: 0.5rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 1rem;
    color: var(--gray-color);
    text-decoration: line-through;
}

.discount {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}



.affiliate-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #ff9900 0%, #ff6b35 100%);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    margin-bottom: 0.75rem;
}

.affiliate-button:hover {
    background: linear-gradient(135deg, #ff6b35 0%, #ff9900 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.compare-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--light-color);
    color: var(--dark-color);
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.compare-button:hover {
    background: var(--primary-color);
    color: white;
}

.product-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--light-color);
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray-color);
}

.product-footer span i {
    margin-right: 0.25rem;
}

.product-disclosure {
    font-size: 0.7rem;
    color: var(--gray-color);
    padding: 0.5rem 1.5rem;
    border-top: 1px solid var(--light-color);
    text-align: center;
}

.best-for {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--light-color);
}

.best-for .badge {
    display: inline-block;
    background: #e3f2fd;
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    margin: 0.25rem;
}

/* ===== Comparison Tool ===== */
.comparison-tool {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*margin-bottom: 1.5rem;*/
}

.comparison-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.comparison-product {
    background: var(--light-color);
    border: 2px dashed var(--gray-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.comparison-product.empty {
    color: var(--gray-color);
    cursor: pointer;
}

.comparison-product.empty:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.comparison-product.selected {
    border: 2px solid var(--primary-color);
    background: #e8f4ff;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    /*margin: 3rem 0;*/
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--light-color);
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    background: white;
    border: 2px solid var(--light-color);
    cursor: pointer;
    transition: var(--transition);
}

.page-number:hover {
    border-color: var(--primary-color);
}

.page-number.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== Email Marketing Section ===== */
.email-marketing {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: var(--border-radius);
    margin: 4rem auto;
    text-align: center;
}

.email-marketing h2 {
    color: white;
    margin-bottom: 1rem;
}

.email-marketing p {
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.email-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
}

.email-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
}

.email-form button {
    padding: 1rem 2rem;
    background: var(--secondary-color);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.email-form button:hover {
    background: white;
    color: var(--secondary-color);
}

.email-benefits {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.email-benefit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.email-benefit i {
    color: var(--secondary-color);
}

/* ===== FAQ Section ===== */
.faq-section {
    background: white;
    padding: 4rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 3rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.faq-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--light-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.faq-question {
    padding: 1rem;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question h4 {
    margin: 0;
    font-size: 1rem;
}

.faq-answer {
    padding: 1rem;
    display: none;
    border-top: 1px solid var(--light-color);
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-question {
    background: var(--primary-color);
    color: white;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* ===== Sleep Calculator CTA ===== */
.calculator-cta {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 3rem;
}

.calculator-cta h2 {
    color: white;
    margin-bottom: 1rem;
}

.calculator-cta p {
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--secondary-color);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
}

.cta-button:hover {
    background: white;
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 107, 53, 0.3);
}

.calculator-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.calculator-feature {
    text-align: center;
    max-width: 200px;
}

.calculator-feature i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* ===== Skeleton Loading ===== */
.product-card.skeleton .product-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.product-card.skeleton .product-title,
.product-card.skeleton .product-description,
.product-card.skeleton .product-features li {
    background: #f0f0f0;
    color: transparent;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.product-card.skeleton .product-title {
    height: 24px;
    width: 80%;
}

.product-card.skeleton .product-description {
    height: 60px;
    width: 100%;
}

.product-card.skeleton .product-features li {
    height: 16px;
    width: 90%;
    margin-bottom: 8px;
}

.product-card.skeleton .product-price .current-price {
    background: #f0f0f0;
    height: 32px;
    width: 100px;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== No Results ===== */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    color: var(--gray-color);
    margin-bottom: 1rem;
}

.no-results h3 {
    margin-bottom: 0.5rem;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .email-form {
        flex-direction: column;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .comparison-slots {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-features {
        gap: 2rem;
    }
    
    .email-form {
        flex-direction: column;
    }
    
    .email-benefits {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .overall-rating {
        font-size: 2.5rem;
    }
    
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .email-form input,
    .email-form button {
        width: 100%;
    }
}