/* Enhanced Visual Design System */

/* Improved Color Palette with Sophisticated Gradients */
:root {
    --primary-green: #059669;
    --primary-green-light: #10b981;
    --primary-green-dark: #047857;
    --secondary-green: #d1fae5;
    --accent-orange: #f59e0b;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-yellow: #eab308;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --gradient-primary: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 50%, var(--accent-blue) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-yellow) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
}

/* Enhanced Typography with Better Hierarchy */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

h1 { 
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 { 
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
}

h3 { 
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
}

h4 { 
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 600;
}

h5 { 
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    font-weight: 600;
}

h6 { 
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    font-weight: 600;
}

/* Line Clamp Utility for Text Truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Enhanced Card Design */
.enhanced-card {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.enhanced-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-green-light);
}

.enhanced-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.enhanced-card-body {
    padding: 1.5rem;
}

.enhanced-card-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
}

/* Enhanced Farm Cards */
.farm-card {
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-light);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
}

.farm-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-green-light);
}

.farm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.farm-card:hover::before {
    opacity: 1;
}

.farm-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

.farm-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.farm-card:hover .farm-card-image img {
    transform: scale(1.1);
}

.farm-card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(16, 185, 129, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.farm-card-content {
    padding: 2rem;
}

.farm-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.farm-card-location {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.farm-card-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.farm-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.farm-feature {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--secondary-green);
    color: var(--primary-green-dark);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.farm-feature:hover {
    background: var(--primary-green-light);
    color: white;
    transform: translateY(-1px);
}

.farm-card-button {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.farm-card-button::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: left 0.5s;
}

.farm-card-button:hover::before {
    left: 100%;
}

.farm-card-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: white;
    text-decoration: none;
}

/* Enhanced Product Cards with Better Visual Hierarchy */
.product-card {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-light);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-green-light);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-card-image img {
    transform: scale(1.1);
}

.product-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(16, 185, 129, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.product-card-content {
    padding: 1.5rem;
    position: relative;
}

.product-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-price {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.product-card-unit {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.product-card-size {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.product-card-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--secondary-green);
    color: var(--primary-green-dark);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.75rem;
}

.product-card-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
}

.product-card-actions .product-card-button {
    width: 100%;
    order: 1;
}

.product-card-actions .product-card-bulk-button {
    width: 100%;
    order: 2;
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
}

.product-card-button {
    flex: 1;
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.product-card-button::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: left 0.5s;
}

.product-card-button:hover::before {
    left: 100%;
}

.product-card-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
    text-decoration: none;
}

.product-card-secondary-button {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid var(--border-medium);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.product-card-secondary-button:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-green-light);
    color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

/* Enhanced Bulk Pricing Button */
.product-card-bulk-button {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    font-size: 0.875rem;
}

.product-card-bulk-button::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: left 0.5s;
}

.product-card-bulk-button:hover::before {
    left: 100%;
}

.product-card-bulk-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
}

.product-card-bulk-button.active {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
}

.product-card-bulk-button.active .fa-chevron-down {
    transform: rotate(180deg);
}

/* Add pulsing animation to draw attention to bulk pricing button */
.product-card-bulk-button {
    animation: subtle-pulse 2s infinite;
}

@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: var(--shadow-md);
    }
    50% {
        box-shadow: var(--shadow-lg), 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
}

.product-card-bulk-button:hover {
    animation: none;
}

.product-card-bulk-button.active {
    animation: none;
}

/* Enhanced Buttons with Better Visual Feedback */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.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: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--border-medium);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-green-light);
    color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

/* Enhanced Form Elements */
.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-green-light);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1), var(--shadow-md);
    transform: translateY(-1px);
}

.form-select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-green-light);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1), var(--shadow-md);
    transform: translateY(-1px);
}

/* Enhanced Animations with Better Timing */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-right {
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-scale-in {
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Enhanced Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: loading 2s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Enhanced Badges and Tags */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.badge-success {
    background: var(--gradient-primary);
    color: white;
}

.badge-warning {
    background: var(--gradient-secondary);
    color: white;
}

.badge-info {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* Enhanced Grid Layouts */
.grid-enhanced {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

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

/* Enhanced Spacing */
.space-y-enhanced > * + * {
    margin-top: 2rem;
}

.space-x-enhanced > * + * {
    margin-left: 2rem;
}

/* Enhanced Shadows */
.shadow-enhanced {
    box-shadow: var(--shadow-xl);
}

.shadow-enhanced-hover:hover {
    box-shadow: var(--shadow-2xl);
}

/* Enhanced Gradients */
.gradient-primary {
    background: var(--gradient-primary);
}

.gradient-secondary {
    background: var(--gradient-secondary);
}

.gradient-accent {
    background: var(--gradient-accent);
}

.gradient-hero {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 30%, var(--accent-blue) 70%, var(--accent-purple) 100%);
}

/* Enhanced Icons */
.icon-enhanced {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
}

.icon-enhanced:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: var(--shadow-xl);
}

.icon-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.icon-secondary:hover {
    background: var(--primary-green-light);
    color: white;
    transform: translateY(-1px);
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .farm-card-image {
        height: 200px;
    }
    
    .product-card-image {
        height: 180px;
    }
    
    .farm-card-content {
        padding: 1.5rem;
    }
    
    .product-card-content {
        padding: 1.25rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
    }
    
    .form-input,
    .form-select {
        padding: 0.875rem 1rem;
    }
}

@media (max-width: 480px) {
    .grid-enhanced {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .grid-enhanced-sm {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .farm-card-image {
        height: 180px;
    }
    
    .product-card-image {
        height: 160px;
    }
    
    .farm-card-content {
        padding: 1.25rem;
    }
    
    .product-card-content {
        padding: 1rem;
    }
    
    .farm-card-features {
        gap: 0.5rem;
    }
    
    .farm-feature {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Enhanced Micro-interactions */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

/* Enhanced Focus States */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Enhanced Scroll Behavior */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* Enhanced Selection */
::selection {
    background: var(--primary-green-light);
    color: white;
}

::-moz-selection {
    background: var(--primary-green-light);
    color: white;
} 

/* Image Loading States */
img {
    transition: opacity 0.3s ease-in-out;
}

img.lazy {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

img.error {
    opacity: 0.5;
    filter: grayscale(100%);
}

/* Progressive Image Loading */
.progressive-image {
    position: relative;
    overflow: hidden;
}

.progressive-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    z-index: 1;
}

.progressive-image.loaded::before {
    display: none;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Performance Optimizations */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Optimized animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Image optimization classes */
.image-optimized {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.image-blur-load {
    filter: blur(10px);
    transition: filter 0.3s ease-out;
}

.image-blur-load.loaded {
    filter: blur(0);
}

/* Performance monitoring */
.performance-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.performance-indicator:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.performance-indicator.show {
    display: block;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Critical CSS for above-the-fold content */
.critical-content {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

/* Optimized grid layouts */
.optimized-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    contain: layout style paint;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .loading-spinner,
    .progressive-image::before {
        animation: none;
    }
    
    img {
        transition: none;
    }
} 