/*
Theme Name:   GadgetsGuru Child
Theme URI:    https://www.gadgetsgurustore.com/
Description:  Child theme for GadgetsGuru. Carries the mobile menu open-state, one-line category pills, one-product-per-row phones layout and a readable dark footer. All templates come from the parent theme.
Author:       Redefine SEO
Author URI:   https://www.redefineseo.com/
Template:     gadgetsguru-theme
Version:      1.1.0
Text Domain:  gadgetsguru
*/

/* ------------------------------------------------
 * Mobile menu (theme's .nav-menu has no open state)
 * ------------------------------------------------ */
@media (max-width: 900px) {
	.nav-menu { display: none !important; height: auto !important; overflow: visible !important; }
	.nav-menu.is-open {
		display: flex !important;
		flex-direction: column;
		align-items: stretch;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 90;
		background: #fff;
		padding: 10px 18px 16px;
		box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
		max-height: 75vh;
		overflow-y: auto;
	}
	.nav-menu.is-open > li { width: 100%; border-bottom: 1px solid rgba(0, 0, 0, .08); }
	.nav-menu.is-open > li > a { display: block; padding: 12px 4px; }
	html.dark-mode .nav-menu.is-open { background: #171d27; }
}

/* ------------------------------------------------
 * Category pills: one aligned, scrollable line
 * ------------------------------------------------ */
.cat-pills {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 10px !important;
	height: auto !important;
	max-height: none !important;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	padding-bottom: 6px;
	scrollbar-width: thin;
}
.cat-pills .cat-pill {
	flex: 0 0 auto !important;
	width: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	white-space: nowrap;
	align-self: center;
}

/* ------------------------------------------------
 * Phones: exactly one product per row, every section
 * (deal of the day, top picks, hot deals, latest in stock)
 * ------------------------------------------------ */
@media (max-width: 640px) {
	ul.products,
	.products,
	.products-grid,
	.gg-products,
	.gg-deal-grid,
	.gg-top-picks,
	.gg-latest,
	.gg-hot-deals,
	.deal-grid,
	.top-picks-grid,
	.latest-grid,
	.hot-deal-grid {
		display: grid !important;
		grid-template-columns: 1fr !important;
		gap: 16px !important;
	}
	ul.products li.product,
	.products .product,
	.gg-products .product,
	.gg-deal-grid > *,
	.gg-top-picks > *,
	.gg-latest > *,
	.gg-hot-deals > * {
		width: 100% !important;
		max-width: 100% !important;
		flex: 0 0 100% !important;
		margin: 0 !important;
	}
}

/* ------------------------------------------------
 * Dark mode footer palette
 * ------------------------------------------------ */
html.dark-mode .site-footer {
	background: #11161f !important;
	color: #cfd7e3 !important;
	border-top-color: #26303d !important;
}
html.dark-mode .site-footer a,
html.dark-mode .site-footer .footer-title,
html.dark-mode .site-footer h2,
html.dark-mode .site-footer h3,
html.dark-mode .site-footer h4 {
	color: #eef3fa !important;
}
html.dark-mode .site-footer a:hover { color: #ff8a3d !important; }
html.dark-mode .site-footer .footer-bottom,
html.dark-mode .site-footer .footer-note { color: #9aa7b8 !important; border-top-color: #26303d !important; }

/* Hide the category scrollbar visually (still swipeable). */
.cat-pills { scrollbar-width: none; -ms-overflow-style: none; }
.cat-pills::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* Equal-size product cards (image, title, price blocks align). */
@media (min-width: 641px) {
	ul.products,
	.gg-products,
	.gg-deal-grid,
	.gg-top-picks,
	.gg-latest,
	.gg-hot-deals,
	.products-slider-track {
		grid-auto-rows: 1fr;
		align-items: stretch;
	}
	ul.products li.product,
	.gg-products .product,
	.gg-deal-grid > *,
	.gg-top-picks > *,
	.gg-latest > *,
	.gg-hot-deals > *,
	.products-slider-wrapper .product {
		display: flex;
		flex-direction: column;
		height: 100%;
	}
	ul.products li.product img,
	.gg-products .product img,
	.products-slider-wrapper .product img {
		aspect-ratio: 1 / 1;
		object-fit: contain;
		width: 100%;
	}
	ul.products li.product .woocommerce-loop-product__title,
	.gg-products .product h3,
	.products-slider-wrapper .product h3 {
		min-height: 2.9em;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
}