/* =============================================
   NEO SALE — Global Dark Theme
   ============================================= */

:root {
    --ns-bg: #111111;
    --ns-bg2: #1a1a1a;
    --ns-bg3: #222222;
    --ns-card: #1e1e1e;
    --ns-red: #E8192C;
    --ns-red-hover: #c4121f;
    --ns-text: #ffffff;
    --ns-muted: #9c9c9c;
    --ns-border: #2e2e2e;
    --ns-radius: 12px;
}

* { box-sizing: border-box; }

body {
    background-color: var(--ns-bg);
    color: var(--ns-text);
    font-family: 'Segoe UI', sans-serif;
    min-height: 100vh;
}

a { color: var(--ns-text); text-decoration: none; }
a:hover { color: var(--ns-red); }

/* ---- Navbar ---- */
.ns-navbar {
    background-color: var(--ns-bg2);
    border-bottom: 1px solid var(--ns-border);
    padding: 12px 0;
}

.ns-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 1px;
    color: #fff !important;
}

.ns-logo-icon {
    background: var(--ns-red);
    border-radius: 8px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.ns-logo-icon-sm {
    background: var(--ns-red);
    border-radius: 6px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    margin-right: 4px;
}

.ns-logo-text { font-weight: 800; letter-spacing: 1px; }

.navbar-nav .nav-link {
    color: #cccccc !important;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s;
}
.navbar-nav .nav-link:hover { color: #fff !important; background: var(--ns-bg3); }

/* ---- Cards ---- */
.ns-card {
    background: var(--ns-card);
    border-radius: var(--ns-radius);
    border: 1px solid var(--ns-border);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.ns-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(232,25,44,0.15); }

.ns-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--ns-bg3);
}

.ns-card-img-placeholder {
    width: 100%;
    height: 180px;
    background: var(--ns-bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ns-muted);
    font-size: 2rem;
}

.ns-card-body { padding: 14px; }

.ns-badge-days {
    background: var(--ns-red);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 8px;
}

.ns-badge-expired {
    background: #555;
    color: #ccc;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 8px;
}

.ns-offer-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ns-offer-type {
    color: var(--ns-muted);
    font-size: 0.78rem;
    margin-bottom: 8px;
}

.ns-offer-price {
    color: var(--ns-red);
    font-weight: 700;
    font-size: 0.9rem;
}

.ns-btn {
    background: var(--ns-red);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 7px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ns-btn:hover { background: var(--ns-red-hover); color: #fff; }

.ns-btn-outline {
    background: transparent;
    color: var(--ns-red);
    border: 1px solid var(--ns-red);
    border-radius: 20px;
    padding: 7px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.ns-btn-outline:hover { background: var(--ns-red); color: #fff; }

/* ---- Hero / Banner Slider ---- */
.ns-hero-slider { border-radius: var(--ns-radius); overflow: hidden; position: relative; }
.ns-hero-slide {
    background: linear-gradient(135deg, #1a0008 0%, #3d0010 50%, #1a0008 100%);
    border-radius: var(--ns-radius);
    padding: 40px 32px;
    min-height: 180px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.ns-hero-slide img {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    border-radius: 0 var(--ns-radius) var(--ns-radius) 0;
}
.ns-hero-label {
    background: var(--ns-red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 10px;
}
.ns-hero-title { font-size: 3rem; font-weight: 900; line-height: 1; margin-bottom: 4px; }
.ns-hero-subtitle { font-size: 1.1rem; font-weight: 600; color: var(--ns-red); letter-spacing: 2px; }

/* ---- Section Header ---- */
.ns-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.ns-section-title { font-weight: 700; font-size: 1.15rem; margin: 0; }
.ns-view-all { color: var(--ns-muted); font-size: 0.85rem; }
.ns-view-all:hover { color: var(--ns-red); }

/* ---- Search Bar ---- */
.ns-search-bar {
    background: var(--ns-bg2);
    border: 1px solid var(--ns-border);
    border-radius: 30px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ns-search-bar input {
    background: none;
    border: none;
    outline: none;
    color: var(--ns-text);
    font-size: 0.9rem;
    width: 100%;
}
.ns-search-bar input::placeholder { color: var(--ns-muted); }

/* ---- Map Section ---- */
.ns-map-preview {
    border-radius: var(--ns-radius);
    overflow: hidden;
    height: 250px;
    background: var(--ns-bg3);
    position: relative;
}
.ns-map-preview iframe { width: 100%; height: 100%; border: none; filter: invert(90%) hue-rotate(180deg); }

/* ---- Category Pills ---- */
.ns-category-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.ns-pill {
    background: var(--ns-bg2);
    border: 1px solid var(--ns-border);
    color: var(--ns-muted);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.ns-pill:hover, .ns-pill.active, .ns-pill-active { background: var(--ns-red); border-color: var(--ns-red); color: #fff; }

/* ---- Offer Card (shop storefront) ---- */
.ns-offer-card {
    background: var(--ns-card);
    border-radius: var(--ns-radius);
    border: 1px solid var(--ns-border);
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}
.ns-offer-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(232,25,44,0.15); border-color: var(--ns-red); }

.ns-discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--ns-red);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 8px;
    text-align: center;
    line-height: 1.2;
    z-index: 2;
}

/* ---- Detail Page ---- */
.ns-detail-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--ns-radius);
    background: var(--ns-bg3);
}

.ns-rating { color: #ffc107; font-size: 0.9rem; }

.ns-info-row { display: flex; align-items: center; gap: 8px; color: var(--ns-muted); font-size: 0.88rem; margin-bottom: 8px; }
.ns-info-row i { color: var(--ns-red); width: 18px; }

/* ---- Notification List ---- */
.ns-notification-item {
    background: var(--ns-card);
    border: 1px solid var(--ns-border);
    border-radius: var(--ns-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}
.ns-notification-item:hover { border-color: var(--ns-red); }
.ns-notification-item.unread { border-left: 3px solid var(--ns-red); }

.ns-notif-logo {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--ns-bg3);
    flex-shrink: 0;
}

.ns-notif-logo-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: var(--ns-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* ---- Auth Pages ---- */
.ns-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ns-bg);
}
.ns-auth-card {
    background: var(--ns-card);
    border: 1px solid var(--ns-border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
}
.ns-auth-logo { text-align: center; margin-bottom: 32px; font-size: 2rem; font-weight: 900; }

.ns-form-group { margin-bottom: 18px; }
.ns-input {
    background: var(--ns-bg2);
    border: 1px solid var(--ns-border);
    border-radius: 10px;
    color: var(--ns-text);
    padding: 12px 16px;
    width: 100%;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}
.ns-input:focus { outline: none; border-color: var(--ns-red); background: var(--ns-bg2); color: var(--ns-text); }
.ns-input::placeholder { color: var(--ns-muted); }
.ns-input-label { color: var(--ns-muted); font-size: 0.78rem; margin-bottom: 6px; display: block; }

.ns-btn-full {
    background: var(--ns-red);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 13px;
    font-size: 1rem;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
}
.ns-btn-full:hover { background: var(--ns-red-hover); }

/* ---- Merchant / Shop Card ---- */
.ns-merchant-card {
    background: var(--ns-card);
    border: 1px solid var(--ns-border);
    border-radius: var(--ns-radius);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.ns-merchant-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(232,25,44,0.15); }

.ns-merchant-logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    background: var(--ns-bg3);
    margin: 0 auto 12px;
    display: block;
}

.ns-merchant-logo-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: var(--ns-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    margin: 0 auto 12px;
}

/* ---- Footer ---- */
.ns-footer {
    background: var(--ns-bg2);
    border-top: 1px solid var(--ns-border);
}

/* ---- Page Hero ---- */
.ns-page-hero {
    background: linear-gradient(135deg, var(--ns-bg2), var(--ns-bg3));
    padding: 40px 0 30px;
    border-bottom: 1px solid var(--ns-border);
    margin-bottom: 30px;
}

/* ---- Utilities ---- */
.text-red { color: var(--ns-red) !important; }
.bg-ns { background: var(--ns-bg2); }
.border-ns { border-color: var(--ns-border) !important; }
.rounded-ns { border-radius: var(--ns-radius) !important; }

/* ── Global Bootstrap dark-theme overrides ───────────────────────────
   Bootstrap 5 defaults many elements to black text. Override globally
   so the dark background always gets white/light text.               */

/* Form controls */
.form-control,
.form-select,
.form-control:focus,
.form-select:focus {
    background-color: #1a1a1a;
    border-color: var(--ns-border);
    color: #fff;
}
.form-control::placeholder { color: #666; }
.form-control:disabled,
.form-select:disabled {
    background-color: #111;
    color: #666;
}

/* Labels */
label,
.form-label,
.form-check-label,
.col-form-label { color: #ccc; }

/* Input groups */
.input-group-text {
    background-color: #1a1a1a;
    border-color: var(--ns-border);
    color: #aaa;
}

/* Tables */
.table { color: #ddd; }
.table > :not(caption) > * > * { background-color: transparent; color: inherit; }
.table-dark { --bs-table-bg: #1e1e1e; --bs-table-striped-bg: #252525; }

/* Alerts */
.alert { color: #ddd; }

/* Dropdowns */
.dropdown-menu {
    background-color: #1e1e1e;
    border-color: var(--ns-border);
}
.dropdown-item { color: #ccc; }
.dropdown-item:hover { background-color: #2a2a2a; color: #fff; }

/* Modal */
.modal-content { background-color: #1e1e1e; border-color: var(--ns-border); color: #ddd; }
.modal-header, .modal-footer { border-color: var(--ns-border); }

/* Cards (Bootstrap default) */
.card {
    background-color: #1e1e1e;
    border-color: var(--ns-border);
    color: #ddd;
}
.card-header, .card-footer {
    background-color: #252525;
    border-color: var(--ns-border);
    color: #ddd;
}

/* Badges */
.badge { font-size: 0.75rem; }

/* Checkbox / radio */
.form-check-input {
    background-color: #1a1a1a;
    border-color: #555;
}
.form-check-input:checked { background-color: var(--ns-red); border-color: var(--ns-red); }

/* Pagination */
.page-link { background-color: #1e1e1e; border-color: var(--ns-border); color: #ccc; }
.page-link:hover { background-color: #2a2a2a; color: #fff; }
.page-item.active .page-link { background-color: var(--ns-red); border-color: var(--ns-red); }

/* Nav tabs */
.nav-tabs { border-color: var(--ns-border); }
.nav-tabs .nav-link { color: #888; }
.nav-tabs .nav-link.active { background-color: #1e1e1e; border-color: var(--ns-border) var(--ns-border) #1e1e1e; color: #fff; }
.nav-tabs .nav-link:hover { color: #fff; border-color: transparent; }

/* Select option text */
option { background-color: #1e1e1e; color: #fff; }

/* Text utilities override */
.text-dark { color: #ddd !important; }
.text-body { color: #ddd !important; }
h1, h2, h3, h4, h5, h6 { color: #fff; }
p { color: #ccc; }
small, .small { color: #b0b0b0; }

/* Bootstrap 5.3 .text-muted / secondary-color is a dark tone -> nearly invisible on the
   dark theme. Force readable light-grey everywhere muted/secondary text is used. */
.text-muted,
.text-secondary { color: #a8a8a8 !important; }
.text-body-secondary { color: #a8a8a8 !important; }
:root { --bs-secondary-color: #a8a8a8; --bs-tertiary-color: #8a8a8a; }

/* ── Shared status badges & stat icons (used across public, merchant & admin layouts) ── */
.ns-status-active   { background: rgba(0,200,100,0.15); color: #00c864; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.ns-status-pending  { background: rgba(255,180,0,0.15);  color: #ffb400; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.ns-status-rejected { background: rgba(232,25,44,0.15);  color: #E8192C; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.ns-status-expired  { background: rgba(100,100,100,0.2); color: #888;    padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }

.admin-stat-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.admin-stat-icon.red    { background: rgba(232,25,44,0.15);  color: #E8192C; }
.admin-stat-icon.blue   { background: rgba(0,120,255,0.15);  color: #0078ff; }
.admin-stat-icon.green  { background: rgba(0,200,100,0.15);  color: #00c864; }
.admin-stat-icon.yellow { background: rgba(255,180,0,0.15);  color: #ffb400; }
.admin-stat-icon.purple { background: rgba(140,0,255,0.15);  color: #8c00ff; }

/* ── Category-themed offer cover (shown when an offer has no uploaded photo) ── */
.ns-cover {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #fff; text-align: center; overflow: hidden; position: relative;
}
.ns-cover i { font-size: 2.6rem; opacity: 0.95; text-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.ns-cover .ns-cover-label {
    margin-top: 10px; padding: 0 14px; font-weight: 700; font-size: 0.9rem;
    line-height: 1.25; text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Premium offer card ── */
.ns-pcard {
    background: #1e1e1e; border: 1px solid #2e2e2e; border-radius: 14px; overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; color: #fff;
}
.ns-pcard:hover { transform: translateY(-4px); border-color: #E8192C; box-shadow: 0 10px 26px rgba(232,25,44,0.18); }
.ns-pcard-cover { position: relative; height: 140px; overflow: hidden; }
.ns-pcard-cover > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ns-pcard-fill { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.ns-pcard-fill i { font-size: 2.4rem; color: #fff; opacity: .95; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.ns-chip {
    position: absolute; left: 10px; top: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px;
    background: rgba(0,0,0,.42); color: #fff; font-size: 0.7rem; font-weight: 600;
    padding: 4px 9px; border-radius: 20px; backdrop-filter: blur(4px);
}
.ns-heart {
    position: absolute; right: 10px; top: 10px; z-index: 2; width: 30px; height: 30px; border-radius: 50%;
    background: rgba(0,0,0,.42); border: none; color: #fff; font-size: 0.9rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: transform .12s, color .12s; backdrop-filter: blur(4px);
}
.ns-heart:hover { transform: scale(1.12); }
.ns-heart.is-fav { color: #E8192C; }
.ns-ribbon {
    position: absolute; right: -34px; top: 15px; z-index: 2; transform: rotate(45deg);
    background: #E8192C; color: #fff; font-size: 0.72rem; font-weight: 700;
    padding: 4px 40px; box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.ns-ribbon-muted { background: #555; }
.ns-pcard-body { padding: 12px 13px 14px; }
.ns-pcard-name {
    font-size: 0.92rem; font-weight: 700; line-height: 1.25; margin-bottom: 4px; color: #fff;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.3em;
}
.ns-pcard-mer { display: flex; align-items: center; gap: 5px; color: #9c9c9c; font-size: 0.72rem; margin-bottom: 6px; }
.ns-pcard-rate { color: #ffb703; font-size: 0.78rem; margin-bottom: 7px; }
.ns-pcard-rate span { color: #9c9c9c; margin-left: 4px; }
.ns-pcard-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ns-pcard-price .now { color: #E8192C; font-size: 1.02rem; font-weight: 800; }
.ns-pcard-price .old { color: #6d6d6d; font-size: 0.78rem; text-decoration: line-through; }
.ns-pcard-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: #E8192C; color: #fff; font-size: 0.78rem; font-weight: 600; padding: 9px; border-radius: 9px;
}

/* ── Deal of the Day spotlight ── */
.ns-tag-pill {
    display: inline-block; background: rgba(232,25,44,0.15); color: #ff6b6b; font-size: 0.68rem; font-weight: 700;
    letter-spacing: 1px; padding: 5px 12px; border-radius: 20px; margin-bottom: 12px;
}
.ns-spot {
    display: flex; border-radius: 16px; overflow: hidden; min-height: 180px; border: 1px solid #2e2e2e;
    transition: box-shadow .18s ease; color: #fff;
}
.ns-spot:hover { box-shadow: 0 10px 30px rgba(232,25,44,0.18); }
.ns-spot-cover {
    flex: 0 0 40%; position: relative; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: #fff;
}
.ns-spot-cover > i { font-size: 2rem; opacity: .9; margin-bottom: 8px; }
.ns-spot-big { font-size: 2.8rem; font-weight: 900; line-height: 1; text-shadow: 0 2px 10px rgba(0,0,0,.3); }
.ns-spot-info { flex: 1; background: #1a1a1a; padding: 22px 24px; display: flex; flex-direction: column; justify-content: center; }
.ns-spot-name { font-size: 1.35rem; font-weight: 800; margin-bottom: 6px; color: #fff; }
.ns-countdown { display: flex; gap: 8px; margin: 14px 0 18px; }
.ns-countdown > div { background: #000; border: 1px solid #2e2e2e; border-radius: 8px; padding: 6px 0; min-width: 50px; text-align: center; }
.ns-countdown b { display: block; font-size: 1.15rem; font-weight: 800; color: #fff; }
.ns-countdown small { font-size: 0.55rem; color: #8a8a8a; letter-spacing: 1px; }
@media (max-width: 575.98px) {
    .ns-spot { flex-direction: column; }
    .ns-spot-cover { flex-basis: auto; padding: 20px 0; }
    .ns-spot-big { font-size: 2.2rem; }
    .ns-countdown > div { min-width: 42px; }
}
