/*!
Theme Name: ecommerce
*
*	Стили для single-product
* 
* 
* 
*/
.single-loop {
	display: flex;
	flex-wrap: wrap;
	gap: 2em;
}

.single-images, .single-summary {
	flex: 1;
	min-width: calc(50% - 1em);
}

.single-images {
	position: relative;
}

.single-summary {
	display: grid;
	gap: 1em 0em;
}

.after-single-summary {
	flex: 1 1 100%;
	display: flex;
	flex-direction: column;
	gap: 2em;
}


/********************* gallery ************************/

/* Анимация для основного изображения */
.gallery-main-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    transition: opacity 0.3s ease;
} 

.gallery-container {
    /*margin: 0 auto;*/
}

.single-images__item-main {
	width: 100%;
	/*margin-bottom: 15px;*/
    cursor: pointer;
}

.single-images__image-main {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.thumbnail-container {
    display: flex;
    gap: 10px;
}

.single-images__item {
    width: 25%;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.single-images__item:hover {
    opacity: 1;
}

.single-images__item img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.single-images__item.active {
	opacity: 1;
}

.gallery-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.gallery-modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 1200px;
}

.gallery-mySlides {
    display: none;
    text-align: center;
}

.gallery-mySlides img {
    /*max-height: 80vh;*/
	/*width: auto;*/
    max-width: 100%;
}

.gallery-close {
    color: white;
    position: absolute;
    top: 50px;
    right: 35px;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.gallery-close:hover {
    color: #ccc;
}

a.gallery-prev, a.gallery-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    background-color: var(--elem_color1);
    font-weight: bold;
    font-size: 20px;
    transition: 0.3s;
    user-select: none;
}

.gallery-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.gallery-prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.gallery-prev:hover, .gallery-next:hover {
    background-color: var(--hovelem_color1);
}

/********************* summary ************************/

.single-product_title {
	font-size: var(--h4);
    font-weight: 700;
}

.single-product_price {
	font-size: var(--h3);
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 1em;
}

.single-product_price > del {
	font-size: var(--h5);
    font-weight: 500;
    color: #999;
    order: 2;
}

.single-product_price > ins {
	order: 1;
}

.single-product-info__excerpt-text,
.single-product-info__characters {
	font-size: var(--h7);
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: baseline;
    gap: 1em;
}

.single-product-atts__att {
	display: flex;
    justify-content: space-between;
    width: 100%;
    position: relative;
    font-size: var(--h6);
}

.product-atts__label {}

.product-atts__value {}

a.product-info__button {
	display: flex;
    justify-content: center;
    line-height: 2rem;
    background: var(--elem_color1);
    color: var(--text_color1);
    padding: 0.5em;
    border-radius: 6px;
}

/********************* items ************************/


.product-info {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 100%;
	font-size: var(--h6);
	height: 100%;
}

.product-info > div {
	padding: 0.5rem 0 0;
}

.product-info__title {
	font-size: var(--h3);
}

.product-info__characters {
    font-weight: 400;
}

.product-atts {
	display: flex;
	flex-direction: column;
	padding: 1rem 0;
	font-size: var(--h8);
	font-weight: 500;
	width: 100%; 
}

.product-atts__att {
	display: flex;
	justify-content: space-between;
}

.product-atts__label {

}

.product-atts__value {

}

.product-info__price {
	font-size: var(--h3);
	line-height: 3rem;
	display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.product-info__addtocart {
	display: flex;
}

form.product-info__formcart {
	display: flex;
	width: 100%;
}

.product-info__excerpt{
	font-weight: 400;
    /*font-size: var(--h6);*/
}

.product-info__excerpt-header {
	font-weight: 600;
}

.product-info__excerpt-text {

}

.product-info__excerpt-text > ul {
	list-style: initial;
    padding: 0.5rem 1rem;
}

.product-info__empty {
	flex: 1 1 auto;
}

.padding {
	padding: 1.5em 0;
}

.product-info__addtocart-button {
	flex: 1 0;
	display: flex;
	justify-content: center;
	text-transform: inherit;
	font-size: inherit;
	font-weight: inherit;
	background: var(--green);
	padding: 0.5em;
}
/********** tabs **************************/

.tab_wrapper {
    display: flex;
    border-bottom: 1px solid #ccc;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-right: 5px;
    background-color: #f1f1f1;
    border-radius: 5px 5px 0 0;
    transition: all 0.3s;
}

.tab:hover {
    background-color: #ddd;
}

.tab.active {
    background-color: #fff;
    border-color: #ccc;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
    font-weight: bold;
}

.tab_content {
    display: none;
}

.tab_content.active {
    display: grid;
}

/********** equipment/materials ***********/

.equipment, .materials, .up-sells, .fund, .pay, .delivery {
	display: none;
/*	display: grid;*/
	gap: 1em 0;
}

.equipment *, .materials * {
/*	border: 1px solid red;*/
}

.work {
    grid-template-rows: 3em 1fr;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1em;
    order: 1;
}

.equipment {
    grid-template-rows: 2fr 1fr;
    order: 2;
}

.materials {
	grid-template-rows: 3em 1fr;
	grid-template-columns: 1fr 2fr 3fr;
    order: 3;
}

.delivery {
    order: 5;
}

.pay {
    order: 6;
}

.fund, .pay, .delivery {
	grid-template-rows: 3em;
}

.equipment_title, .up-sells_title, .materials_title,
.fund_title, .pay_title, .delivery_title, .work_title {
	font-size: var(--h4);
	font-weight: 700;
	text-align: center;
	border-radius: 6px;
	background: var(--bg2);
	align-self: stretch;
	display: grid;
	place-items: center;
}

.equipment_title, .materials_title, .fund_title, .delivery_title, .delivery_cell, .pay_title, .pay_cell__text {
    grid-column: 1/3;
}

.materials_title, .work_title {
	grid-column: 1/-1;
}

.materials_cell-img {
    max-height: 100px;
}

.materials_cell-img, .work_cell-img {
	width: auto;
	overflow: hidden;
}

.materials_cell-img > img,
.work_cell-img > img {
    object-fit: cover;
    border-radius: 6px;
}

.delivery_cell__map {
	width: 100%;
	height: 500px;
	position: relative;
	border-radius: 6px;
	overflow: hidden;
}

.equipment_cell, .materials_cell {
	border-bottom: 1px solid var(--bg2);
    padding-left: 1em;
    align-content: center;
}

.equipment_cell-left, .materials_cell-left {
}

.equipment_cell-right, .materials_cell-right {
	text-align: right;
}

/*************** pay.php *************/

.howtobuy {
    padding-top: 1em;
}

.pay {
    grid-template-columns: 1fr;
    gap: 1em;
    counter-reset: step-counter;
}

.pay ul > li::before {
    content: "\2714";
    position: absolute;
    left: 0;
    color: var(--elem_color1);
    font-size: 1em;
    border-radius: 50%;
    width: 1.5em;
    height: 1.5em;
    background-color: var(--elem_color2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.pay_cell {
    display: grid;
    border: 1px solid var(--elem_color1);
    border-radius: 6px;
    padding: 1em;
    background: var(--bg2);
    gap: 1em;
    align-items: start;
    position: relative;
}

.pay_cell__header {
    border-bottom: 1px solid var(--elem_color1);
    font-size: var(--h4);
    font-weight: 700;
    padding: 0 0 0.8em 0;
    counter-increment: step-counter;
    position: relative;
    display: flex;
    align-items: anchor-center;
    gap: 1em;
}

.pay_cell__header::before {
    content: counter(step-counter);
    position: relative;
    left: 0;
    top: 0;
    min-width: 40px;
    height: 40px;
    background: var(--elem_color1);
    color: var(--bg2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--h4);
}

.pay_cell__description {
}

/* Распределение пар по колонкам */
.pay_cell:nth-child(odd) {
  grid-column: 1;
}

/* Распределение пар по колонкам */
.pay_cell:nth-child(even) {
  grid-column: 2;
}

/* Стили для карты */
#map {
    width: 100%;
    height: 100%; /* Фиксированная высота */
    margin: 0;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Отключение скролла на карте */
#map ymaps {
/*    height: 100% !important;*/
}

/************* up-sells **************/


.up-sells {
    grid-template-rows: 3em 1fr;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1em;
    order: 3;
}

.up-sells_title {
    grid-column: 1/5;
}

.up-sells_cell {
    overflow: hidden;
    position: relative;
    padding: 1em;
    background-color: white;
    box-shadow: 0 0 100px rgb(198 198 198 / 37%);
    border-radius: 1em;
    transition: 0.3s;
}

.up-sells_cell .ecproduct__title {
    padding: 0;
}


@media (max-width: 1150px) {

	.product-info {
		font-size: var(--h4);
	}

	.product-info__title {
		font-size: var(--h4);
	}

	.product-info > div {
/*		padding: 0;*/
	}

}

@media (max-width: 980px) {

	.single-loop {
	}

	.single-images, .single-summary {
		min-width: 100%;
	}

	.after-single-summary {
		font-size: var(--h6);
	}


    .after-single-summary {
        font-size: var(--h6);
    }

    .equipment, .materials, .up-sells, .fund, .pay, .delivery {
/*      display: none;*/
        display: grid;
    }

    .materials {
        grid-template-columns: 1fr 1fr 2fr;
    }

    .tab_wrapper {
        display: none;
    }

    .onsale {
        top: 8em;
        width: 8em;
        height: 2em;
    }

    .up-sells {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .up-sells_title {
        grid-column: 1/4;
    }

    .up-sells_cell {
        padding: 1em;
    }

    .pay_cell:nth-child(even) {
      grid-column: 1;
    }

    .pay {
        grid-template-rows: 6em;
    }

    .work {
        grid-template-columns: 1fr 1fr;
    }


}


@media (max-width: 600px) {

    .up-sells {
        grid-template-columns: 1fr 1fr;
    }

    .up-sells_title {
        grid-column: 1/3;
    }

    .pay_cell:nth-child(even) {
      grid-column: 1;
    }

    .pay {
        grid-template-rows: 6em;
    }

    .work {
        grid-template-columns: 1fr;
    }

}


