/**
 * GS My Account — Cosmétiques Créatifs layout
 */

body.gs-my-account-page .woocommerce-MyAccount-navigation,
body.gs-my-account-page nav.woocommerce-MyAccount-navigation {
	display: none !important;
}

body.gs-my-account-page .woocommerce-account .woocommerce {
	max-width: 820px;
	margin-left: auto;
	margin-right: auto;
}

body.gs-my-account-page .woocommerce-MyAccount-content {
	width: 100%;
	float: none;
}

body.gs-my-account-page .entry-title,
body.gs-my-account-page .page-title {
	text-align: center;
	font-weight: 400;
	letter-spacing: 0.02em;
	margin-bottom: 2rem;
}

.gs-my-account {
	position: relative;
	font-family: inherit;
	padding: 0 1.25rem 4rem;
}

.gs-my-account::before {
	content: "";
	position: absolute;
	inset: 80px 0 0;
	background-image: url("../images/account-watermark.svg");
	background-repeat: no-repeat;
	background-position: center top;
	background-size: contain;
	opacity: 0.07;
	pointer-events: none;
	z-index: 0;
}

.gs-my-account__top-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin-bottom: 2.5rem;
}

.gs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	padding: 0.75rem 1.25rem;
	border: none;
	border-radius: 0;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
	transition: opacity 0.2s ease;
}

.gs-btn:hover {
	opacity: 0.85;
	text-decoration: none;
}

.gs-btn--light {
	background: #e8e8e8;
	color: #333;
}

.gs-btn--dark {
	background: #2b2b2b;
	color: #fff;
	max-width: 420px;
	margin: 0 auto;
}

.gs-btn--wide {
	max-width: 420px;
	margin: 0 auto;
}

.gs-btn--remove {
	background: linear-gradient(90deg, #f5b8b8 0%, #faf5f5 55%, #f5b8b8 100%);
	color: #333;
}

.gs-btn--disabled {
	opacity: 0.55;
	pointer-events: none;
}

.gs-account-form,
.gs-password-form,
.gs-section {
	position: relative;
	z-index: 1;
}

.gs-form-row {
	margin-bottom: 1.75rem;
}

.gs-form-row label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.8125rem;
	font-weight: 400;
	color: #333;
	letter-spacing: 0.01em;
}

.gs-form-grid {
	display: grid;
	gap: 1.25rem 2rem;
}

.gs-form-grid--2 {
	grid-template-columns: 1fr 1fr;
}

.gs-form-grid--buttons {
	margin-top: 1rem;
}

.gs-form-row .input-text,
.gs-form-row input[type="email"],
.gs-form-row input[type="tel"],
.gs-form-row input[type="text"],
.gs-form-row input[type="password"],
.gs-select {
	width: 100%;
	padding: 0.35rem 0;
	border: none;
	border-bottom: 1px solid #c8c8c8;
	border-radius: 0;
	background: transparent;
	font-size: 0.9375rem;
	color: #333;
	box-shadow: none;
	outline: none;
}

.gs-form-row .input-text:focus,
.gs-select:focus {
	border-bottom-color: #333;
	outline: none;
	box-shadow: none;
}

.gs-select {
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, #666 50%), linear-gradient(135deg, #666 50%, transparent 50%);
	background-position: calc(100% - 12px) calc(50% + 2px), calc(100% - 6px) calc(50% + 2px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	cursor: pointer;
}

.gs-checkboxes {
	margin: 2rem 0 2.5rem;
}

.gs-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	margin-bottom: 1rem;
	font-size: 0.6875rem;
	line-height: 1.45;
	color: #000000;
	cursor: pointer;
	font-family: inherit;
}

/* Скриваме оригиналния браузър checkbox */
.gs-checkbox input[type="checkbox"] {
	display: none !important;
}

/* Кастъмното квадратче */
.gs-checkbox__box {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	min-width: 18px;
	border: 1.5px solid #bbb;
	border-radius: 2px;
	background: #fff;
	margin-top: 1px;
	transition: background 0.15s, border-color 0.15s;
	cursor: pointer;
}

.gs-checkbox.is-checked .gs-checkbox__box {
	background: #4a7c3f;
	border-color: #4a7c3f;
}

.gs-checkbox.is-checked .gs-checkbox__box::after {
	content: '';
	display: block;
	width: 5px;
	height: 9px;
	border: 2px solid #4a7c3f;
	border-top: none;
	border-left: none;
	transform: rotate(45deg) translateY(-1px);
}

/* Премахваме ::before и ::after от label */
.gs-checkbox::before,
.gs-checkbox::after {
	display: none !important;
	content: none !important;
}



.gs-form-actions {
	text-align: center;
	margin: 2rem 0 3rem;
}

.gs-section {
	margin-bottom: 2.5rem;
	padding-top: 0.5rem;
}

.gs-section--password {
	margin-top: 1rem;
}

.gs-inline-form {
	margin: 0;
	width: 100%;
}

.gs-inline-form .gs-btn {
	width: 100%;
}

/* WooCommerce notices */
body.gs-my-account-page .woocommerce-message,
body.gs-my-account-page .woocommerce-info,
body.gs-my-account-page .woocommerce-error {
	margin-bottom: 1.5rem;
}

/* Order history — custom grid (replaces default orders table) */
body.gs-order-history-page .woocommerce-account .woocommerce {
	max-width: 1280px;
}

.gs-order-history {
	margin-top: 0.5rem;
}

.gs-order-block {
	margin-bottom: 3.5rem;
}

.gs-order-block__header {
	display: grid;
	grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
	align-items: start;
	gap: 1rem 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #e0e0e0;
	margin-bottom: 1.75rem;
}

.gs-order-block__title {
	font-size: 1rem;
	font-weight: 600;
	color: #111;
	white-space: nowrap;
}

.gs-order-block__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.25rem 1rem;
	font-size: 0.625rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #9a9a9a;
	line-height: 1.5;
	text-align: center;
}

.gs-order-block__meta-item {
	white-space: nowrap;
}

.gs-order-block__total {
	font-size: 1rem;
	font-weight: 700;
	color: #111;
	text-align: right;
	white-space: nowrap;
}

.gs-order-block__products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2rem 1.25rem;
}

.gs-product-card {
	display: flex;
	flex-direction: column;
	text-align: center;
}

.gs-product-card__image {
	background: #f2f2f2;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	margin-bottom: 1rem;
	padding: 1rem;
	box-sizing: border-box;
}

.gs-product-card__image img,
.gs-product-card__img-el {
	max-width: 100%;
	max-height: 160px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.gs-product-card__title {
	font-size: 0.9375rem;
	font-weight: 400;
	color: #222;
	line-height: 1.35;
	margin: 0 0 0.5rem;
	min-height: 2.7em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.gs-product-card__rating {
	font-size: 0.65rem;
	line-height: 1;
	margin-bottom: 0.65rem;
	letter-spacing: 0.05em;
}

.gs-product-card__star {
	color: #d0d0d0;
}

.gs-product-card__star--filled {
	color: #111;
}

.gs-product-card__excerpt {
	font-size: 0.6875rem;
	line-height: 1.45;
	color: #888;
	margin: 0 0 0.75rem;
	flex: 1 1 auto;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-align: left;
}

.gs-product-card__price {
	font-size: 1rem;
	font-weight: 700;
	color: #111;
	margin-bottom: 1rem;
}

.gs-product-card__actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.5rem;
}

.gs-product-card__add {
	display: block;
	width: 100%;
	padding: 0.65rem 0.5rem;
	background: #111;
	color: #fff !important;
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-align: center;
	text-decoration: none !important;
	border: none;
	border-radius: 0;
	box-sizing: border-box;
}

.gs-product-card__add:hover {
	opacity: 0.88;
	color: #fff !important;
}

.gs-product-card__add--disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.gs-product-card__details {
	font-size: 0.6875rem;
	color: #333;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.gs-orders-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 3rem;
	margin: 2rem 0 4rem;
	font-size: 0.8125rem;
}

.gs-orders-pagination__link {
	color: #111;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.gs-orders-pagination__link:hover {
	text-decoration: underline;
}

.gs-orders-pagination__link--disabled {
	color: #bbb;
	pointer-events: none;
}

.gs-orders-pagination__chev {
	font-weight: 600;
}

@media (max-width: 1100px) {
	.gs-order-block__products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	.gs-order-block__header {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.gs-order-block__title,
	.gs-order-block__total {
		text-align: center;
		white-space: normal;
	}

	.gs-order-block__products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.gs-order-block__products {
		grid-template-columns: 1fr;
	}

	.gs-orders-pagination {
		gap: 1.5rem;
	}
}

@media (max-width: 640px) {
	.gs-form-grid--2,
	.gs-my-account__top-actions {
		grid-template-columns: 1fr;
	}

	.gs-my-account {
		background-size: 120% auto;
		background-position: center 80px;
	}
}
