.products-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.product-category-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.product-category-tab {
    padding: 12px 25px;
    margin: 0 10px 10px;
    background: #fff;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark);
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 50px;
}

.pagination {
    display: flex;
    gap: 5px;
}

.page-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background-color: #f0f0f0;
}

.page-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.product-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4em;
    max-height: 4.2em;
    /* 3 строки по 1.4em */
}

/* Для модального окна - полный текст */
#modalProductDescription {
    white-space: pre-wrap;
    line-height: 1.6em;
}

.product-category-tab.active,
.product-category-tab:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-img {
    overflow: hidden;
    position: relative;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
}

.product-content {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.product-description {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.product-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 18px;
}

.product-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-btn:hover {
    background: var(--primary-dark);
}

.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.product-modal-content {
    background: white;
    border-radius: 10px;
    max-width: 900px;
    margin: 30px auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    z-index: 10;
}

.modal-body {
    padding: 30px;
}

/* Стили для формы */
.contact-form {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
}

textarea.form-control {
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.product-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    z-index: 10;
}

.product-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 10px;
}

.product-modal-img {
    min-height: 400px;
}
@media (max-width: 768px) {
 .product-modal-img {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: fit-content;
}
}

.product-modal-img img {
    width: 100%;
    max-width: 452px;
    height: 80%;
    max-height: 862px;
    object-fit: cover;
}
@media (max-width: 768px) {
    .product-modal-img img {
        width: 100%;
        max-width: 100%;
        height: 80%;
        max-height: 862px;
        object-fit: cover;
    }
}
/* Стилі для зображень в описі */
.description-image {
    margin: 15px 0;
    text-align: center;
}

.description-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.image-caption {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Стилі для модального вікна */
#modalProductDescription img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border-radius: 4px;
}

.product-modal-info {
    padding: 10px;
}
.product-modal-info{
    /* grid-column: span 2; */
}

.product-modal-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--dark);
}

.product-modal-price {
    font-size: 22px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 20px;
}

.product-modal-description {
    margin-bottom: 25px;
    line-height: 1.6;
}

.product-modal-specs {
    margin-bottom: 25px;
}

.product-modal-specs li {
    margin-bottom: 8px;
    display: flex;
}

.product-modal-specs strong {
    min-width: 120px;
    display: inline-block;
    color: var(--dark);
}

.product-modal-form {
    margin-top: 30px;
}

.order-success {
    text-align: center;
    padding: 20px;
}

.order-success i {
    color: #27ae60;
    font-size: 50px;
    margin-bottom: 20px;
}

.order-success h3 {
    color: #2d9cdb;
    margin-bottom: 15px;
}

.order-success p {
    margin-bottom: 10px;
    color: #4f4f4f;
}

.close-success {
    margin-top: 20px;
    background-color: #2d9cdb;
    color: white;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.maincontainer{
    width: 100%;
    height: 456px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    background-color: black;
}
.mtedian_b{
    width: 16.66%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    border: 1px solid white;
    padding: 10px;
    min-height: 456px;
}
.img_container{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.class_p{
    color: white;
}
.img_camdent_absolute{
    width: 100%;
    max-height: 400px;
    max-width: 220px;
}
.img_camdent{
    width: 80%;
}
@media (max-width: 1024px) {
    .maincontainer{
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: black;
    }
    .mtedian_b{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    border: 1px solid white;
    padding: 10px;
    min-height: 100px;
    }
    .img_camdent{
        width: 100%;
        height: 100%;
        max-width: 150px;
        max-height: 150px;
    }
    .img_camdent_absolute{
        transform: rotate(270deg);
        width: 100%;
        height: 100%;
        max-width: 200px;
        max-height: 250px;
    }
    .mtedian_b:last-child{
        display: none;
    }
    .img_container{
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}