/* assets/css/style.css - Enhanced Version */
:root {
    --primary-red: #e4002b;
    --primary-dark: #27251f;
    --accent-yellow: #ffc72c;
    --light-gray: #f8f9fa;
    --text-dark: #333;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    color: var(--text-dark);
    background: #fff;
}

/* Header & Navigation */
.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
}

.navbar-brand small {
    font-size: 0.75rem;
    color: #666;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 8px;
    color: var(--text-dark) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-red) !important;
}

/* Delivery Banner */
.delivery-banner {
    background: linear-gradient(135deg, var(--primary-red), #c00);
    color: white;
    font-size: 0.9rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
                url('../images/hero-bgn.jpg') center/cover;
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section .btn {
    background: var(--primary-red);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    font-size: 1.1rem;
}

.hero-section .btn:hover {
    background: #c00;
    transform: translateY(-2px);
}

/* Enhanced Horizontal Scrolling Banner - Complete Image Preview */
.bg-scroll-wrapper {
    overflow: hidden;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    background: #f8f9fa; /* Background color for empty spaces */
}

.bg-scroll {
    display: flex;
    gap: 15px;
    align-items: center;
    animation: scroll-left 80s linear infinite;
    padding: 20px 0; /* Added padding for better spacing */
    width: max-content;
}

.bg-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-item img {
    height: 250px;
    width: auto; /* Let the width be auto to maintain aspect ratio */
    max-width: 500px; /* Maximum width */
    object-fit: contain; 
    display: block;
    border-radius: 8px;
    transition: transform 0.3s ease;
    background: white; /* White background for transparent images */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bg-item img:hover {
    transform: scale(1.05);
}

/* Calculate animation duration based on actual content width */
@keyframes scroll-left {
    0% { 
        transform: translateX(0); 
    }
    100% { 
        transform: translateX(calc(-500px * 6 - 15px * 6)); 
    }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .bg-item img {
        height: 220px;
        max-width: 450px;
    }
    
    @keyframes scroll-left {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-450px * 6 - 15px * 6)); }
    }
}

@media (max-width: 992px) {
    .bg-item img {
        height: 200px;
        max-width: 400px;
    }
    
    @keyframes scroll-left {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-400px * 6 - 15px * 6)); }
    }
}

@media (max-width: 768px) {
    .bg-item img {
        height: 180px;
        max-width: 350px;
    }
    
    @keyframes scroll-left {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-350px * 6 - 15px * 6)); }
    }
}

@media (max-width: 576px) {
    .bg-scroll {
        gap: 10px;
        padding: 15px 0;
    }
    
    .bg-item img {
        height: 150px;
        max-width: 280px;
    }
    
    @keyframes scroll-left {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-280px * 6 - 10px * 6)); }
    }
}

/* Product Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-img-top {
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-title {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.card-text {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.price {
    color: var(--primary-red);
    font-weight: 700;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--primary-red);
    border: none;
    padding: 8px 16px;
    font-weight: 500;
    border-radius: 6px;
}

.btn-primary:hover {
    background: #c00;
    transform: translateY(-1px);
}

/* Category Filter */
.list-group-item {
    border: none;
    padding: 12px 20px;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.list-group-item.active {
    background: var(--primary-red);
    border-color: var(--primary-red);
}

.list-group-item:hover:not(.active) {
    background: var(--light-gray);
    color: var(--primary-red);
}

/* Cart Styles */
.cart-badge {
    background: var(--primary-red);
    font-size: 0.7rem;
}

.table th {
    background: var(--light-gray);
    font-weight: 600;
}

/* Footer */
footer {
    background: var(--primary-dark);
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .bg-item img {
        height: 120px;
        width: 240px;
    }
    
    .bg-scroll {
        animation-duration: 20s;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand small {
        display: none;
    }
    
    .bg-item img {
        height: 100px;
        width: 200px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Enhanced Image Styles */
.logo-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 3px solid var(--primary-red);
    padding: 4px;
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

/* Standardized Image Sizes */
.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.promotion-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.banner-image {
    width: 400px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.category-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.cart-image {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

/* Responsive Image Adjustments */
@media (max-width: 768px) {
    .banner-image {
        width: 300px;
        height: 150px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .promotion-image {
        height: 160px;
    }
}

@media (max-width: 576px) {
    .banner-image {
        width: 250px;
        height: 120px;
    }
    
    .logo-container {
        width: 50px;
        height: 50px;
    }
    
    .product-image {
        height: 140px;
    }
}

/*  */
:root {
    --gradient-primary: linear-gradient(135deg, #e4002b, #ff6b6b);
    --shadow-soft: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-hard: 0 20px 40px rgba(0,0,0,0.1);
}

/* Modern card design */
.product-card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hard);
}

/* Gradient buttons */
.btn-gradient {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(228, 0, 43, 0.3);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .card {
        background: #2d3748;
        color: white;
    }
}

/* Loading animations */
.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Admin Floating Buttons */
.btn-group-vertical .btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    transition: all 0.3s ease;
}

.btn-group-vertical .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Admin Badge in Navigation */
.navbar .btn-success {
    font-weight: 600;
    padding: 6px 12px;
}

/* Responsive Admin Button */
@media (max-width: 768px) {
    .navbar .btn-success {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .btn-group-vertical .btn {
        width: 45px;
        height: 45px;
    }
}



/* Developer Footer */
.developer-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #aaa;
    font-size: 0.85rem;
    border-top: 2px solid var(--primary-red);
    position: relative;
    z-index: 1000;
}

.developer-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--primary-red) 0%, 
        #ff6b35 25%, 
        #ffc107 50%, 
        #28a745 75%, 
        #17a2b8 100%);
}

.permanent-footer {
    position: relative !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.footer-content {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.developer-link {
    color: #4dabf7 !important;
    transition: all 0.3s ease;
    position: relative;
}

.developer-link:hover {
    color: #339af0 !important;
    text-decoration: underline !important;
}

.developer-link::after {
    content: ' ↗';
    font-size: 0.8em;
}

.separator {
    color: #666;
}

/* Print styles - hide dev */
@media print {
    .developer-footer,
    .no-print {
        display: none !important;
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .developer-footer {
        font-size: 0.75rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .separator {
        display: none;
    }
}

/* */
.developer-footer.permanent-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 9999 !important;
}

/*  */
.developer-footer * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
