/* ── Apegos — Custom Styles ── */

:root {
    --primary: #dc3545;
    --primary-dark: #b02a37;
    --bs-primary: #dc3545;
    --bs-primary-rgb: 220,53,69;
    --bs-link-color: #c82333;
    --bs-link-hover-color: #a61e2a;
}

/* Force Bootstrap primary components to use red theme */
.navbar.bg-primary,
.bg-primary {
    background-color: #dc3545 !important;
}

.text-primary {
    color: var(--primary) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-bg: #8f202c;
    --bs-btn-active-border-color: #8f202c;
    --bs-btn-focus-shadow-rgb: 220,53,69;
}

.btn-outline-primary {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
    --bs-btn-focus-shadow-rgb: 220,53,69;
}

.nav-link.active,
.dropdown-item:active,
.page-link,
.page-link:hover {
    color: var(--primary);
}

.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

.list-group-item.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.list-group-item.active i {
    color: #fff;
}

body {
    background-color: #f5f6fa;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.brand-logo-footer {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

/* ── Cards de produto ── */
.product-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
    background: #e9ecef;
}
.product-card .img-placeholder {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    color: #adb5bd;
    font-size: 3rem;
}
.product-card .badge-status {
    position: absolute;
    top: 10px;
    right: 10px;
}
.product-card .price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* ── Hero / Banner ── */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #8b1f2b 100%);
    color: #fff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
}

/* ── Auth forms ── */
.auth-card {
    max-width: 480px;
    margin: 2rem auto;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.1);
}

/* ── Product detail ── */
.product-gallery img {
    border-radius: 12px;
    width: 100%;
    object-fit: cover;
    max-height: 420px;
}
.product-gallery .thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.product-gallery .thumb.active,
.product-gallery .thumb:hover {
    border-color: var(--primary);
}

/* ── Chat / Q&A ── */
.qa-item {
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
    margin-bottom: 1.25rem;
}
.qa-item .question {
    font-weight: 600;
    color: #212529;
}
.qa-item .answer {
    color: #495057;
    margin-top: 0.4rem;
    padding-left: 0.75rem;
}
.qa-item .answer::before {
    content: '↳ ';
    color: var(--primary);
    font-weight: bold;
}

/* ── Admin ── */
.admin-sidebar .nav-link {
    color: #495057;
    border-radius: 8px;
    padding: 0.6rem 1rem;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: var(--primary);
    color: #fff;
}

/* ── Responsive tweaks ── */
@media (max-width: 576px) {
    .hero { padding: 1.5rem 1rem; }
    .product-card .card-img-top,
    .product-card .img-placeholder { height: 160px; }
}

/* ── Mobile navbar collapsed menu ── */
@media (max-width: 991.98px) {
    #navMain {
        background-color: #dc3545 !important;
        border-radius: 0 0 10px 10px;
        padding: 0.5rem 0.75rem 0.75rem;
        margin-top: 0.25rem;
    }
    #navMain .nav-link {
        color: rgba(255,255,255,.85) !important;
    }
    #navMain .nav-link:hover,
    #navMain .nav-link.active {
        color: #fff !important;
        background-color: rgba(0,0,0,.15);
        border-radius: 8px;
    }
    #navMain .btn-light {
        background-color: #fff;
        color: #dc3545;
        border-color: #fff;
    }
    #navMain .dropdown-toggle {
        color: rgba(255,255,255,.85) !important;
    }
}

/* ── Alerts / Flash ── */
.flash-message {
    position: fixed;
    top: 70px;
    right: 1rem;
    z-index: 1080;
    min-width: 280px;
    max-width: 360px;
    animation: slideIn .3s ease;
}
@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}
