/* Frontend Styles */

:root {
    --primary-color: #4F46E5;
    /* Indigo-600 (modern, strong CTA color) */
    --secondary-color: #0EA5E9;
    /* Sky Blue-500 (fresh & clean accent) */
    --success-color: #16A34A;
    /* Green-600 (better than default bootstrap green) */
    --warning-color: #F59E0B;
    /* Amber-500 (softer than #ffc107) */
    --danger-color: #DC2626;
    /* Red-600 (strong but not harsh) */
    --dark-color: #1F2937;
    /* Gray-800 (modern dark tone) */
    --light-gray: #F3F4F6;
    /* Soft neutral background */

}

/* Body */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Site Header */
.site-header .navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

/* Navbar Menu Styles */
.navbar-nav .nav-link {
    font-weight: 600;
    color: #ffffff !important;
    transition: 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #f8f9fa !important;
}

.navbar-nav .nav-link.active {
    color: #ffffff !important;
    font-weight: 700;
}

/* Navbar Search Box (Task: Rounded & Wider) */
#navbar-search-form .input-group {
    width: 350px;
    max-width: 100%;
}

#navbar-search-form .form-control {
    border-radius: 50px 0 0 50px !important;
    padding-left: 20px;
}

#navbar-search-form .btn {
    border-radius: 0 50px 50px 0 !important;
    padding-right: 20px;
}

@media (max-width: 991.98px) {
    #navbar-search-form {
        margin-top: 15px;
        margin-bottom: 10px;
        width: 100%;
    }
    #navbar-search-form .input-group {
        width: 100%;
    }
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 300px);
    padding: 0 0 30px 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Section Titles */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.section-title.center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Store Card */
.store-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    height: 100%;
}

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

.store-card img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
    margin-bottom: 15px;
}

.store-card h5 {
    font-weight: 600;
    margin-bottom: 10px;
}

.store-card .coupon-count {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Coupon Card */
.coupon-card {
    background: white;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s;
}

.coupon-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.coupon-card.featured {
    border-color: var(--warning-color);
    border-style: solid;
}

.coupon-card.verified {
    border-color: var(--success-color);
}

.coupon-card .offer-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.5rem;
}

.coupon-card .offer-detail {
    color: #6c757d;
    margin-bottom: 15px;
}

.coupon-card .coupon-code-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
}

.coupon-card .coupon-code {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    letter-spacing: 2px;
}

.coupon-card .store-logo-sm {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: white;
    padding: 2px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.coupon-card .expiry-info {
    font-size: 0.875rem;
    color: #6c757d;
}

.coupon-card .expiry-info.expired {
    color: var(--danger-color);
}

.coupon-card .expiry-info.soon {
    color: var(--warning-color);
}

/* Coupon Flags – card layout (category, coupon detail cards) */
.coupon-card .coupon-flags--card {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
    max-width: 65%;
    margin-bottom: 0;
    z-index: 1;
}

.coupon-card .coupon-flags--card .badge {
    font-size: 12px;
    padding: 5px 8px;
}

/* Coupon Flags – inline layout (store list, homepage, etc.) */
.coupon-flags--inline {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    width: 100%;
}

.coupon-flags--inline .badge {
    font-size: 12px;
    padding: 5px 8px;
    white-space: nowrap;
}

.modern-coupon-item .coupon-flags--inline {
    margin-bottom: 0.75rem;
}

/* Category Card */
.category-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s;
    height: 100%;
}

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

.category-card .category-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.category-card img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
}

.category-card h5 {
    font-weight: 600;
    margin-bottom: 5px;
}

.category-card .store-count {
    color: #6c757d;
    font-size: 0.875rem;
}

.category-icon-large {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin: 0 auto 15px;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.transition-all {
    transition: all 0.3s ease;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    height: 100%;
}

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

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card .blog-content {
    padding: 20px;
}

.blog-card .blog-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.blog-card .blog-excerpt {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.blog-card .blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Site Footer */
.site-footer {
    margin-top: auto;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
}

.site-footer a:hover {
    color: white;
}

.social-links a {
    font-size: 1.5rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
}

.btn-coupon {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    border: none;
    font-weight: 600;
    color: white;
}

.btn-coupon:hover {
    background: linear-gradient(135deg, #20c997 0%, var(--success-color) 100%);
    color: white;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: var(--primary-color);
}

/* Search Box (Navbar) */
.navbar .input-group {
    width: 280px;
}

@media (max-width: 991px) {
    .navbar .input-group {
        width: 100%;
    }
}

/* Search Box (Hero/Generic) */
.search-box {
    max-width: 600px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 10px 0;
    margin-bottom: 20px;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Badge Styles */
.badge-featured {
    background: var(--warning-color);
}

.badge-verified {
    background: var(--success-color);
}

.badge-popular {
    background: var(--danger-color);
}

/* Store Autocomplete Suggestions (Task 7) */
#store-suggestions {
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
}

#store-suggestions .list-group-item {
    font-size: 0.9rem;
    border-left: none;
    border-right: none;
    border-radius: 0 !important;
    color: var(--dark-color);
    transition: background 0.15s ease;
}

#store-suggestions .list-group-item:first-child {
    border-top: none;
}

#store-suggestions .list-group-item:hover,
#store-suggestions .list-group-item:focus {
    background-color: #f0f4ff;
    color: var(--primary-color);
}


/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .store-card img {
        max-height: 40px;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Store Page Specific Styles */
.store-hero {
    position: relative;
    margin-bottom: 80px;
}

.store-banner-wrapper {
    height: 300px;
    width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 0 0 15px 15px;
    background: #f0f0f0;
}

.store-banner-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-header-content {
    position: relative;
    margin-top: -60px;
    z-index: 10;
}

.store-logo-wrapper {
    width: 130px;
    height: 130px;
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.store-title-area {
    padding-top: 70px;
}

.store-title-area h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 5px;
}

/* Horizontal Coupon Cards */
.coupon-list-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0;
    margin-bottom: 20px;
    display: flex;
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.coupon-list-item:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.coupon-list-item .coupon-type-side {
    width: 120px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-right: 2px dashed #eee;
    position: relative;
}

.coupon-list-item .coupon-type-side::before,
.coupon-list-item .coupon-type-side::after {
    content: '';
    position: absolute;
    right: -8px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    z-index: 2;
}

.coupon-list-item .coupon-type-side::before {
    top: -8px;
}

.coupon-list-item .coupon-type-side::after {
    bottom: -8px;
}

.coupon-list-item .coupon-type-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.coupon-list-item .coupon-type-text {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.coupon-list-item .coupon-body {
    flex-grow: 1;
    padding: 20px;
}

.coupon-list-item .coupon-action {
    width: 200px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.coupon-list-item .offer-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    min-height: auto;
}

.coupon-list-item .offer-detail {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 10px;
}

.coupon-list-item.verified {
    border-left: 4px solid var(--success-color);
}

.coupon-list-item.featured {
    border-left: 4px solid var(--warning-color);
}

/* Sidebar Widgets */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sidebar-widget h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.store-social-icons a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    margin-right: 8px;
    color: var(--dark-color);
    transition: all 0.3s;
}

.store-social-icons a:hover {
    background: var(--primary-color);
    color: white;
}

@media (max-width: 991px) {
    .coupon-list-item {
        flex-direction: column;
    }

    .coupon-list-item .coupon-type-side {
        width: 100%;
        flex-direction: row;
        border-right: none;
        border-bottom: 2px dashed #eee;
        justify-content: flex-start;
        padding: 10px 20px;
    }

    .coupon-list-item .coupon-type-side::before,
    .coupon-list-item .coupon-type-side::after {
        display: none;
    }

    .coupon-list-item .coupon-type-icon {
        margin-bottom: 0;
        margin-right: 10px;
        font-size: 1.2rem;
    }

    .coupon-list-item .coupon-action {
        width: 100%;
        padding-top: 0;
        background: transparent;
    }
}

/* Premium Footer Styling (Task 6) */
footer.site-footer {
    background: #111111 !important;
    color: #cccccc !important;
    font-size: 0.9rem;
}

footer.site-footer .footer-title {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1.1rem;
    position: relative;
}

footer.site-footer .footer-text {
    color: #bbbbbb !important;
    line-height: 1.7;
}

footer.site-footer .footer-links li {
    margin-bottom: 8px;
}

footer.site-footer .footer-links a {
    color: #bbbbbb !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer.site-footer .footer-links a:hover {
    color: #ffffff !important;
}

footer.site-footer .social-icons a {
    margin: 0 12px;
    font-size: 20px;
    color: #cccccc;
    display: inline-block;
    transition: color 0.3s ease, transform 0.2s ease;
}

footer.site-footer .social-icons a:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

footer.site-footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Homepage Redesign Scoped Styles
   ========================================================================== */

/* Utility Classes */
.fs-7 { font-size: 0.875rem; }
.tracking-wider { letter-spacing: 0.05em; }
.transition-all { transition: all 0.3s ease; }
.hover-lift:hover { transform: translateY(-5px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important; }
.hover-text-primary:hover { color: var(--primary-color) !important; }
.hover-translate-x i { transition: transform 0.3s ease; }
.hover-translate-x:hover i { transform: translateX(5px); }
.hover-bg-opacity-20:hover { background-color: rgba(255,255,255,0.2) !important; }

/* Hero Section */
.hp-hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}
.hp-hero-image {
    max-height: 400px;
    object-fit: contain;
}
@keyframes floatAnim {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}
.floating-anim {
    animation: floatAnim 6s ease-in-out infinite;
}

/* Category & Store Cards */
.hp-store-logo-wrapper img {
    transition: transform 0.3s ease;
}
.hp-store-card:hover .hp-store-logo-wrapper img {
    transform: scale(1.1);
}

/* Coupon Cards */
.hp-coupon-title {
    color: var(--dark-color);
}
.hp-coupon-card:hover .hp-coupon-title {
    color: var(--primary-color);
}

/* Brands Strip */
.filter-grayscale { filter: grayscale(100%); opacity: 0.6; }
.hover-filter-none:hover { filter: grayscale(0%); opacity: 1; }

/* Mix Blend */
.mix-blend-multiply { mix-blend-mode: multiply; }

/* ==========================================================================
   Premium Trust Section Redesign
   ========================================================================== */
.hp-trust-section {
    background: #f8f9fa; /* Very light neutral background */
}

/* Subtle decorative blobs */
.hp-trust-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

.hp-trust-blob--1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    left: -150px;
    opacity: 0.05;
}

.hp-trust-blob--2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-color);
    bottom: -50px;
    right: -100px;
    opacity: 0.05;
}

.hp-trust-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
}

.hp-trust-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
}

.hp-trust-icon-wrap {
    width: 50px;
    height: 50px;
    background: rgba(79, 70, 229, 0.08); /* Soft primary background */
    color: var(--primary-color);
    font-size: 1.25rem;
    transition: background 0.3s ease, transform 0.3s ease;
}

.hp-trust-card:hover .hp-trust-icon-wrap {
    background: rgba(79, 70, 229, 0.15);
    transform: scale(1.05);
}

/* ==========================================================================
   Premium Newsletter Section Redesign
   ========================================================================== */
.hp-newsletter {
    background: #ffffff;
}

.hp-newsletter-box {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(79, 70, 229, 0.02) 100%);
    border: 1px solid rgba(79, 70, 229, 0.05);
}

.hp-newsletter-input-group {
    border: 1px solid #E2E5EE;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.hp-newsletter-input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.1) !important;
}

.hp-newsletter-input-group .form-control:focus {
    box-shadow: none;
}

.hp-btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

@media (max-width: 575.98px) {
    .hp-newsletter-input-group {
        border-radius: 1rem !important;
    }
    .hp-newsletter-input-group .btn {
        width: 100%;
    }
}

/* ==========================================================================
   SEO Content Block Styling
   ========================================================================== */
.hp-seo-content {
    text-align: justify;
    line-height: 1.7;
}

.hp-seo-content p {
    text-align: justify;
    line-height: 1.7;
    margin-bottom: 1rem;
}