/* =============================================== */
/* XFormula Shop - Components Styles */
/* =============================================== */

/* ------------------- Page Loader ---------------------*/
.page-loader {
	position: fixed;
	inset: 0;
	background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 24px;
	transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.loader-spinner {
	width: 60px;
	height: 60px;
	border: 4px solid rgba(255, 107, 53, 0.2);
	border-top-color: #ff6b35;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

.loader-text {
	color: rgba(255, 255, 255, 0.8);
	font-size: 16px;
	font-weight: 600;
}

/* ------------------- Cart Icon ---------------------*/
.cart-icon {
	position: fixed;
	bottom: 30px;
	right: 30px;
	width: 64px;
	height: 64px;
	background: linear-gradient(135deg, #ff6b35, #ff8a4b);
	border-radius: 50%;
	border: none;
	box-shadow: 0 8px 32px rgba(255, 107, 53, 0.4);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	z-index: 999;
}

.cart-icon:hover {
	transform: scale(1.1);
	box-shadow: 0 12px 40px rgba(255, 107, 53, 0.6);
}

.cart-icon svg {
	width: 28px;
	height: 28px;
	fill: #fff;
}

.cart-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #ff3838;
	color: #fff;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #0d0d0d;
}

/* ------------------- Cart Modal ---------------------*/
.cart-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
	backdrop-filter: blur(8px);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 2001;
	padding: 20px;
	overflow-y: auto;
}

.cart-modal.active {
	display: flex;
	animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.cart-content {
	background: linear-gradient(160deg, rgba(25, 25, 25, 0.98), rgba(20, 20, 20, 0.95));
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 24px;
	max-width: 600px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	overflow-x: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
	position: relative;
	animation: modalSlideUp 0.4s ease;
}

@keyframes modalSlideUp {
	from { 
		opacity: 0;
		transform: translateY(30px) scale(0.95);
	}
	to { 
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.cart-header {
	padding: 24px 30px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.cart-header h2 {
	margin: 0;
	font-size: 24px;
	color: #fff;
}

.cart-close {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.cart-close:hover {
	background: rgba(255, 107, 53, 0.2);
	border-color: rgba(255, 107, 53, 0.4);
	transform: rotate(90deg);
}

.cart-body {
	padding: 20px 30px;
	max-height: 400px;
	overflow-y: auto;
}

.cart-empty {
	text-align: center;
	padding: 40px 20px;
	color: rgba(255, 255, 255, 0.5);
	font-size: 16px;
}

.cart-item {
	display: flex;
	gap: 16px;
	padding: 16px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	margin-bottom: 12px;
	position: relative;
}

.cart-item-image {
	width: 80px;
	height: 80px;
	border-radius: 8px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.04);
	flex-shrink: 0;
}

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

.cart-item-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cart-item-name {
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	margin: 0;
}

.cart-item-price {
	font-size: 18px;
	font-weight: 700;
	color: #ffb58a;
	margin: 0;
}

.cart-item-controls {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
}

.cart-item-qty {
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 8px;
	padding: 4px 8px;
}

.cart-item-qty button {
	width: 24px;
	height: 24px;
	border: none;
	background: rgba(255, 107, 53, 0.3);
	color: #fff;
	border-radius: 4px;
	cursor: pointer;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.cart-item-qty button:hover {
	background: rgba(255, 107, 53, 0.5);
}

.cart-item-qty span {
	color: #fff;
	font-weight: 600;
	min-width: 20px;
	text-align: center;
}

.cart-item-remove {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 28px;
	height: 28px;
	border: none;
	background: rgba(255, 56, 56, 0.2);
	border-radius: 6px;
	color: #ff6b6b;
	cursor: pointer;
	font-size: 18px;
	transition: all 0.2s ease;
}

.cart-item-remove:hover {
	background: rgba(255, 56, 56, 0.4);
}

.cart-footer {
	padding: 20px 30px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
	font-size: 20px;
	font-weight: 700;
	color: #fff;
}

.cart-total-price {
	color: #ffb58a;
	font-size: 24px;
}

.cart-checkout {
	width: 100%;
	padding: 14px;
	background: linear-gradient(135deg, #ff6b35, #ff8a4b);
	border: none;
	border-radius: 12px;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.3s ease;
}

.cart-checkout:hover {
	box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
	transform: translateY(-2px);
}

/* ------------------- Order Form ---------------------*/
.order-form-wrapper {
	padding: 20px 30px;
	display: none;
}

.order-form-wrapper.active {
	display: block;
}

.order-form {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.form-group label {
	color: #ff9051;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
}

.form-group input,
.form-group textarea,
.form-group select {
	background: rgba(255, 255, 255, 0.04);
	border: 2px solid rgba(255, 107, 53, 0.2);
	border-radius: 12px;
	padding: 14px 18px;
	color: #ffffff;
	font-size: 16px;
	font-family: inherit;
	transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
	outline: none;
	border-color: #ff6b35;
	background: rgba(255, 107, 53, 0.08);
	box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15);
}

.form-group textarea {
	resize: vertical;
	min-height: 140px;
	line-height: 1.6;
}

.form-group select {
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ff6b35' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 18px center;
	padding-right: 45px;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

@media (max-width: 768px) {
	.form-row {
		grid-template-columns: 1fr;
		gap: 24px;
	}
}

.form-actions {
	display: flex;
	gap: 16px;
	margin-top: 12px;
}

.form-actions button {
	flex: 1;
	padding: 16px 24px;
	border: none;
	border-radius: 14px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.form-submit {
	background: linear-gradient(135deg, #ff6b35, #ff8851);
	color: #fff;
	box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
}

.form-submit:hover {
	box-shadow: 0 8px 28px rgba(255, 107, 53, 0.5);
	transform: translateY(-2px);
	background: linear-gradient(135deg, #ff8851, #ff6b35);
}

.form-submit svg {
	width: 20px;
	height: 20px;
}

.form-cancel {
	background: transparent;
	color: rgba(255, 255, 255, 0.7);
	border: 2px solid rgba(255, 255, 255, 0.15);
}

.form-cancel:hover {
	background: rgba(255, 255, 255, 0.05);
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.3);
}

.form-success {
	text-align: center;
	padding: 50px 30px;
	background: rgba(107, 212, 107, 0.1);
	border: 2px solid rgba(107, 212, 107, 0.3);
	border-radius: 16px;
	display: none;
	animation: successFadeIn 0.5s ease;
}

.form-success.active {
	display: block;
}

.form-success-icon {
	margin: 0 auto 20px;
	width: 80px;
	height: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(107, 212, 107, 0.15);
	border-radius: 50%;
	animation: successBounce 0.6s ease;
}

.form-success-icon svg {
	width: 48px;
	height: 48px;
	color: #6bd46b;
}

.form-success h4 {
	font-size: 24px;
	color: #6bd46b;
	margin: 0 0 12px 0;
	font-weight: 700;
}

.form-success p {
	font-size: 16px;
	color: rgba(255, 255, 255, 0.8);
	margin: 0;
	line-height: 1.6;
}

@keyframes successFadeIn {
	from { opacity: 0; transform: scale(0.9); }
	to { opacity: 1; transform: scale(1); }
}

@keyframes successBounce {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.1); }
}

/* ------------------- Product Modal ---------------------*/
.product-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	backdrop-filter: blur(8px);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 2000;
	padding: 20px;
	overflow-y: auto;
}

.product-modal.active {
	display: flex;
	animation: modalFadeIn 0.3s ease;
}

.modal-content {
	background: linear-gradient(160deg, rgba(25, 25, 25, 0.98), rgba(20, 20, 20, 0.95));
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 24px;
	max-width: 900px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	overflow-x: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
	position: relative;
	animation: modalSlideUp 0.4s ease;
}

.modal-close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	z-index: 10;
}

.modal-close:hover {
	background: rgba(255, 107, 53, 0.2);
	border-color: rgba(255, 107, 53, 0.4);
	transform: rotate(90deg);
}

.modal-body {
	padding: 30px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
}

.modal-gallery {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.modal-main-image {
	width: 100%;
	height: 400px;
	border-radius: 18px;
	overflow: hidden;
	background: radial-gradient(circle at 30% 30%, rgba(255,107,53,0.15), rgba(255,255,255,0.03));
	border: 1px solid rgba(255, 255, 255, 0.08);
	position: relative;
}

.modal-main-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.modal-main-image:hover img {
	transform: scale(1.05);
}

.modal-main-image.no-img {
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.5);
	font-size: 18px;
	font-weight: 600;
}

.modal-thumbnails {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.modal-thumb {
	width: 80px;
	height: 80px;
	border-radius: 12px;
	overflow: hidden;
	border: 2px solid transparent;
	cursor: pointer;
	transition: all 0.3s ease;
	background: rgba(255, 255, 255, 0.04);
}

.modal-thumb:hover,
.modal-thumb.active {
	border-color: rgba(255, 107, 53, 0.6);
	box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.modal-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.modal-info {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.modal-header {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.modal-category {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(255, 107, 53, 0.18);
	border: 1px solid rgba(255, 107, 53, 0.35);
	color: #ffd9c3;
	font-size: 13px;
	font-weight: 600;
	width: fit-content;
}

.modal-title {
	font-size: 28px;
	margin: 0;
	color: #fff;
	line-height: 1.3;
}

.modal-sku {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.6);
	margin: 0;
}

.modal-price {
	font-size: 32px;
	font-weight: 800;
	color: #ffb58a;
	margin: 0;
}

.modal-description {
	font-size: 16px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
}

.modal-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.modal-tag {
	padding: 6px 12px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 12px;
	color: rgba(255, 255, 255, 0.8);
}

.modal-actions {
	display: flex;
	gap: 12px;
	margin-top: auto;
}

.modal-actions .xf-btn {
	flex: 1;
	padding: 14px 20px;
	font-size: 15px;
}



