/* 
========================================================================
   LEARNING & HEALING - BRAND DESIGN SYSTEM
   A premium, culturally themed non-profit e-commerce CSS architecture
========================================================================
*/

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700&display=swap');

/* CSS Variables & Design Tokens */
:root {
    /* Color Palette */
    --clr-brand-primary: #1C3F35;      /* Acacia Dark Green */
    --clr-brand-primary-rgb: 28, 63, 53;
    --clr-brand-secondary: #C05C3E;    /* Terracotta Clay */
    --clr-brand-secondary-rgb: 192, 92, 62;
    --clr-brand-accent: #E29B37;       /* Savannah Gold */
    --clr-brand-accent-rgb: 226, 155, 55;
    
    --clr-bg-canvas: #FBF9F6;          /* Soft Linen / Off-White */
    --clr-bg-surface: #FFFFFF;
    --clr-bg-card: rgba(255, 255, 255, 0.85);
    
    --clr-text-main: #212121;          /* Premium Charcoal */
    --clr-text-muted: #5C5C5C;
    --clr-text-light: #8E8E8E;
    
    --clr-success: #2E7D32;            /* Healing Green */
    --clr-error: #C62828;              /* Alert Red */
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Layout & Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2.5rem;
    --space-xxl: 4rem;
    
    /* UI Decoratives */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(28, 63, 53, 0.08);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
    --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    
    --container-max-width: 1280px;
    --header-height: 80px;
}

/* Base resets */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--clr-bg-canvas);
    color: var(--clr-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--clr-brand-primary);
    font-weight: 700;
    line-height: 1.25;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--clr-bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* Primary Layout Container */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Header & Navigation Styles */
.site-header {
    height: var(--header-height);
    background: rgba(251, 249, 246, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(28, 63, 53, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--clr-brand-primary), var(--clr-brand-secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(28, 63, 53, 0.2);
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--clr-brand-primary);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--clr-brand-secondary);
}

.nav-menu {
    display: flex;
    gap: var(--space-xl);
    list-style: none;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: var(--space-xs) 0;
    color: var(--clr-brand-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--clr-brand-secondary);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--clr-brand-secondary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--clr-brand-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.cart-toggle-btn {
    position: relative;
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    color: var(--clr-brand-primary);
    background: rgba(28, 63, 53, 0.05);
}

.cart-toggle-btn:hover {
    background: rgba(192, 92, 62, 0.1);
    color: var(--clr-brand-secondary);
    transform: scale(1.05);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--clr-brand-secondary);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--clr-bg-canvas);
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--clr-brand-primary);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}

/* Premium Buttons & Call-to-Actions */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.8rem 1.6rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--clr-brand-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(28, 63, 53, 0.25);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background-color: #2b574a;
    box-shadow: 0 6px 20px rgba(28, 63, 53, 0.35);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--clr-brand-secondary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(192, 92, 62, 0.25);
}

.btn-secondary:hover {
    background-color: #a84b30;
    box-shadow: 0 6px 20px rgba(192, 92, 62, 0.35);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--clr-brand-primary);
    color: var(--clr-brand-primary);
}

.btn-outline:hover {
    background-color: var(--clr-brand-primary);
    color: #fff;
    transform: translateY(-2px);
}

.btn-icon {
    padding: 0.8rem;
    border-radius: var(--radius-md);
    background: rgba(28, 63, 53, 0.05);
    color: var(--clr-brand-primary);
    transition: var(--transition-fast);
}

.btn-icon:hover {
    background: rgba(28, 63, 53, 0.1);
    transform: translateY(-2px);
}

/* Slide-out Cart Drawer */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(28, 63, 53, 0.4);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background-color: var(--clr-bg-canvas);
    z-index: 201;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.cart-drawer.active {
    right: 0;
}

.cart-header {
    padding: var(--space-lg);
    background-color: var(--clr-brand-primary);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-title {
    color: #fff;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.cart-close-btn {
    cursor: pointer;
    color: #fff;
    opacity: 0.8;
    transition: var(--transition-fast);
}

.cart-close-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.cart-items-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.empty-cart-message {
    text-align: center;
    padding: var(--space-xxl) var(--space-lg);
    color: var(--clr-text-muted);
}

.empty-cart-icon {
    font-size: 3rem;
    color: var(--clr-text-light);
    margin-bottom: var(--space-md);
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: var(--space-md);
    background-color: var(--clr-bg-surface);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(28, 63, 53, 0.05);
    align-items: center;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.cart-item-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--clr-brand-primary);
}

.cart-item-impact {
    font-size: 0.8rem;
    color: var(--clr-brand-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.cart-item-price {
    font-weight: 600;
    font-size: 0.95rem;
}

.cart-item-qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid rgba(28, 63, 53, 0.1);
    border-radius: var(--radius-sm);
    width: fit-content;
    background-color: var(--clr-bg-canvas);
}

.cart-item-qty-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition-fast);
}

.cart-item-qty-btn:hover {
    color: var(--clr-brand-secondary);
    background: rgba(28, 63, 53, 0.05);
}

.cart-item-qty-val {
    width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.cart-item-remove-btn {
    cursor: pointer;
    color: var(--clr-text-light);
    transition: var(--transition-fast);
}

.cart-item-remove-btn:hover {
    color: var(--clr-error);
}

.cart-summary-section {
    padding: var(--space-lg);
    background-color: var(--clr-bg-surface);
    border-top: 1px solid rgba(28, 63, 53, 0.08);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--clr-text-muted);
}

.cart-summary-row.total {
    color: var(--clr-brand-primary);
    font-weight: 700;
    font-size: 1.2rem;
    border-top: 1px dashed rgba(28, 63, 53, 0.15);
    padding-top: var(--space-md);
}

.cart-impact-notice {
    background: rgba(28, 63, 53, 0.05);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--clr-brand-primary);
    font-size: 0.8rem;
    color: var(--clr-brand-primary);
    font-weight: 500;
}

.promo-code-input-container {
    display: flex;
    gap: var(--space-sm);
}

.promo-input {
    flex-grow: 1;
    border: 1px solid rgba(28, 63, 53, 0.15);
    border-radius: var(--radius-sm);
    padding: 0.5rem var(--space-sm);
    font-size: 0.85rem;
}

.promo-input:focus {
    outline: none;
    border-color: var(--clr-brand-secondary);
}

.promo-btn {
    background: var(--clr-brand-primary);
    color: #fff;
    padding: 0.5rem var(--space-md);
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
}

.promo-feedback {
    font-size: 0.8rem;
    font-weight: 600;
    display: none;
}

.promo-feedback.success {
    color: var(--clr-success);
    display: block;
}

.promo-feedback.error {
    color: var(--clr-error);
    display: block;
}

/* Home Hero Section */
.hero-section {
    position: relative;
    padding: var(--space-xxl) 0;
    background-color: var(--clr-brand-primary);
    color: #fff;
    overflow: hidden;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero_kenya.png');
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    z-index: 1;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(28, 63, 53, 0.95), rgba(192, 92, 62, 0.4));
    z-index: 2;
}

.hero-grid {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-xxl);
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.hero-tagline {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--clr-brand-accent);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3.5rem;
    color: #fff;
    font-weight: 800;
    line-height: 1.15;
}

.hero-title span {
    color: var(--clr-brand-accent);
}

.hero-desc {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 580px;
    margin-bottom: var(--space-md);
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-image-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid rgba(255, 255, 255, 0.15);
    position: relative;
    transform: rotate(2deg);
    transition: var(--transition-smooth);
}

.hero-image-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.hero-image-card img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.hero-impact-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    padding: var(--space-md);
    background: rgba(28, 63, 53, 0.85);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-md);
    color: #fff;
    border-left: 4px solid var(--clr-brand-accent);
}

/* Impact Ticker Section */
.impact-ticker-section {
    margin-top: calc(-1 * var(--space-xl));
    position: relative;
    z-index: 5;
}

.ticker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.ticker-card {
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.ticker-icon {
    width: 50px;
    height: 50px;
    background: rgba(192, 92, 62, 0.1);
    color: var(--clr-brand-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.ticker-number {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2rem;
    color: var(--clr-brand-primary);
    line-height: 1.1;
}

.ticker-label {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Interactive Impact Calculator */
.calculator-section {
    padding: var(--space-xxl) 0;
    background: rgba(28, 63, 53, 0.02);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.section-badge {
    background: rgba(192, 92, 62, 0.1);
    color: var(--clr-brand-secondary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: var(--space-sm);
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: var(--space-sm);
}

.section-desc {
    color: var(--clr-text-muted);
}

.calc-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-xl);
    align-items: stretch;
}

.calc-sliders-container {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-xl);
}

.calc-control-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.calc-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calc-control-label {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--clr-brand-primary);
}

.calc-control-val {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--clr-brand-secondary);
    background: rgba(192, 92, 62, 0.08);
    padding: 0.2rem var(--space-sm);
    border-radius: var(--radius-sm);
}

.calc-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: var(--radius-full);
    background: rgba(28, 63, 53, 0.1);
    outline: none;
    box-shadow: var(--shadow-inset);
}

.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: var(--clr-brand-secondary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(192, 92, 62, 0.4);
    transition: var(--transition-fast);
}

.calc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: var(--clr-brand-accent);
}

.calc-presets {
    display: flex;
    gap: var(--space-sm);
}

.calc-preset-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(28, 63, 53, 0.15);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.calc-preset-btn:hover,
.calc-preset-btn.active {
    background: var(--clr-brand-primary);
    color: #fff;
    border-color: var(--clr-brand-primary);
}

.calc-results-card {
    background: var(--clr-brand-primary);
    color: #fff;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    position: relative;
    overflow: hidden;
}

.calc-results-card::before {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    border-radius: var(--radius-full);
    background: rgba(226, 155, 55, 0.08);
    pointer-events: none;
}

.calc-results-title {
    color: var(--clr-brand-accent);
    font-size: 1.15rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.calc-metrics-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    flex-grow: 1;
}

.calc-metric-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: rgba(255, 255, 255, 0.08);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--clr-brand-accent);
}

.calc-metric-num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.2rem;
    color: var(--clr-brand-accent);
    min-width: 60px;
    text-align: center;
    line-height: 1;
}

.calc-metric-details {
    display: flex;
    flex-direction: column;
}

.calc-metric-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
}

.calc-metric-desc {
    font-size: 0.8rem;
    opacity: 0.75;
}

/* Featured Products & Catalog Grid */
.products-section {
    padding: var(--space-xxl) 0;
}

.catalog-actions-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-md);
    align-items: center;
    margin-bottom: var(--space-xl);
}

.filters-group {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding-bottom: 5px;
}

.filter-chip {
    padding: 0.5rem 1.2rem;
    border: 1px solid rgba(28, 63, 53, 0.12);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.filter-chip:hover,
.filter-chip.active {
    background-color: var(--clr-brand-primary);
    color: #fff;
    border-color: var(--clr-brand-primary);
    box-shadow: var(--shadow-sm);
}

.search-sort-group {
    display: flex;
    gap: var(--space-sm);
}

.catalog-search-input {
    border: 1px solid rgba(28, 63, 53, 0.15);
    border-radius: var(--radius-md);
    padding: 0.5rem var(--space-md);
    font-size: 0.9rem;
    background: var(--clr-bg-surface);
    width: 220px;
}

.catalog-search-input:focus {
    outline: none;
    border-color: var(--clr-brand-secondary);
}

.catalog-sort-select {
    border: 1px solid rgba(28, 63, 53, 0.15);
    border-radius: var(--radius-md);
    padding: 0.5rem var(--space-md);
    font-size: 0.9rem;
    background: var(--clr-bg-surface);
    cursor: pointer;
}

.catalog-sort-select:focus {
    outline: none;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.product-card {
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card-img-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1;
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.product-card:hover .product-card-img {
    transform: scale(1.05);
}

.product-badge-flag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--clr-brand-secondary);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.product-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(0deg, rgba(28,63,53,0.8), transparent);
    z-index: 1;
    opacity: 0;
    transition: var(--transition-fast);
}

.product-card:hover .product-card-overlay {
    opacity: 1;
}

.product-card-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    flex-grow: 1;
}

.product-card-category {
    font-size: 0.75rem;
    color: var(--clr-text-light);
    font-weight: 600;
    text-transform: uppercase;
}

.product-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--clr-brand-primary);
}

.product-card-impact {
    font-size: 0.8rem;
    color: var(--clr-brand-secondary);
    font-weight: 500;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-sm);
}

.product-card-price {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--clr-text-main);
}

.product-quick-add {
    background: var(--clr-brand-primary);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.product-quick-add:hover {
    background: var(--clr-brand-secondary);
    transform: scale(1.05);
}

/* Product Details View Page */
.product-detail-layout {
    padding: var(--space-xxl) 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xxl);
    align-items: start;
}

.detail-gallery {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.detail-main-img-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 1;
}

.detail-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.detail-category {
    font-size: 0.85rem;
    color: var(--clr-brand-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-title {
    font-size: 2.5rem;
}

.detail-price-box {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.detail-price {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--clr-brand-primary);
}

.detail-impact-badge {
    background: rgba(192, 92, 62, 0.1);
    color: var(--clr-brand-secondary);
    font-weight: 600;
    padding: 0.3rem var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.detail-desc {
    color: var(--clr-text-muted);
}

.detail-culture-card {
    background: rgba(28, 63, 53, 0.04);
    border-left: 4px solid var(--clr-brand-primary);
    padding: var(--space-md);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.detail-culture-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--clr-brand-primary);
    margin-bottom: var(--space-xs);
}

.detail-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.detail-qty-picker {
    display: flex;
    align-items: center;
    border: 2px solid rgba(28, 63, 53, 0.15);
    border-radius: var(--radius-md);
    padding: 0.2rem;
}

.detail-qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
}

.detail-qty-btn:hover {
    color: var(--clr-brand-secondary);
}

.detail-qty-val {
    width: 40px;
    text-align: center;
    font-weight: 700;
}

.detail-impact-breakdown-box {
    margin-top: var(--space-lg);
    border-top: 1px solid rgba(28, 63, 53, 0.1);
    padding-top: var(--space-lg);
}

.detail-breakdown-title {
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
}

.detail-breakdown-bar-container {
    height: 14px;
    background: rgba(28, 63, 53, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.detail-breakdown-fill {
    height: 100%;
}

.detail-breakdown-fill.school {
    background-color: var(--clr-brand-primary);
}

.detail-breakdown-fill.hospital {
    background-color: var(--clr-brand-secondary);
}

.detail-breakdown-fill.admin {
    background-color: var(--clr-brand-accent);
}

.detail-breakdown-labels {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.8rem;
    font-weight: 500;
}

.detail-breakdown-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.detail-breakdown-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
}

.detail-breakdown-dot.school { background-color: var(--clr-brand-primary); }
.detail-breakdown-dot.hospital { background-color: var(--clr-brand-secondary); }
.detail-breakdown-dot.admin { background-color: var(--clr-brand-accent); }

/* Non-Profit Story Homepage block */
.story-section {
    padding: var(--space-xxl) 0;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xxl);
    align-items: center;
}

.story-visual-container {
    position: relative;
}

.story-main-img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 90%;
    height: 480px;
    object-fit: cover;
}

.story-overlap-card {
    position: absolute;
    bottom: -30px;
    right: 0;
    width: 250px;
    padding: var(--space-lg);
    border-left: 5px solid var(--clr-brand-accent);
}

.story-overlap-num {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--clr-brand-primary);
}

.story-overlap-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--clr-text-muted);
}

.story-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* Toast Notification Styling */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background-color: var(--clr-bg-surface);
    color: var(--clr-text-main);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--clr-brand-primary);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.active {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    border-left-color: var(--clr-success);
}

.toast-error {
    border-left-color: var(--clr-error);
}

.toast-message {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Checkout Page Steps */
.checkout-layout {
    padding: var(--space-xxl) 0;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-xxl);
    align-items: start;
}

.checkout-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    position: relative;
}

.checkout-stepper::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(28, 63, 53, 0.1);
    z-index: 1;
}

.checkout-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.checkout-step-num {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background-color: var(--clr-bg-canvas);
    border: 2px solid rgba(28, 63, 53, 0.15);
    color: var(--clr-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.checkout-step.active .checkout-step-num {
    background-color: var(--clr-brand-primary);
    border-color: var(--clr-brand-primary);
    color: #fff;
}

.checkout-step.completed .checkout-step-num {
    background-color: var(--clr-brand-secondary);
    border-color: var(--clr-brand-secondary);
    color: #fff;
}

.checkout-step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--clr-text-light);
    text-transform: uppercase;
}

.checkout-step.active .checkout-step-label {
    color: var(--clr-brand-primary);
}

.checkout-form-container {
    padding: var(--space-xl);
}

.checkout-step-section {
    display: none;
    flex-direction: column;
    gap: var(--space-md);
}

.checkout-step-section.active {
    display: flex;
}

.checkout-form-title {
    font-size: 1.4rem;
    margin-bottom: var(--space-sm);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--clr-text-muted);
}

.form-input {
    border: 1px solid rgba(28, 63, 53, 0.18);
    border-radius: var(--radius-md);
    padding: 0.7rem var(--space-md);
    font-size: 0.95rem;
    background: var(--clr-bg-surface);
}

.form-input:focus {
    outline: none;
    border-color: var(--clr-brand-secondary);
}

/* Match Donation Card styling */
.match-donation-card {
    background: rgba(192, 92, 62, 0.05);
    border: 1.5px dashed var(--clr-brand-secondary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.match-info {
    display: flex;
    flex-direction: column;
}

.match-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--clr-brand-secondary);
}

.match-desc {
    font-size: 0.8rem;
    color: var(--clr-text-muted);
}

.match-choices {
    display: flex;
    gap: var(--space-xs);
}

.match-btn {
    width: 44px;
    height: 36px;
    border: 1px solid rgba(192, 92, 62, 0.3);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition-fast);
    background: #fff;
}

.match-btn.active {
    background: var(--clr-brand-secondary);
    color: #fff;
    border-color: var(--clr-brand-secondary);
}

/* Payment selection methods */
.payment-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.payment-tab {
    padding: var(--space-md);
    border: 1.5px solid rgba(28, 63, 53, 0.12);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: center;
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    transition: var(--transition-fast);
}

.payment-tab:hover {
    border-color: var(--clr-brand-secondary);
}

.payment-tab.active {
    border-color: var(--clr-brand-primary);
    background-color: rgba(28, 63, 53, 0.04);
}

.payment-tab-icon {
    font-size: 1.3rem;
}

.payment-tab.active .payment-tab-icon {
    color: var(--clr-brand-primary);
}

.payment-content {
    display: none;
    flex-direction: column;
    gap: var(--space-md);
}

.payment-content.active {
    display: flex;
}

/* M-Pesa STK push simulation overlay modal */
.mpesa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
}

.mpesa-modal-overlay.active {
    display: flex;
}

.mpesa-modal {
    width: 90%;
    max-width: 400px;
    padding: var(--space-xl);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.mpesa-modal-icon {
    font-size: 3rem;
    color: #4CAF50;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.mpesa-pin-input-container {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin: var(--space-md) 0;
}

.mpesa-pin-box {
    width: 45px;
    height: 45px;
    border: 2px solid rgba(28, 63, 53, 0.2);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--clr-bg-canvas);
}

.mpesa-pin-box:focus {
    outline: none;
    border-color: var(--clr-brand-secondary);
}

.checkout-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-lg));
    padding: var(--space-xl);
}

.checkout-sidebar-title {
    font-size: 1.25rem;
    border-bottom: 1px solid rgba(28, 63, 53, 0.1);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
}

.checkout-totals-box {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* Donor Dashboard / Impact Ledger */
.dashboard-layout {
    padding: var(--space-xxl) 0;
}

.dashboard-hero {
    background: var(--clr-brand-primary);
    color: #fff;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--space-lg);
}

.dashboard-user-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.dashboard-user-name {
    color: #fff;
    font-size: 2rem;
}

.dashboard-joined {
    font-size: 0.85rem;
    opacity: 0.75;
}

.dashboard-level-badge {
    background: var(--clr-brand-accent);
    color: var(--clr-brand-primary);
    font-family: var(--font-heading);
    font-weight: 800;
    padding: 0.6rem var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 1rem;
    text-align: center;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-xl);
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.dashboard-stat-card {
    padding: var(--space-lg);
    text-align: center;
}

.dashboard-stat-num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.4rem;
    color: var(--clr-brand-secondary);
    line-height: 1.1;
    margin-bottom: var(--space-xs);
}

.dashboard-stat-label {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.ledger-card {
    padding: var(--space-xl);
}

.ledger-table-container {
    overflow-x: auto;
    margin-top: var(--space-md);
}

.ledger-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.ledger-table th, 
.ledger-table td {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(28, 63, 53, 0.08);
}

.ledger-table th {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--clr-brand-primary);
    font-size: 0.85rem;
}

.ledger-table td {
    font-size: 0.9rem;
}

.ledger-allocation-badge {
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.75rem;
}

.ledger-allocation-badge.school {
    background-color: rgba(28, 63, 53, 0.1);
    color: var(--clr-brand-primary);
}

.ledger-allocation-badge.hospital {
    background-color: rgba(192, 92, 62, 0.1);
    color: var(--clr-brand-secondary);
}

.ledger-allocation-badge.mixed {
    background-color: rgba(226, 155, 55, 0.1);
    color: var(--clr-brand-accent);
}

/* Badges section */
.badges-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.badge-item {
    text-align: center;
    padding: var(--space-md);
    background: rgba(28, 63, 53, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid rgba(28, 63, 53, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    opacity: 0.35;
    transition: var(--transition-fast);
}

.badge-item.earned {
    opacity: 1;
    background: #fff;
    border-color: rgba(192, 92, 62, 0.2);
}

.badge-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: rgba(28, 63, 53, 0.05);
    color: var(--clr-brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.badge-item.earned .badge-icon {
    background: rgba(192, 92, 62, 0.1);
    color: var(--clr-brand-secondary);
}

.badge-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
}

.badge-desc {
    font-size: 0.7rem;
    color: var(--clr-text-light);
}

/* Printable Certificate Frame */
.certificate-preview-container {
    display: none;
    margin-top: var(--space-xl);
}

.certificate-preview-container.active {
    display: block;
}

.certificate-frame {
    border: 15px solid var(--clr-brand-primary);
    padding: var(--space-xl);
    background-color: #fff;
    background-image: radial-gradient(circle, rgba(226, 155, 55, 0.03) 0%, transparent 80%);
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
}

.certificate-frame::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 2px dashed var(--clr-brand-secondary);
    pointer-events: none;
}

.cert-header {
    margin-bottom: var(--space-xl);
}

.cert-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--clr-brand-primary);
}

.cert-logo span { color: var(--clr-brand-secondary); }

.cert-subtitle {
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--clr-text-muted);
}

.cert-main-title {
    font-size: 2.2rem;
    font-family: var(--font-heading);
    color: var(--clr-brand-secondary);
    margin-bottom: var(--space-md);
}

.cert-recipient {
    font-size: 1.8rem;
    font-family: var(--font-heading);
    font-weight: 700;
    border-bottom: 2px solid var(--clr-brand-accent);
    width: fit-content;
    margin: 0 auto var(--space-md) auto;
    padding: 0 var(--space-xl);
}

.cert-text {
    max-width: 600px;
    margin: 0 auto var(--space-xl) auto;
    color: var(--clr-text-muted);
}

.cert-text strong {
    color: var(--clr-brand-primary);
}

.cert-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xxl);
    margin-top: var(--space-xl);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cert-sig-line {
    border-top: 1px solid var(--clr-text-light);
    padding-top: var(--space-xs);
    font-size: 0.8rem;
    color: var(--clr-text-muted);
}

.cert-sig-title {
    font-weight: 600;
}

/* Footer Section */
.site-footer {
    background-color: var(--clr-brand-primary);
    color: #fff;
    padding: var(--space-xxl) 0 var(--space-xl) 0;
    border-top: 5px solid var(--clr-brand-accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-about {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.6rem;
    color: #fff;
}

.footer-logo span { color: var(--clr-brand-accent); }

.footer-about-text {
    font-size: 0.85rem;
    opacity: 0.8;
}

.footer-links-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-col-title {
    font-size: 1rem;
    color: var(--clr-brand-accent);
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    list-style: none;
}

.footer-link {
    font-size: 0.85rem;
    opacity: 0.8;
}

.footer-link:hover {
    opacity: 1;
    color: var(--clr-brand-accent);
    padding-left: 3px;
}

.footer-newsletter {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-newsletter-text {
    font-size: 0.85rem;
    opacity: 0.8;
}

.newsletter-form {
    display: flex;
    gap: var(--space-xs);
}

.newsletter-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.5rem var(--space-sm);
    font-size: 0.85rem;
    color: #fff;
    flex-grow: 1;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--clr-brand-accent);
}

.newsletter-btn {
    background-color: var(--clr-brand-accent);
    color: var(--clr-brand-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 0.5rem var(--space-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.75;
}

/* ========================================================================
   RESPONSIVENESS (MOBILE FRIENDLY MEDIA QUERIES)
   ======================================================================== */

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .hamburger-btn {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--clr-bg-canvas);
        flex-direction: column;
        align-items: center;
        padding: var(--space-xl) 0;
        transition: var(--transition-smooth);
        z-index: 99;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .hero-image-card {
        max-width: 450px;
        margin: 0 auto;
        transform: none;
    }
    
    .hero-image-card img {
        height: 320px;
    }
    
    .ticker-grid {
        grid-template-columns: 1fr;
    }
    
    .calc-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .story-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .story-main-img {
        width: 100%;
        height: 320px;
    }
    
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .badges-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .checkout-stepper {
        flex-direction: column;
        gap: var(--space-md);
        align-items: flex-start;
    }
    
    .checkout-stepper::before {
        display: none;
    }
    
    .checkout-step {
        flex-direction: row;
        gap: var(--space-md);
    }
    
    .payment-tabs {
        grid-template-columns: 1fr;
    }
}

/* ========================================================================
   CAMPAIGN PROJECT CARDS & GRID
   ======================================================================== */
.campaigns-section {
    padding: var(--space-xxl) 0;
}

.campaigns-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

@media (max-width: 768px) {
    .campaigns-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

.campaign-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-lg);
    transition: var(--transition-smooth);
    background: var(--clr-bg-surface);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(28, 63, 53, 0.08);
}

.campaign-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(192, 92, 62, 0.2);
}

.campaign-card-img-container {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.campaign-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.campaign-card:hover .campaign-card-img {
    transform: scale(1.04);
}

.campaign-card-content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex-grow: 1;
}

.campaign-card-tagline {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--clr-brand-secondary);
    letter-spacing: 1.5px;
}

.campaign-card-title {
    font-size: 1.6rem;
    color: var(--clr-brand-primary);
    margin-bottom: var(--space-xs);
    font-weight: 800;
}

.campaign-card-desc {
    font-size: 0.95rem;
    color: var(--clr-text-muted);
    line-height: 1.6;
    flex-grow: 1;
}

.campaign-card-progress-container {
    margin: var(--space-md) 0 var(--space-sm) 0;
}

.campaign-card-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(28, 63, 53, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-xs);
}

.campaign-card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--clr-brand-secondary), var(--clr-brand-accent));
    border-radius: var(--radius-full);
    transition: width 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.campaign-card-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--clr-text-muted);
}

.campaign-card-progress-info .raised {
    color: var(--clr-brand-primary);
}

.campaign-card-stats-pill {
    background: rgba(28, 63, 53, 0.04);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(28, 63, 53, 0.05);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--clr-brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

/* ========================================================================
   PROJECT EXPANDABLE DRAWER
   ======================================================================== */
.project-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(28, 63, 53, 0.4);
    backdrop-filter: blur(4px);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.project-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.project-drawer {
    position: fixed;
    top: 0;
    right: -750px;
    width: 100%;
    max-width: 750px;
    height: 100%;
    background-color: var(--clr-bg-canvas);
    z-index: 151;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.project-drawer.active {
    right: 0;
}

@media (max-width: 768px) {
    .project-drawer {
        right: -100%;
        max-width: 100%;
    }
}

.project-drawer-header {
    padding: var(--space-lg);
    background-color: var(--clr-brand-primary);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-drawer-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.project-drawer-title {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
}

.project-drawer-tagline {
    font-size: 0.85rem;
    color: var(--clr-brand-accent);
    font-weight: 600;
}

.project-drawer-close-btn {
    cursor: pointer;
    color: #fff;
    opacity: 0.8;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-drawer-close-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.project-drawer-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.project-drawer-desc {
    font-size: 0.95rem;
    color: var(--clr-text-muted);
    line-height: 1.6;
    border-bottom: 1px solid rgba(28, 63, 53, 0.1);
    padding-bottom: var(--space-md);
}

.project-drawer-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 576px) {
    .project-drawer-products-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

.drawer-product-card {
    background: var(--clr-bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid rgba(28, 63, 53, 0.06);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: var(--transition-smooth);
}

.drawer-product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(192, 92, 62, 0.15);
}

.drawer-product-image-container {
    height: 180px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--clr-bg-canvas);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.drawer-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drawer-product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--clr-text-light);
}

.drawer-product-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--clr-brand-primary);
    margin: 0;
    line-height: 1.3;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.drawer-product-impact {
    font-size: 0.8rem;
    color: var(--clr-brand-secondary);
    font-weight: 600;
    margin: 0;
}

.drawer-product-sizes-container {
    margin-top: auto;
    border-top: 1px solid rgba(28, 63, 53, 0.05);
    padding-top: var(--space-sm);
}

.drawer-product-sizes-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--clr-text-muted);
    display: block;
    margin-bottom: 4px;
}

.drawer-product-sizes {
    display: flex;
    gap: 4px;
}

.drawer-size-btn {
    width: 32px;
    height: 26px;
    border: 1px solid rgba(192, 92, 62, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: var(--transition-fast);
}

.drawer-size-btn:hover {
    border-color: var(--clr-brand-secondary);
    color: var(--clr-brand-secondary);
}

.drawer-size-btn.active {
    background: var(--clr-brand-secondary);
    color: #fff;
    border-color: var(--clr-brand-secondary);
}

.drawer-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-xs);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(28, 63, 53, 0.05);
}

.drawer-product-price {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--clr-text-main);
}

.drawer-quick-add {
    background: var(--clr-brand-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 0.4rem var(--space-sm);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    transition: var(--transition-fast);
    box-shadow: 0 2px 6px rgba(28, 63, 53, 0.15);
}

.drawer-quick-add:hover {
    background-color: var(--clr-brand-secondary);
    box-shadow: 0 4px 10px rgba(192, 92, 62, 0.2);
}

/* ========================================================================
   PRINT STYLING (FOR MEDICAL TAX DEDUCTION RECEIPTS)
   ======================================================================== */
@media print {
    body * {
        visibility: hidden;
    }
    
    .certificate-preview-container,
    .certificate-preview-container * {
        visibility: visible;
    }
    
    .certificate-preview-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    .certificate-frame {
        box-shadow: none;
        border-width: 8px;
    }
    
    .btn,
    .site-header,
    .site-footer,
    .dashboard-hero,
    .dashboard-main,
    .dashboard-sidebar {
        display: none !important;
    }
}
