:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #25D366;
    --dark-color: #1f2937;
}

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

.navbar-brand img {
    max-height: 40px;
}

/* Ensure logo visibility on white background */
.navbar-light .navbar-brand img {
    filter: brightness(0.9);
}

/* Responsive image fixes */
.product-card .card-img-top,
.carousel-item img {
    max-width: 100%;
    height: auto;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.hero {
    background: linear-gradient(135deg, var(--dark-color) 0%, #374151 100%);
}

.product-card {
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

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

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.category-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: var(--success-color);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: #fff;
}

.whatsapp-float i {
    line-height: 1;
}

.thumb-preview {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.thumb-preview:hover,
.thumb-preview.active {
    opacity: 1;
}

.price-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.list-group-item a {
    display: block;
}

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

.btn-success:hover {
    background-color: #128C7E;
    border-color: #128C7E;
}

.badge {
    font-weight: 500;
}

@media (max-width: 768px) {
    .product-card .card-img-top {
        height: 150px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 15px;
        right: 15px;
    }
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded,
img:not([loading="lazy"]) {
    opacity: 1;
}

.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: var(--dark-color);
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.75rem 1rem;
    border-radius: 0;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.admin-sidebar .nav-link i {
    width: 24px;
}

.stat-card {
    border-left: 4px solid var(--primary-color);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.warning {
    border-left-color: #f59e0b;
}

.stat-card.danger {
    border-left-color: #ef4444;
}

.table-responsive {
    overflow-x: auto;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.pos-cart {
    max-height: 400px;
    overflow-y: auto;
}

.pos-product-card {
    cursor: pointer;
    transition: background-color 0.2s;
}

.pos-product-card:hover {
    background-color: #f8f9fa;
}

.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ef4444;
    color: white;
    text-align: center;
    padding: 5px;
    z-index: 9999;
    display: none;
}

.offline-indicator.show {
    display: block;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.drag-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    transition: border-color 0.2s, background-color 0.2s;
}

.drag-drop-zone.dragover {
    border-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

.image-preview {
    position: relative;
    display: inline-block;
    margin: 5px;
}

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

.image-preview .remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
