/**
 * Forward March Pro - Modern WooCommerce Styling Overrides
 */

/* -------------------------------------------------------------
 * SHOP ARCHIVE & CATALOG
 * ----------------------------------------------------------- */
.fm-shop-header-banner {
	background: linear-gradient(135deg, #111e19 0%, #1c322b 100%);
	color: var(--fm-color-white);
	padding: 4rem 0 3.5rem;
	text-align: center;
}

.fm-shop-header-content {
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
}

.fm-shop-page-title {
	color: var(--fm-color-white);
	font-size: 2.75rem;
	margin-bottom: 0.5rem;
}

.fm-shop-page-desc {
	color: rgba(255, 255, 255, 0.85);
	font-size: 1.05rem;
	margin-bottom: 1.8rem;
}

.fm-shop-category-pills {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	flex-wrap: wrap;
}

.fm-cat-pill {
	background: rgba(255, 255, 255, 0.12);
	color: var(--fm-color-white);
	border: 1px solid rgba(255, 255, 255, 0.25);
	padding: 0.45rem 1.1rem;
	border-radius: var(--fm-radius-full);
	font-size: 0.88rem;
	font-weight: 600;
	transition: var(--fm-transition);
}

.fm-cat-pill:hover,
.fm-cat-pill.active {
	background-color: var(--fm-color-accent);
	border-color: var(--fm-color-accent);
	color: var(--fm-color-white);
}

.fm-shop-container-section {
	padding: 3.5rem 0 5rem;
}

.fm-shop-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 2rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--fm-color-border);
	flex-wrap: wrap;
	gap: 1rem;
}

.woocommerce-result-count,
.fm-shop-result-count {
	font-size: 0.9rem;
	color: var(--fm-color-muted);
	font-weight: 500;
}

.woocommerce-ordering select {
	padding: 0.5rem 1.2rem;
	border-radius: var(--fm-radius-full);
	border: 1px solid var(--fm-color-border);
	background-color: var(--fm-color-white);
	color: var(--fm-color-dark);
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
}

ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.8rem;
	margin-bottom: 3.5rem;
}

/* -------------------------------------------------------------
 * SINGLE PRODUCT PAGE (PDP)
 * ----------------------------------------------------------- */
.fm-single-product-wrapper {
	padding: 2rem 0 5rem;
	background-color: var(--fm-color-white);
}

.fm-product-breadcrumb {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.85rem;
	color: var(--fm-color-muted);
	margin-bottom: 2rem;
}

.fm-product-breadcrumb a:hover {
	color: var(--fm-color-accent);
}

.fm-single-product-layout {
	display: grid;
	grid-template-columns: minmax(320px, 460px) 1fr;
	gap: 3.5rem;
	align-items: start;
	margin-bottom: 4rem;
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
}

/* Gallery Column */
.fm-pdp-gallery-column {
	position: sticky;
	top: 100px;
	width: 100%;
	max-width: 460px;
	margin: 0 auto;
}

.fm-pdp-gallery-main {
	position: relative;
	border-radius: var(--fm-radius-lg);
	overflow: hidden;
	background-color: var(--fm-color-bg-light);
	border: 1px solid var(--fm-color-border);
	width: 100%;
	max-width: 460px;
	max-height: 460px;
	aspect-ratio: 1 / 1;
	box-shadow: var(--fm-shadow-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
}

.fm-pdp-badge {
	position: absolute;
	top: 1rem;
	left: 1rem;
	z-index: 5;
}

.fm-pdp-main-image-container {
	width: 100%;
	height: 100%;
	max-width: 460px;
	max-height: 460px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem;
}

.fm-pdp-main-img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	margin: 0 auto;
	transition: transform 0.3s ease;
}

.fm-pdp-thumbs-row {
	display: flex;
	gap: 0.6rem;
	margin-top: 0.85rem;
	overflow-x: auto;
	padding-bottom: 0.5rem;
	max-width: 460px;
	margin-left: auto;
	margin-right: auto;
}

.fm-pdp-thumb-btn {
	width: 64px;
	height: 64px;
	border-radius: var(--fm-radius-md);
	overflow: hidden;
	border: 2px solid var(--fm-color-border);
	padding: 2px;
	background: var(--fm-color-bg-light);
	cursor: pointer;
	flex-shrink: 0;
	transition: var(--fm-transition);
	display: flex;
	align-items: center;
	justify-content: center;
}

.fm-pdp-thumb-btn img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.fm-pdp-thumb-btn.active,
.fm-pdp-thumb-btn:hover {
	border-color: var(--fm-color-accent);
	transform: translateY(-2px);
	box-shadow: var(--fm-shadow-md);
}

/* Fallbacks for standard WooCommerce image wrappers */
.single-product .woocommerce-product-gallery,
.single-product div.product div.images {
	max-width: 460px !important;
	margin: 0 auto !important;
}

.single-product div.product div.images img,
.single-product .woocommerce-product-gallery__image img {
	max-height: 460px !important;
	width: auto !important;
	max-width: 100% !important;
	object-fit: contain !important;
	margin: 0 auto !important;
}

/* Summary Column */
.fm-pdp-summary-column {
	display: flex;
	flex-direction: column;
}

.fm-pdp-rating {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.6rem;
	font-size: 0.9rem;
}

.fm-rating-score {
	font-weight: 700;
	color: var(--fm-color-dark);
}

.fm-pdp-title {
	font-size: 2.3rem;
	font-weight: 800;
	line-height: 1.2;
	color: var(--fm-color-dark);
	margin-bottom: 0.75rem;
}

.fm-pdp-price-box {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	margin-bottom: 1.25rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--fm-color-border);
}

.fm-pdp-price {
	font-family: var(--fm-font-display);
	font-size: 1.85rem;
	font-weight: 800;
	color: var(--fm-color-dark);
}

.fm-pdp-shipping-hint {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--fm-color-green);
}

.fm-pdp-short-desc {
	font-size: 0.98rem;
	color: var(--fm-color-body);
	margin-bottom: 1.8rem;
	line-height: 1.65;
}

/* WooCommerce Variation Swatches Container */
.variations_form {
	margin-bottom: 1.5rem;
}

.variations {
	width: 100%;
	border: none;
	margin-bottom: 1.25rem;
}

.variations tr {
	display: flex;
	flex-direction: column;
	margin-bottom: 1.25rem;
}

.variations td.label {
	padding: 0 0 0.5rem 0;
	font-family: var(--fm-font-display);
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--fm-color-dark);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.variations td.value {
	padding: 0;
}

.variations select {
	width: 100%;
	padding: 0.8rem 1.2rem;
	border-radius: var(--fm-radius-md);
	border: 1.5px solid var(--fm-color-border);
	background-color: var(--fm-color-bg-light);
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
}

.variations select:focus {
	outline: none;
	border-color: var(--fm-color-accent);
}

/* Visual Pill Swatches */
.fm-swatch-group {
	display: flex;
	gap: 0.6rem;
	flex-wrap: wrap;
	margin-top: 0.4rem;
}

.fm-swatch-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.55rem 1.1rem;
	border-radius: var(--fm-radius-md);
	border: 1.5px solid var(--fm-color-border);
	background: var(--fm-color-white);
	font-family: var(--fm-font-display);
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--fm-color-dark);
	cursor: pointer;
	transition: var(--fm-transition);
}

.fm-swatch-pill:hover {
	border-color: var(--fm-color-dark);
}

.fm-swatch-pill.active {
	border-color: var(--fm-color-accent);
	background-color: var(--fm-color-accent-light);
	color: var(--fm-color-accent);
	font-weight: 700;
}

/* Add to cart action row */
.woocommerce-variation-add-to-cart {
	display: flex;
	gap: 1rem;
	align-items: stretch;
	margin-top: 1.5rem;
	flex-wrap: wrap;
}

.quantity {
	display: inline-flex;
	align-items: center;
	border: 1.5px solid var(--fm-color-border);
	border-radius: var(--fm-radius-full);
	overflow: hidden;
	background: var(--fm-color-bg-light);
}

.quantity input.qty {
	width: 50px;
	height: 48px;
	text-align: center;
	border: none;
	background: transparent;
	font-weight: 700;
	font-size: 1rem;
	color: var(--fm-color-dark);
}

.quantity input.qty::-webkit-outer-spin-button,
.quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.single_add_to_cart_button {
	flex-grow: 1;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background-color: var(--fm-color-accent) !important;
	color: var(--fm-color-white) !important;
	font-family: var(--fm-font-display) !important;
	font-weight: 700 !important;
	font-size: 1.05rem !important;
	border-radius: var(--fm-radius-full) !important;
	padding: 0 2rem !important;
	box-shadow: 0 4px 14px rgba(224, 122, 44, 0.4) !important;
	transition: var(--fm-transition) !important;
}

.single_add_to_cart_button:hover {
	background-color: var(--fm-color-accent-hover) !important;
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(224, 122, 44, 0.5) !important;
}

/* Perks Card */
.fm-pdp-perks-card {
	background-color: var(--fm-color-bg-light);
	border: 1px solid var(--fm-color-border);
	border-radius: var(--fm-radius-md);
	padding: 1.25rem 1.5rem;
	margin: 1.5rem 0 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}

.fm-perk-item {
	display: flex;
	align-items: center;
	gap: 0.85rem;
}

.fm-perk-icon {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background-color: rgba(74, 90, 58, 0.12);
	color: var(--fm-color-olive);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.fm-perk-icon svg {
	width: 18px;
	height: 18px;
}

.fm-perk-item strong {
	display: block;
	font-size: 0.9rem;
	color: var(--fm-color-dark);
}

.fm-perk-item p {
	font-size: 0.8rem;
	color: var(--fm-color-muted);
	margin-bottom: 0;
}

/* PDP Payment Trust Badges */
.fm-pdp-payment-trust {
	background-color: var(--fm-color-white);
	border: 1px dashed var(--fm-color-border);
	border-radius: var(--fm-radius-md);
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	text-align: center;
}

.fm-pdp-trust-title {
	display: block;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--fm-color-muted);
	margin-bottom: 0.6rem;
}

.fm-pdp-payment-trust .fm-payment-icons {
	justify-content: center;
	gap: 0.4rem;
}

/* Accordions */
.fm-pdp-accordions {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 1rem;
}

.fm-accordion {
	border: 1px solid var(--fm-color-border);
	border-radius: var(--fm-radius-md);
	overflow: hidden;
	background: var(--fm-color-white);
}

.fm-accordion-heading {
	padding: 1rem 1.25rem;
	font-family: var(--fm-font-display);
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--fm-color-dark);
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	user-select: none;
	list-style: none;
}

.fm-accordion-heading::-webkit-details-marker {
	display: none;
}

.fm-accordion-content {
	padding: 0 1.25rem 1.25rem;
	font-size: 0.9rem;
	color: var(--fm-color-body);
}

.fm-accordion-content ul {
	list-style: disc;
	padding-left: 1.25rem;
}

.fm-accordion-content li {
	margin-bottom: 0.4rem;
}

.fm-size-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 0.75rem;
	font-size: 0.85rem;
}

.fm-size-table th,
.fm-size-table td {
	padding: 0.5rem;
	border: 1px solid var(--fm-color-border);
	text-align: center;
}

.fm-size-table th {
	background-color: var(--fm-color-bg-light);
	font-weight: 700;
}

/* Sticky Add to Cart Bar */
.fm-sticky-atc-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: var(--fm-color-white);
	border-top: 1px solid var(--fm-color-border);
	padding: 0.75rem 0;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
	z-index: 998;
	transform: translateY(100%);
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fm-sticky-atc-bar.is-visible {
	transform: translateY(0);
}

.fm-sticky-atc-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.fm-sticky-atc-product {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.fm-sticky-thumb {
	width: 48px;
	height: 48px;
	border-radius: var(--fm-radius-sm);
	object-fit: cover;
}

.fm-sticky-title {
	font-size: 1rem;
	margin-bottom: 0.1rem;
}

.fm-sticky-price {
	font-weight: 700;
	color: var(--fm-color-accent);
}

/* Mini Cart Drawer Line Items */
.fm-mini-cart-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.fm-cart-item {
	display: flex;
	gap: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--fm-color-border);
	position: relative;
}

.fm-cart-item-thumb {
	width: 72px;
	height: 72px;
	border-radius: var(--fm-radius-md);
	overflow: hidden;
	background: var(--fm-color-bg-light);
	flex-shrink: 0;
}

.fm-cart-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fm-cart-item-info {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.fm-cart-item-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.5rem;
}

.fm-cart-item-name {
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.3;
}

.fm-cart-remove-btn {
	color: var(--fm-color-muted);
	font-size: 1.25rem;
	line-height: 1;
	transition: var(--fm-transition);
}

.fm-cart-remove-btn:hover {
	color: var(--fm-color-danger);
}

.fm-cart-item-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: auto;
	font-size: 0.85rem;
}

.fm-cart-item-price {
	font-weight: 700;
	color: var(--fm-color-dark);
}

.fm-empty-cart-drawer {
	text-align: center;
	padding: 3rem 1rem;
}

.fm-empty-cart-icon {
	font-size: 3rem;
	margin-bottom: 1rem;
}

.fm-empty-cart-drawer h3 {
	font-size: 1.3rem;
	margin-bottom: 0.5rem;
}

.fm-empty-cart-drawer p {
	color: var(--fm-color-muted);
	font-size: 0.9rem;
	margin-bottom: 1.5rem;
}

/* -------------------------------------------------------------
 * RESPONSIVE PDP
 * ----------------------------------------------------------- */
@media (max-width: 900px) {
	.fm-single-product-layout {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}
	ul.products {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}
}

@media (max-width: 480px) {
	ul.products {
		grid-template-columns: 1fr;
	}
	.fm-pdp-title {
		font-size: 1.75rem;
	}
}
