/*
Theme Name: NutritionByMias
Theme URI: https://www.nutritionbymias.com
Description: Custom child theme for protein powder reviews - data-driven, professional, authoritative
Author: NutritionByMias
Author URI: https://www.nutritionbymias.com
Template: generatepress
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nutritionbymias
*/

/* ============================================
   Design System - Color Variables
   ============================================ */
:root {
    /* Base Colors */
    --bg: #FBFAF8;           /* Warm white background */
    --surface: #FFFFFF;       /* Card surface */
    --ink: #14201A;          /* Primary text - near-black with green tone */
    --ink-soft: #5A6B62;     /* Secondary text */
    --line: #E4E8E5;         /* Dividers */

    /* Brand Colors */
    --primary: #1B7A4B;      /* Deep green - trustworthy, athletic */
    --primary-light: #2FA36B; /* Lighter green - hover states */
    --primary-dark: #145A38;  /* Darker green - pressed states */

    /* Accent Colors */
    --accent: #E8A33D;       /* Amber - ratings, CTAs */
    --accent-light: #F4B962;
    --danger: #C4462F;       /* Red - discounts, warnings */
    --success: #1B7A4B;      /* Green - pros, positive */

    /* Neutral Grays */
    --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;

    /* Design Tokens */
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow: 0 1px 3px rgba(20, 32, 26, 0.06), 0 8px 24px rgba(20, 32, 26, 0.06);
    --shadow-lg: 0 4px 6px rgba(20, 32, 26, 0.07), 0 20px 40px rgba(20, 32, 26, 0.10);

    /* Typography Scale */
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing Scale */
    --space-xs: 0.25rem;    /* 4px */
    --space-sm: 0.5rem;     /* 8px */
    --space-md: 1rem;       /* 16px */
    --space-lg: 1.5rem;     /* 24px */
    --space-xl: 2rem;       /* 32px */
    --space-2xl: 3rem;      /* 48px */
    --space-3xl: 4rem;      /* 64px */
}

/* ============================================
   Global Styles
   ============================================ */
body {
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
    margin-top: 0;
}

h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 2rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.875rem; }
h5 { font-size: 1.125rem; margin-bottom: 0.75rem; }
h6 { font-size: 1rem; margin-bottom: 0.75rem; }

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-light);
}

/* Container */
.site-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg);
}

/* ============================================
   Component: Product Card
   ============================================ */
.product-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
}

.product-card__header {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.product-card__image {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-card__meta {
    flex: 1;
}

.product-card__title {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.product-card__brand {
    color: var(--ink-soft);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
}

.product-card__rating {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.product-card__stars {
    color: var(--accent);
    font-size: 1.1rem;
}

.product-card__score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
}

.product-card__reviews {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.product-card__price {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.product-card__price-current {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ink);
}

.product-card__price-original {
    font-size: 1.25rem;
    color: var(--ink-soft);
    text-decoration: line-through;
}

.product-card__discount {
    font-size: 0.95rem;
    color: var(--danger);
    font-weight: 600;
}

.product-card__price-per-serving {
    color: var(--ink-soft);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
}

/* ============================================
   Component: CTA Button
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-light);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 122, 75, 0.25);
}

.btn-secondary {
    background: var(--accent);
    color: #FFFFFF;
}

.btn-secondary:hover {
    background: var(--accent-light);
    color: #FFFFFF;
    transform: translateY(-1px);
}

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

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

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

.btn-block {
    display: block;
    width: 100%;
}

/* ============================================
   Component: Comparison Table
   ============================================ */
.comparison-table {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: var(--space-2xl) 0;
}

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

.comparison-table th {
    background: var(--gray-100);
    padding: var(--space-md);
    text-align: left;
    font-weight: 600;
    color: var(--ink);
    border-bottom: 2px solid var(--line);
}

.comparison-table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--line);
}

.comparison-table tbody tr:hover {
    background: var(--gray-50);
}

.comparison-table__rank {
    font-weight: 700;
    color: var(--accent);
}

.comparison-table__score {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

/* ============================================
   Component: Pros/Cons
   ============================================ */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin: var(--space-2xl) 0;
}

.pros, .cons {
    padding: var(--space-lg);
    border-radius: var(--radius);
}

.pros {
    background: rgba(27, 122, 75, 0.05);
    border-left: 4px solid var(--success);
}

.cons {
    background: rgba(196, 70, 47, 0.05);
    border-left: 4px solid var(--danger);
}

.pros h4, .cons h4 {
    margin-bottom: var(--space-md);
}

.pros h4 {
    color: var(--success);
}

.cons h4 {
    color: var(--danger);
}

.pros ul, .cons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pros li, .cons li {
    padding-left: 1.5rem;
    margin-bottom: var(--space-sm);
    position: relative;
}

.pros li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

.cons li:before {
    content: '✗';
    position: absolute;
    left: 0;
    color: var(--danger);
    font-weight: 700;
}

/* ============================================
   Component: Badge
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
}

.badge-primary {
    background: var(--primary);
    color: #FFFFFF;
}

.badge-accent {
    background: var(--accent);
    color: #FFFFFF;
}

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

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .site-content {
        padding: var(--space-md);
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .product-card__header {
        flex-direction: column;
    }

    .product-card__image {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .pros-cons {
        grid-template-columns: 1fr;
    }

    .comparison-table {
        overflow-x: auto;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--ink-soft); }
.text-small { font-size: 0.9rem; }
.text-large { font-size: 1.25rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-sm); }
.gap-2 { gap: var(--space-md); }
.gap-3 { gap: var(--space-lg); }
