/* ==========================================================================
   PRIMA OPTICS - Responsive Styles
   ========================================================================== */

/* Laptop */
@media (max-width: 1200px) {
	.po-products-grid,
	.products { grid-template-columns: repeat(3, 1fr); }

	.po-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet */
@media (max-width: 1024px) {
	.po-hero__inner {
		min-height: auto;
		height: clamp(480px, 65vh, 640px);
	}

	.po-hero__content {
		width: 52%;
		padding: 60px 32px;
	}

	.po-hero__img {
		object-position: 70% center;
	}

	.po-usp__grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }

	.po-products-grid,
	.products { grid-template-columns: repeat(2, 1fr); }

	.po-categories__grid { grid-template-columns: repeat(2, 1fr); }

	.po-shop-layout { grid-template-columns: 1fr; }

	.po-shop,
	.po-shop-content,
	.po-shop-products {
		overflow-x: hidden;
		max-width: 100%;
		touch-action: pan-y;
	}

	.po-shop-products .products,
	.po-shop-products .po-products-grid {
		width: 100%;
		max-width: 100%;
		overflow-x: hidden;
		touch-action: pan-y;
	}

	body.woocommerce-shop,
	body.tax-product_cat,
	body.tax-product_tag,
	body.tax-product_brand {
		touch-action: pan-y;
		-ms-touch-action: pan-y;
	}

	.po-shop-filters {
		position: fixed;
		top: 0;
		left: 0;
		width: min(100%, 360px);
		max-width: 360px;
		height: 100vh;
		height: 100dvh;
		background: var(--po-white);
		z-index: 300;
		padding: 24px;
		overflow-x: hidden;
		overflow-y: auto;
		transform: translate3d(-105%, 0, 0);
		visibility: hidden;
		pointer-events: none;
		transition: transform 0.3s ease, visibility 0.3s ease;
		-webkit-overflow-scrolling: touch;
	}

	.po-shop-filters.is-open {
		transform: translate3d(0, 0, 0);
		visibility: visible;
		pointer-events: auto;
	}

	.po-shop-filters__header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 24px;
	}

	.po-shop-filters__header h2 {
		font-size: 14px;
		font-weight: 600;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		margin: 0;
	}

	.po-shop-toolbar {
		display: flex;
	}

	.po-shop-toolbar__filter { display: flex; align-items: center; gap: 8px; }

	.po-product { grid-template-columns: 1fr; gap: 32px; }

	.po-newsletter__inner { flex-direction: column; text-align: center; }

	.po-newsletter__form { width: 100%; flex-direction: column; }

	.po-newsletter__form input { min-width: auto; width: 100%; }
}

/* Tablet portrait */
@media (max-width: 768px) {
	:root { --po-header-height: 60px; }

	.po-announcement__items { display: none; }
	.po-announcement__inner { justify-content: center; }

	.po-header__inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		position: relative;
	}

	.po-header__menu-toggle { display: flex; }

	.po-header__nav { display: none; }

	.po-header__left {
		z-index: 2;
		flex: 0 0 auto;
		min-width: 40px;
	}

	.po-header__actions {
		position: relative;
		z-index: 2;
		flex: 0 0 auto;
		flex-wrap: nowrap;
		justify-content: flex-end;
		gap: 2px;
		margin-left: auto;
	}

	.po-header__account { display: none; }

	.po-header__logo {
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
		z-index: 1;
		max-width: min(140px, calc(100% - 168px));
		justify-content: center;
	}

	.po-header__logo-text {
		font-size: 11px;
		letter-spacing: 0.12em;
		text-align: center;
		line-height: 1.15;
	}

	.po-header__logo-img {
		max-height: var(--po-header-logo-height-mobile, 36px);
		max-width: 100%;
	}

	.po-header__action {
		width: 36px;
		height: 36px;
		flex-shrink: 0;
	}

	.single-product .po-breadcrumbs {
		display: none;
	}

	.single-product .po-product-page {
		padding-bottom: 24px;
	}

	.single-product .po-product-page > .po-container {
		padding-left: 16px;
		padding-right: 16px;
	}

	.single-product .po-product {
		display: flex;
		flex-direction: column;
		gap: 20px;
		margin-bottom: 32px;
	}

	.single-product .po-product__gallery {
		margin: 0 -16px;
		width: calc(100% + 32px);
		max-width: none;
	}

	.single-product .woocommerce-product-gallery,
	.single-product div.product div.images {
		position: relative;
		width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		background: var(--po-white);
		border-radius: 0;
	}

	.single-product .woocommerce div.product div.images .flex-control-thumbs,
	.single-product .flex-control-thumbs {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
	}

	.single-product .woocommerce div.product div.images .flex-control-paging,
	.single-product .flex-control-paging {
		display: block !important;
		visibility: visible !important;
		height: auto !important;
		overflow: visible !important;
		position: absolute;
		left: 0;
		right: 0;
		bottom: 14px;
		margin: 0 !important;
		padding: 0 !important;
		z-index: 3;
		text-align: center;
		font-size: 0 !important;
	}

	.single-product .woocommerce-product-gallery .flex-viewport {
		overflow: hidden;
		margin: 0;
		width: 100%;
		border-radius: 0;
	}

	.single-product .woocommerce-product-gallery__wrapper {
		margin: 0;
	}

	.single-product .woocommerce-product-gallery__image {
		padding: 0 !important;
		margin: 0 !important;
		background: var(--po-white);
		width: 100%;
	}

	.single-product .woocommerce-product-gallery__image a,
	.single-product .woocommerce-product-gallery__image img {
		display: block;
		width: 100% !important;
		max-width: 100% !important;
		height: auto;
		margin: 0 !important;
		padding: 0 !important;
		border-radius: 0 !important;
		object-fit: contain;
	}

	.single-product .po-product__summary {
		padding: 0;
	}

	.single-product .po-product__brand {
		margin-bottom: 6px;
		font-size: 11px;
	}

	.single-product .po-product__title {
		font-size: 24px;
		line-height: 1.2;
		margin: 0 0 12px;
		font-weight: 700;
	}

	.single-product .po-product__tags {
		margin-bottom: 12px;
	}

	.single-product .po-product__excerpt {
		font-size: 14px;
		margin-bottom: 16px;
		color: var(--po-text-muted);
	}

	/* Price + qty + add to cart in one row */
	.single-product .po-product__purchase {
		display: flex;
		align-items: center;
		gap: 8px;
		margin: 0 0 16px;
		width: 100%;
	}

	.single-product .po-product__purchase .po-product__price {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		justify-content: center;
		gap: 2px;
		flex: 0 0 auto;
		min-width: 0;
		margin: 0;
		font-size: 16px;
		line-height: 1.15;
		white-space: nowrap;
	}

	.single-product .po-product__purchase .po-product__price del {
		font-size: 11px;
		font-weight: 500;
		color: var(--po-text-muted);
		order: 2;
	}

	.single-product .po-product__purchase .po-product__price ins,
	.single-product .po-product__purchase .po-product__price > .amount,
	.single-product .po-product__purchase .po-product__price .woocommerce-Price-amount {
		font-size: 16px;
		font-weight: 700;
		text-decoration: none;
	}

	.single-product .po-product__purchase form.cart {
		display: flex;
		align-items: stretch;
		gap: 8px;
		flex: 1 1 auto;
		min-width: 0;
		margin: 0;
	}

	.single-product .po-product__purchase form.cart .quantity {
		margin: 0;
		flex: 0 0 auto;
	}

	.single-product .po-product__purchase .quantity .qty {
		width: 52px;
		height: 48px;
		padding: 0;
		border-radius: 10px;
		font-size: 15px;
		font-weight: 600;
	}

	.single-product .po-product__purchase form.cart .single_add_to_cart_button,
	.single-product .po-product__purchase form.cart .button {
		flex: 1 1 auto;
		width: auto !important;
		min-width: 0;
		height: 48px;
		padding: 0 10px !important;
		border-radius: 10px !important;
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		font-size: 10px !important;
		letter-spacing: 0.03em !important;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.single-product .po-product__meta-actions {
		margin: 0 0 16px;
	}

	.single-product .po-product__wishlist {
		width: 100%;
		justify-content: center;
	}

	.single-product .po-product__meta {
		padding-top: 16px;
		margin-top: 8px;
		font-size: 13px;
	}

	.po-usp {
		padding: 16px 0;
	}

	.po-usp__desktop {
		display: none;
	}

	.po-usp__ticker {
		display: block;
	}

	.po-hero {
		padding: 0;
		background: var(--po-warm);
	}

	.po-hero__inner {
		position: relative;
		display: block;
		min-height: clamp(260px, 62vw, 380px);
		height: clamp(260px, 62vw, 380px);
	}

	/* Mobile: full-width cover image, same as desktop */
	.po-hero__media {
		position: absolute;
		inset: 0;
		width: 100%;
		min-height: 100%;
	}

	.po-hero__img {
		width: 100%;
		height: 100%;
		min-height: 100%;
		object-fit: cover;
		object-position: 78% center;
	}

	.po-hero__content {
		position: relative;
		z-index: 1;
		width: 54%;
		max-width: none;
		height: 100%;
		background: transparent;
		text-align: left;
		padding: 24px 10px 24px 16px;
		justify-content: center;
	}

	.po-hero__title {
		font-size: clamp(17px, 4.8vw, 24px);
		margin-bottom: 14px;
		line-height: 1.12;
	}

	.po-hero__subtitle {
		display: none;
		margin: 0 0 16px;
	}

	.po-hero__actions {
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 8px;
		width: 100%;
	}

	.po-hero__actions .po-btn {
		width: 100%;
		padding: 11px 8px;
		font-size: 9px;
		letter-spacing: 0.05em;
		justify-content: center;
		white-space: nowrap;
	}

	.po-section { padding: 60px 0; }

	.po-brands__row {
		justify-content: flex-start;
		flex-wrap: nowrap;
		gap: 28px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-behavior: smooth;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding: 12px 0 8px;
		margin: 0 -20px;
		padding-left: 20px;
		padding-right: 20px;
	}

	.po-brands__row::-webkit-scrollbar {
		display: none;
	}

	.po-brands__item {
		flex: 0 0 auto;
		scroll-snap-align: start;
		min-width: 120px;
	}

	.po-footer__grid {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.po-footer__bottom {
		flex-direction: column;
		gap: 16px;
		text-align: center;
	}
}

/* Mobile */
@media (max-width: 480px) {
	.po-container { padding: 0 16px; }

	.po-products-grid,
	.products { grid-template-columns: repeat(2, 1fr); gap: 12px; }

	.po-product-card__actions { opacity: 1; transform: none; }

	.po-product-card__info { padding-top: 10px; }

	.po-product-card__title { font-size: 13px; }

	.po-hero__content {
		padding: 20px 8px 20px 14px;
		width: 56%;
	}

	.po-hero__title {
		font-size: clamp(15px, 4.5vw, 20px);
		margin-bottom: 12px;
	}

	.po-hero__inner {
		min-height: clamp(220px, 58vw, 320px);
		height: clamp(220px, 58vw, 320px);
	}

	.po-hero__actions .po-btn {
		padding: 10px 6px;
		font-size: 8px;
	}

	.po-btn { padding: 12px 20px; font-size: 11px; }

	.po-categories__grid { grid-template-columns: 1fr; }

	.po-brands__row {
		margin: 0 -16px;
		padding-left: 16px;
		padding-right: 16px;
		gap: 24px;
	}

	.po-brands__item {
		min-width: 100px;
	}

	.po-mini-cart__panel { max-width: 100%; }
}

/* Small mobile */
@media (max-width: 390px) {
	.po-products-grid.columns-1,
	.products.columns-1 { grid-template-columns: 1fr; }

	.po-header__actions { gap: 8px; }

	.po-header__action { width: 36px; height: 36px; }
}

/* Grid layout switch */
.products.columns-2 { grid-template-columns: repeat(2, 1fr) !important; }
.products.columns-4 { grid-template-columns: repeat(4, 1fr) !important; }

@media (max-width: 1024px) {
	.products.columns-4 { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 480px) {
	.products.columns-4 { grid-template-columns: repeat(2, 1fr) !important; }
}
