/* Custom styles for Biochar Marketplace */

/* Hover effects for cards */
.hover-card {
    transition: all 0.2s ease-in-out;
}

.hover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Cart item styling */
.cart-item {
    transition: background-color 0.2s ease;
}

.cart-item:hover {
    background-color: var(--bs-gray-100);
}

/* Product image consistent sizing */
.product-image {
    height: 200px;
    object-fit: cover;
}

.product-image-placeholder {
    height: 200px;
    background-color: var(--bs-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Store logo consistent sizing */
.store-logo {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.store-logo-large {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

/* Badge styling improvements */
.badge-custom {
    font-weight: 500;
    font-size: 0.75em;
}

/* Quantity input styling */
.quantity-input {
    max-width: 80px;
}

/* Sticky elements */
.sticky-top {
    top: 20px;
}

/* Loading states */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Hero section styling */
.hero-section {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    border-radius: 15px;
}

/* Form improvements */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Table improvements */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

/* Alert improvements */
.alert {
    border: none;
    border-radius: 10px;
}

/* Navigation improvements */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Footer styling */
footer {
    margin-top: auto;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem !important;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .cart-item .row > div {
        margin-bottom: 0.5rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark mode specific adjustments */
[data-bs-theme="dark"] .cart-item:hover {
    background-color: var(--bs-gray-800);
}

[data-bs-theme="dark"] .bg-light {
    background-color: var(--bs-gray-800) !important;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .btn {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Success/Error state styling */
.success-icon {
    color: var(--bs-success);
    font-size: 4rem;
}

.error-icon {
    color: var(--bs-danger);
    font-size: 4rem;
}

.warning-icon {
    color: var(--bs-warning);
    font-size: 4rem;
}

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

::-webkit-scrollbar-track {
    background: var(--bs-gray-200);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--bs-gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bs-gray-800);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--bs-gray-600);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}
