/* assets/css/style.css */
:root {
    --brand-1: #4f46e5;
    --brand-2: #06b6d4;
    --brand-3: #ec4899;
    --ink: #1f2937;
    --muted: #6b7280;
}

* { scroll-behavior: smooth; }

body {
    background: linear-gradient(180deg, #f5f7ff 0%, #eef2f7 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

main { flex: 1; }

/* ---------- Navbar ---------- */
.navbar {
    background: linear-gradient(90deg, var(--brand-1), var(--brand-2)) !important;
    box-shadow: 0 4px 18px rgba(79, 70, 229, .25);
}
.navbar-brand {
    font-weight: 800;
    letter-spacing: .5px;
    font-size: 1.4rem;
}
.navbar-brand::before {
    content: "\2726";
    margin-right: .4rem;
    color: #fde047;
}
.nav-link { font-weight: 500; }
.navbar .btn-outline-light:hover { background: rgba(255,255,255,.15); }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(120deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));
    color: #fff;
    border-radius: 1rem;
    padding: 3rem 2rem;
    box-shadow: 0 12px 30px rgba(79, 70, 229, .3);
}
.hero h1 { font-weight: 800; font-size: 2.4rem; }
.hero p { opacity: .92; font-size: 1.1rem; }

/* ---------- Section headings ---------- */
.section-title {
    position: relative;
    font-weight: 700;
    margin-bottom: 1.2rem;
    padding-left: .8rem;
}
.section-title::before {
    content: "";
    position: absolute;
    left: 0; top: .15em; bottom: .15em;
    width: 5px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--brand-1), var(--brand-2));
}

/* ---------- Category cards ---------- */
.category-card {
    position: relative;
    display: block;
    height: 170px;
    border-radius: 1rem;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .18);
    transition: transform .25s ease, box-shadow .25s ease;
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .28);
    color: #fff;
}
.category-card img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.category-card .overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0) 35%, rgba(15,23,42,.85) 100%);
}
.category-card .cc-title {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: .9rem 1rem;
    font-weight: 700; font-size: 1.15rem;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.category-card .cc-letter {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 3.5rem; font-weight: 800; color: rgba(255,255,255,.9);
}

/* ---------- Post cards ---------- */
.card { border: none; border-radius: 1rem; }
.post-card {
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .16);
}
.card-img-top { border-top-left-radius: 1rem; border-top-right-radius: 1rem; }

/* ---------- Buttons ---------- */
.btn-primary {
    background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
    border: none;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-success { background: linear-gradient(90deg, #16a34a, #22c55e); border: none; }
.btn-danger  { background: linear-gradient(90deg, #e11d48, #f43f5e); border: none; }
.btn-warning { background: linear-gradient(90deg, #f59e0b, #fbbf24); border: none; color: #1f2937; }
.btn-info    { background: linear-gradient(90deg, #0891b2, #06b6d4); border: none; }

/* ---------- Badges ---------- */
.badge.bg-secondary { background: linear-gradient(90deg, #6366f1, #8b5cf6) !important; }

/* ---------- Tables ---------- */
.table thead.table-light { background: #eef2ff; }

/* ---------- Footer ---------- */
footer {
    margin-top: auto;
    background: linear-gradient(90deg, #1e1b4b, #312e81) !important;
}

/* ---------- Auth / form cards ---------- */
.card.shadow { box-shadow: 0 10px 30px rgba(15, 23, 42, .12) !important; }
.form-control:focus, .form-select:focus {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 .2rem rgba(6, 182, 212, .25);
}

/* ---------- Live feed ---------- */
.live-dot {
    font-size: .7rem;
    animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}
.post-new { animation: flashIn 1.3s ease; }
@keyframes flashIn {
    0%   { box-shadow: 0 0 0 3px rgba(34, 197, 94, .7); transform: translateY(-4px); }
    100% { box-shadow: none; transform: translateY(0); }
}

/* ---------- Product / post detail ---------- */
.product-detail { padding-top: .5rem; }
.product-img-wrap {
    position: relative;
    cursor: zoom-in;
    border-radius: .75rem;
    overflow: hidden;
}
.product-img-wrap img { transition: transform .35s ease; }
.product-img-wrap:hover img { transform: scale(1.04); }
.zoom-badge {
    position: absolute;
    right: .6rem;
    bottom: .6rem;
    width: 2.1rem; height: 2.1rem;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .65);
    color: #fff;
    border-radius: 50%;
    font-size: .95rem;
    pointer-events: none;
}
.sticky-detail { padding-left: 0; }
@media (min-width: 992px) {
    .sticky-detail {
        position: sticky;
        top: 88px;
    }
}
.detail-card { border-radius: 1rem; }
.product-detail h1 { line-height: 1.25; }
.product-detail .list-group-item { border-color: #eef2f7; }
