/**
 * Tablet layout (768px–1024px): header, filter button, product grid, product page.
 */
@media (min-width: 768px) and (max-width: 1024px) {
	/* Compact header with search (not full mobile hamburger-only bar) */
	.header__container {
		display: block !important;
		flex: 1;
		margin-left: 1rem;
		padding: 0 10px !important;
		max-width: none;
		width: auto;
	}

	.header__options {
		display: none;
	}

	.header__search {
		display: block;
		flex: 1;
	}

	.header__search input {
		width: 100% !important;
		opacity: 1 !important;
		padding: 0.6rem 3rem 0.6rem 4rem !important;
	}

	.header_in {
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		padding-top: 10px;
	}

	.header__row {
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
	}

	.navbar-header {
		width: auto !important;
		height: auto;
		flex-shrink: 0;
	}

	/* Keep collapsed nav behind hamburger on tablets */
	#top .navbar-collapse.collapse:not(.in) {
		display: none !important;
	}

	#top .navbar-collapse.collapse.in {
		display: block !important;
	}

	.mobile_activation {
		display: none !important;
	}

	a.navbar-menus {
		display: block;
	}

	.mobile_count_cart {
		background-color: #e7e7e7;
		border-radius: 5px;
		margin-right: 10px;
	}

	.mobile_count_cart--new {
		background-color: rgba(255,101,25,1);
		border-radius: 5px;
		margin-right: 10px;
	}

	.count-span {
		margin-left: 5px;
		font-weight: 700;
		color: white;
	}

	/* Filter trigger visible on tablets */
	.mobile-filtr {
		display: block;
		padding: 12px 8px 0;
	}

	.mobile-filtr .header__catalog {
		display: block;
		border-radius: 5px;
		background: linear-gradient(to right, #43cbff, #9708cc);
		font-weight: 800;
		color: white;
		border: 0;
		cursor: pointer;
		width: 220px;
		max-width: 100%;
		margin: auto;
		text-align: center;
		padding: 10px 16px;
		text-decoration: none !important;
		text-transform: uppercase;
	}

	.mobile-filtr .header__catalog span {
		color: inherit;
	}

	.mobile-filtr .header__catalog:hover {
		opacity: 0.85;
	}

	#filterpro_arrow {
		display: none !important;
	}

	.common-home .ocf-horizontal.ocf-container {
		margin-bottom: 0;
	}

	.ocf-btn-mobile-fixed {
		display: none !important;
	}

	/* --- Product cards: tablet layout --- */

	/* Portrait / narrow tablet: 2 columns; landscape: 3 columns */
	#content.col-sm-12 .product-layout.product-grid {
		width: 50% !important;
	}

	#content.col-sm-9 .product-layout.product-grid {
		width: 50% !important;
	}

	.product-grid .product-thumb {
		overflow: visible;
		padding: 10px 12px 14px;
	}

	.event-card__body {
		padding: 6px 4px 0;
		overflow: visible;
	}

	.product-layout .product-thumb .caption a {
		font-size: 16px;
		line-height: 1.3;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.product-thumb .price {
		font-size: 18px;
		margin-bottom: 8px;
	}

	.product-meta {
		flex-wrap: wrap;
		gap: 8px;
		margin: 8px 0;
	}

	.product-meta-item {
		flex: 1 1 calc(50% - 8px);
		min-width: 0;
		padding: 6px 8px;
		font-size: 12px;
	}

	.product-meta-item .cart_item-title {
		font-size: 12px;
		line-height: 1.2;
		white-space: normal;
	}

	/* Stack CTA buttons — side-by-side text overflows in narrow cards */
	.event-card__body .btn-group,
	.product-cta-grid {
		display: grid !important;
		grid-template-columns: 1fr !important;
		gap: 8px;
		width: 100%;
		float: none;
	}

	.product-layout .product-thumb .event-card__body .btn-group .btn-buy,
	.product-layout .product-thumb .event-card__body .btn-group .btn-self-book,
	.product-cta-grid .blimingButton,
	.product-cta-grid .id-button-cart,
	.product-cta-grid .btn-self-book {
		width: 100% !important;
		max-width: 100%;
		margin: 0 !important;
		float: none !important;
		font-size: 13px;
		padding: 11px 10px;
		min-height: 42px;
		white-space: normal;
		line-height: 1.25;
		box-sizing: border-box;
	}

	.btn-group .btn + .btn,
	.btn-group .btn + .btn-group {
		margin-left: 0 !important;
	}

	/* --- Product page: hero & content tuning (layout is single-column in 451–1024 block) --- */

	body[class*="product-product"] .prodBigImageHolder img.prodBigImage.mobhide {
		max-height: min(48vh, 460px);
		object-fit: cover;
		width: 100%;
	}

	body[class*="product-product"] .product-video__headline {
		font-size: clamp(22px, 3.2vw, 32px);
		line-height: 1.25;
		max-width: min(520px, 55vw);
		padding-bottom: 12px;
	}

	body[class*="product-product"] .product-headline {
		top: clamp(20px, 4vw, 40px);
		left: clamp(16px, 3vw, 32px);
		right: clamp(16px, 3vw, 32px);
	}

	body[class*="product-product"] .botomAttrsHolder_n .attrWrapp_n {
		width: 50%;
	}

	body[class*="product-product"] .card-item_new {
		flex: 1 1 calc(50% - 15px);
	}

	body[class*="product-product"] .reviews-section-header .comments.product-section-title {
		font-size: 20px;
	}

	body[class*="product-product"] .reviews-add-btn,
	body[class*="product-product"] #button-open-review.reviews-add-btn {
		height: 44px;
		min-height: 44px;
		font-size: 14px;
		padding: 0 16px;
	}

	body[class*="product-product"] #content .product-layout.product-grid {
		width: 50% !important;
	}

	body[class*="product-product"] .container1 {
		padding-left: 8px;
		padding-right: 8px;
	}
}

@media (min-width: 960px) and (max-width: 1024px) {
	#content.col-sm-12 .product-layout.product-grid {
		width: 33.33333333% !important;
	}

	#content.col-sm-9 .product-layout.product-grid {
		width: 33.33333333% !important;
	}

	body[class*="product-product"] #content.col-sm-9 .product-layout.product-grid {
		width: 33.33333333% !important;
	}
}

/*
 * Product page 451–1024px: single-column layout.
 * Bootstrap col-sm-* uses float:right at 768–991px, which pins the sidebar
 * to the right and drops #content below — leaving a large empty gap.
 */
@media (min-width: 451px) and (max-width: 1024px) {
	body[class*="product-product"] #opmenu.row {
		display: flex;
		flex-direction: column;
	}

	body[class*="product-product"] #opmenu.row::before,
	body[class*="product-product"] #opmenu.row::after {
		content: none;
		display: none;
	}

	body[class*="product-product"] #column-left {
		display: none !important;
	}

	body[class*="product-product"] #content.col-sm-9,
	body[class*="product-product"] #content.col-sm-6,
	body[class*="product-product"] #content.col-sm-12 {
		width: 100% !important;
		max-width: 100% !important;
		float: none !important;
	}

	body[class*="product-product"] .gifts-container {
		display: none !important;
	}

	body[class*="product-product"] .gifts-container-mobile {
		display: block !important;
		width: 100%;
		max-width: 100%;
		margin: 16px 0 24px;
		box-shadow: 0 5px 15px rgba(204, 204, 204, 0.7);
		padding: 16px;
		box-sizing: border-box;
		order: -1;
	}

	body[class*="product-product"] .gifts-container-mobile .attrs_block_new {
		display: none !important;
	}

	body[class*="product-product"] .gifts-container-mobile .name {
		font-weight: 600;
		font-size: 22px;
		text-align: left;
		padding-bottom: 5px;
	}

	body[class*="product-product"] .gifts-container-mobile .leftProdPrice {
		font-weight: bold;
		font-size: 22px;
		text-align: left;
		float: right;
	}

	body[class*="product-product"] .gifts-container-mobile .reviews-rating {
		margin-bottom: 15px;
		font-size: 18px;
		float: right;
	}

	body[class*="product-product"] .gifts-container-mobile .product-cta-grid {
		display: grid !important;
		grid-template-columns: 1fr 1fr !important;
		gap: 10px;
		width: 100%;
		clear: both;
		margin-top: 16px;
	}

	body[class*="product-product"] .gifts-container-mobile .id-button-cart,
	body[class*="product-product"] .gifts-container-mobile .btn-self-book {
		width: 100% !important;
		font-size: 15px;
		min-height: 44px;
		box-sizing: border-box;
	}

	body[class*="product-product"] .gifts-container-mobile .gift-options {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 10px;
		margin: 16px 0;
		overflow: hidden;
	}

	body[class*="product-product"] .gifts-container-mobile .gift-card {
		min-width: 0;
		padding: 12px 8px;
		font-size: 13px;
		box-sizing: border-box;
	}

	body[class*="product-product"] .gifts-container-mobile .gift-row {
		flex-wrap: wrap;
		justify-content: center;
	}

	body[class*="product-product"] .fixit-cart.fixed {
		position: static;
		width: auto;
		height: auto;
		border: none;
		padding: 0;
		background: transparent;
	}

	body[class*="product-product"].has-fixed-cart {
		padding-bottom: 0;
	}

	body[class*="product-product"] .newmenu nav {
		width: 100%;
		overflow: visible;
	}

	body[class*="product-product"] .newmenu nav ul {
		display: flex !important;
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		height: auto;
		max-height: none;
		width: 100%;
		-webkit-overflow-scrolling: touch;
	}

	body[class*="product-product"] .newmenu nav ul li {
		flex: 0 0 auto;
		margin-left: 8px;
		margin-right: 8px;
		padding-top: 10px;
		padding-bottom: 10px;
	}

	body[class*="product-product"] .newmenu nav ul li a {
		font-size: 13px;
		padding: 0.4em 0.6em;
		white-space: nowrap;
	}

	body[class*="product-product"] .prodBigImageHolder img.prodBigImage.mobhide {
		max-height: min(42vh, 380px);
		object-fit: cover;
		width: 100%;
	}

	body[class*="product-product"] .product-video__headline {
		font-size: 24px;
		max-width: 70vw;
	}
}

@media (min-width: 451px) and (max-width: 640px) {
	body[class*="product-product"] .gifts-container-mobile .product-cta-grid {
		grid-template-columns: 1fr !important;
	}
}

@media (max-width: 767px) {
	.mobile-filtr {
		display: block;
	}
}
