/* Variabile culori */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
}

/* Truncate product description to 2 lines */
.card-text.product-description {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 3em;
    line-height: 1.5;
}

/* General styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar styling */
.navbar {
    background-color: #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color) !important;
}

.navbar-brand img {
    max-height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
}

/* Category links in header */
.navbar-nav.center-nav .nav-item .nav-link {
    width: 140px;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Cart icon styling */
.nav-link .fa-shopping-cart {
    color: var(--accent-color);
}

/* Main content area */
main.main {
    flex: 1;
    padding: 2rem 0;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 2rem;
}

/* Card styling */
.card {
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.card:hover {
    transform: translateY(-5px);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Feature boxes styling */
.feature {
    background-color: #fff;
    border-radius: 10px;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    color: #007bff;
}

/* Price styling */
.price {
    font-size: 1.25rem;
    color: #28a745;
    font-weight: bold;
}

/* Button hover effects */
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,.2);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,.1);
}

/* Top navigation styling */
.top-nav {
    background-color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.top-nav-title a {
    color: #007bff;
    font-weight: bold;
    font-size: 1.5rem;
    text-decoration: none;
}

.top-nav-links a {
    color: #6c757d;
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.2s;
}

.top-nav-links a:hover {
    color: #007bff;
}

/* Container padding */
.content {
    padding: 2rem 0;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Footer styling */
.footer {
    background-color: var(--dark-color) !important;
    color: #fff;
    padding: 3rem 0 !important;
    margin-top: auto;
}

.footer h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer .list-unstyled li {
    margin-bottom: 0.8rem;
}

.footer a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-color);
}

.footer .text-muted {
    color: #bdc3c7 !important;
}

.footer i {
    color: var(--primary-color);
    width: 20px;
    margin-right: 10px;
}

/* Flash messages styling */
.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.message.success {
    background-color: var(--secondary-color);
    color: white;
}

.message.error {
    background-color: var(--accent-color);
    color: white;
}

/* Card styling */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* Button styling */
.btn {
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

/* Form styling */
.form-control {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 0.75rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Table styling */
.table {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table thead th {
    background-color: var(--light-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Badge styling */
.badge {
    padding: 0.5em 1em;
    font-weight: 500;
}

/* Pagination styling */
.pagination {
    gap: 0.25rem;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link.btn {
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.pagination .page-link.btn-primary {
    color: white;
}

.pagination .page-link.btn-outline-primary:hover {
    color: white;
}

.pagination .fas {
    font-size: 0.8rem;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.65;
    pointer-events: none;
}

/* Logo în sidebar */
.sidebar-brand img {
    max-height: 45px;
    width: auto;
    filter: drop-shadow(0px 0px 3px rgba(255, 255, 255, 0.3));
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .nav-link {
        padding: 0.5rem 0 !important;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer .col-md-3:not(:last-child) {
        margin-bottom: 2rem;
    }
    
    /* Mobile adjustments for category links */
    .navbar-nav.center-nav .nav-item .nav-link {
        width: 100%;
        min-height: auto;
        padding: 0.75rem 0 !important;
    }
}

/* Detailed product description styling */
.product-full-description {
    margin-bottom: 3rem;
}

.product-full-description .card {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.product-full-description .card-body {
    padding: 2rem;
}

/* Make sure CKEditor content displays properly */
.product-full-description img {
    max-width: 100%;
    height: auto;
}

.product-full-description table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.product-full-description table td,
.product-full-description table th {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
}
