﻿html {
    position: relative;
    min-height: 100%;
}

body {
    direction: rtl;
    font-family: Arial, sans-serif;
    margin: 0;
    display: flex !important;
    flex-direction: column;
    min-height: 100vh;
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding-bottom: 3rem;
}

.custom-footer {
    background-color: #f8f9fa;
    padding: 20px 0;
    color: #333;
}

    .custom-footer h4 {
        font-size: 18px;
        margin-bottom: 10px;
        font-weight: bold;
    }

    .custom-footer p {
        margin: 5px 0;
        display: flex;
        align-items: center;
    }

.footer-links,
.social-links {
    list-style: none;
    padding: 0;
}

    .footer-links li,
    .social-links li {
        margin-bottom: 10px;
    }

    .footer-links a {
        color: #007bff;
        text-decoration: none;
    }

        .footer-links a:hover {
            text-decoration: underline;
        }

    .social-links img {
        width: 24px;
        height: 24px;
        transition: transform 0.3s ease; 
    }

        .social-links img:hover {
            transform: scale(1.2); 
        }

.footer-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

    .footer-icon:hover {
        transform: scale(1.2); 
    }

.custom-footer .text-center {
    margin-top: 20px;
    font-size: 14px;
    color: #555;
}


.nav-bar {
    padding: 0px;
    background-color: darkblue !important;
    margin: 0px;
    display: flex;
    align-items: stretch;
}

.brand-bar {
    background-color: #091537;
    display: flex;
    width: 100%;
}

.menue-bar {
    background-color: white;
    width: 100% !important;
}

.brand {
    color: white !important;
    font-size: 32px;
}

.horizontal-view {
    display: inline-block;
}

.full-background {
    background: url('../Images/cnc.webp') no-repeat center center fixed;
    background-size: cover;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    text-align: center;
    padding: 20px;
}

.header-style {
    margin: 20px;
}

.content-style {
    margin-right: 40px;
    margin-bottom: 40px;
}

.image-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    gap: 10px;
}

.image-container {
    flex: 1;
    text-align: start;
    padding: 10px;
    background-color: #f8f9fa;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

    .image-container img {
        width: 100%; 
        height: auto;
    }

    .image-container h3 {
        margin-top: 10px;
        font-size: 16px;
    }

    .image-container p {
        margin-top: 10px;
        font-size: 16px;
        flex-grow: 1;
    }


@media (max-width: 768px) {
    .full-background {
        height: 50vh;
    }

    .image-row {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    .image-container {
        width: 100%;
        margin-bottom: 20px;
    }
}


.admin-content {
    padding: 20px;
    margin: 0 auto;
    max-width: 1200px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table, th, td {
    border: 1px solid #dee2e6;
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #e9ecef;
    color: #495057;
}

tr:nth-child(even) {
    background-color: #f1f1f1;
}

a {
    color: #007bff;
    text-decoration: none;
    margin-right: 10px;
}

    a:hover {
        text-decoration: underline;
    }

form {
    width: 100%;
    max-width: 600px;
    background: #fff;
    padding: 20px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"], input[type="password"], input[type="email"], select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

button {
    padding: 10px 15px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

    button:hover {
        background-color: #218838;
    }

.cancel-button {
    padding: 10px 15px;
    background-color: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    margin-left: 10px;
}

    .cancel-button:hover {
        background-color: #c82333;
    }


.admin-content {
    padding: 20px;
    margin: 0 auto;
    max-width: 1200px;
}

.admin-dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.dashboard-item {
    flex: 1 1 calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f8f9fa;
    padding: 20px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    color: #495057;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

    .dashboard-item:hover {
        background-color: #e9ecef;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

.dashboard-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.dashboard-title {
    font-size: 18px;
    font-weight: bold;
}


.admin-content {
    padding: 20px;
    margin: 0 auto;
    max-width: 1200px;
}

.admin-dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.dashboard-item {
    flex: 1 1 calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f8f9fa;
    padding: 20px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    color: #495057;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

    .dashboard-item:hover {
        background-color: #e9ecef;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

.dashboard-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.dashboard-title {
    font-size: 18px;
    font-weight: bold;
}

.cancel-button {
    padding: 10px 15px;
    background-color: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    margin-left: 10px;
}

    .cancel-button:hover {
        background-color: #c82333;
    }

/* wwwroot/css/site.css */

/* Existing styles */

/* New styles for the admin pages */
.admin-content {
    padding: 20px;
    margin: 0 auto;
    max-width: 1200px;
}

.admin-dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.dashboard-item {
    flex: 1 1 calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f8f9fa;
    padding: 20px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    color: #495057;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

    .dashboard-item:hover {
        background-color: #e9ecef;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

.dashboard-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.dashboard-title {
    font-size: 18px;
    font-weight: bold;
}

.cancel-button, .delete-button, .create-button {
    padding: 10px 15px;
    background-color: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    margin-left: 10px;
}

    .cancel-button:hover, .delete-button:hover, .create-button:hover {
        background-color: #c82333;
    }

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.admin-content {
    padding: 20px;
    margin: 0 auto;
    max-width: 1200px;
}

.admin-dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.dashboard-item {
    flex: 1 1 calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f8f9fa;
    padding: 20px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    }
/* تنظیمات اصلی برای کارت‌ها و چیدمان سه‌تایی */
.products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-around;
}

.product-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(33.333% - 32px); /* سه کارت در یک ردیف */
    max-width: calc(33.333% - 32px);
    padding: 16px;
    text-align: center;
}

    .product-item img {
        border-radius: 4px;
        max-width: 100%;
        height: auto;
    }

    .product-item h3 {
        font-size: 1.2em;
        margin-top: 8px;
    }

    .product-item p {
        font-size: 0.9em;
        color: #666;
        margin: 8px 0;
        white-space: pre-line; /* تنظیم برای نمایش کاراکترهای newline */
        overflow: hidden;
        text-overflow: ellipsis;
    }


    .product-item a {
        color: #007bff;
        text-decoration: none;
    }

        .product-item a:hover {
            text-decoration: underline;
        }

.product-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upper-section {
    display: flex;
    gap: 16px;
}

.image-slider {
    position: relative;
    flex: 1;
}

.image-container {
    overflow: hidden;
}

.slider-image {
    display: none;
    width: 100%;
    border-radius: 8px;
}

.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
}

    .slider-button:hover {
        background-color: rgba(0, 0, 0, 0.8);
    }

    .slider-button:first-of-type {
        left: 8px;
    }

    .slider-button:last-of-type {
        right: 8px;
    }

.product-info {
    flex: 1;
}

.lower-section {
    display: flex;
    gap: 16px;
}

.specifications, .documents {
    flex: 1;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
}

    .specifications h3, .documents h3 {
        margin-bottom: 8px;
    }

    .specifications ul, .documents ul {
        list-style-type: none;
        padding: 0;
    }

    .specifications li, .documents li {
        margin-bottom: 8px;
    }

        .specifications li strong, .documents li a {
            color: #333;
        }

        .documents li a {
            text-decoration: none;
        }

            .documents li a:hover {
                text-decoration: underline;
            }

/* Media Queries برای ریسپانسیو بودن */
@media (max-width: 768px) {
    .products-grid {
        flex-direction: column;
        gap: 8px;
    }

    .product-item {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 8px;
    }

    .upper-section {
        flex-direction: column;
    }

    .lower-section {
        flex-direction: column;
    }

    .slider-button {
        padding: 4px;
    }

    .slider-image {
        border-radius: 4px;
    }
}

@media (max-width: 576px) {
    .product-item h3 {
        font-size: 1em;
    }

    .product-item p {
        font-size: 0.8em;
    }

    .slider-button {
        padding: 2px;
    }

    .specifications h3, .documents h3 {
        font-size: 1em;
    }

    .specifications li strong, .documents li a {
        font-size: 0.8em;
    }
}

.product-description {
    white-space: normal;
    line-height: 1.6;
    font-size: 16px;
}

    .product-description ul {
        list-style-type: disc;
        margin-right: 20px;
    }

    .product-description li {
        margin-bottom: 10px;
    }

    .product-description p {
        margin-bottom: 15px;
    }   