/*
Theme Name: AffiliatePress
Description: Professional affiliate marketing WordPress theme with built-in affiliate link management, ad placement system, and responsive design. Perfect for product reviews, deal sites, and affiliate marketing blogs.
Version: 1.0.0
Author: Your Name
License: GPL v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: affiliatepress
Tags: blog, e-commerce, affiliate-marketing, responsive, custom-colors, custom-menu, custom-logo, featured-images, flexible-header, footer-widgets, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready
*/

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f8fafc;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

p {
    margin-bottom: 1rem;
}

a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1d4ed8;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.grid {
    display: grid;
    gap: 2rem;
}

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

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Header */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e40af;
}

.site-logo svg {
    width: 2rem;
    height: 2rem;
}

/* Navigation */
.main-navigation {
    display: none;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation a {
    color: #64748b;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: #3b82f6;
}

@media (min-width: 768px) {
    .main-navigation {
        display: block;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

/* Main Content */
.site-main {
    padding: 2rem 0;
}

.content-area {
    grid-column: 1 / -1;
}

@media (min-width: 1024px) {
    .content-area {
        grid-column: 1 / 4;
    }
}

/* Sidebar */
.sidebar {
    grid-column: 1 / -1;
}

@media (min-width: 1024px) {
    .sidebar {
        grid-column: 4 / 5;
    }
}

/* Post Cards */
.post-card {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.post-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #64748b;
}

.post-category {
    background: #e2e8f0;
    color: #475569;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.post-title {
    margin-bottom: 0.75rem;
}

.post-title a {
    color: #1e293b;
    font-weight: 600;
}

.post-title a:hover {
    color: #3b82f6;
}

.post-excerpt {
    color: #64748b;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #3b82f6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background: #1d4ed8;
    color: white;
}

/* Affiliate Links */
.affiliate-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f59e0b;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.affiliate-link:hover {
    background: #d97706;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.affiliate-link::after {
    content: "🔗";
    margin-left: 0.25rem;
}

/* Ad Placements */
.ad-placement {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    color: #64748b;
    margin: 2rem 0;
}

.ad-placement.header-ad {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placement.sidebar-ad {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Widget Areas */
.widget {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.widget li:last-child {
    border-bottom: none;
}

/* Footer */
.site-footer {
    background: #1e293b;
    color: #e2e8f0;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h4 {
    color: #ffffff;
    margin-bottom: 1rem;
}

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

.footer-widget li {
    margin-bottom: 0.5rem;
}

.footer-widget a {
    color: #cbd5e1;
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: #ffffff;
}

.site-info {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 767px) {
    .container {
        padding: 0 1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .post-content {
        padding: 1rem;
    }
    
    .affiliate-link {
        display: flex;
        justify-content: center;
        margin: 1rem 0;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

.shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }

/* WordPress Core Styles */
.alignleft {
    float: left;
    margin: 0 1rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1rem;
}

.aligncenter {
    display: block;
    margin: 1rem auto;
}

.wp-caption {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.5rem;
    text-align: center;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* Comments */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.comment-list {
    list-style: none;
}

.comment {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
}