/**
 * ThalNexus Store — WooCommerce Pages
 */

/* ========== Shop Layout ========== */
.thalnexus-shop-page #main-content {
	padding-top: var(--header-height);
}

.thalnexus-shop-wrap {
	background: var(--color-bg-alt);
	min-height: calc(100vh - var(--header-height));
	padding-bottom: 80px;
}

.shop-page-hero {
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
	border-bottom: 1px solid var(--color-border);
	padding: 40px 0 32px;
	text-align: center;
}

.shop-page-hero-success {
	background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(99, 102, 241, 0.06) 100%);
}

.shop-page-title {
	font-family: var(--font-display);
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--color-text);
	margin-bottom: 8px;
}

.shop-page-subtitle {
	font-size: 1rem;
	color: var(--color-text-muted);
}

.shop-content {
	padding-top: 40px;
}

/* ========== Progress Steps ========== */
.shop-progress {
	margin-bottom: 24px;
}

.shop-progress-list {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	list-style: none;
	padding: 0;
	margin: 0;
}

.shop-progress-step {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--color-text-light);
}

.shop-progress-step .step-num {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--color-border);
	color: var(--color-text-muted);
	font-size: 0.75rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.shop-progress-step.is-active {
	color: var(--color-primary);
	font-weight: 600;
}

.shop-progress-step.is-active .step-num {
	background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
	color: #fff;
}

.shop-progress-step.is-done {
	color: var(--color-success);
}

.shop-progress-step.is-done .step-num {
	background: var(--color-success);
	color: #fff;
}

.shop-progress-step a {
	color: inherit;
	text-decoration: none;
}

.shop-progress-step a:hover {
	color: var(--color-primary);
}

.shop-progress-divider {
	width: 40px;
	height: 2px;
	background: var(--color-border);
	margin: 0 12px;
}

.shop-progress-step.is-done + .shop-progress-divider {
	background: var(--color-success);
}

/* ========== Single Product ========== */
.thalnexus-product {
	max-width: 1000px;
	margin: 0 auto;
}

.product-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: start;
}

.product-gallery-card {
	background: #fff;
	border-radius: var(--radius-xl);
	border: 1px solid var(--color-border);
	padding: 32px;
	box-shadow: var(--shadow-md);
	overflow: hidden;
}

.product-main-image {
	width: 100%;
	height: auto;
	border-radius: var(--radius-md);
}

.product-placeholder-image {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	min-height: 320px;
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
	border-radius: var(--radius-md);
	color: var(--color-primary);
}

.product-placeholder-image span {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.125rem;
}

.product-trust-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}

.trust-badge-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--color-text-muted);
	background: #fff;
	border: 1px solid var(--color-border);
	padding: 10px 14px;
	border-radius: var(--radius-full);
}

.trust-badge-item svg {
	color: var(--color-primary);
	flex-shrink: 0;
}

.product-summary-card {
	background: #fff;
	border-radius: var(--radius-xl);
	border: 1px solid var(--color-border);
	padding: 40px;
	box-shadow: var(--shadow-lg);
}

.product-badge {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-primary);
	background: rgba(99, 102, 241, 0.1);
	padding: 6px 12px;
	border-radius: var(--radius-full);
	margin-bottom: 16px;
}

.product-title {
	font-family: var(--font-display);
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 800;
	line-height: 1.2;
	margin-bottom: 16px;
	letter-spacing: -0.02em;
}

.product-price {
	margin-bottom: 20px;
}

.product-price .woocommerce-Price-amount,
.product-price > .amount {
	font-family: var(--font-display);
	font-size: 2.5rem;
	font-weight: 800;
	color: var(--color-text);
}

.product-price .price-note {
	display: block;
	font-size: 0.875rem;
	color: var(--color-text-muted);
	font-weight: 400;
	margin-top: 4px;
}

.product-short-desc {
	font-size: 1rem;
	color: var(--color-text-muted);
	line-height: 1.7;
	margin-bottom: 24px;
}

.product-features-list {
	margin-bottom: 28px;
}

.product-features-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	font-size: 0.9375rem;
	color: var(--color-text);
	border-bottom: 1px solid var(--color-border);
}

.product-features-list li:last-child {
	border-bottom: none;
}

.product-features-list svg {
	color: var(--color-success);
	flex-shrink: 0;
}

.product-actions {
	margin-bottom: 16px;
}

.product-actions form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: stretch;
}

.product-actions .quantity {
	display: flex;
	align-items: center;
}

.product-actions .quantity input.qty {
	width: 70px;
	padding: 14px 12px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	font-size: 1rem;
	font-weight: 600;
	text-align: center;
}

.product-actions .single_add_to_cart_button,
.product-actions button[type="submit"] {
	flex: 1;
	min-width: 200px;
	background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%) !important;
	color: #fff !important;
	border: none !important;
	padding: 16px 32px !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	border-radius: var(--radius-md) !important;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
	font-family: var(--font-sans) !important;
}

.product-actions .single_add_to_cart_button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.product-guarantee {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8125rem;
	color: var(--color-text-muted);
}

.product-guarantee svg {
	color: var(--color-success);
}

.product-description-card {
	margin-top: 48px;
	background: #fff;
	border-radius: var(--radius-xl);
	border: 1px solid var(--color-border);
	padding: 40px;
	box-shadow: var(--shadow-sm);
}

.product-description-card h2 {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 20px;
}

.product-description-content {
	font-size: 0.9375rem;
	color: var(--color-text-muted);
	line-height: 1.8;
}

/* ========== Cart Page ========== */
.cart-layout {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 32px;
	align-items: start;
}

.cart-items-card,
.cart_totals {
	background: #fff;
	border-radius: var(--radius-xl);
	border: 1px solid var(--color-border);
	padding: 32px;
	box-shadow: var(--shadow-md);
}

.cart-card-title {
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--color-border);
}

.thalnexus-cart-form table.shop_table {
	width: 100%;
	border-collapse: collapse;
}

.thalnexus-cart-form table.shop_table thead th {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-text-muted);
	padding: 12px 8px;
	border-bottom: 1px solid var(--color-border);
	text-align: left;
}

.thalnexus-cart-form table.shop_table td {
	padding: 20px 8px;
	border-bottom: 1px solid var(--color-border);
	vertical-align: middle;
}

.thalnexus-cart-form .product-thumbnail img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: var(--radius-sm);
}

.thalnexus-cart-form .product-name a {
	font-weight: 600;
	color: var(--color-text);
}

.thalnexus-cart-form .product-remove a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(239, 68, 68, 0.1);
	color: var(--color-danger) !important;
	font-size: 1.25rem;
	line-height: 1;
	text-decoration: none;
}

.thalnexus-cart-form .product-remove a:hover {
	background: var(--color-danger);
	color: #fff !important;
}

.thalnexus-cart-form .actions {
	padding-top: 20px !important;
}

.thalnexus-cart-form .coupon {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.thalnexus-cart-form .coupon input {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
}

.cart_totals table {
	width: 100%;
}

.cart_totals table th,
.cart_totals table td {
	padding: 12px 0;
	font-size: 0.9375rem;
	border-bottom: 1px solid var(--color-border);
}

.cart_totals .order-total th,
.cart_totals .order-total td {
	font-size: 1.25rem;
	font-weight: 700;
	border-bottom: none;
	padding-top: 16px;
}

.wc-proceed-to-checkout {
	margin-top: 24px;
}

.wc-proceed-to-checkout .checkout-button,
.wc-proceed-to-checkout a.checkout-button {
	display: block !important;
	width: 100%;
	text-align: center;
	background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%) !important;
	color: #fff !important;
	padding: 16px 24px !important;
	border-radius: var(--radius-md) !important;
	font-weight: 600 !important;
	font-size: 1rem !important;
	text-decoration: none !important;
	border: none !important;
	transition: all 0.2s ease;
	box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.wc-proceed-to-checkout .checkout-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
	color: #fff !important;
}

.cart-trust-note {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	font-size: 0.8125rem;
	color: var(--color-text-muted);
	justify-content: center;
}

.cart-trust-note svg {
	color: var(--color-success);
	flex-shrink: 0;
}

/* Empty cart */
.woocommerce-cart .cart-empty {
	text-align: center;
	padding: 60px 20px;
	background: #fff;
	border-radius: var(--radius-xl);
	border: 1px solid var(--color-border);
}

.woocommerce-cart .return-to-shop .button {
	background: linear-gradient(135deg, var(--color-primary), var(--color-accent)) !important;
	color: #fff !important;
	padding: 14px 28px !important;
	border-radius: var(--radius-md) !important;
	font-weight: 600 !important;
	margin-top: 16px;
}

/* ========== Checkout Page ========== */
.checkout-layout {
	display: grid;
	grid-template-columns: 1fr 420px;
	gap: 32px;
	align-items: start;
}

.checkout-layout-single {
	grid-template-columns: minmax(0, 480px);
	justify-content: center;
	max-width: 480px;
	margin: 0 auto;
}

.checkout-email-section {
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--color-border);
}

.checkout-section-title {
	font-family: var(--font-display);
	font-size: 1rem;
	font-weight: 700;
	margin-bottom: 6px;
	color: var(--color-text);
}

.checkout-card {
	background: #fff;
	border-radius: var(--radius-xl);
	border: 1px solid var(--color-border);
	padding: 32px;
	box-shadow: var(--shadow-md);
	margin-bottom: 24px;
}

.checkout-card-title {
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 12px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--color-border);
}

.checkout-card-desc {
	font-size: 0.9375rem;
	color: var(--color-text-muted);
	margin: -8px 0 20px;
}

.checkout-fields .woocommerce-billing-fields > h3 {
	display: none;
}

.checkout-fields .form-row {
	margin-bottom: 16px;
}

.checkout-fields label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--color-text);
	margin-bottom: 6px;
	display: block;
}

.checkout-fields input.input-text,
.checkout-fields select,
.checkout-fields textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-size: 0.9375rem;
	font-family: var(--font-sans);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.checkout-fields input.input-text:focus,
.checkout-fields select:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.checkout-order-card {
	position: sticky;
	top: calc(var(--header-height) + 24px);
}

.woocommerce-checkout-review-order-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
	padding: 12px 0;
	font-size: 0.9375rem;
	border-bottom: 1px solid var(--color-border);
}

.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
	font-size: 1.125rem;
	font-weight: 700;
	border-bottom: none;
}

#payment {
	background: var(--color-bg-alt);
	border-radius: var(--radius-md);
	padding: 20px;
	margin-top: 16px;
}

#payment .wc_payment_methods {
	list-style: none;
	padding: 0;
	margin: 0 0 16px;
}

#payment .wc_payment_method {
	padding: 10px 0;
	border-bottom: 1px solid var(--color-border);
}

#payment .payment_box {
	background: #fff;
	padding: 16px;
	border-radius: var(--radius-sm);
	margin-top: 8px;
	font-size: 0.875rem;
	border: 1px solid var(--color-border);
}

#place_order {
	width: 100%;
	background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%) !important;
	color: #fff !important;
	border: none !important;
	padding: 16px 32px !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	border-radius: var(--radius-md) !important;
	cursor: pointer;
	transition: all 0.2s;
	box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
	font-family: var(--font-sans) !important;
	margin-top: 8px;
}

#place_order:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* Compact privacy / terms text inside order card */
.woocommerce-checkout .woocommerce-privacy-policy-text,
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
	font-size: 0.8125rem;
	color: var(--color-text-muted);
	margin: 12px 0 0;
	line-height: 1.5;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 0.8125rem;
}

/* Hide login/coupon toggles */
.woocommerce-form-login-toggle,
.woocommerce-form-coupon-toggle,
.checkout_coupon,
.woocommerce-form-login {
	display: none !important;
}

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	padding: 14px 18px;
	border-radius: var(--radius-sm);
	margin-bottom: 20px;
	font-size: 0.9375rem;
	list-style: none;
}

.woocommerce-message {
	background: rgba(34, 197, 94, 0.1);
	border-left: 4px solid var(--color-success);
}

.woocommerce-info {
	background: rgba(99, 102, 241, 0.08);
	border-left: 4px solid var(--color-primary);
}

.woocommerce-error {
	background: rgba(239, 68, 68, 0.1);
	border-left: 4px solid var(--color-danger);
}

/* ========== Thank You Page ========== */
.thalnexus-download-banner {
	background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
	border: 1px solid rgba(34, 197, 94, 0.3);
	border-radius: var(--radius-lg);
	padding: 32px;
	text-align: center;
	margin-bottom: 32px;
}

.thalnexus-download-banner h2 {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--color-success);
	margin-bottom: 8px;
}

.thalnexus-download-banner p {
	color: var(--color-text-muted);
	font-size: 0.9375rem;
}

.woocommerce-thankyou-order-received {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 800;
	text-align: center;
	margin-bottom: 32px;
}

.woocommerce-order-details,
.woocommerce-customer-details,
.woocommerce-downloads {
	background: #fff;
	border-radius: var(--radius-xl);
	border: 1px solid var(--color-border);
	padding: 32px;
	margin-bottom: 24px;
	box-shadow: var(--shadow-sm);
}

.woocommerce-downloads .download-file a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
	color: #fff !important;
	padding: 14px 28px;
	border-radius: var(--radius-md);
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
	transition: transform 0.2s;
}

.woocommerce-downloads .download-file a:hover {
	transform: translateY(-2px);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
	.product-layout,
	.cart-layout,
	.checkout-layout {
		grid-template-columns: 1fr;
	}

	.checkout-order-card {
		position: static;
	}
}

@media (max-width: 768px) {
	.thalnexus-cart-form table.shop_table thead {
		display: none;
	}

	.thalnexus-cart-form table.shop_table tr {
		display: block;
		margin-bottom: 20px;
		padding-bottom: 20px;
		border-bottom: 1px solid var(--color-border);
	}

	.thalnexus-cart-form table.shop_table td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 8px 0;
		border: none;
	}

	.thalnexus-cart-form table.shop_table td::before {
		content: attr(data-title);
		font-weight: 600;
		font-size: 0.75rem;
		text-transform: uppercase;
		color: var(--color-text-muted);
	}

	.product-summary-card,
	.cart-items-card,
	.cart_totals,
	.checkout-card {
		padding: 24px;
	}

	.shop-progress-list {
		flex-wrap: wrap;
		gap: 8px;
	}

	.shop-progress-divider {
		display: none;
	}
}
