/* Pimento Custom Styles */

:root {
    --primary-color: #dc3545;
    --primary-dark: #c82333;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Custom Components */
.search-hero {
    background: linear-gradient(135deg, var(--primary-color), #e74c3c);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.product-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

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

.category-badge {
    background-color: var(--light-color);
    color: var(--secondary-color);
    border: 1px solid #dee2e6;
    font-weight: 500;
}

/* Search Results */
.search-filters {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-results-grid {
    min-height: 400px;
}

/* Button Styles */
.btn-danger {
    background: linear-gradient(45deg, var(--primary-color), #e74c3c);
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(45deg, var(--primary-dark), #c0392b);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-outline-danger {
    border-width: 2px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-hero {
        min-height: 50vh;
        padding: 2rem 0;
    }
    
    .search-hero h1 {
        font-size: 2rem;
    }
    
    .product-card:hover {
        transform: none;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .search-hero {
        min-height: 40vh;
    }
    
    .search-hero h1 {
        font-size: 1.75rem;
    }
    
    .search-hero .lead {
        font-size: 1rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .price-tag {
        font-size: 1.1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

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

/* Image Loading and Optimization */
.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

.img-lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.img-lazy.loaded {
    opacity: 1;
}

.img-error {
    background: #f8f9fa;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border: 2px dashed #dee2e6;
}

/* Skeleton Loading Animation */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite linear;
}

.skeleton-text {
    height: 1rem;
    margin: 0.5rem 0;
    border-radius: 4px;
}

.skeleton-title {
    height: 1.5rem;
    margin: 0.5rem 0;
    border-radius: 4px;
    width: 80%;
}

.skeleton-image {
    height: 200px;
    border-radius: 8px;
}

/* Image Aspect Ratio Containers */
.img-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.img-container::before {
    content: '';
    display: block;
    padding-top: 75%; /* 4:3 aspect ratio */
}

.img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Toast Container */
.toast-container {
    z-index: 1055;
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Utility Classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.box-shadow {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.rounded-lg {
    border-radius: 0.75rem;
}

.gradient-bg {
    background: linear-gradient(135deg, var(--primary-color), #e74c3c);
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn, .search-hero {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
}