/* EGOUSH E-Commerce - Styles Premium */

:root {
    --primary-color: #059669;
    --secondary-color: #10b981;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #14b8a6;
    --dark-color: #1f2937;
    --light-color: #ffffff;
    --accent-green: #34d399;
    --dark-green: #047857;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #374151;
    background-color: #f9fafb;
}

a {
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Header Styles */
.top-bar {
    font-size: 0.875rem;
}

.main-header {
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.15);
    backdrop-filter: blur(10px);
}

.logo:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.search-form .form-control {
    border-radius: 25px 0 0 25px;
    border-right: none;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.search-form .form-control:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
    border-color: var(--primary-color);
}

.search-form .btn {
    border-radius: 0 25px 25px 0;
    padding: 0.75rem 1.5rem;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Product Card */
.product-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid rgba(5, 150, 105, 0.1);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(5, 150, 105, 0.1), transparent);
    transition: left 0.5s;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    box-shadow: 0 20px 40px rgba(5, 150, 105, 0.2);
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.product-card .product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
    transform: scale(1.1) rotate(1deg);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 1;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.product-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    height: 2.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

.product-card:hover .product-title {
    color: var(--primary-color);
}

.product-rating {
    font-size: 0.875rem;
}

.product-price {
    font-size: 1.1rem;
}

/* Category Card */
.category-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.category-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.category-card:hover::after {
    width: 300px;
    height: 300px;
}

.category-card:hover {
    box-shadow: 0 15px 40px rgba(5, 150, 105, 0.3);
    transform: translateY(-10px) scale(1.02);
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-color: var(--accent-green);
}

.category-card i {
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.category-card:hover i {
    color: white !important;
    transform: rotateY(360deg) scale(1.2);
}

.category-card h5 {
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.category-card:hover h5 {
    color: white !important;
    transform: scale(1.05);
}

/* Service Box */
.service-box {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(5, 150, 105, 0.1);
}

.service-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    transition: left 0.5s;
}

.service-box:hover::before {
    left: 0;
}

.service-box:hover {
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.2);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.service-box i {
    transition: all 0.3s ease;
}

.service-box:hover i {
    transform: scale(1.2);
    color: var(--primary-color) !important;
}

/* Hero Slider Responsive */
.hero-slider-responsive {
    background-color: #f9fafb;
}

.hero-slide-img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    background-color: #f9fafb;
}

/* Desktop - bannière pleine largeur */
@media (min-width: 768px) {
    .hero-slide-img {
        max-height: 550px;
    }
}

/* Mobile - hauteur réduite, pas d'espaces */
@media (max-width: 767px) {
    .hero-slide-img {
        max-height: 300px;
        object-fit: cover;
    }
    
    .carousel-indicators {
        margin-bottom: 5px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
    }
}

/* Ancien style hero-slide (conservé pour compatibilité) */
.hero-slide {
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
    transform: translateY(-3px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

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

.btn-outline-success:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-color: transparent;
    transform: scale(1.05);
}

.btn-light {
    background: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-light:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    transform: scale(1.05);
}

/* Cart Badge */
.badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    position: relative;
    top: -10px;
    left: -5px;
    animation: pulse 2s infinite;
}

.badge.bg-danger {
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.badge.bg-success {
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.bg-success-subtle {
    background-color: rgba(5, 150, 105, 0.1) !important;
}

/* Section Header */
.section-header {
    animation: fadeInUp 0.8s ease;
}

.section-header .badge {
    animation: slideInLeft 0.6s ease;
    top: 0;
}

/* Newsletter Section */
.newsletter-section {
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 40%;
    height: 200%;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(15deg);
    animation: shimmer 3s infinite;
}

.newsletter-form input:focus {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
    border-color: white;
}

.newsletter-form .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(5, 150, 105, 0.3);
}

/* Footer */
footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.social-links a:hover {
    transform: scale(1.2);
    display: inline-block;
}

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

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

.opacity-50 {
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-slide {
        height: 300px !important;
    }
    
    .hero-slide h1 {
        font-size: 2rem !important;
    }
    
    .product-card .product-image {
        height: 200px;
    }
    
    .search-form {
        margin: 1rem 0;
    }
}

/* Admin Styles */
.card-header {
    font-weight: 600;
}

.table {
    background: white;
}

.list-group-item-action:hover {
    background-color: #f3f4f6;
}

.list-group-item.active {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-color: #059669;
}

/* Forms */
.form-control:focus {
    border-color: #059669;
    box-shadow: 0 0 0 0.2rem rgba(5, 150, 105, 0.25);
}

.form-label {
    font-weight: 500;
    color: #374151;
}

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

/* Loading Spinner */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

/* Product Details */
.product-gallery {
    position: relative;
}

.product-gallery-main {
    width: 100%;
    height: 500px;
    object-fit: contain;
    background: #f9fafb;
    border-radius: 10px;
}

.product-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
}

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

.product-gallery-thumb:hover,
.product-gallery-thumb.active {
    border-color: #059669;
    transform: scale(1.05);
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-selector button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-selector button:hover {
    background: #059669;
    color: white;
    border-color: #059669;
}

.quantity-selector input {
    width: 60px;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    padding: 5px;
}

/* Cart Page */
.cart-item {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

/* Checkout */
.checkout-step {
    padding: 20px;
    background: white;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.checkout-step-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

/* Order Summary */
.order-summary {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 20px;
}

.order-summary-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.order-summary-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
    margin-top: 10px;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Dropdown Catégories Moderne */
#categories-menu {
    max-height: 500px;
    overflow-y: auto;
    min-width: 320px;
    padding: 0.5rem 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 12px;
}

#categories-menu::-webkit-scrollbar {
    width: 6px;
}

#categories-menu::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

#categories-menu::-webkit-scrollbar-thumb {
    background: #059669;
    border-radius: 10px;
}

#categories-menu::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

#categories-menu .dropdown-item {
    padding: 0.65rem 1.25rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
}

#categories-menu .dropdown-item:hover {
    background: linear-gradient(90deg, rgba(5, 150, 105, 0.08) 0%, rgba(5, 150, 105, 0.03) 100%);
    border-left-color: #059669;
    padding-left: 1.5rem;
    transform: translateX(3px);
}

#categories-menu .dropdown-item.fw-bold {
    color: #1f2937;
    font-weight: 600;
    font-size: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

#categories-menu .dropdown-item.ps-4 {
    color: #6b7280;
    font-size: 0.9rem;
    padding-left: 2.5rem;
}

#categories-menu .dropdown-item.ps-4:hover {
    color: #059669;
    padding-left: 2.75rem;
}

#categories-menu .dropdown-divider {
    margin: 0.5rem 0;
    border-color: #e5e7eb;
}

#categories-menu .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Animation d'ouverture du dropdown */
.dropdown-menu.show {
    animation: dropdownFadeIn 0.3s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #059669;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #047857;
}
