/**
 * Local BREAK Stylesheet
 * Location: /public/style.css
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #ffe2c4 0%, #ffd6b0 60%, #fff7ee 100%);
    color: #333;
    overflow-x: hidden;
}

header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
}
header { backdrop-filter: saturate(120%) blur(6px); border-bottom: 1px solid rgba(0,0,0,0.04); }

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Legacy / non-Bootstrap nav container (kept for older views) */
header .legacy-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Bootstrap navbar adjustments to avoid double padding/overflow */
.navbar {
    padding: 0.5rem 0;
}
.navbar .container {
    max-width: 1200px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.mobile-menu-btn { display:none; background:transparent; border:2px solid #FF6B35; color:#FF6B35; padding:.5rem .75rem; border-radius:8px; }
.nav-links { display:flex; gap:1rem; align-items:center; }
.nav-links a { padding:.5rem .75rem; }

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #FF6B35;
    text-decoration: none;
    letter-spacing: -1px;
}
.logo::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background-image: url('assets/logo.png');
    background-size: cover;
    background-repeat: no-repeat;
    margin-right: 8px;
    vertical-align: -5px;
}
/* Ensure logo and brand align nicely */
.logo { display:inline-flex; align-items:center; gap:8px; }
.logo img { height:28px; width:auto; display:inline-block; }

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #FF6B35;
}
.nav-links a.active {
    color: #FF6B35;
    font-weight: 700;
}
.desktop-only { display: block; }
.mobile-only { display: none; }

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: #FF6B35;
    color: white;
}

.btn-primary:hover {
    background: #e55a2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-outline {
    background: transparent;
    color: #FF6B35;
    border: 2px solid #FF6B35;
}

.btn-outline:hover {
    background: #FF6B35;
    color: white;
}
.btn-outline.active {
    background: #FF6B35;
    color: #fff;
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

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

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    color: #1a1a1a;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero .gradient-text {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Chat toggle button styling */
#chat-toggle { position:fixed !important; right:18px; bottom:16px; width:56px; height:56px; padding:0; font-size:20px; line-height:56px; text-align:center; z-index:3000; border-radius:999px; box-shadow:0 8px 24px rgba(0,0,0,0.18); display:inline-flex; align-items:center; justify-content:center; }
#chat-panel { position:fixed !important; right:18px; bottom:80px; width:360px; max-width:92%; display:none !important; z-index:3000; }
#chat-panel .card { width:100%; }

@media (max-width:576px) {
    #chat-toggle { right:12px; bottom:16px; width:48px; height:48px; font-size:18px; }
    #chat-panel { right:12px; bottom:80px; width:320px; max-width:92%; }
}
@media (max-width:400px) {
    #chat-panel { width:280px; }
    #chat-toggle { width:44px; height:44px; }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.filters {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out 0.2s both;
}

.filter-pill {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.filter-pill:hover, .filter-pill.active {
    background: #fff;
    color: #FF6B35;
    border-color: #FF6B35;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.deals-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.deal-card {
    background: white;
    border-radius: 16px;
    display: block;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    animation: scaleIn 0.5s ease-out;
    animation-fill-mode: both;
}

.deal-card:nth-child(1) { animation-delay: 0.1s; }
.deal-card:nth-child(2) { animation-delay: 0.2s; }
.deal-card:nth-child(3) { animation-delay: 0.3s; }
.deal-card:nth-child(4) { animation-delay: 0.4s; }
.deal-card:nth-child(5) { animation-delay: 0.5s; }
.deal-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.9);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.deal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.deal-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    position: relative;
}

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

.deal-content {
    padding: 1.5rem;
}

.deal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.deal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.deal-business {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.deal-discount {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
}

.deal-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.deal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.deal-expiry {
    font-size: 0.85rem;
    color: #FF6B35;
    font-weight: 600;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    padding: 2rem;
}

.auth-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: #FF6B35;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #666;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FF6B35;
}

.radio-group {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-label:hover {
    border-color: #FF6B35;
}

.radio-label input[type="radio"] {
    width: auto;
}

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.auth-footer a {
    color: #FF6B35;
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.test-accounts {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.test-accounts h4 {
    margin-bottom: 1rem;
    color: #333;
}

.account-info {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 2rem;
    margin-top: 4rem;
    text-align: center;
}

footer p {
    margin-bottom: 1rem;
}

.admin-layout { max-width:1200px; margin:0 auto; padding:2rem; display:grid; grid-template-columns:240px 1fr; gap:1rem; }
.admin-side { border:1px solid #e5e7eb; border-radius:12px; padding:1rem; }
.admin-main { width:100%; }
.admin-payments-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; margin-bottom:1rem; }

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .mobile-menu-btn { display:block; background:transparent; border:2px solid #FF6B35; color:#FF6B35; padding:.5rem .75rem; border-radius:8px; }
    nav { position: relative; }

    /* Off-canvas mobile navigation */
    .nav-links.mobile-only {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 320px;
        max-width: 90%;
        background: linear-gradient(180deg,#ffffff, #fbfbfd);
        transform: translateX(-120%);
        transition: transform 0.28s cubic-bezier(.2,.8,.2,1), box-shadow 0.28s;
        box-shadow: 14px 0 40px rgba(16,24,40,0.12);
        padding: 1.25rem 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        z-index: 1500;
        border-right: 1px solid rgba(0,0,0,0.04);
    }
    .nav-links.mobile-only.active { transform: translateX(0); }
    .nav-links.mobile-only a { display:block; padding: .75rem 1rem; border-radius:8px; color:#333; text-decoration:none; }
    .mobile-close-btn { background:transparent; border:none; color:#333; font-size:1.25rem; align-self:flex-end; padding:.25rem; }
    .mobile-close-btn { font-size:1.5rem; padding:.5rem; }

    /* Desktop nav hidden on small screens */
    .nav-links.desktop-only { display:none; }
    .desktop-only { display: none; }
    .mobile-only { display: block; }

    .btn { width: 100%; }
    body { padding-bottom: 68px; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .deals-grid { grid-template-columns: 1fr; }
    .auth-box { padding: 2rem; }
    .admin-layout { grid-template-columns: 1fr; padding:1rem; }
    .admin-payments-grid { grid-template-columns: 1fr; }
    .mobile-tabbar { display: flex; }
}

/* Footer polish */
footer { background:#0b1220; color:#cbd5e1; padding:2.5rem 1rem; }
footer .footer-inner { max-width:1200px; margin:0 auto; display:flex; gap:1rem; align-items:center; justify-content:space-between; flex-wrap:wrap; }
footer a { color:#fff; text-decoration:none; opacity:0.9; }
@media (max-width:600px) { footer .footer-inner { flex-direction:column; align-items:flex-start; gap:0.5rem; } }

/* Chat panel small adjustments */
#chat-panel .card { border-radius:12px; overflow:hidden; }
#chat-panel .card-header { background:#fff; border-bottom:1px solid #eee; }
#chat-panel .card-body { background: #fbfbff; }

.no-deals {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Preloader overlay */
.preloader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.4s ease;
}

.preloader.hidden { opacity: 0; pointer-events: none; }

.preloader .logo-bounce {
    width: 120px;
    height: 120px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
    animation: popBounce 1s ease-in-out infinite alternate;
}

@keyframes popBounce {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-14px) scale(1.04); }
}

/* Extra micro-interactions */
.deal-card:hover { transform: translateY(-8px) rotateX(1deg) rotateY(1deg); }
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 4px 18px rgba(255,107,53,0.35); }
.filter-pill:hover, .filter-pill.active { transform: translateY(-2px) scale(1.03); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.logo:hover { animation: logoPulse 0.8s ease-in-out; }
@keyframes logoPulse { 0% {transform:scale(1);} 50% {transform:scale(1.05);} 100% {transform:scale(1);} }
.nearby-badge{display:inline-block;background:#10b981;color:#fff;border-radius:12px;padding:2px 8px;font-size:.75rem}
.wave-spinner{width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#4facfe,#00f2fe);animation:wave 1.2s infinite ease-in-out}
@keyframes wave{0%{transform:scale(1)}50%{transform:scale(1.1)}100%{transform:scale(1)}}
.parallax{background-attachment:fixed;background-size:cover}
.carousel{position:relative;}
.carousel-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:1rem;padding-bottom:.5rem}
.carousel-track .deal-card{scroll-snap-align:start;min-width:280px}
.carousel-btn{position:absolute;top:50%;transform:translateY(-50%);background:#0f172a;color:#fff;border:none;border-radius:999px;width:36px;height:36px;cursor:pointer;opacity:.8}
.carousel-btn.prev{left:8px}
.carousel-btn.next{right:8px}
.deal-card:hover { cursor: pointer; }
a.deal-card { text-decoration: none; color: inherit; }

.mobile-tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: 64px; background: #0f3b3a; display: flex; justify-content: space-around; align-items: center; z-index: 1200; box-shadow: 0 -6px 20px rgba(0,0,0,0.2); }
.mobile-tabbar .tab-item { color: #fff; text-decoration: none; font-weight: 700; font-size: .9rem; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mobile-tabbar .tab-item .icon { font-size: 1.2rem; }
.mobile-tabbar { pointer-events: auto; }

/* Default: hide mobile tab bar on desktop */
.mobile-tabbar { display: none; }
