/* Стили для карточки товара по макету Figma */

/* Импорт шрифтов */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;600&family=Plus+Jakarta+Sans:wght@600&display=swap");

/* Основные стили для карточки товара */
.figma-product-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 416px !important;
    background-color: transparent !important;
    margin-bottom: 30px !important;
    height: 100% !important; /* Растягиваем на всю высоту ячейки сетки */
}

/* Верхняя часть карточки (Изображение + Текст) */
.figma-product-card__top {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    flex-grow: 1 !important; /* Занимает все свободное место, толкая кнопку вниз */
}

/* Контейнер изображения */
.figma-product-card__image-container {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 416 / 420;
    border-radius: 30px !important;
    overflow: hidden !important;
    background-color: rgba(180, 180, 180, 0.09) !important;
}

.figma-product-card__image-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
}

.figma-product-card__image-link img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

/* Контент карточки */
.figma-product-card__content {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.figma-product-card__header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important; /* Выравнивание по верхнему краю */
    gap: 15px !important;
}

.figma-product-card__title {
    margin: 0 !important;
    font-family: "Plus Jakarta Sans", sans-serif !important;
    font-weight: 600 !important;
    font-size: 20px !important;
    line-height: 24px !important;
    letter-spacing: -0.02em !important;
}

.figma-product-card__title-link {
    color: #ffffff !important;
    text-decoration: none !important;
}

.figma-product-card__price {
    font-family: "DM Sans", sans-serif !important;
    font-weight: 400 !important;
    font-size: 24px !important;
    color: #ffffff !important;
    white-space: nowrap !important; /* Цена в одну строку */
}

.figma-product-card__description {
    font-family: "DM Sans", sans-serif !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin: 0 !important;
}

/* Зона корзины под карточкой (кнопка или степпер) */
.figma-product-card__cart {
	margin-top: 30px !important;
}

/* Ссылка «Просмотр корзины» после AJAX add to cart (WC .added_to_cart) */
.figma-product-card__cart-slot .added_to_cart {
	display: block !important;
	margin-top: 12px !important;
	padding: 0 !important;
	font-family: "DM Sans", sans-serif !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	color: #23d399 !important;
	text-decoration: underline !important;
	text-underline-offset: 3px !important;
	text-align: center !important;
	background: none !important;
	border: none !important;
}

.figma-product-card__cart-slot .added_to_cart:hover,
.figma-product-card__cart-slot .added_to_cart:focus-visible {
	color: #ffffff !important;
}

/* Кнопка "В корзину" */
.figma-product-card__button {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px 40px !important;
    background-color: #18785b !important;
    border-radius: 100px !important;
    font-family: "DM Sans", sans-serif !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    letter-spacing: -0.02em !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: background-color 0.3s !important;
    margin-top: 0 !important;
}

.figma-product-card__button:hover {
    background-color: #0f6a4e !important;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .figma-product-card {
        max-width: 100% !important;
    }
}

/* Стили для контейнера карточек товаров */
ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
    justify-content: flex-start !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: var(--regagro-max-width, 1296px) !important;
    margin: 0 auto !important;
}

ul.products li.product,
ul.products li.figma-product-item {
    margin: 0 !important;
    padding: 0 !important;
    width: calc(33.333% - 16px) !important; /* 3 колонки с учетом gap 24px */
    float: none !important;
    clear: none !important;
    list-style: none !important;
}

@media (max-width: 1024px) {
    ul.products li.product,
    ul.products li.figma-product-item {
        width: calc(50% - 12px) !important;
    }
}

@media (max-width: 767px) {
    ul.products li.product,
    ul.products li.figma-product-item {
        width: 100% !important;
    }
}

/* Скрыть стандартные элементы WooCommerce */
.products li.product .star-rating,
.products li.product .price del,
.products li.product .price ins {
    display: none;
}
