/**
 * Styles principaux pour AFRICA-US
 */

:root {
    --orange-primary: #FF9500;
    --orange-secondary: #FF6B35;
    --green-primary: #28a745;
    --blue-primary: #007bff;
    --dark-primary: #232F3E;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
}

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

.text-orange {
    color: var(--orange-primary) !important;
}

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

.text-green {
    color: var(--green-primary) !important;
}

.text-blue {
    color: var(--blue-primary) !important;
}

.btn-orange {
    background-color: var(--orange-primary);
    border-color: var(--orange-primary);
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-orange:hover {
    background-color: var(--orange-secondary);
    border-color: var(--orange-secondary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 149, 0, 0.3);
}

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

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

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
}

.search-container {
    max-width: 500px;
    width: 100%;
    position: relative;
}

.search-form .form-control {
    border-radius: 25px 0 0 25px;
    border-right: none;
    padding: 12px 20px;
}

.search-form .btn {
    border-radius: 0 25px 25px 0;
    padding: 12px 20px;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:hover {
    background-color: var(--light-gray);
}

.categories-bar {
    border-top: 1px solid var(--border-color);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(35, 47, 62, 0.8), rgba(255, 149, 0, 0.6));
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
.section-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark-primary);
    margin: 0;
}

.section-link {
    color: var(--orange-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.section-link:hover {
    color: var(--orange-secondary);
}

/* Features Section */
.features-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--dark-primary);
}

.feature-description {
    color: #6c757d;
    margin-bottom: 0;
}

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

.product-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--orange-primary);
}

.product-card .card-img-top {
    transition: transform 0.3s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-card .card-body {
    padding: 1.25rem;
}

.product-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    height: 2.6rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card .card-title a:hover {
    color: var(--orange-primary) !important;
}

/* Category Cards */
.category-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}

.category-image {
    height: 120px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.category-name {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--dark-primary);
}

/* Cart */
.cart-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.cart-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-summary {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-line:last-child {
    border-bottom: none;
}

.total-line {
    font-size: 1.1rem;
    font-weight: bold;
    background: var(--light-gray);
    margin: 0 -1.5rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.quantity-btn {
    background: var(--light-gray);
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.quantity-btn:hover {
    background-color: var(--orange-primary);
    color: white;
}

.quantity-input {
    border: none;
    text-align: center;
    width: 60px;
    padding: 8px;
    font-weight: bold;
}

.quantity-input:focus {
    outline: none;
}

/* Checkout */
.checkout-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.checkout-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.checkout-step.active .step-number {
    background: var(--orange-primary);
    color: white;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.payment-method {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.payment-method:hover {
    border-color: var(--orange-primary);
    background: #fff8f0;
}

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

.payment-method input[type="radio"]:checked + label,
.payment-method.selected {
    border-color: var(--orange-primary);
    background: #fff8f0;
}

.payment-details {
    background: var(--light-gray);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

/* Testimonials */
.testimonials-section {
    background: linear-gradient(135deg, var(--dark-primary), #1a252f);
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.testimonial-rating {
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.testimonial-author strong {
    display: block;
    margin-bottom: 0.25rem;
}

/* Newsletter */
.newsletter-section {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-secondary));
}

.newsletter-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.newsletter-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.newsletter-form .input-group {
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.newsletter-form .form-control {
    border: none;
    padding: 15px 20px;
    font-size: 1.1rem;
}

.newsletter-form .btn {
    border: none;
    padding: 15px 30px;
    font-weight: bold;
}

/* Product Detail */
.product-gallery {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.product-main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.product-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.product-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: var(--orange-primary);
    transform: scale(1.05);
}

.product-info {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.product-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark-primary);
    margin-bottom: 1rem;
}

.product-meta {
    margin-bottom: 1.5rem;
}

.product-rating {
    display: flex;
    align-items: center;
}

.product-price {
    margin-bottom: 1.5rem;
}

.current-price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--orange-primary);
}

.original-price {
    font-size: 1.25rem;
    color: #6c757d;
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.product-features ul {
    list-style: none;
    padding: 0;
}

.product-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.add-to-cart-section {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.shipping-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

/* Filters */
.search-filters {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    position: sticky;
    top: 100px;
}

.filter-section {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
}

.filter-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-title {
    font-weight: 600;
    color: var(--dark-primary);
    margin-bottom: 0.75rem;
}

.filter-options {
    max-height: 200px;
    overflow-y: auto;
}

.form-check {
    margin-bottom: 0.5rem;
}

.form-check-label {
    cursor: pointer;
    font-size: 0.95rem;
}

/* Order Tracking */
.order-tracking {
    position: relative;
}

.tracking-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    position: relative;
}

.tracking-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 45px;
    width: 2px;
    height: calc(100% + 1rem);
    background: #dee2e6;
}

.tracking-step.active::after {
    background: var(--orange-primary);
}

.tracking-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    z-index: 1;
    position: relative;
}

.tracking-step.active .tracking-icon {
    background: var(--orange-primary);
    color: white;
}

.tracking-content h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

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

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

.price-animation {
    animation: pulse 0.5s ease-in-out;
    color: var(--orange-primary) !important;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--orange-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

/* Utilities */
.border-left-primary {
    border-left: 4px solid var(--blue-primary) !important;
}

.border-left-success {
    border-left: 4px solid var(--green-primary) !important;
}

.border-left-warning {
    border-left: 4px solid #ffc107 !important;
}

.border-left-info {
    border-left: 4px solid #17a2b8 !important;
}

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--orange-secondary);
}

/* Focus States */
.form-control:focus,
.form-select:focus {
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 0.2rem rgba(255, 149, 0, 0.25);
}

/* Hover Effects */
.btn {
    transition: all 0.3s ease;
}

.card {
    transition: all 0.3s ease;
}

.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--orange-primary) !important;
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* Table Styles */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.table thead th {
    background: var(--dark-primary);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #f0f0f0;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Modal Styles */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    background: var(--orange-primary);
    color: white;
    border-radius: 12px 12px 0 0;
}

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

/* Form Styles */
.form-floating > label {
    color: #6c757d;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--orange-primary);
}

/* Avatar */
.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--orange-primary), var(--orange-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .search-container {
        display: none;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .checkout-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}