.fs-advent-calendar {
    margin: 40px 0;
}

.fs-advent-calendar__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}



.fs-advent-item {
    position: relative;
}

.fs-advent-door {
    position: relative;
    perspective: 1000px;
    min-height: 220px;
}

/* FRONT: "дверка" с номером */
.fs-advent-door__front {
    position: absolute;
    inset: 0;
    /* background: #d32f2f; */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    backface-visibility: hidden;
    transform-origin: left center;
    transition: transform 0.5s ease, opacity 0.5s ease;
    /* box-shadow: 0 4px 12px rgba(0,0,0,0.2); */
}

.fs-advent-day-number {
    display: block;
}

/* BACK: содержимое товара */
.fs-advent-door__back {
    position: relative;
    inset: 0;
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    transform-style: preserve-3d;
    min-height: 220px;
}

.fs-advent-product__thumb img {
    display: block;
    margin: 0 auto 8px;
    max-height: 120px;
    width: auto;
}

.fs-advent-product__title {
    font-size: 14px;
    margin: 4px 0;
    text-align: center;
}

.fs-advent-product__title a {
    color: #333;
    text-decoration: none;
}

.fs-advent-product__price {
    text-align: center;
    font-weight: 700;
    margin-bottom: 8px;
}

.fs-advent-add-to-cart {
    display: block;
    margin: 0 auto;
}

/* future: кнопка неактивна */
.fs-advent-add-disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

/* Текст "Will be available" */
.fs-advent-product__available {
    margin-top: 8px;
    text-align: center;
}

.fs-advent-product__available-text {
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}

/* overlay-подарок для future */
.fs-advent-door__overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background-image: url('../img/gift-overlay.png'); /* Поставь свой путь */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

/* past: дверь открыта по умолчанию (front скрыт) */
.fs-advent-door.fs-advent-door--opened .fs-advent-door__front {
    transform: rotateY(-90deg);
    opacity: 0;
}

body.fs-advent-page .article__body-main {
    /* здесь любые спец-стили только для страницы акции */
    max-width: 100%;
    padding-top: 40px;
    /* пример: убрать стандартные отступы, фон и т.п. */
}

.product-card--advent {
    display: flex;
    flex-direction: column;
    height: 100%;
	max-height:300px;
}

.product-card__bottom--advent {
    position: absolute;
    bottom: 50px;
    right: 0;
	display: flex;
    justify-content: center;
    align-items: center;
}

.product-card__add-to-cart {
	width: 100px;         /* диаметр круга */
    aspect-ratio: 1 / 1;  /* делает высоту = ширине */
    border-radius: 50%;
	display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px;         /* отступы внутри круга */
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 600;
	white-space: normal;  /* разрешить перенос строк */
    line-height: 1.2;
	overflow:hidden;
    text-transform: none; /* чтобы WP/тема не делали ВСЕ ЗАГЛАВНЫМИ */
}

.product-card__add-to-cart--disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}
.product-card__price-old {
	color: var(--Gray-6, #9A9AA2);
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 20px;
	text-decoration-line: line-through;
}
.product-card__discount {
    color: #ffffff;
    font-size: 14px;
    position: absolute;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    border-radius: 8px;
    background-color: var(--Dark-wine-1, #92111C);
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 6px 12px;
    top: 20px;

}
.product-card__price-new {
	color: var(--Dark-wine-1, #92111C);
	font-size: 24px;
	font-style: normal;
	font-weight: 700;
	line-height: 42px;
}
.fs-advent-door__back {
    visibility: hidden;
    opacity: 0;
    transition: opacity .35s ease;
}

/* Когда дверь открыта — показываем товар */
.fs-advent-door.fs-advent-door--opened .fs-advent-door__back {
    visibility: visible;
    opacity: 1;
}
/* PAST — дверь сразу открыта */
.fs-advent-status-past .fs-advent-door__front,
.fs-advent-status-past .fs-advent-door__overlay {
    display: none !important;
}

/* PAST — содержимое видно */
.fs-advent-status-past .fs-advent-door__back {
    visibility: visible !important;
    opacity: 1 !important;
}

.fs-advent-door.fs-advent-door--opened .fs-advent-door__front {
    transform: rotateY(-90deg);
    opacity: 0;
}

/* По умолчанию товар за дверью не виден */
.fs-advent-door__back {
    visibility: hidden;
    opacity: 0;
    transition: opacity .35s ease;
}

/* Когда дверь открыта — показываем */
.fs-advent-door.fs-advent-door--opened .fs-advent-door__back {
    visibility: visible;
    opacity: 1;
}

/* Для past — сразу открыто */
.fs-advent-status-past .fs-advent-door__front,
.fs-advent-status-past .fs-advent-door__overlay {
    display: none !important;
}

.fs-advent-status-past .fs-advent-door__back {
    visibility: visible !important;
    opacity: 1 !important;
}
/* future — неподвижные двери */
.fs-advent-status-future .fs-advent-door__front,
.fs-advent-status-future .fs-advent-door__overlay {
    cursor: not-allowed;
    opacity: 1; /* не меняем прозрачность */
}

.fs-advent-status-future .fs-advent-door__overlay:hover {
    opacity: 1; /* убрать эффекты наведения */
}
.fs-advent-status-past .fs-advent-door__back {
    visibility: visible;
    opacity: 1;
}

/* Не показываем товар по умолчанию */
.fs-advent-door__back {
    visibility: hidden;
    opacity: 0;
    transition: opacity .35s ease;
}

/* Когда открыт → плавно появляется */
.fs-advent-door.fs-advent-door--opened .fs-advent-door__back {
    visibility: visible;
    opacity: 1;
}

/* Оверлей */
.fs-advent-door__overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: opacity .3s ease;
}
/* Специальный оверлей для 15-го дня */
.fs-advent-overlay-15 {
    background-image: url('../img/gift-overlay-15.png') !important;
	border-radius: 10px;
}
/* При открытии overlay исчезает */
.fs-advent-door__overlay.fs-advent-overlay--fadeout {
    opacity: 0;
}

/* Скрытие past как двери */
.fs-advent-status-past .fs-advent-door__overlay {
    display: none;
}

/* Курсор запрещён для future */
.fs-advent-status-future .fs-advent-door__overlay {
    cursor: not-allowed;
}
/* Контейнер overlay */
.fs-advent-door__overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: opacity .3s ease;

    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* ↓ надпись снизу */
    padding: 10px;
    text-align: center;
}

/* Текст надписи */
.fs-advent-overlay__date {
    background: rgb(99 22 14);
    color: #fff;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: none;
}

/* Когда открыли — overlay исчезает => текст тоже исчезает */
.fs-advent-overlay--fadeout .fs-advent-overlay__date {
    opacity: 0;
}

.product-card__image {
	/* max-height: 240px; */
}
.product-card__name {
	font-size: 15px;
}
.product-card__price {
	display: flex;
    flex-direction: column;
    position: absolute;
    bottom: 50px;	
}
.product-card__name {
	font-size: 15px;
    padding: 30px 0 0 0;	
}
.product-card__name a{
    width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;	
}
@keyframes fsShakeX {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* воспроизвести 3 раза, задержка 5 секунд */
.fs-advent-today-shake {
    animation: fsShakeX 1.2s ease-in-out 5s 3;
}

body.fs-advent-page .article__header-sidebar {
    display: none !important;
}

body.fs-advent-page .breadcrumb__wrap {
    display: none !important;
}

body.fs-advent-page .article__header {
    justify-content:center;
}

body.fs-advent-page .article__header-main{
    text-align:center;
}

@media (max-width: 768px) {
    .fs-advent-calendar__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 480px) {
	.product-card__name {
		font-size: 14px;
		padding: 25px 0 0 0;		
	}
	.product-card__name a {
		width: 170px;
	}
	.product-card__price {
	    bottom: 115px;	
	}
	.product-card__bottom--advent {
		bottom:150px;
	}
	.product-card__add-to-cart {
		padding:0;
		font-size: 10px;
		width: 70px;
	}
	.product-card__price-new {
		font-size: 16px;
		line-height: 30px;		
	}
	.product-card__price-old {
		font-size: 14px;
	}
	.fs-advent-overlay__date {
		padding: 6px 5px;
		font-size: 10px;
		font-weight: 500;
	}
}
