/* Font Awesome – forțează font-display: swap */
@font-face {
    font-family: "Font Awesome 6 Free";
    font-display: swap;
}
@font-face {
    font-family: "Font Awesome 6 Brands";
    font-display: swap;
}

:root {
    --primary: #4f46e5; /* indigo modern */
}

body {
    font-family: 'Inter', sans-serif;
    color: #1f2937;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Dark mode ===== */
[data-bs-theme="dark"] {
    --bs-body-color: #e5e7eb;
    --bs-secondary-color: #9ca3af;
}

[data-bs-theme="dark"] body {
    color: #e5e7eb;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
    color: #f3f4f6 !important;
}

[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .lead {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .breadcrumb-item a {
    color: #a5b4fc;
}

[data-bs-theme="dark"] .breadcrumb-item.active {
    color: #d1d5db;
}

[data-bs-theme="dark"] .card {
    background-color: #1f2937;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .card-body {
    color: #e5e7eb;
}

[data-bs-theme="dark"] .pack-card {
    background-color: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .pack-card .card-title a {
    color: #f3f4f6 !important;
}

[data-bs-theme="dark"] .bg-body-tertiary {
    background-color: #111827 !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #1e1e2f !important;
}

[data-bs-theme="dark"] .list-unstyled li {
    color: #d1d5db;
}

[data-bs-theme="dark"] hr {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .content {
    color: #d1d5db;
}

.navbar-brand-text {
    color: #212529; /* negru în light mode */
}

[data-bs-theme="dark"] .navbar-brand-text {
    color: #f8f9fa; /* aproape alb în dark mode */
}

/* Toastr dark mode friendly */
[data-bs-theme="dark"] .toast {
    background-color: #1f2937 !important;
    color: #f3f4f6 !important;
}
[data-bs-theme="dark"] .toast-success {
    background-color: #065f46 !important;
}
[data-bs-theme="dark"] .toast-error {
    background-color: #7f1d1d !important;
}

/* ===== Dark mode ===== */

h1, h2, h3, h4, .navbar-brand, .btn {
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: #4338ca;
    border-color: #4338ca;
}

.hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 100px 0 80px;
}

.pack-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    border-radius: 16px;
}

.pack-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: #eef2ff;
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ===== Animații de bază ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delay-uri pentru carduri */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Hover carduri (desktop) */
.pack-card {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.35s ease;
}

.pack-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(79, 70, 229, 0.18);
}

/* Feature icons */
.feature-icon {
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.feature-icon:hover {
    transform: scale(1.12) rotate(6deg);
}

/* Butoane */
.btn {
    transition: all 0.3s ease;
}
.btn-primary:hover,
.btn-outline-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.25);
}

/* Related products - horizontal scroll + swipe */
.related-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch; /* smooth pe iOS */
    scrollbar-width: thin;
    width: 100%;
    max-width: 100%;
}

.related-track {
    display: flex;
    gap: 1.25rem;
    min-width: max-content;
}

.related-card {
    width: 260px;
    flex-shrink: 0;
}

/* Ascunde scrollbar pe Chrome/Safari dacă vrei look mai curat */
.related-scroll::-webkit-scrollbar {
    height: 6px;
}
.related-scroll::-webkit-scrollbar-thumb {
    background: rgba(79, 70, 229, 0.4);
    border-radius: 10px;
}

/* Previne overflow orizontal DOAR pe mobil */
@media (max-width: 991.98px) {
    html, body {
        overflow-x: hidden;
    }
    
    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Footer hover effects */
footer a.text-muted:hover {
    color: var(--primary) !important;
    transition: color 0.2s ease;
}

.font-size-24 {
    font-size: 24px !important;
}

footer .fab:hover {
    color: var(--primary) !important;
}

/* Fix categorii active în sidebar */
.list-group-item.active {
    background-color: transparent !important;
    color: var(--primary) !important;
    font-weight: 600;
    border-left: 3px solid var(--primary);
    padding-left: 0.75rem !important;
}

.list-group-item.active.text-primary {
    color: var(--primary) !important;
}

/* Dark mode */
[data-bs-theme="dark"] .list-group-item.active {
    color: #a5b4fc !important;
    border-left-color: #a5b4fc;
}

/* ===== Categorii sidebar – stil custom ===== */
.list-group-item.list-group-item-action {
    transition: all 0.15s ease;
}

.list-group-item.list-group-item-action:hover {
    color: #2c4872 !important;
    background-color: rgba(44, 72, 114, 0.06) !important;
}

.list-group-item.list-group-item-action.active {
    background-color: rgba(44, 72, 114, 0.12) !important;
    color: #2c4872 !important;
    font-weight: 600 !important;
    border-left: 3px solid #2c4872 !important;
    border-radius: 0.375rem !important;
}

/* Dark mode */
[data-bs-theme="dark"] .list-group-item.list-group-item-action:hover {
    color: #8fb4e0 !important;
    background-color: rgba(143, 180, 224, 0.08) !important;
}

[data-bs-theme="dark"] .list-group-item.list-group-item-action.active {
    background-color: rgba(143, 180, 224, 0.15) !important;
    color: #8fb4e0 !important;
    border-left-color: #8fb4e0 !important;
}