/* ============================================================
   Ikra102 — карточка товара
   ============================================================ */

.ikra-product {
	padding: 24px var(--gutter) var(--section-y);
	display: grid;
	grid-template-columns: 1fr 480px;
	gap: 44px;
	align-items: start;
}

/* ------------------------------------------------------------
   Галерея
   ------------------------------------------------------------ */

.ikra-gallery {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

.ikra-gallery__main {
	position: relative;
	height: 480px;
	border-radius: var(--r-lg);
	overflow: hidden;
	background: var(--stripes), var(--photo-bg);
}

.ikra-gallery__main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ikra-gallery__thumbs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}

.ikra-gallery__thumb {
	position: relative;
	height: 100px;
	border-radius: var(--r-xs);
	overflow: hidden;
	border: 2px solid transparent;
	background: var(--stripes-sm), var(--photo-bg);
	cursor: pointer;
	transition: border-color var(--t);
	padding: 0;
}

.ikra-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ikra-gallery__thumb.is-active {
	border-color: var(--accent);
}

.ikra-gallery__thumb--video {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font: 400 10px/1 var(--font-mono);
	color: var(--photo-label);
}

/* Точки-индикаторы на мобильном */
.ikra-gallery__dots {
	display: none;
	position: absolute;
	right: 16px;
	bottom: 12px;
	gap: 6px;
}

.ikra-gallery__dot {
	width: 8px;
	height: 8px;
	border-radius: var(--r-pill);
	background: #c8cec9;
}

.ikra-gallery__dot.is-active {
	background: var(--ink);
}

/* Характеристики 2×2 */
.ikra-specs {
	margin-top: 8px;
}

.ikra-specs > * {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ikra-specs__label {
	font: 500 11px/1 var(--font-mono);
	color: var(--muted-2);
	text-transform: uppercase;
	letter-spacing: .1em;
}

.ikra-specs__value {
	font: 600 15px/1.3 var(--font-text);
}

/* ------------------------------------------------------------
   Инфо-колонка
   ------------------------------------------------------------ */

.ikra-product__info {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

.ikra-product__topline {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	font: 500 11px/1.4 var(--font-mono);
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--muted-2);
}

.ikra-product__stock {
	color: var(--success);
	text-align: right;
}

.ikra-product__stock.is-backorder {
	color: var(--accent);
}

.ikra-product__title {
	font: 600 40px/1.08 var(--font-display);
	letter-spacing: -.03em;
}

.ikra-product__excerpt {
	font: 400 16px/1.65 var(--font-text);
	color: var(--ink-3);
}

/* Фасовка — плитки вариантов */
.ikra-packs {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ikra-packs__label {
	font: 500 11px/1 var(--font-mono);
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted-2);
}

.ikra-packs__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.ikra-packs__tile {
	padding: 14px;
	background: var(--surface);
	border: 1px solid var(--line-3);
	border-radius: var(--r-sm);
	display: flex;
	flex-direction: column;
	gap: 5px;
	text-align: left;
	cursor: pointer;
	transition: border-color var(--t), color var(--t);
	min-height: 60px;
}

.ikra-packs__tile:hover {
	border-color: var(--ink);
}

.ikra-packs__tile.is-active {
	border: 2px solid var(--accent);
	padding: 13px;
}

.ikra-packs__name {
	font: 600 15px/1.2 var(--font-text);
}

.ikra-packs__price {
	font: 400 11px/1.3 var(--font-mono);
	color: var(--muted-2);
}

.ikra-packs__tile.is-active .ikra-packs__name,
.ikra-packs__tile.is-active .ikra-packs__price {
	color: var(--accent);
}

/* Карта покупки */
.ikra-buy {
	background: var(--surface);
	border: 1px solid var(--line-2);
	border-radius: var(--r-lg);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ikra-buy__price-row {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}

.ikra-buy__price {
	font: 700 36px/1 var(--font-display);
}

.ikra-buy__perkg {
	font: 400 13px/1.3 var(--font-mono);
	color: var(--muted-2);
}

.ikra-buy__actions {
	display: flex;
	gap: 12px;
	align-items: stretch;
}

.ikra-buy__actions .ikra-qty {
	flex: 0 0 142px;
}

.ikra-buy__actions .ikra-btn {
	flex: 1;
	padding: 18px;
	min-height: 56px;
}

.ikra-buy__oneclick {
	text-align: center;
	font: 500 13px/1.4 var(--font-text);
	color: var(--accent);
	background: none;
	border: 0;
	cursor: pointer;
}

.ikra-buy__oneclick:hover {
	opacity: .7;
}

/* Товар «под заказ» */
.ikra-buy--backorder .ikra-buy__actions .ikra-btn {
	background: transparent;
	border: 1px solid var(--line-3);
	color: var(--ink);
}

/* Апселлы */
.ikra-upsells {
	padding: 0 var(--gutter) var(--section-y);
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ikra-upsells__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Закреплённая панель покупки на мобильном */
.ikra-product-bar {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100;
	padding: 14px var(--gutter-mobile) 20px;
	padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	background: rgba(255, 255, 255, .97);
	backdrop-filter: blur(8px);
	border-top: 1px solid var(--line);
	flex-direction: column;
	gap: 10px;
}

.ikra-product-bar__price {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.ikra-product-bar__price strong {
	font: 700 26px/1 var(--font-display);
}

.ikra-product-bar__price span {
	font: 400 11px/1 var(--font-mono);
	color: var(--muted-2);
}

.ikra-product-bar__actions {
	display: flex;
	gap: 10px;
}

.ikra-product-bar__actions .ikra-qty {
	grid-template-columns: 44px 40px 44px;
	height: 52px;
	flex: 0 0 128px;
}

.ikra-product-bar__actions .ikra-btn {
	flex: 1;
	min-height: 52px;
}

/* Длинный артикул не должен ломать верхнюю строку карточки товара.
   В реальных каталогах SKU бывает и в сотню символов. */
.ikra-product__topline {
	min-width: 0;
}

.ikra-product__topline > span:first-child {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ikra-product__topline > span:first-child [data-ikra-sku] {
	display: inline;
}

.ikra-product__stock {
	flex: 0 0 auto;
	white-space: nowrap;
}
