/* RunBikeCalc Typography
   Playfair Display (headings) + Source Sans 3 (body)
*/

body {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1, h2, h3, h4, h5, h6,
.font-display {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
}

h1 {
    font-weight: 700;
}

h2 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

h3 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
    font-size: 1.25rem;
}

/* Lists - scoped to content areas only */
.content-box ul, .content-box ol,
.prose ul, .prose ol,
article ul, article ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-box ul, .prose ul, article ul {
    list-style-type: disc;
}

.content-box ol, .prose ol, article ol {
    list-style-type: decimal;
}

.content-box li, .prose li, article li {
    margin-bottom: 0.5rem;
}

/* Paragraphs - scoped to content areas only */
.content-box p, .prose p, article p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Ensure calculator inputs stay readable */
input, select, textarea, button {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Site logo - Playfair Display, black */
.site-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: #000 !important;
    text-decoration: none;
}

/* Content box - matches calculator card styling */
.content-box {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Site Navigation */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(26, 26, 26, 0.05);
}

.site-nav .nav-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
}

.site-nav .nav-links {
    display: none;
    align-items: center;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .site-nav .nav-links {
        display: flex;
    }
}

.site-nav .nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.site-nav .nav-link:hover {
    color: #1a1a1a;
}

.site-nav .nav-link-red {
    color: #dc2626;
    font-weight: 600;
}

.site-nav .nav-link-red:hover {
    color: #b91c1c;
}

.site-nav .nav-cta {
    display: none;
    background: #1a1a1a;
    color: #FAF8F5;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: background 0.2s;
}

.site-nav .nav-cta:hover {
    background: rgba(26, 26, 26, 0.9);
}

@media (min-width: 768px) {
    .site-nav .nav-cta {
        display: inline-flex;
    }
}

.site-nav .mobile-menu-btn {
    display: block;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .site-nav .mobile-menu-btn {
        display: none;
    }
}

.site-nav .mobile-menu {
    display: none;
    background: #FAF8F5;
    border-top: 1px solid rgba(26, 26, 26, 0.05);
    padding: 1.5rem;
}

.site-nav .mobile-menu.active {
    display: block;
}

.site-nav .mobile-menu a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1.125rem;
    color: rgba(26, 26, 26, 0.7);
    text-decoration: none;
}

.site-nav .mobile-menu a:hover {
    color: #1a1a1a;
}

.new-badge {
    background: #C67B4E;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Add padding to body for fixed nav - but not homepage */
body:not(.homepage) {
    padding-top: 5rem;
}

/* ===== INLINE PRODUCT RECOMMENDATIONS (for guides/articles) ===== */
.product-rec {
    background: linear-gradient(135deg, rgba(198, 123, 78, 0.08) 0%, rgba(198, 123, 78, 0.03) 100%);
    border-left: 4px solid #C67B4E;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.product-rec h4 {
    color: #C67B4E;
    font-size: 1.1rem;
    margin: 0 0 0.75rem 0;
    font-family: 'Playfair Display', Georgia, serif;
}

.product-rec p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.product-rec a.product-link {
    display: inline-block;
    background: #C67B4E;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.product-rec a.product-link:hover {
    background: #a5623d;
}

/* ===== CALCULATOR PRODUCT RECOMMENDATIONS ===== */
.product-recommendations {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.recommendations-title {
    font-size: 1.25rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Playfair Display', Georgia, serif;
}

.recommendations-title::before {
    content: '🛒';
}

.affiliate-disclosure {
    font-size: 0.8rem;
    color: #64748b;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.product-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.product-card {
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card h4 {
    color: #C67B4E;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-family: 'Playfair Display', Georgia, serif;
}

.product-card p {
    margin: 0 0 1rem 0;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
}

.product-card .btn-amazon {
    display: inline-block;
    background: #C67B4E;
    color: white;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background 0.2s ease;
}

.product-card .btn-amazon:hover {
    background: #a5623d;
}

/* Calculator result context styling */
.result-context {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-style: italic;
}

/* ===== AMAZON PRODUCT CARDS WITH IMAGES ===== */
.amazon-affiliate-disclosure {
    font-size: 0.75rem;
    color: #64748b;
    padding: 0.5rem 0.75rem;
    background: #f1f5f9;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

.amazon-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.amazon-product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.amazon-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.amazon-product-horizontal {
    flex-direction: row;
    text-align: left;
    gap: 1rem;
}

.amazon-product-image-link {
    display: block;
    margin-bottom: 1rem;
}

.amazon-product-horizontal .amazon-product-image-link {
    margin-bottom: 0;
    flex-shrink: 0;
}

.amazon-product-image {
    width: 140px;
    height: 140px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 8px;
    padding: 8px;
}

.amazon-product-horizontal .amazon-product-image {
    width: 100px;
    height: 100px;
}

.amazon-product-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.amazon-product-horizontal .amazon-product-content {
    align-items: flex-start;
}

.amazon-product-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    font-family: 'Source Sans 3', sans-serif;
}

.amazon-product-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.amazon-product-title a:hover {
    color: #C67B4E;
}

.amazon-product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #16a34a;
    margin: 0 0 0.75rem 0;
}

.amazon-product-button {
    display: inline-block;
    background: linear-gradient(to bottom, #f7dfa5, #f0c14b);
    border: 1px solid #a88734;
    color: #111;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.15s;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
}

.amazon-product-button:hover {
    background: linear-gradient(to bottom, #f5d78e, #eeb933);
}

/* Inline product link (for article content) */
.amazon-inline-product {
    display: inline-flex;
    align-items: center;
}

.amazon-inline-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #C67B4E;
    text-decoration: none;
    font-weight: 500;
}

.amazon-inline-link:hover {
    text-decoration: underline;
}

.amazon-inline-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    background: #f8fafc;
    vertical-align: middle;
}

/* Featured product card (larger, for hero positions) */
.amazon-product-featured {
    padding: 1.5rem;
    background: linear-gradient(135deg, #fffbf7 0%, #fff 100%);
    border: 2px solid #C67B4E;
}

.amazon-product-featured .amazon-product-image {
    width: 180px;
    height: 180px;
}

.amazon-product-featured .amazon-product-title {
    font-size: 1.15rem;
}

/* Product comparison table with images */
.product-comparison-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.product-comparison-row:last-child {
    border-bottom: none;
}

.product-comparison-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 8px;
    flex-shrink: 0;
}

.product-comparison-info {
    flex: 1;
}

.product-comparison-name {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.product-comparison-price {
    color: #16a34a;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .amazon-products-grid {
        grid-template-columns: 1fr;
    }

    .amazon-product-image {
        width: 120px;
        height: 120px;
    }

    .amazon-product-horizontal {
        flex-direction: column;
        text-align: center;
    }

    .amazon-product-horizontal .amazon-product-content {
        align-items: center;
    }
}
