:root {
    --primary-green: #72C006;
    --white: #FFFFFF;
    --dark-green: #5A9A05;
    --light-gray: #F8F9FA;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
}

.brand-font {
    font-family: 'Post No Bills', sans-serif;
    font-weight: 600;
}

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

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

.btn-primary-green {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
}

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

.navbar-brand {
    font-family: 'Post No Bills', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    transition: all 0.3s;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    color: white;
    transform: translateY(-2px);
}

.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e0e0e0;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-image {
    height: 200px;
    object-fit: cover;
}

.payment-method-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-method-card.selected {
    border-color: var(--primary-green);
    background-color: rgba(114, 192, 6, 0.1);
}

.payment-code {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-green);
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    border: 1px dashed #ccc;
}

.stats-card {
    border-radius: 10px;
    transition: transform 0.3s;
}

.stats-card:hover {
    transform: translateY(-3px);
}

.order-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-pending { background-color: #fff3cd; color: #856404; }
.status-paid { background-color: #d1ecf1; color: #0c5460; }
.status-shipped { background-color: #cce5ff; color: #004085; }
.status-delivered { background-color: #d4edda; color: #155724; }
.status-cancelled { background-color: #f8d7da; color: #721c24; }

footer {
    background-color: #343a40;
    color: white;
    margin-top: 50px;
}

.form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.25rem rgba(114, 192, 6, 0.25);
}

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

.page-link:hover {
    color: var(--dark-green);
}

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

.alert-success {
    background-color: rgba(114, 192, 6, 0.1);
    border-color: var(--primary-green);
    color: var(--dark-green);
}

/* AliExpress Style */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
}

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

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

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

.animate-fade-in { animation: fadeIn 0.8s ease-out; }
.animate-fade-in-delay { animation: fadeIn 0.8s ease-out 0.2s both; }
.animate-fade-in-delay-2 { animation: fadeIn 0.8s ease-out 0.4s both; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* Categories */
.category-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: var(--primary-green);
}

.category-icon-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon-wrapper {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
}

.category-card:hover .category-icon {
    color: white !important;
}

.category-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

/* Flash Deals */
.time-box {
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    min-width: 60px;
}

.time-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
}

.time-label {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Product Cards - AliExpress Style */
.col-xl-2-4 {
    flex: 0 0 auto;
    width: 20%;
}

.product-card-wrapper {
    margin-bottom: 1rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-color: var(--primary-green);
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge-discount {
    background: #ff4757;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: bold;
}

.badge-new {
    background: #00d2d3;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: bold;
}

.badge-flash {
    background: #ffa502;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.product-image-container {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.product-quick-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-quick-actions {
    opacity: 1;
}

.btn-quick-view, .btn-add-wishlist {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-quick-view:hover, .btn-add-wishlist:hover {
    background: var(--primary-green);
    color: white;
    transform: scale(1.1);
}

.product-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title-wrapper {
    margin-bottom: 0.5rem;
}

.product-title {
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

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

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    font-size: 0.7rem;
}

.rating-count {
    font-size: 0.7rem;
    color: #999;
}

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

.price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 0.8rem;
    margin-right: 8px;
}

.price-current {
    color: #ff4757;
    font-size: 1.1rem;
    font-weight: bold;
}

.price-save {
    display: block;
    color: var(--primary-green);
    font-size: 0.7rem;
    font-weight: 500;
}

.product-shipping {
    margin-bottom: 1rem;
}

.free-shipping, .shipping-info {
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.free-shipping {
    color: var(--primary-green);
    font-weight: 500;
}

.shipping-info {
    color: #666;
}

.product-actions {
    display: flex;
    gap: 4px;
    padding: 0 1rem 1rem;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.product-actions .btn {
    border: none;
    padding: 8px 4px;
    font-size: 0.7rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.btn-detail {
    background: #f8f9fa;
    color: #666;
}

.btn-detail:hover {
    background: #e9ecef;
    color: #333;
}

.btn-cart {
    background: var(--primary-green);
    color: white;
}

.btn-cart:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.product-actions .btn i {
    font-size: 0.8rem;
}

.product-actions .btn span {
    font-size: 0.6rem;
    line-height: 1;
}

/* Payment Cards */
.payment-card {
    background: white;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

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

.payment-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-icon {
    max-height: 60px;
    object-fit: contain;
}

.payment-features {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.payment-features .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
}

/* Trust Badges */
.trust-item {
    padding: 1rem;
    transition: all 0.3s ease;
}

.trust-item:hover {
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 1200px) {
    .col-xl-2-4 {
        width: 25%;
    }
}

@media (max-width: 992px) {
    .col-xl-2-4 {
        width: 33.333%;
    }
}

@media (max-width: 768px) {
    .col-xl-2-4 {
        width: 50%;
    }
    
    .product-actions .btn span {
        display: none;
    }
    
    .product-actions .btn {
        padding: 10px;
    }
    
    .product-actions .btn i {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .col-xl-2-4 {
        width: 100%;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .time-box {
        min-width: 50px;
        padding: 6px 8px;
    }
    
    .time-value {
        font-size: 1rem;
    }
    
    .time-label {
        font-size: 0.6rem;
    }
}

/* Responsive Sidebar for Dashboards */
@media (max-width: 768px) {
    /* Admin Sidebar */
    #adminSidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 280px;
        height: 100vh;
        z-index: 1050;
        background-color: white;
        border-right: 1px solid #ddd;
        overflow-y: auto;
    }

    #adminSidebar.show {
        display: block !important;
        animation: slideInLeft 0.3s ease-out;
    }

    /* Vendor Sidebar */
    #vendorSidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 280px;
        height: 100vh;
        z-index: 1050;
        background-color: white;
        border-right: 1px solid #ddd;
        overflow-y: auto;
    }

    #vendorSidebar.show {
        display: block !important;
        animation: slideInLeft 0.3s ease-out;
    }

    /* Overlay backdrop for mobile */
    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }

    .sidebar-backdrop.show {
        display: block;
        animation: fadeIn 0.3s ease-out;
    }

    /* Adjust main content */
    .col-md-10 {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Toggle button styling */
    #toggleAdminSidebar,
    #toggleVendorSidebar {
        margin-bottom: 15px;
        font-weight: 500;
    }

    /* Close button in sidebar header */
    .card-header .btn-close {
        padding: 0.25rem 0.25rem;
    }

    /* List group items spacing */
    .list-group-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Badge positioning */
    .list-group-item .badge {
        margin-left: auto;
    }
}

/* Slide in animation */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Fade in for backdrop */
@keyframes fadeInBackdrop {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.5;
    }
}

/* Larger screens - show sidebar normally */
@media (min-width: 768px) {
    #toggleAdminSidebar,
    #toggleVendorSidebar {
        display: none !important;
    }

    #adminSidebar,
    #vendorSidebar {
        display: block !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        border-right: none !important;
    }

    #adminSidebar.collapse,
    #vendorSidebar.collapse {
        display: block;
    }
}

/* Badge des messages sur desktop/large */
@media (min-width: 992px) {
    #nav-messages-badge {
        z-index: 10 !important;
        overflow: visible !important;
    }
    
    .navbar-nav .position-relative {
        overflow: visible !important;
    }
    
    .navbar-collapse {
        overflow: visible !important;
    }
}
