/* Custom styles for BookAfri */

:root {
    --primary-color: #28a745; /* Green for African theme */
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

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

.navbar-brand i {
    color: var(--primary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Buttons */
.btn-success {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-outline-success {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-success:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Badges */
.badge.bg-success {
    background-color: var(--primary-color);
}

/* Hover effects */
.hover-lift {
    transition: transform 0.3s ease;
}

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

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #21c87a 100%);
    color: white;
    border-radius: 10px;
}

/* Category cards */
.category-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    background-color: rgba(40, 167, 69, 0.1);
    transform: translateY(-3px);
}

/* Product images */
.card-img-top {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

/* Footer */
footer a {
    text-decoration: none;
    color: #adb5bd;
}

footer a:hover {
    color: white;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Alerts */
.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: var(--primary-color);
    color: var(--success-color);
}

/* Rating stars */
.text-warning {
    color: var(--warning-color) !important;
}

/* Cart count badge positioning */
.position-absolute.top-0.start-100 {
    top: -10px !important;
    left: 100% !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
}

/* Animation for cart count */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.badge.bg-danger {
    animation: pulse 0.5s ease;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Service grid */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Vendor grid */
.vendor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Custom radio buttons for ratings */
.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rating-input input[type="radio"] {
    display: none;
}

.rating-input label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #ddd;
    margin-right: 5px;
    transition: color 0.2s;
}

.rating-input input[type="radio"]:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    color: var(--warning-color);
}

/* Image gallery */
.img-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.img-gallery img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom alerts */
.alert-info {
    background-color: rgba(114, 137, 218, 0.1);
    border-color: #6c757d;
    color: #495057;
}

/* Breadcrumb */
.breadcrumb-item.active {
    color: var(--primary-color);
}

/* Pagination */
.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-link {
    color: var(--primary-color);
}

.page-link:hover {
    color: #218838;
}

/* Modal */
.modal-header {
    background-color: var(--primary-color);
    color: white;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Table */
.table th {
    background-color: var(--primary-color);
    color: white;
}

/* Progress bars */
.progress {
    height: 10px;
}

/* Accordion */
.accordion-button:not(.collapsed) {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--primary-color);
}

/* Tooltip */
.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: 4px;
    padding: 5px 10px;
}

/* Popover */
.popover {
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.popover-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    border-top-left-radius: calc(8px - 1px);
    border-top-right-radius: calc(8px - 1px);
}

/* Custom checkboxes */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Custom selects */
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Custom range sliders */
.form-range::-webkit-slider-thumb {
    background-color: var(--primary-color);
}

.form-range::-moz-range-thumb {
    background-color: var(--primary-color);
}

/* Disabled states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Focus states */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Utility classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-success {
    border-color: var(--primary-color) !important;
}

/* Hover shadows */
.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card {
        margin-bottom: 15px;
    }
}

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