body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.hero-section {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    padding: 80px 0;
}

.card {
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

.card-img-top {
    border-radius: 10px 10px 0 0;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: scale(1.05);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
}

footer {
    margin-top: auto;
}

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

footer a:hover {
    color: #28a745 !important;
}

/* بهینه‌سازی فوتر در موبایل */
@media (max-width: 768px) {
    footer {
        font-size: 0.85rem;
        padding: 1.5rem 0 !important;
    }
    
    footer h5 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    footer p {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    footer ul {
        font-size: 0.8rem;
    }
    
    footer li {
        margin-bottom: 0.4rem;
    }
    
    footer .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    footer .row > [class*="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.table {
    background-color: white;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.alert {
    border-radius: 10px;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
}

.list-group-item.active {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.product-card {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
}

.product-card .card-img-top {
    transition: transform 0.3s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.form-select-lg {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 30px 0 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-section h1 {
        font-size: 1.4rem;
        font-weight: 700;
        white-space: nowrap;
    }
    
    .navbar-brand {
        font-size: 0.9rem !important;
    }
    
    .card-img-top {
        height: 140px !important;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
    
    .product-card .card-body {
        padding: 0.75rem !important;
    }
    
    .product-card .card-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .product-card .card-text {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .product-card .mt-auto {
        margin-top: 0.5rem !important;
    }
    
    .product-card .mb-3 {
        margin-bottom: 0.75rem !important;
    }
    
    .form-select-lg {
        font-size: 1rem;
    }
    
    .product-card .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.5rem;
    }
    
    #products .row {
        margin-bottom: 0.5rem;
    }
    
    #products .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    /* بهینه‌سازی سبد خرید در موبایل */
    .container.my-5 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .container.my-5 h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem !important;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .card.mb-3 {
        border-radius: 10px;
    }
    
    .card.mb-3 .card-body {
        padding: 1rem !important;
    }
    
    .card.mb-3 h6 {
        font-size: 0.95rem;
        font-weight: 600;
    }
    
    .card.mb-3 small {
        font-size: 0.75rem;
    }
    
    .card.mb-3 .btn-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .card .d-flex.justify-content-between {
        gap: 0.5rem;
    }
    
    .card .text-success.fw-bold {
        font-size: 0.9rem;
    }
    
    /* بهینه‌سازی فرم‌های سبد خرید در موبایل */
    .card-body h6 {
        font-size: 0.9rem;
    }
    
    .card-body .form-control {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .card-body .btn {
        font-size: 0.9rem;
    }
    
    .card-body .btn-lg {
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }
    
    .card-body .alert {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .card-body label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }
    
    .card-body .form-text {
        font-size: 0.75rem;
    }
    
    .card-body .small {
        font-size: 0.75rem;
    }
    
    .card-body hr {
        margin: 1rem 0;
    }
    
    .card-body .d-flex.justify-content-between {
        font-size: 0.9rem;
    }
    
    .card-body .fs-5 {
        font-size: 1.1rem !important;
    }
    
    /* بهینه‌سازی فرم سفارش در موبایل */
    .card-body .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }
    
    .card-body .form-control {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .card-body .btn-lg {
        font-size: 1rem;
        padding: 0.6rem 1.2rem;
    }
    
    .card-body .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .card-body .row > [class*="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .card-body .mb-3 {
        margin-bottom: 0.75rem !important;
    }
    
    .card-body .small {
        font-size: 0.75rem;
    }
    
    /* بهینه‌سازی پنل مدیریت در موبایل */
    .sidebar {
        min-height: auto !important;
        padding: 15px 0 !important;
    }
    
    .sidebar h4 {
        font-size: 1.1rem;
    }
    
    .sidebar .nav-link {
        padding: 10px 15px !important;
        font-size: 0.9rem;
        margin: 3px 10px !important;
    }
    
    .content-wrapper {
        padding: 15px !important;
    }
    
    .content-wrapper h2 {
        font-size: 1.5rem;
    }
    
    .card-header h4,
    .card-header h5 {
        font-size: 1rem;
    }
    
    .card-body .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }
    
    .card-body .form-control,
    .card-body .form-select {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .card-body textarea.form-control {
        min-height: 80px;
    }
    
    .card-body .form-text {
        font-size: 0.75rem;
    }
    
    .card-body .form-check-label {
        font-size: 0.85rem;
    }
    
    .card-body img {
        max-width: 150px !important;
    }
    
    .stat-card {
        margin-bottom: 0.5rem;
    }
    
    .stat-card .card-body {
        padding: 1rem !important;
    }
    
    .stat-card h2 {
        font-size: 1.3rem;
    }
    
    .stat-card h6 {
        font-size: 0.75rem;
        margin-bottom: 0.5rem !important;
    }
    
    .stat-icon {
        font-size: 1.5rem !important;
    }
    
    .stat-card .d-flex {
        flex-wrap: wrap;
    }
    
    .d-grid.gap-2 .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    /* بهینه‌سازی کارت منوی موبایل پنل مدیریت */
    .card-body .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.4rem;
        white-space: nowrap;
    }
    
    .card-body .btn i {
        font-size: 1.2rem;
    }
    
    .card-body .btn small {
        font-size: 0.7rem;
        display: block;
    }
    
    .card-body .btn.active {
        background-color: #28a745;
        border-color: #28a745;
        color: white;
    }
    
    .card-body .row.g-2 {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
    
    .card-body .row.g-2 > [class*="col-"] {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    /* بهینه‌سازی کارت‌های سفارش در موبایل */
    .card.mb-3.shadow-sm {
        border-radius: 10px;
    }
    
    .card.mb-3.shadow-sm .card-header {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .card.mb-3.shadow-sm .card-body {
        padding: 1rem;
    }
    
    .card.mb-3.shadow-sm small {
        font-size: 0.75rem;
    }
    
    .card.mb-3.shadow-sm strong {
        font-size: 0.9rem;
    }
    
    .card.mb-3.shadow-sm .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}


