/* public/css/style.css */
:root {
    --primary-color: #e63946;
    --primary-dark: #c62835;
    --secondary-color: #457b9d;
    --accent-color: #f4a261;
    --success-color: #2a9d8f;
    --dark-bg: #1d3557;
    --light-bg: #f8f9fa;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --border-radius: 12px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    background: #f5f6fa;
}

h1,h2,h3,h4,h5,h6,.logo-name { font-family: 'Poppins', sans-serif; }

/* Header */
.site-header { background: #fff; position: sticky; top: 0; z-index: 1000; }
.logo-link { text-decoration: none; color: inherit; }
.logo-text { display: flex; align-items: center; gap: 10px; }
.logo-icon { background: var(--primary-color); color: white; width: 40px; height: 40px;
    border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.logo-name { font-size: 1.5rem; font-weight: 700; color: var(--dark-bg); }
.logo-img { max-height: 50px; width: auto; }

.search-input { border-radius: 25px 0 0 25px; border: 2px solid #e0e0e0; font-size: 0.95rem; }
.search-input:focus { border-color: var(--primary-color); box-shadow: none; }
.search-form .btn-primary { border-radius: 0 25px 25px 0; background: var(--primary-color); border-color: var(--primary-color); }

.main-nav { background: var(--primary-color) !important; }
.main-nav .nav-link { padding: 12px 16px; font-size: 0.9rem; }
.main-nav .nav-link:hover { background: rgba(255,255,255,0.15); border-radius: 6px; }
.mega-menu { min-width: 220px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border-radius: 12px; }
.mega-menu .dropdown-item { padding: 8px 16px; font-size: 0.9rem; }
.mega-menu .dropdown-item:hover { background: #fff5f5; color: var(--primary-color); }

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1d3557 0%, #457b9d 50%, #e63946 100%);
    color: white; padding: 60px 0 80px;
    position: relative; overflow: hidden;
}
.hero-section::after {
    content: ''; position: absolute; bottom: -40px; left: 0; right: 0;
    height: 80px; background: #f5f6fa; transform: skewY(-2deg);
}
.hero-section h1 { font-size: 2.8rem; font-weight: 700; line-height: 1.2; }
.hero-section .subtitle { font-size: 1.15rem; opacity: 0.9; }
.hero-stats { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 25px; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 1.8rem; font-weight: 700; display: block; }
.hero-stat .lbl { font-size: 0.8rem; opacity: 0.8; text-transform: uppercase; }

/* Category Pills */
.category-pills { padding: 20px 0; background: white; border-bottom: 1px solid #eee; }
.cat-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
    border-radius: 50px; border: 2px solid #e0e0e0; text-decoration: none; color: #555;
    font-size: 0.85rem; font-weight: 500; transition: all 0.2s; margin: 4px; white-space: nowrap; }
.cat-pill:hover, .cat-pill.active { border-color: var(--primary-color); color: var(--primary-color);
    background: #fff5f5; }
.cat-pill i { font-size: 1rem; }

/* Section Titles */
.section-title { font-size: 1.6rem; font-weight: 700; color: var(--dark-bg); margin-bottom: 4px; }
.section-subtitle { color: #888; font-size: 0.95rem; }
.section-divider { width: 50px; height: 4px; background: var(--primary-color); border-radius: 2px; margin: 8px 0 20px; }

/* Coupon Cards */
.coupon-card {
    background: white; border-radius: var(--border-radius); box-shadow: var(--card-shadow);
    transition: all 0.25s; overflow: hidden; border: 1px solid #f0f0f0; height: 100%;
    display: flex; flex-direction: column;
}
.coupon-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.coupon-card-header { padding: 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px dashed #eee; }
.merchant-logo { width: 56px; height: 56px; border-radius: 10px; object-fit: contain;
    border: 1px solid #eee; padding: 4px; background: white; flex-shrink: 0; }
.merchant-logo-placeholder { width: 56px; height: 56px; border-radius: 10px; background: var(--primary-color);
    display: flex; align-items: center; justify-content: center; color: white; font-size: 1.4rem; flex-shrink: 0; }
.merchant-name { font-weight: 600; font-size: 0.95rem; color: var(--dark-bg); }
.coupon-category { font-size: 0.75rem; color: #888; margin-top: 2px; }

.coupon-card-body { padding: 14px 16px; flex: 1; }
.coupon-title { font-size: 0.9rem; font-weight: 600; color: #333; line-height: 1.4; margin-bottom: 6px; 
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.coupon-desc { font-size: 0.82rem; color: #777; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.coupon-card-footer { padding: 12px 16px; background: #fafafa; border-top: 1px solid #f0f0f0; }
.coupon-code-preview { background: #fff5f5; border: 2px dashed var(--primary-color); border-radius: 8px;
    padding: 8px 12px; text-align: center; font-family: monospace; font-weight: 700;
    font-size: 1rem; color: var(--primary-color); letter-spacing: 2px; cursor: pointer;
    transition: background 0.2s; margin-bottom: 10px; }
.coupon-code-preview:hover { background: #ffe5e5; }
.coupon-code-preview.deal-badge { letter-spacing: 0; font-family: 'Poppins', sans-serif; font-size: 0.85rem; }
.btn-get-coupon { width: 100%; border-radius: 8px; font-weight: 600; font-size: 0.9rem;
    background: var(--primary-color); border-color: var(--primary-color); color: white; }
.btn-get-coupon:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; }

.coupon-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 0.75rem; color: #999; }

/* Store Cards */
.store-card { background: white; border-radius: var(--border-radius); box-shadow: var(--card-shadow);
    text-align: center; padding: 24px 16px; transition: all 0.25s; text-decoration: none;
    color: inherit; display: block; border: 2px solid transparent; }
.store-card:hover { border-color: var(--primary-color); transform: translateY(-3px); color: inherit; }
.store-logo-wrap { width: 80px; height: 80px; margin: 0 auto 12px; border-radius: 16px;
    overflow: hidden; border: 1px solid #eee; display: flex; align-items: center; justify-content: center; }
.store-logo-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }
.store-name { font-weight: 600; font-size: 0.9rem; color: var(--dark-bg); margin-bottom: 4px; }
.store-count { font-size: 0.8rem; color: var(--primary-color); }

/* Featured Banner */
.featured-banner { background: linear-gradient(135deg, #f4a261, #e63946); border-radius: 16px;
    padding: 30px; color: white; margin-bottom: 30px; }
.featured-banner h3 { font-size: 1.8rem; font-weight: 700; }

/* Blog Cards */
.blog-card { background: white; border-radius: var(--border-radius); box-shadow: var(--card-shadow);
    overflow: hidden; transition: transform 0.2s; height: 100%; }
.blog-card:hover { transform: translateY(-3px); }
.blog-card-img { width: 100%; height: 180px; object-fit: cover; }
.blog-card-img-placeholder { width: 100%; height: 180px; background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    display: flex; align-items: center; justify-content: center; font-size: 3rem; color: #ccc; }
.blog-card-body { padding: 16px; }
.blog-card-cat { font-size: 0.75rem; color: var(--primary-color); font-weight: 600; text-transform: uppercase; }
.blog-card-title { font-size: 1rem; font-weight: 600; color: var(--dark-bg); margin: 6px 0; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-excerpt { font-size: 0.85rem; color: #777; display: -webkit-box;
    -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-meta { font-size: 0.78rem; color: #aaa; margin-top: 10px; }

/* Coupon Modal */
.coupon-code-box { position: relative; }
.code-display { font-size: 2rem; font-weight: 800; letter-spacing: 4px; color: var(--primary-color);
    background: #fff5f5; border: 3px dashed var(--primary-color); border-radius: 12px;
    padding: 16px 24px; margin-bottom: 10px; font-family: monospace; cursor: pointer;
    transition: all 0.2s; }
.code-display:hover { background: #ffe5e5; }

/* Sidebar */
.sidebar-widget { background: white; border-radius: var(--border-radius); box-shadow: var(--card-shadow);
    padding: 20px; margin-bottom: 24px; }
.sidebar-widget h5 { font-size: 1rem; font-weight: 700; border-left: 4px solid var(--primary-color);
    padding-left: 10px; margin-bottom: 16px; }

/* Breadcrumb */
.site-breadcrumb { background: white; border-bottom: 1px solid #eee; padding: 10px 0; }
.site-breadcrumb .breadcrumb { margin: 0; font-size: 0.85rem; }
.site-breadcrumb .breadcrumb-item a { color: var(--secondary-color); text-decoration: none; }
.site-breadcrumb .breadcrumb-item.active { color: #888; }

/* Footer */
.footer-main { background: #1a1a2e; }
.footer-main h5, .footer-main h6 { color: white; }
.footer-main p, .footer-main .text-muted { color: #aaa !important; }
.footer-links { }
.footer-links a { color: #aaa; text-decoration: none; display: block; padding: 3px 0; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary-color); }
.trust-badges .badge-item { font-size: 0.85rem; color: #aaa; }
.footer-bottom { background: #111; }

/* Pagination */
.pagination .page-link { color: var(--primary-color); border-color: #dee2e6; }
.pagination .page-item.active .page-link { background: var(--primary-color); border-color: var(--primary-color); }
.pagination .page-link:focus { box-shadow: none; }

/* Search Results */
.search-highlight { background: #fff9c4; padding: 2px 4px; border-radius: 3px; }

/* Loading Spinner */
.loading-spinner { text-align: center; padding: 60px; color: #ccc; }
.loading-spinner .spinner-border { width: 3rem; height: 3rem; color: var(--primary-color); }

/* Badges */
.badge-new { background: var(--primary-color); color: white; }
.badge-exclusive { background: #6f42c1; color: white; }
.badge-hot { background: #fd7e14; color: white; }
.badge-verified { background: var(--success-color); color: white; }

/* Empty State */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 4rem; color: #ddd; margin-bottom: 20px; }
.empty-state h4 { color: #999; }

/* Policy Pages */
.policy-content h2 { font-size: 1.4rem; font-weight: 700; color: var(--dark-bg); margin: 30px 0 12px; }
.policy-content h3 { font-size: 1.1rem; font-weight: 600; margin: 20px 0 10px; }
.policy-content p, .policy-content li { line-height: 1.8; color: #555; }
.policy-box { background: #fff5f5; border-left: 4px solid var(--primary-color); padding: 16px 20px;
    border-radius: 0 8px 8px 0; margin: 20px 0; }

/* Utilities */
.text-primary-custom { color: var(--primary-color) !important; }
.bg-primary-custom { background: var(--primary-color) !important; }
.btn-primary { background: var(--primary-color) !important; border-color: var(--primary-color) !important; }
.btn-primary:hover { background: var(--primary-dark) !important; border-color: var(--primary-dark) !important; }
.btn-outline-primary { color: var(--primary-color) !important; border-color: var(--primary-color) !important; }
.btn-outline-primary:hover { background: var(--primary-color) !important; color: white !important; }

/* Admin Bar */
.admin-bar { background: #333; color: white; padding: 6px 0; font-size: 0.82rem; }
.admin-bar a { color: #ffc107; text-decoration: none; }
.admin-bar a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 1.8rem; }
    .hero-stats { gap: 15px; }
    .coupon-card { margin-bottom: 16px; }
    .section-title { font-size: 1.3rem; }
}

/* Cookie Banner */
#cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: #1d3557;
    color: white; padding: 16px; z-index: 9999; transform: translateY(100%); transition: transform 0.3s; }
#cookie-banner.show { transform: translateY(0); }

/* Back to Top */
#back-to-top { position: fixed; bottom: 30px; right: 30px; background: var(--primary-color);
    color: white; border: none; border-radius: 50%; width: 44px; height: 44px;
    display: none; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); font-size: 1.1rem; z-index: 999; }
#back-to-top.show { display: flex; }
