/*
Theme Name: Philinvest
Theme URI: https://philinvest.be/
Author: WeJune
Description: Thème WordPress sur mesure pour une boutique philatélique WooCommerce (catalogue public, prix/achat réservés aux utilisateurs connectés, checkout hors ligne).
Version: 0.1.0
*/

/* === GLOBAL STYLES === */
:root {
	--philinvest-primary: #2c3e50;
	--philinvest-secondary: #307C9D;
	--philinvest-accent: #e74c3c;
	--philinvest-success: #27ae60;
	--philinvest-light: #ecf0f1;
	--philinvest-dark: #1a252f;
	--philinvest-btn: #65C6F0;
	--philinvest-display: "Abril Fatface", Georgia, "Times New Roman", serif;
	--philinvest-text: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
	background: #FFFDF8;
	color: #2c3e50;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

body.single-product {
	background: #fdf7f2;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--philinvest-display);
	letter-spacing: .02rem;
	position: relative;
	width: fit-content;
}

h2::after {
    content: '';
    display: block;
    width: 50%;
    height: 4px;
    background: var(--philinvest-primary);
    margin-top: 0.5rem;
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translate(100%, -100%);
}

main {
	flex: 1 0 auto;
}

footer {
	margin-top: auto;
}

a, p, span, li, div, label, input, select, textarea {
	font-family: var(--philinvest-text);
}

a:not(.btn) {
	color: var(--philinvest-secondary);
	text-decoration: none;
}

a:not(.btn):hover {
	color: var(--philinvest-secondary);
	text-decoration: none;
}

/* === HEADER === */
.philinvest-header {
	background: #fff;
	position: sticky;
	top: 0;
	z-index: 1030;
	transition: box-shadow 0.3s ease;
}

.navbar-brand {
	font-size: 1.5rem;
	transition: opacity 0.2s ease;
}

.navbar-brand img {
	max-height: 60px;
	width: auto;
}

.navbar-brand:hover {
	opacity: 0.8;
}

.philinvest-header-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	color: var(--philinvest-primary);
	background: transparent;
	border: none;
	padding: 0;
	width: 32px;
	height: 32px;
}

.philinvest-header-icon svg {
	width: 20px;
	height: 20px;
}

.philinvest-header-icon:hover {
	color: var(--philinvest-secondary);
}

.navbar-light .navbar-nav .nav-link {
	color: var(--philinvest-primary);
	font-weight: 500;
	padding: 0.5rem 1rem;
	transition: color 0.2s ease;
	text-decoration: none;
}

.navbar-light .navbar-nav .nav-link:hover {
	color: var(--philinvest-secondary);
}

.philinvest-navbar-toggler {
	width: 46px;
	height: 46px;
	border: 1px solid #d9e9f1;
	border-radius: 999px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, #ffffff 0%, #f5fbfe 100%);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.philinvest-navbar-toggler:focus {
	box-shadow: 0 0 0 0.2rem rgba(101, 198, 240, 0.25);
}

.philinvest-navbar-toggler:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.philinvest-toggler-icon {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 20px;
	height: 14px;
	position: relative;
}

.philinvest-toggler-icon span {
	position: absolute;
	left: 0;
	display: block;
	width: 20px;
	height: 2px;
	background: #307c9d;
	border-radius: 2px;
	transform-origin: center;
	transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.philinvest-toggler-icon span:nth-child(1) {
	top: 0;
}

.philinvest-toggler-icon span:nth-child(2) {
	top: 6px;
}

.philinvest-toggler-icon span:nth-child(3) {
	top: 12px;
}

.philinvest-navbar-toggler:not(.collapsed) .philinvest-toggler-icon span:nth-child(1) {
	top: 6px;
	transform: rotate(45deg);
}

.philinvest-navbar-toggler:not(.collapsed) .philinvest-toggler-icon span:nth-child(2) {
	opacity: 0;
}

.philinvest-navbar-toggler:not(.collapsed) .philinvest-toggler-icon span:nth-child(3) {
	top: 6px;
	transform: rotate(-45deg);
}

@media (max-width: 991.98px) {
	#philinvestNav {
		background: transparent;
		border: 0;
		border-top: 1px solid #e8eef3;
		border-radius: 0;
		padding: 0.85rem 0 0;
		margin-top: 0.65rem;
		box-shadow: none;
	}

	#philinvestNav.show,
	#philinvestNav.collapsing {
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;
		align-items: flex-start;
	}

	#menu-main-menu {
		width: fit-content !important;
	}
}

.btn-outline-primary {
	border-color: var(--philinvest-secondary);
	color: var(--philinvest-secondary);
	transition: all 0.2s ease;
}

.btn-outline-primary:hover {
	background: var(--philinvest-secondary);
	border-color: var(--philinvest-secondary);
	color: #fff;
}

.btn-primary {
	background: var(--philinvest-btn);
	border-color: var(--philinvest-btn);
	color: #fff;
	transition: all 0.2s ease;
}

.btn-primary:hover {
	background: var(--philinvest-secondary);
	border-color: var(--philinvest-secondary);
	color: #fff;
}


/* === LOGIN HINT === */
.philinvest-login-hint {
	padding: 1rem 1.25rem;
	background: #fff;
	color: var(--philinvest-primary);
	border: 1px solid #d9e9f1;
	border-left: 4px solid var(--philinvest-btn);
	border-radius: 0.5rem;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
	animation: fadeInUp 0.3s ease;
}

.philinvest-login-hint a {
	color: var(--philinvest-secondary);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s ease;
}

.philinvest-login-hint a:hover {
	color: var(--philinvest-primary);
}

/* === WOOCOMMERCE PRODUCTS === */
.woocommerce ul.products {
	margin: 0;
}

/* WooCommerce Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-radius: 0.5rem;
	border: none;
	padding: 1rem 1.5rem;
	background: #65C6F0;
	color: #fff;
}

.woocommerce-message {
	display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    width: fit-content;
    flex-direction: row;
    max-width: 50%;
    position: absolute;
    z-index: 1;
    right: 0;
    gap: 3rem;
	background: #65C6F0;
	color: #fff;
	align-items: center;
}
.woocommerce-message::before {
	display: none;
}
.woocommerce-message a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
    transition: opacity 0.2s ease;
    background: none;
}

.woocommerce-info {
	background: #65C6F0;
	color: #fff;
}

.woocommerce-error {
	background: #65C6F0;
	color: #fff;
}

/* Product Single */
.woocommerce div.product {
	padding: 2rem 0;
}

.woocommerce div.product .product_title {
	font-size: 2rem;
	font-weight: 700;
	color: var(--philinvest-primary);
}

.woocommerce div.product p.price {
	color: var(--philinvest-dark);
	font-size: 1.25rem;
	font-weight: bold;
}


.philinvest-single .woocommerce-product-gallery__wrapper {
	padding: 2rem;
	background: #f1f1f1;
	border-radius: 0.25rem;
}

.philinvest-single .woocommerce-product-gallery__image img {
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
	background: #fff;
	padding: 1rem;
}

.philinvest-single .summary {
	padding-top: 1.5rem;
}

.philinvest-single .woocommerce-product-details__short-description {
	color: #6c757d;
	font-size: 0.95rem;
	line-height: 1.6;
	margin-bottom: 1.5rem;
}

.philinvest-single .price {
	color: var(--philinvest-dark);
	font-size: 1.5rem;
	font-weight: bold;
	margin-bottom: 1.5rem;
}

.philinvest-single .summary.entry-summary > .product_meta {
	display: none;
}

.philinvest-single .single_add_to_cart_button,  .philinvest-home-card__cta a {
	background: var(--philinvest-btn)!important;
	border: none;
	color: #fff;
	width: 100%;
	border-radius: 0;
	padding: 0.85rem 1.25rem;
	font-family: var(--philinvest-display);
	letter-spacing: .02rem;
	font-weight: 600;
}

body:not(.woocommerce-block-theme-has-button-styles) .wc-block-components-button:not(.is-link) {
	background: var(--philinvest-btn)!important;
	border: none;
	color: #fff;
	border-radius: 0;
	padding: 0.85rem 1.25rem;
	font-family: var(--philinvest-display);
	letter-spacing: .02rem;
	font-weight: 600;
}
.philinvest-single .single_add_to_cart_button:hover,
.philinvest-single .single_add_to_cart_button:focus {
	background: var(--philinvest-secondary);
	color: #fff;
}

.philinvest-single .quantity {
	display: none;
}

.philinvest-single .woocommerce-tabs {
	margin-top: 3rem;
}

.philinvest-single .woocommerce-tabs ul.tabs {
	display: none;
}

.philinvest-single .woocommerce-tabs .panel h2 {
	font-family: var(--philinvest-display);
	font-size: 1.25rem;
	margin-bottom: 1rem;
	letter-spacing: .02rem;
}

.woocommerce div.product .woocommerce-product-details__short-description {
	font-size: 1.1rem;
	color: #6c757d;
	margin-bottom: 1.5rem;
}

/* === AFFILIATION FORM === */
.philinvest-affiliation {
	background: #fff;
	padding: 2.5rem;
	border-radius: 1rem;
	border: 1px solid #edf1f5;
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.philinvest-affiliation .form-label {
	font-weight: 600;
	color: var(--philinvest-primary);
	margin-bottom: 0.5rem;
}


.philinvest-affiliation .form-control,
.philinvest-affiliation .form-select {
	background: #fdfdfd;
	border-radius: 0.75rem;
	border: 1px solid #dfe6ee;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.philinvest-affiliation .form-control:focus,
.philinvest-affiliation .form-select:focus {
	border-color: var(--philinvest-btn);
	box-shadow: 0 0 0 0.2rem rgba(101, 198, 240, 0.2);
	background: #fff;
}

.philinvest-affiliation .btn-primary {
	background: var(--philinvest-btn);
	border: none;
	padding: 0.9rem 2.5rem;
	font-weight: 600;
	transition: all 0.3s ease;
	border-radius: 999px;
	width: 100%;
	box-shadow: 0 10px 20px rgba(101, 198, 240, 0.25);
}

.philinvest-affiliation .btn-primary:hover, .btn.philinvest-search-btn:hover {
	background: var(--philinvest-secondary);
	transform: translateY(-2px);
	box-shadow: 0 12px 24px rgba(48, 124, 157, 0.25);
}

.philinvest-affiliation .form-check-input {
	border-color: #cfd8e3;
}

.philinvest-affiliation .form-check-input:checked {
	background-color: var(--philinvest-btn);
	border-color: var(--philinvest-btn);
}

/* === ALERTS === */
.alert {
	border-radius: 0.5rem;
	border: none;
	animation: fadeInDown 0.5s ease;
	background: #65C6F0;
	color: #fff;
}

.alert-info {
	background: #65C6F0;
	color: #fff;
}

/* === HERO SECTION === */
.philinvest-hero {
	background: linear-gradient(135deg, var(--philinvest-primary) 0%, var(--philinvest-secondary) 100%);
	color: #fff;
	padding: 3rem 2rem;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
	margin-bottom: 3rem;
}

.philinvest-hero h1 {
	font-weight: 700;
	margin-bottom: 1rem;
}

.philinvest-hero p {
	font-size: 1.2rem;
	opacity: 0.95;
}

/* === HOME HERO === */
.philinvest-home-hero {
	position: relative;
	min-height: 360px;
	background-size: cover;
	background-position: center;
	color: #fff;
	display: flex;
	align-items: center;
}

.philinvest-home-hero__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.philinvest-home-hero__content {
	position: relative;
	z-index: 2;
	max-width: 640px;
	padding: 3rem 0;
}

.philinvest-home-hero__content h1 {
	font-size: clamp(2rem, 3.5vw, 3rem);
	margin-bottom: 0.75rem;
}

.philinvest-home-hero__content p {
	font-size: 1.05rem;
	color: rgba(255, 255, 255, 0.85);
	margin-bottom: 1.5rem;
}

.philinvest-home-hero .btn-outline-light {
	border-width: 2px;
}

/* === HOME SECTIONS === */
.philinvest-home-recent {
	background-color: #4a2e23;
	background-size: cover;
	background-position: center;
	padding: 3.5rem 0 4rem;
	color: #fff;
	position: relative;
	overflow: hidden;
}

.philinvest-home-recent::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.1469);
	z-index: 1;
}

.philinvest-home-recent .container {
	position: relative;
	z-index: 2;
}

.philinvest-section-title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin-bottom: 2rem;
}

.philinvest-section-title span {
	font-family: var(--philinvest-display);
	font-size: 1.5rem;
}

.philinvest-section-title::before,
.philinvest-section-title::after {
	content: "";
	display: block;
	height: 1px;
	width: 120px;
	background: rgba(255, 255, 255, 0.5);
}

.philinvest-home-card {
	background: transparent;
	color: #fff;
}

.philinvest-home-card__thumb img {
	background: #f6f2ef;
	padding: 0.75rem;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.philinvest-home-card__price {
	color: #fff;
	font-weight: 600;
}


.philinvest-home-news {
	background: #fffaf4;
	padding: 3.5rem 0 4rem;
}

.philinvest-section-heading {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.philinvest-section-heading h2 {
	font-family: var(--philinvest-display);
	font-size: 1.75rem;
	margin: 0;
	max-width: 50%;
}

.philinvest-news-card {
	max-width: 320px;
}


.philinvest-news-card h3 {
	font-family: var(--philinvest-display);
	font-size: 1rem;
}

.philinvest-news-card__link {
	display: inline-block;
	margin-top: 0.5rem;
	font-size: 0.9rem;
}

/* === HOME PRODUCTS === */
.philinvest-home-products {
	background: #f8fafc;
	padding: 2.5rem 0;
}

.philinvest-home-products .products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem;
	margin: 0;
}

@media (max-width: 991.98px) {
	.philinvest-home-products .products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767.98px) {
	.philinvest-home-products .products {
		grid-template-columns: 1fr;
	}
}

/* === PAGE HERO === */
.philinvest-page-hero {
	position: relative;
	min-height: 256px;
	display: flex;
	align-items: center;
	background-size: cover;
	background-position: center;
	color: #fff;
	overflow: hidden;
}

.philinvest-page-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.philinvest-page-hero__content {
	position: relative;
	z-index: 2;
	max-width: 720px;
	padding: 2rem 0;
}

.philinvest-page-hero__title {
	font-size: clamp(2rem, 3vw, 2.75rem);
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.philinvest-page-hero__subtitle {
	font-size: 1.1rem;
	opacity: 0.9;
	margin-bottom: 0;
}

/* === SHOP HERO & FILTERS === */
.philinvest-shop-hero {
	background: linear-gradient(135deg, #1f2937 0%, #4b5563 100%);
	color: #fff;
	padding: 3rem 0;
	margin-bottom: 2rem;
}

.philinvest-filters {
	background: transparent;
	border: 0;
	border-radius: 0.75rem;
	padding: 1.5rem;
	box-shadow: none;
}

@media (min-width: 768px) {
	.philinvest-sticky-filters {
		position: sticky;
		top: 6rem;
	}
}

.philinvest-filters-scroll {
	max-height: calc(100vh - 12rem);
	overflow: hidden;
}

.philinvest-filters-body {
	overflow: hidden;
}

.philinvest-filter-scroll {
	max-height: 33dvh;
	overflow-y: auto;
	padding-right: 0.5rem;
}

.philinvest-filter-group .badge {
	font-size: 0.75rem;
}

.philinvest-search .form-control {
	border-radius: 0.5rem 0 0 0.5rem;
}

.philinvest-search .btn {
	border-radius: 0 0.5rem 0.5rem 0;
}

.philinvest-search-bar .form-control {
	border: 1px solid #b9b9b9;
	border-right: 0;
	border-radius: 0;
	font-style: italic;
	padding: 0.85rem 1.25rem;
}

.philinvest-search-bar .form-control:focus {
	box-shadow: none;
	border-color: #b9b9b9;
}

.philinvest-search-btn {
	background: var(--philinvest-btn);
	border: 1px solid #b9b9b9;
	border-left: 0;
	border-radius: 0;
	color: #fff;
	padding: 0 1.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.philinvest-search-btn svg {
	width: 18px;
	height: 18px;
}

.philinvest-search-btn svg path {
	stroke: #fff;
}

/* === PRODUCT CARDS === */
.philinvest-product-card {
	border: 0;
	overflow: hidden;
	text-align: center;
}

.philinvest-product-card.card {
	border: 0;
	border-radius: 0;
	gap: 1rem;
	background-color: transparent;
}

.philinvest-product-thumb {
	position: relative;
	display: block;
	text-align: center;
}

.philinvest-product-thumb img {
	max-width: 100%;
	height: auto;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.philinvest-product-card .onsale {
	position: absolute;
	top: 12px;
	left: 12px;
	background: var(--philinvest-accent);
	color: #fff;
	padding: 0.25rem 0.5rem;
	border-radius: 999px;
	font-size: 0.75rem;
}

.philinvest-price {
	color: var(--philinvest-secondary);
	font-weight: 600;
}

.philinvest-product-card .card-body {
	padding: 0;
}

.philinvest-product-card .card-body .card-title,
.philinvest-product-card .card-body .philinvest-price {
	padding: 0 1.5rem;
}

.philinvest-product-card .btn {
	font-family: var(--philinvest-display);
	border-radius: 0;
	width: 100%;
	padding: 0.9rem 1rem;
	letter-spacing: .02rem;
}

.philinvest-loading {
	opacity: 0.6;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.woocommerce-result-count {
	color: #6c757d;
	margin-bottom: 1rem;
}

.woocommerce-ordering select {
	border-radius: 0.5rem;
	border: 1px solid #dee2e6;
	padding: 0.45rem 0.75rem;
}

/* === FOOTER === */
.philinvest-footer {
	background: #f8f9fa;
	margin-top: 4rem;
}

.philinvest-footer h5 {
	color: var(--philinvest-primary);
	font-size: 0.9rem;
	letter-spacing: 0.5px;
}

.philinvest-footer .widget {
	margin-bottom: 1.5rem;
}

.philinvest-footer .widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.philinvest-footer .widget ul li {
	margin-bottom: 0.5rem;
}

.philinvest-footer .widget ul li a {
	color: #6c757d;
	text-decoration: none;
	font-size: 0.875rem;
	transition: color 0.2s ease;
}

.philinvest-footer .widget ul li a:hover {
	color: var(--philinvest-secondary);
}

.philinvest-footer a {
	color: var(--philinvest-primary);
	text-decoration: none;
	transition: color 0.2s ease;
}

.philinvest-footer a:hover {
	color: var(--philinvest-secondary);
}

.philinvest-footer-bottom {
	background: #fff;
}

.philinvest-footer-bottom a {
	color: var(--philinvest-secondary);
	font-weight: 600;
}

.philinvest-footer-bottom a:hover {
	color: var(--philinvest-primary);
}


/* === ANIMATIONS === */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fadeInDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fadeOutUp {
	from {
		opacity: 1;
		transform: translateY(0);
	}
	to {
		opacity: 0;
		transform: translateY(-20px);
	}
}

/* === UTILITIES === */
.transition-all {
	transition: all 0.3s ease;
}

.shadow-hover:hover {
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.ratio-1x1 {
	aspect-ratio: 1/1!important;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
	.philinvest-hero {
		padding: 2rem 1.5rem;
	}
	
	.philinvest-affiliation {
		padding: 1.5rem;
	}

	.wp-block-group.is-layout-grid,
	.wp-block-group.wp-block-group-is-layout-grid {
		grid-template-columns: 1fr !important;
	}
}
