/* Braxo Price List - Main Stylesheet */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-bg: #f8f9fa;
    --card-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --card-shadow-hover: 0 8px 25px rgba(0,0,0,0.15);
    --border-radius: 15px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--light-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border: 0.3em solid rgba(52, 152, 219, 0.2);
    border-top: 0.3em solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Overlay for loading */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9998;
}

.header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="1000,100 1000,0 0,100"/></svg>');
    background-size: cover;
}

.brand-logo {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.brand-logo:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Enhanced Search Section */
.search-section {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.search-container {
    background: white;
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
}

.search-container:focus-within {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.search-input {
    border: none;
    outline: none;
    padding: 0.75rem 1.5rem;
    border-radius: 45px;
    width: 100%;
    font-size: 1rem;
    transition: var(--transition);
}

.search-input:focus {
    background-color: #f8f9fa;
}

.search-btn {
    background: var(--secondary-color);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.search-btn:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.product-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 100%;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    padding: 15px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.image-placeholder {
    width: 100%;
    height: 250px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.product-info {
    padding: 20px;
    padding-bottom: 0;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-packing {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.product-packing strong {
    color: #333;
}

.price-section {
    padding: 20px;
    background: white;
}

.price-left {
    flex: 1;
}

.price-right {
    text-align: right;
}

.mrp-line {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
}

.mrp-value {
    color: #333;
    font-weight: 600;
}

.current-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.price-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.offer-text {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 4px;
    color: #333;
}

.offer-active {
    color: #333;
}

.offer-ended {
    color: #333;
}

.stats-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
}

/* Advertising Image Card */
.ad-image-card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition);
    height: 200px;
}

.image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    text-align: left;
}

.image-overlay h5 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.image-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Advertising Video Card */
.ad-video-card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition);
    height: 200px;
}

.video-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

#adVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    text-align: left;
    pointer-events: none;
}

.video-overlay h5 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.video-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.stats-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.no-products {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 992px) {
    .brand-logo {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .header-section {
        padding: 1.5rem 0;
        text-align: center;
    }
    
    .header-section .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-section {
        position: relative;
        padding: 1.5rem 0;
    }
    
    .controls-section {
        text-align: center;
    }
    
    .filter-btn, .sort-btn {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .product-card {
        margin-bottom: 1.5rem;
        transform: none !important;
    }
    
    .product-image {
        height: 180px;
    }
    
    .stats-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .header-section {
        padding: 1rem 0;
    }
    
    .brand-logo {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin-right: 0.5rem;
    }
    
    .search-input {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .search-btn {
        width: 35px;
        height: 35px;
    }
    
    .product-info {
        padding: 15px;
        padding-bottom: 0;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .price-section {
        padding: 15px;
    }
    
    .current-price {
        font-size: 1rem;
    }
    
    .price-value {
        font-size: 1.1rem;
    }
    
    .offer-text {
        font-size: 0.8rem;
    }
    
    .mrp-line {
        font-size: 0.8rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}


/* Toast Notifications */
.toast {
    min-width: 300px;
}

/* Scroll to top button */
#scrollToTop {
    transition: var(--transition);
    box-shadow: var(--card-shadow);
}

#scrollToTop:hover {
    transform: scale(1.1);
    box-shadow: var(--card-shadow-hover);
}

/* Loading states */
.loading-skeleton {
    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; }
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .product-card:hover {
        transform: none !important;
    }
    
    .product-image:hover {
        transform: none !important;
    }
}

/* Alternative: Add this class to body to disable all animations */
.no-animations * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}
