/**
 * Theme Name: Astra Child - Boshop
 * Theme URI: https://boshop.vn
 * Description: Astra Child Theme implementing Boshop.vn Mega Menu and Product Card styling.
 * Author: Antigravity
 * Author URI: https://github.com/sickn33
 * Template: astra
 * Version: 1.0.0
 * Text Domain: astra-child-boshop
 */

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
	--boshop-primary: #AF1D2C;
	--boshop-secondary: #146B31; /* Cart CTA */
	--boshop-bg-white: #FFFFFF;
	--boshop-bg-grey: #F4F4F4;
	--boshop-text-primary: #333333;
	--boshop-text-price: #D0021B;
	--boshop-font-family: 'Roboto', 'Segoe UI', sans-serif;
}

body, h1, h2, h3, h4, h5, h6, p, a, span, div {
	font-family: var(--boshop-font-family);
}

/* ==========================================================================
   Header & Utility Navigation
   ========================================================================== */
.site-header {
	background-color: var(--boshop-bg-white);
	border-bottom: 1px solid var(--boshop-bg-grey);
}

.ast-header-search .search-submit {
	background-color: var(--boshop-primary);
	color: #fff;
	border: none;
}

.ast-site-header-cart .ast-cart-menu-wrap {
	/* Cart CTA styling */
	background-color: var(--boshop-secondary);
	color: #fff;
	padding: 8px 15px;
	border-radius: 4px;
	transition: background-color 0.3s ease;
}

.ast-site-header-cart .ast-cart-menu-wrap:hover {
	background-color: #0e5023; /* Darker green */
}

/* ==========================================================================
   Mega Menu Sidebar (Desktop)
   ========================================================================== */
.main-header-menu .menu-item-has-children > a {
	color: var(--boshop-text-primary);
	font-weight: 600;
}

/* Base Mega Menu Fly-out Panel Styling */
.main-header-menu .sub-menu {
	background-color: var(--boshop-bg-white);
	border: 1px solid var(--boshop-bg-grey);
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
	border-radius: 4px;
}

/* Hover States */
.main-header-menu .sub-menu .menu-item a:hover {
	color: var(--boshop-primary);
	background-color: var(--boshop-bg-grey);
}

/* ==========================================================================
   WooCommerce Product Cards
   ========================================================================== */
.woocommerce ul.products li.product {
	background-color: var(--boshop-bg-white);
	border: 1px solid var(--boshop-bg-grey);
	border-radius: 8px;
	padding: 15px;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	position: relative;
	text-align: left;
}

.woocommerce ul.products li.product:hover {
	box-shadow: 0 8px 16px rgba(0,0,0,0.1);
	transform: translateY(-2px);
}

/* Product Title */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 14px;
	color: var(--boshop-text-primary);
	font-weight: 400;
	margin-top: 10px;
	margin-bottom: 8px;
	/* line-clamp to limit lines */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	height: 40px; /* Force height based on line-height * lines */
}

/* Pricing Structure */
.woocommerce ul.products li.product .price {
	font-family: var(--boshop-font-family);
	display: flex;
	flex-direction: column-reverse; /* Swap order if original shows below via Woo logic, or flex adjustments */
	align-items: flex-start;
	justify-content: flex-start;
	gap: 4px;
	margin-bottom: 12px;
}

.woocommerce ul.products li.product .price del {
	font-size: 12px;
	color: #999999;
	display: block;
}

.woocommerce ul.products li.product .price ins {
	font-size: 18px;
	color: var(--boshop-text-price);
	font-weight: 700;
	text-decoration: none;
	display: block;
}

/* Add to Cart Icon / Button Component */
.woocommerce ul.products li.product .button.add_to_cart_button {
	background-color: transparent !important;
	color: var(--boshop-primary) !important;
	border: 1px solid var(--boshop-primary) !important;
	border-radius: 4px;
	padding: 6px 12px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	transition: all 0.3s ease;
	width: 100%;
	text-align: center;
}

.woocommerce ul.products li.product .button.add_to_cart_button:hover {
	background-color: var(--boshop-primary) !important;
	color: #ffffff !important;
}

/* Brand label (requires custom field injected via hooks) */
.boshop-brand-label {
	font-size: 11px;
	color: #777;
	text-transform: uppercase;
	margin-top: 5px;
	display: block;
}
