/* ==========================================================
   Site-wide polish & mobile UX pass (v5.31.0)
   Loaded last, on every page.
   ========================================================== */

/* ---------- Homepage product rows: swipeable on phones ----------
   Long single-column lists made the homepage ~20,000px tall on mobile.
   Each row is now a horizontal slider showing ~2 cards. */
@media (max-width: 768px) {
	.product-row .product-grid {
		display: grid !important;
		grid-template-columns: none !important;
		grid-auto-flow: column;
		grid-auto-columns: 46%;
		gap: 12px !important;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		margin: 0 -16px;
		padding: 2px 16px 10px;
		scroll-padding-left: 16px;
	}
	.product-row .product-grid::-webkit-scrollbar { display: none; }
	.product-row .product-grid > * { scroll-snap-align: start; min-width: 0; }
	.product-row__head { margin-bottom: 16px; align-items: flex-end; }
	.product-row__head .section-subtitle { display: none; }
	.product-row__head .section-title--plain { font-size: 24px; line-height: 1.2; }
	.product-row__head .view-all { white-space: nowrap; font-size: 13.5px; }
	section.container, section.full-bleed { margin: 36px auto; }
}

/* Category / shop / search grids stay 2-up on narrow phones (no 1-column wall). */
@media (max-width: 420px) {
	.product-grid, ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
	.product-card__title { font-size: 13px !important; }
	.product-card__body { padding: 10px 10px 12px !important; }
}

/* ---------- Product card on touch screens ---------- */
@media (max-width: 768px) {
	.product-card__quickview { display: none !important; } /* tap opens the product; the dark bar wasted space */
	.product-card__title { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
	.product-card .badge { font-size: 10px; padding: 4px 8px; }
	.product-card__savings { font-size: 11.5px; }
	.product-card__brand { font-size: 10.5px; }
	.product-card__price del { font-size: 11.5px; }
}

/* ---------- Flash deals (mobile) ---------- */
@media (max-width: 768px) {
	.flash-deals { padding: 20px 16px !important; border-radius: 18px; }
	.flash-deals__head { margin-bottom: 16px; gap: 12px; }
	.flash-deals__title h2 { font-size: 24px; }
	.flash-deals__flame { width: 40px; height: 40px; font-size: 18px; border-radius: 10px; }
	.flash-slider { gap: 0 !important; }
	.flash-slider__arrow { display: none !important; }
	.flash-slider__viewport { overflow-x: auto !important; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 6px; }
	.flash-slider__viewport::-webkit-scrollbar { display: none; }
	.flash-slider__track { gap: 12px !important; transform: none !important; }
	.flash-slider__item { flex: 0 0 46% !important; scroll-snap-align: start; }
	.flash-deals__foot { margin-top: 18px; }
	.flash-deals__foot .btn { width: 100%; justify-content: center; padding: 14px 18px; font-size: 15px; }
}

/* ---------- Why Lap N Tab Mart (mobile: compact 2-up) ---------- */
@media (max-width: 768px) {
	.why-trust__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
	.why-trust__grid > * { padding: 16px 14px !important; }
	.why-trust__grid h3, .why-trust__grid h4 { font-size: 14.5px; margin: 10px 0 4px; }
	.why-trust__grid p { font-size: 12.5px; line-height: 1.5; margin: 0; }
	.why-trust .section-title--center, .why-trust h2 { font-size: 26px; }
}

/* ---------- Category page (mobile): image off, compact header ---------- */
@media (max-width: 768px) {
	.cat-hero { padding: 18px 0 20px !important; }
	.cat-hero__visual { display: none !important; }
	.cat-hero__inner { gap: 0 !important; text-align: left !important; }
	.cat-hero h1 { font-size: 26px !important; margin: 2px 0 6px !important; }
	.cat-hero__desc { font-size: 14px !important; margin: 0 0 12px !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.cat-hero__meta { flex-direction: row !important; justify-content: flex-start !important; align-items: center !important; gap: 12px !important; }
	.cat-hero__meta .btn { padding: 10px 16px; font-size: 13.5px; }
	.cat-hero .breadcrumbs, .cat-hero nav { text-align: left; justify-content: flex-start; }
}

/* ---------- Footer (mobile) ---------- */
@media (max-width: 768px) {
	.site-footer__grid, .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 28px 18px !important; }
	.site-footer__grid > :first-child, .footer-grid > :first-child,
	.site-footer__grid > :last-child, .footer-grid > :last-child { grid-column: 1 / -1; }
	.site-footer .footer-widget__title { font-size: 15px; margin-bottom: 12px; }
	.site-footer li { margin-bottom: 8px; }
	.site-footer a { font-size: 13.5px; }
}
.social-icons a { transition: transform var(--speed-fast, .2s) var(--ease), background var(--speed-fast, .2s); }
.social-icons a:hover { transform: translateY(-3px); }

/* ---------- General touches ---------- */
img { -webkit-user-drag: none; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
@media (max-width: 768px) {
	.eyebrow { font-size: 11.5px; letter-spacing: .14em; }
	.section-title--center { font-size: 26px; }
	.cta-banner__inner { padding: 34px 22px !important; }
	.cta-banner__inner .btn { width: 100%; justify-content: center; }
}

/* Review slider (mobile): cards size to their own text, long reviews clamp */
@media (max-width: 768px) {
	.review-slider__track { align-items: flex-start; }
	.review-card { padding: 20px !important; }
	.review-card p, .review-card__text { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ==========================================================
   Review cards: equal height, long reviews clamp + "Read more" popup
   ========================================================== */
.review-slider__track { align-items: stretch !important; }
.review-card { display: flex; flex-direction: column; min-height: 300px; }
.review-card p.review-card__quote { min-height: 0; margin: 0; flex: 1; font-size: 15px; line-height: 1.65; }
.review-card p.review-card__quote.is-clamped { flex: 0 0 auto; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
[data-review-more][hidden] { display: none !important; }
.review-card__more { align-self: flex-start; margin: 10px 0 auto; padding: 0; border: 0; background: none; color: var(--color-primary); font-weight: 700; font-size: 14px; cursor: pointer; }
.review-card__more:hover { text-decoration: underline; }
.review-card__author { margin-top: auto !important; }
.review-card p.review-card__quote:not(.is-clamped) + .review-card__author { margin-top: 16px !important; }

.rv-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 15, 35, .55); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility 0s linear .25s; }
.rv-modal.is-open { opacity: 1; visibility: visible; transition: opacity .25s ease; }
.rv-modal__box { position: relative; width: 100%; max-width: 560px; max-height: 85vh; overflow-y: auto; background: #fff; border-radius: 22px; padding: 32px 30px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); transform: translateY(12px) scale(.98); transition: transform .3s var(--ease); }
.rv-modal.is-open .rv-modal__box { transform: none; }
.rv-modal__close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--color-border); background: #fff; cursor: pointer; font-size: 18px; line-height: 1; }
.rv-modal__box .stars { color: #F5A623; display: flex; gap: 3px; margin-bottom: 14px; }
.rv-modal__box p { font-size: 16px; line-height: 1.75; color: var(--color-text); margin: 0 0 20px; white-space: pre-line; }
.rv-modal__box .review-card__author { margin-top: 0 !important; }
@media (max-width: 768px) { .review-card { min-height: 0; } .rv-modal__box { padding: 28px 20px 20px; } }

/* ==========================================================
   Category infinite scroll (v5.39.0)
   ========================================================== */
.cat-infinite { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 34px auto 10px; max-width: 420px; text-align: center; }
.cat-infinite__progress { width: 100%; max-width: 260px; height: 4px; border-radius: 99px; background: #E6EBF4; overflow: hidden; }
.cat-infinite__progress span { display: block; height: 100%; background: var(--brand-gradient, var(--color-primary)); border-radius: inherit; transition: width .4s var(--ease); }
.cat-infinite__status { margin: 0; font-size: 13.5px; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.cat-infinite__more { min-width: 220px; justify-content: center; }
.cat-infinite__end { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--color-navy, #0B1B3F); }
.cat-infinite__loader { display: flex; gap: 6px; padding: 10px 0; }
.cat-infinite__loader[hidden] { display: none; }
.cat-infinite__loader span { width: 9px; height: 9px; border-radius: 50%; background: var(--color-primary); animation: catdot 1s infinite ease-in-out; }
.cat-infinite__loader span:nth-child(2) { animation-delay: .15s; }
.cat-infinite__loader span:nth-child(3) { animation-delay: .3s; }
@keyframes catdot { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.product-grid > .product-card { animation: catin .45s var(--ease) both; }
@keyframes catin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .product-grid > .product-card { animation: none; } }
.cat-infinite [hidden] { display: none !important; }
