/* GreenSpace Lawn & Garden Custom Styles */

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f2e8;
}

::-webkit-scrollbar-thumb {
    background: #4a7c59;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2d5016;
}

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

/* Enhanced focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
a:focus {
    outline: 2px solid #87a96b;
    outline-offset: 2px;
}

/* Navigation link hover effects */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #4a7c59;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero section background pattern */
#home {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(168, 198, 134, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(135, 169, 107, 0.1) 0%, transparent 50%);
}

/* Category cards hover effect */
.category-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover {
    box-shadow: 0 25px 50px -12px rgba(45, 80, 22, 0.25);
}

/* Product cards */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(45, 80, 22, 0.25);
    border-color: #87a96b;
}

.product-image {
    background: linear-gradient(135deg, #f5f2e8 0%, #e5e7eb 100%);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image i {
    font-size: 3rem;
    color: #87a96b;
}

/* Testimonial cards */
.testimonial-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-left: 4px solid #87a96b;
}

/* Star ratings */
.stars {
    color: #fbbf24;
}

/* Button animations */
.btn-primary {
    background: linear-gradient(135deg, #4a7c59 0%, #2d5016 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2d5016 0%, #1a2f0c 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(45, 80, 22, 0.3);
}

/* Form styles */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid #d1d5db;
}

.form-input:focus {
    border-color: #4a7c59;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

/* Newsletter form */
#newsletterForm input {
    transition: all 0.3s ease;
}

#newsletterForm input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(168, 198, 134, 0.3);
}

/* Cart sidebar animation */
#cartSidebar.open {
    transform: translateX(0);
}

/* Search results dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 50;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: #f9fafb;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Blog post cards */
.blog-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(45, 80, 22, 0.1);
}

.blog-meta {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Service cards */
.service-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    transition: all 0.3s ease;
}

.service-card:hover {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    transform: translateY(-4px);
}

/* Contact form */
.contact-form {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
}

/* Map container */
.map-container {
    height: 400px;
    background: linear-gradient(135deg, #87a96b 0%, #4a7c59 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #4a7c59;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

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

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .category-card,
    .product-card,
    .blog-card {
        margin-bottom: 1rem;
    }
    
    #cartSidebar {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-padding {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .category-card,
    .product-card,
    .blog-card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom utility classes */
.bg-gradient-green {
    background: linear-gradient(135deg, #4a7c59 0%, #2d5016 100%);
}

.text-gradient-green {
    background: linear-gradient(135deg, #4a7c59 0%, #2d5016 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-green {
    box-shadow: 0 10px 25px rgba(45, 80, 22, 0.15);
}

.shadow-green-lg {
    box-shadow: 0 25px 50px rgba(45, 80, 22, 0.25);
}

/* Notification styles */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: #10b981;
}

.notification.error {
    background-color: #ef4444;
}

.notification.info {
    background-color: #3b82f6;
}