/*
 Theme Name:   TSKLuxe Child
 Theme URI:    https://tskluxe.co.za
 Description:  A custom child theme for the TSKLuxe hair products e-commerce store, built on Storefront.
 Author:       TSKLuxe
 Author URI:   https://tskluxe.co.za
 Template:     storefront
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  tskluxe-child
 Requires at least: 6.0
 Requires PHP: 7.4
*/

/* ========================================================================
   Shop/Product Grid Layout Fix
   ======================================================================== */

.woocommerce ul.products {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr);
	gap: 2rem;
	list-style: none;
	padding: 0;
	margin: 0;
	float: none !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
	display: none !important;
	content: none !important;
}

@media (min-width: 768px) {
	.woocommerce ul.products {
		grid-template-columns: repeat(2, 1fr);
		gap: 2.5rem;
	}
}

@media (min-width: 1024px) {
	.woocommerce ul.products {
		grid-template-columns: repeat(3, 1fr);
		gap: 2.5rem;
	}
}

@media (min-width: 1400px) {
	.woocommerce ul.products {
		grid-template-columns: repeat(4, 1fr);
	}
}

.woocommerce ul.products li.product {
	width: 100% !important;
	margin: 0 !important;
	padding: 0;
	display: flex;
	flex-direction: column;
	float: none !important;
}

.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 8px;
	margin-bottom: 0.75rem;
}

/* Hide empty placeholder images */
.woocommerce ul.products li.product .woocommerce-placeholder {
	background: #f9f9f9;
	border: 1px dashed #ddd;
}

/* Fix result count and ordering wrapper */
.woocommerce-result-count,
.woocommerce-ordering {
	margin-bottom: 1rem;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 0.95rem;
	font-weight: 600;
	margin-bottom: 0.4rem;
	line-height: 1.3;
}

.woocommerce ul.products li.product .price {
	font-size: 1rem;
	font-weight: 700;
	margin-bottom: 0.75rem;
}

.woocommerce ul.products li.product .button {
	margin-top: auto;
	width: 100%;
	text-align: center;
	padding: 0.6rem 1rem;
	font-size: 0.85rem;
}

/* ========================================================================
   Contact Us Page
   ======================================================================== */

.tskluxe-contact-page {
	padding: 2rem 1rem;
	max-width: 1200px;
	margin: 0 auto;
}

.tskluxe-contact-header {
	text-align: center;
	margin-bottom: 2rem;
}

.tskluxe-contact-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

@media (min-width: 768px) {
	.tskluxe-contact-grid {
		grid-template-columns: 1fr 1fr;
		gap: 3rem;
	}
}

.tskluxe-contact-info,
.tskluxe-contact-form {
	padding: 1.5rem;
}

.tskluxe-contact-info h2,
.tskluxe-contact-form h2 {
	margin-bottom: 1.5rem;
}

.tskluxe-contact-details {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.tskluxe-contact-item {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.tskluxe-contact-label {
	font-weight: 700;
}

.tskluxe-contact-item a {
	word-break: break-all;
}

/* ========================================================================
   About Us Page Styles
   ======================================================================== */

.tskluxe-about-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1rem;
}

.tskluxe-about-header {
	text-align: center;
	margin-bottom: 2rem;
}

.tskluxe-about-title {
	font-size: 2.5rem;
	margin-bottom: 0.5rem;
}

.tskluxe-about-featured-image {
	margin: 0 0 2.5rem;
	text-align: center;
}

.tskluxe-about-featured-image img {
	width: 100%;
	max-width: 600px;
	max-height: 350px;
	height: auto;
	object-fit: cover;
	border-radius: 8px;
}

/* Brand Story Section */
.tskluxe-about-story {
	margin-bottom: 3rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid #f0f0f0;
}

.tskluxe-about-story h2 {
	font-size: 1.75rem;
	margin-bottom: 1rem;
}

.tskluxe-about-story-content p {
	font-size: 1.1rem;
	line-height: 1.8;
	margin-bottom: 1rem;
}

/* Brand Values Section */
.tskluxe-about-values {
	margin-bottom: 3rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid #f0f0f0;
}

.tskluxe-about-values h2 {
	font-size: 1.75rem;
	margin-bottom: 1.5rem;
	text-align: center;
}

.tskluxe-about-values-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
}

.tskluxe-about-value-card {
	text-align: center;
	padding: 1.5rem;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tskluxe-about-value-icon {
	display: block;
	font-size: 2.5rem;
	margin-bottom: 0.75rem;
}

.tskluxe-about-value-title {
	font-size: 1.25rem;
	margin-bottom: 0.5rem;
}

.tskluxe-about-value-description {
	font-size: 0.95rem;
	line-height: 1.6;
}

/* Team Section */
.tskluxe-about-team {
	margin-bottom: 2rem;
}

.tskluxe-about-team h2 {
	font-size: 1.75rem;
	margin-bottom: 1.5rem;
	text-align: center;
}

.tskluxe-about-team-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 2rem;
}

.tskluxe-about-team-member {
	text-align: center;
}

.tskluxe-about-team-member-photo {
	width: 150px;
	height: 150px;
	border-radius: 50%;
	object-fit: cover;
	margin-bottom: 1rem;
}

.tskluxe-about-team-member-name {
	font-size: 1.1rem;
	margin-bottom: 0.25rem;
}

.tskluxe-about-team-member-role {
	font-size: 0.9rem;
	font-style: italic;
	margin-bottom: 0.5rem;
}

.tskluxe-about-team-member-bio {
	font-size: 0.9rem;
	line-height: 1.5;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
	.tskluxe-about-title {
		font-size: 1.75rem;
	}

	.tskluxe-about-values-grid {
		grid-template-columns: 1fr;
	}

	.tskluxe-about-team-grid {
		grid-template-columns: 1fr;
	}

	.tskluxe-about-page {
		padding: 1rem;
	}
}

@media (max-width: 480px) {
	.tskluxe-about-title {
		font-size: 1.5rem;
	}

	.tskluxe-about-story h2,
	.tskluxe-about-values h2,
	.tskluxe-about-team h2 {
		font-size: 1.4rem;
	}
}


/* ========================================================================
   Footer Legal Links
   ======================================================================== */

.tskluxe-footer-legal {
	text-align: center;
	padding: 1rem 0;
	border-top: 1px solid #f0e0e8;
}

.tskluxe-legal-links {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1.5rem;
}

.tskluxe-legal-links a {
	color: #F178AE;
	text-decoration: none;
	font-size: 0.85rem;
	transition: color 0.2s;
}

.tskluxe-legal-links a:hover {
	color: #E85A96;
	text-decoration: underline;
}

/* ========================================================================
   Override WooCommerce Green with Brand Pink
   ======================================================================== */

.woocommerce-message,
.woocommerce-info {
	background-color: #fdf2f6 !important;
	border-top-color: #F178AE !important;
	color: #333 !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
	color: #F178AE !important;
}

.woocommerce-message a.button,
.woocommerce-info a.button {
	background-color: #F178AE !important;
	color: #fff !important;
}

.woocommerce-message a.button:hover,
.woocommerce-info a.button:hover {
	background-color: #E85A96 !important;
}

/* Storefront green button overrides */
.storefront-primary-navigation .main-navigation ul.menu > li > a:hover,
.storefront-primary-navigation .main-navigation ul.menu > li.current-menu-item > a,
.site-header-cart .cart-contents:hover {
	color: #F178AE;
}

/* Checkout/cart success states */
.woocommerce form .form-row.woocommerce-validated .select2-container,
.woocommerce form .form-row.woocommerce-validated input.input-text,
.woocommerce form .form-row.woocommerce-validated select {
	border-color: #E85A96 !important;
}

/* ========================================================================
   Fix: Sorting/Result Count Not Part of Product Grid
   ======================================================================== */

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
	float: none !important;
	width: 100% !important;
	margin-bottom: 1rem;
}

@media (max-width: 767px) {
	/* Ensure sorting wrapper doesn't interfere with product grid */
	.woocommerce-page .storefront-sorting {
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
		margin-bottom: 1.5rem;
	}

	.woocommerce-page .storefront-sorting select {
		width: 100%;
	}

	/* Force all product grid items to have equal height */
	.woocommerce ul.products li.product {
		min-height: auto !important;
	}

	/* Remove any stray spacing before first product */
	.woocommerce ul.products::before,
	.woocommerce ul.products::after {
		display: none !important;
		content: none !important;
	}

	/* Ensure product images fill their space */
	.woocommerce ul.products li.product a img {
		display: block;
		width: 100%;
	}
}
