/*
Theme Name: Nasekarty Child Theme
Theme URI: https://nasekarty.com/
Description: Nasekarty child theme based on Twenty Twenty-Four with custom product designer functionality.
Author: Nasekarty Team
Author URI: https://nasekarty.com/
Template: twentytwentyfour
Version: 1.0.0
Text Domain: nasekarty-theme
*/

/* Reset and Base Styles */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	line-height: 1.6;
	color: #333;
	background-color: #fff;
}

/* Typography - Force Inter font on all headings */
h1, h2, h3, h4, h5, h6 {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
	font-weight: 600;
	line-height: 1.2;
	margin-bottom: 1rem;
}

/* Override WordPress theme fonts */
.wp-block-heading,
.entry-title,
.site-title,
article h1,
article h2,
article h3,
article h4,
article h5,
article h6 {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* WooCommerce Support */
.woocommerce {
	font-family: 'Inter', sans-serif;
}

.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button {
	background-color: #3b82f6;
	color: white;
	border: none;
	padding: 12px 24px;
	border-radius: 8px;
	font-weight: 500;
	transition: background-color 0.3s ease;
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
	background-color: #2563eb;
}

/* Product Designer Specific Styles - Wireframe Aligned */
.configurator-container {
	background-color: #ffffff;
	border-radius: 16px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
	width: 100%;
	max-width: 1000px;
	display: flex;
	flex-direction: column;
	min-height: 600px;
	overflow: hidden;
	margin: 0 auto;
}

.configurator-content {
	flex-grow: 1;
	padding: 32px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

/* Theme integration for pages with configurator */
body.has-configurator {
	font-family: 'Inter', sans-serif;
}

/* Ensure configurator works well within theme content */
.has-configurator .npd-configurator-wrapper {
	margin: 1rem auto;
}

/* Wide template specific overrides */
.wp-block-group.alignfull .npd-configurator-wrapper {
	max-width: none;
	width: 100%;
	margin: 1rem 0;
}

.card-design, .npd-design-card {
	position: relative;
	width: 320px;
	height: auto;
	border-radius: 16px;
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
	background: white;
	display: flex;
	flex-direction: column;
	transform-style: preserve-3d;
	perspective: 1000px;
}

.card-design:hover {
	transform: translateY(-10px) scale(1.03);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.card-design img {
	position: relative;
	width: 320px;
	height: 320px;
	backface-visibility: hidden;
	transition: transform 0.6s;
	border-radius: 16px 16px 0 0;
	object-fit: contain;
	display: block;
}

.card-front {
	transform: rotateY(0deg);
}

.card-back {
	transform: rotateY(180deg);
}

.card-design.flipped .card-front {
	transform: rotateY(-180deg);
}

.card-design.flipped .card-back {
	transform: rotateY(0deg);
}

.upload-box {
	border: 3px dashed #cbd5e1;
	background-color: #f8fafc;
	border-radius: 12px;
	padding: 40px;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.upload-box:hover {
	background-color: #eff6ff;
	border-color: #93c5fd;
}

/* Step 4: Card Configuration Grid - CSS Grid Layout (for many small items) */
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 16px;
	width: 100%;
	max-width: 900px;
	margin-top: 20px;
}

.card-item {
	position: relative;
	width: 120px;
	height: 180px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
	background-color: #f8fafc;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.card-printing-area {
	position: relative;
	width: calc(100% - 16px);
	height: calc(100% - 16px);
	margin: 8px;
	border: 1px dashed #ccc;
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: hidden;
}

.card-image-content {
	position: absolute;
	width: 100%;
	height: 100%;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	cursor: grab;
	transition: border 0.1s ease-in-out;
}

.card-image-content.active-drag {
	border: 2px solid #3b82f6;
}

.image-overlay-controls {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.4);
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.card-item:hover .image-overlay-controls {
	opacity: 1;
	pointer-events: auto;
}

.image-overlay-controls .control-button {
	background-color: rgba(0, 0, 0, 0.7);
	color: white;
	border-radius: 50%;
	padding: 8px;
	margin: 4px;
	cursor: pointer;
	transition: background-color 0.2s;
	display: flex;
	justify-content: center;
	align-items: center;
	pointer-events: auto;
}

.image-overlay-controls .control-button:hover {
	background-color: rgba(0, 0, 0, 0.9);
}

.resize-handle {
	position: absolute;
	width: 16px;
	height: 16px;
	background-color: #3b82f6;
	border: 1px solid #ffffff;
	border-radius: 4px;
	cursor: nwse-resize;
	bottom: -8px;
	right: -8px;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: auto;
}

.card-item:hover .resize-handle {
	opacity: 1;
}

.upload-icon-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
	cursor: pointer;
	transition: color 0.2s;
}

.upload-icon-placeholder:hover {
	color: #64748b;
}

.footer-navigation {
	border-top: 1px solid #e2e8f0;
	padding: 20px 32px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: #f8fafc;
	border-bottom-left-radius: 16px;
	border-bottom-right-radius: 16px;
}

/* Font previews specific styles */
.font-option {
	padding: 12px 20px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: center;
	font-size: 1.1rem;
	min-width: 120px;
}

.font-option:hover {
	background-color: #f0f2f5;
	border-color: #cbd5e1;
}

.font-option.selected {
	background-color: #e0e7ff;
	border-color: #60a5fa;
	box-shadow: 0 0 0 2px #93c5fd;
}

/* Utility Classes */
.hidden {
	display: none !important;
}

.current-step {
	display: flex !important;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet Landscape and smaller */
@media (max-width: 991px) {
	.card-design, .npd-design-card {
		width: 280px;
		height: auto;
	}

	.card-design img {
		width: 280px;
		height: 280px;
	}
}

/* Mobile Landscape */
@media (max-width: 767px) {
	.configurator-container {
		margin: 10px;
		border-radius: 12px;
	}

	.configurator-content {
		padding: 20px;
	}

	.card-design, .npd-design-card {
		width: 240px;
		height: auto;
	}

	.card-design img {
		width: 240px;
		height: 240px;
	}

	.card-grid {
		grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
		gap: 12px;
	}

	.card-item {
		width: 100px;
		height: 150px;
	}
}

/* Mobile Portrait */
@media (max-width: 575px) {
	.configurator-container {
		margin: 5px;
		border-radius: 8px;
	}

	.configurator-content {
		padding: 15px;
	}

	.card-design, .npd-design-card {
		width: 100%;
		max-width: 300px;
		height: auto;
	}

	.card-design img {
		width: 100%;
		height: 300px;
		max-width: 300px;
	}

	.card-grid {
		grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
		gap: 8px;
	}

	.card-item {
		width: 80px;
		height: 120px;
	}
}
