/* Custom Variables to override Bootstrap */
:root {
    --bs-primary: #3498db;
    --bs-secondary: #2c3e50;
    --bs-danger: #e74c3c;
    --bs-success: #27ae60;
    --bs-warning: #f39c12;
    --bs-light: #f8f9fa;
    --bs-dark: #343a40;
}

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

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

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

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

/* Header styling */
.logo-badge {
    width: 80px;
    height: 80px;
    background-color: var(--bs-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.logo-badge i {
    font-size: 2.5rem;
    color: white;
}

/* Body padding adjustment without navbar */
body {
    padding-top: 20px;
}

/* Enhance logo badge for more prominence */
.logo-badge {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
}

/* Card styling enhancements */
.card {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    overflow: hidden;
}

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

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Button enhancements */
.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #2c3e50);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(52, 152, 219, 0.4);
}

/* Form controls */
.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

.input-group-text {
    background-color: #f8f9fa;
}

/* Loading indicator */
.loading-indicator {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Results section */
.results-section {
    display: none;
    animation: fadeIn 0.6s ease-out;
}

/* Price cards */
#competitor-prices .col-md-4 {
    margin-bottom: 1.5rem;
}

.price-card {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.25rem;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.price-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.retailer-name {
    font-weight: 600;
    color: var(--bs-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.retailer-name i {
    margin-right: 10px;
    color: var(--bs-primary);
}

.price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bs-danger);
    margin: 10px 0;
}

.price-difference {
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
}

.price-difference.lower {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--bs-success);
}

.price-difference.higher {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--bs-danger);
}

/* Promotion cards */
#promotions .col-md-6 {
    margin-bottom: 1.5rem;
}

.promotion-card {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.25rem;
    height: 100%;
    border-left: 5px solid var(--bs-primary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.promotion-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.promotion-retailer {
    font-weight: 600;
    color: var(--bs-secondary);
    display: flex;
    align-items: center;
}

.promotion-retailer i {
    margin-right: 10px;
    color: var(--bs-primary);
}

.promotion-details {
    margin: 12px 0;
    font-size: 1.05rem;
}

.promotion-validity {
    font-size: 0.85rem;
    color: #6c757d;
    padding: 4px 10px;
    background-color: #f8f9fa;
    border-radius: 20px;
    display: inline-block;
}

/* Chart container */
.price-chart-container {
    height: 400px;
    position: relative;
}

/* Recommendations section */
.recommendations-section {
    display: none;
    animation: fadeIn 0.8s ease-out;
}

.recommendation-content {
    padding: 0.5rem 0;
}

.recommendation-item {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--bs-primary);
}

.recommendation-item .title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--bs-secondary);
}

.recommendation-item .description {
    color: #495057;
}

.strategic-suggestion {
    background-color: rgba(52, 152, 219, 0.1);
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin-top: 1.5rem;
    border: 1px dashed rgba(52, 152, 219, 0.3);
}

.strategic-suggestion h4 {
    color: var(--bs-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.strategic-suggestion h4:before {
    content: '\f0eb';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    color: var(--bs-warning);
}

/* Error message styling */
.error-message {
    animation: fadeIn 0.3s ease-out;
}

/* No promotions message */
.no-promotions {
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    font-style: italic;
}

/* Footer styling */
footer a {
    color: var(--bs-primary);
}

footer a:hover {
    color: #2980b9;
}

/* Media queries for responsive design */
@media (max-width: 992px) {
    .logo-badge {
        width: 70px;
        height: 70px;
    }
    
    .logo-badge i {
        font-size: 2rem;
    }
    
    h1.display-5 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .card-body {
        padding: 1.25rem;
    }
    
    .price {
        font-size: 1.75rem;
    }
    
    .logo-badge {
        width: 60px;
        height: 60px;
    }
    
    .logo-badge i {
        font-size: 1.75rem;
    }
    
    h1.display-5 {
        font-size: 1.8rem;
    }
    
    .price-chart-container {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
    
    .recommendation-item {
        padding-left: 0.75rem;
    }
}

