/* Daily Deal Finders - Modern CSS Styles */

/* CSS Variables for Color Palette */
:root {
    --primary-color: #0A84FF;     /* Professional Blue */
    --secondary-color: #0F172A;   /* Deep Slate */
    --accent-color: #14B8A6;      /* Teal Accent */
    --background-color: #F8FAFC;  /* Subtle Off-White */
    --light-bg: #EEF2F7;          /* Soft Gray */
    --text-color: #0F172A;        /* Slate 900 */
    --text-muted: #64748B;        /* Slate 500 */
    --border-color: #E5E7EB;      /* Gray 200 */
    --shadow: 0 4px 6px rgba(2, 6, 23, 0.08);
    --shadow-lg: 0 12px 24px rgba(2, 6, 23, 0.12);
    --border-radius: 12px;
    --transition: all 0.3s ease;

    /* Bootstrap color overrides */
    --bs-primary: var(--primary-color);
    --bs-secondary: #64748B;
}

/* Align Bootstrap utility colors to new palette */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }

/* Form styles aligned with new color scheme */
.offers-form .form-control,
.offers-form .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #fff;
    box-shadow: none;
}
.offers-form .form-control:focus,
.offers-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(10, 132, 255, 0.15);
}
.offers-form .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #3BA2FF);
    box-shadow: var(--shadow);
}
.offers-form .input-group-text { 
    background: var(--light-bg); 
    border: 1px solid var(--border-color);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.display-4 {
    font-weight: 800;
    line-height: 1.2;
}

/* Custom Bootstrap Overrides */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #3BA2FF);
    box-shadow: var(--shadow);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #0667CC, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #4FC3F7);
}
.btn-success {
    background: linear-gradient(135deg, var(--accent-color), #2DD4BF);
}
.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}
.btn-outline-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Navigation Styles */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 1rem 0;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--light-bg), #D8E3F0);
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #F3F6FA 0%, #E6F0FA 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-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 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="%230A84FF" stop-opacity="0.08"/><stop offset="100%" stop-color="%230A84FF" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="300" fill="url(%23a)"/><circle cx="800" cy="800" r="400" fill="url(%23a)"/></svg>') no-repeat;
    background-size: cover;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-image img {
    animation: float 6s ease-in-out infinite;
}

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

.hero-buttons .btn {
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    margin: 0 1rem;
}

.stat-item h4 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Deal Cards */
.deal-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    height: 100%;
}

.deal-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.deal-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--accent-color), #2DD4BF);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    z-index: 2;
    animation: pulse 2s infinite;
}

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

.deal-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.deal-card:hover img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.price-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.original-price {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Category Cards */
.category-card {
    display: block;
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    color: inherit;
    text-decoration: none;
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #FF8F00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.category-icon i {
    font-size: 2rem;
    color: white;
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.category-count {
    display: inline-block;
    background: var(--light-bg);
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Store Logos */
.store-logo {
    max-height: 60px;
    width: auto;
    filter: grayscale(100%);
    transition: var(--transition);
    opacity: 0.7;
}

.store-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Store Carousel Styles */
.stores-carousel {
    overflow: hidden;
    position: relative;
    margin: 2rem 0;
}

.stores-track {
    display: flex;
    animation: scroll 40s linear infinite;
    gap: 2rem;
}

.store-item {
    flex: 0 0 auto;
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    min-width: 180px;
    border: 2px solid transparent;
}

.store-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(255, 111, 0, 0.2);
    border-color: var(--primary-color);
}

.store-item .store-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.8rem;
    border-radius: 8px;
}

.store-name {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.store-deals {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
    background: rgba(39, 174, 96, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    display: inline-block;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Testimonials */
.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    height: 100%;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.testimonial-card:hover::before {
    transform: scaleX(1);
}

.testimonial-rating {
    color: #ffc107;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
    position: relative;
}

.testimonial-text::before {
    content: '"';
    font-size: 3rem;
    color: var(--primary-color);
    position: absolute;
    top: -10px;
    left: -10px;
    opacity: 0.3;
    font-family: serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    padding: 2px;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.author-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.author-savings {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
    background: rgba(39, 174, 96, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    display: inline-block;
}

/* Testimonial Stats */
.testimonial-stats {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
}

.stat-box {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    margin-bottom: 1rem;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.stat-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Newsletter Section */
.newsletter-form .form-control {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
}

.newsletter-form .btn {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d) !important;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
    text-decoration: none;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Coupon Modal */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.coupon-code-display {
    background: linear-gradient(135deg, var(--light-bg), #E8F5E8);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

.coupon-code-display h3 {
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
}

.coupon-code-display h3:hover {
    transform: scale(1.05);
}

/* Utility Classes */
.min-vh-75 {
    min-height: 75vh;
}

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

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

.text-success {
    color: var(--accent-color) !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), #FF8F00) !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 0 15px;
    }
    
    .deal-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 992px) {
    .display-4 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .category-card {
        margin-bottom: 1.5rem;
    }
    
    .store-item {
        margin-bottom: 1.5rem;
    }
    
    .testimonial-card {
        margin-bottom: 1.5rem;
    }
    
    .stat-box {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .hero-section {
        padding: 60px 0;
        text-align: center;
    }
    
    .display-4 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-lg {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .deal-card {
        margin-bottom: 1rem;
    }
    
    .deal-card .card-body {
        padding: 1rem;
    }
    
    .category-card {
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
    }
    
    .store-item {
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .store-logo {
        max-height: 40px;
        margin-bottom: 1rem;
    }
    
    .testimonial-card {
        margin-bottom: 1rem;
    }
    
    .stat-item {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .newsletter-form .input-group {
        flex-direction: column;
    }
    
    .newsletter-form .form-control,
    .newsletter-form .btn {
        border-radius: var(--border-radius);
        margin-bottom: 1rem;
    }
    
    footer {
        text-align: center;
    }
    
    footer .row > div {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .hero-section p {
        font-size: 0.95rem;
    }
    
    .deal-card,
    .category-card,
    .testimonial-card {
        margin-bottom: 1.5rem;
    }
    
    .hero-stats .col-4 {
        margin-bottom: 1rem;
    }
    
    .deal-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .current-price {
        font-size: 1.1rem;
    }
    
    .original-price {
        font-size: 0.9rem;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
    }
    
    .store-logo {
        max-height: 30px;
    }
    
    .testimonial-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-collapse {
        margin-top: 1rem;
    }
    
    .nav-link {
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .deal-card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }
    
    .category-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .store-item:hover {
        transform: none;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-section {
        background-attachment: scroll;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 111, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 111, 0, 0.25);
    border-color: var(--primary-color);
}

/* Print Styles */
@media print {
    .navbar,
    .hero-section,
    footer,
    .modal {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .deal-card,
    .category-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}