/*!
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;
}




/********************* 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 {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    gap: 1em;
}


.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, .excerpt {
	display: none;
/*	display: grid;*/
	gap: 1em 0;
}

.equipment *, .materials * {
/*	border: 1px solid red;*/
}

.portfolio {
    display: flex;
    flex-direction: column;
}

.work {
    grid-template-rows: 3em 1fr;
    gap: 1em;
    order: 1;
}

.workcolumn {
    display: block;
    columns: 3;
    gap: 1em;
}

.excerpt {
    grid-template-rows: 3em 1fr;
    order: 2;
}

.equipment {
    grid-template-rows: 3em 1fr;
    order: 3;
}

.materials {
	grid-template-rows: 3em 1fr;
	grid-template-columns: 1fr 2fr 3fr;
    order: 4;
}

.delivery {
    order: 5;
}

.pay {
    order: 6;
}

.fund, .pay {
	grid-template-rows: 3em;
}

.equipment_title, .up-sells_title, .materials_title, .pay_title, .delivery_title, .work_title, .excerpt_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, .delivery_title, .delivery_cell, .pay_title, .pay_cell__text, .excerpt_title {
    grid-column: 1/3;
}

.materials_title, .work_title {
	grid-column: 1/-1;
}

.materials_cell-img {
    max-height: 100px;
}

.work_cell-img {
	display: flex;
	padding-bottom: 1em;
}

.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 > .section_header  {
    display: none;
}

.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, .work {
        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;
        grid-template-columns: 1fr;
    }

    .workcolumn {
        columns: 2;
    }


}


/* Вариативный товар: блок выбора комплектации */
.variations_form select {
	display: none; /* скрываем оригинальные селекторы, работаем через кнопки */
}

.variant-selector {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1em;
	text-align: center;
}

.variant-title {
	font-size: var(--h5);
	font-weight: 600;
	color: var(--text_color2);
}

.variant-buttons {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.8em;
	width: 100%;
}

.variant-button {
	background: transparent;
	color: var(--text_color2);
	border: 1px solid var(--elem_color1);
	border-radius: 6px;
	padding: 0.5em 1.4em;
	font-size: var(--h7);
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	transition: background 0.3s, color 0.3s;
}

.variant-button:hover {
	background: var(--hovelem_color1);
	color: var(--text_color1);
}

.variant-button.is-active {
	background: var(--elem_color1);
	color: var(--text_color1);
}

.variations_form .quantity,
.variations_form .single_add_to_cart_button,
.woocommerce-variation-add-to-cart .quantity,
.woocommerce-variation-add-to-cart .single_add_to_cart_button {
	display: none;
}

.variations_form .single_variation_wrap {
	margin-top: 0.5em;
}

.variations_form .variant-price {
	text-align: center;
}

.variations_form .variant-price .price {
	font-size: var(--h3);
	font-weight: 700;
	display: flex;
	justify-content: center;
	gap: 0.5em;
	margin: 0;
}

.variations_form .variant-price .price del {
	font-size: var(--h5);
	font-weight: 500;
	order: 2;
}

.variations_form .variant-price .price ins {
	order: 1;
}

@media (max-width: 600px) {

    .up-sells {
        grid-template-columns: 1fr 1fr;
    }
}


