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

:root {
	--primary-color: #000;
	--secondary-color: #fff;
	--accent-color: #333;
	--success-color: #10b981;
	--error-color: #ef4444;
	--border-radius: 12px;
	--shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
	font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
	line-height: 1.6;
	color: var(--primary-color);
	background: linear-gradient(135deg, #3e44dd 0%, #1c0957 100%);
	min-height: 100vh;
}

#back-text {
	width: 100%;
	min-height: 80px;
	padding: 0.75rem;
	font-size: 1rem;
	border: 2px solid #aaa;
	border-radius: 10px;
	background: #f9f9f9;
	box-sizing: border-box;
	transition: border-color 0.2s;
}

#back-text:focus {
	outline: none;
	border-color: #10b981;
	background: #fff;
}

#processing-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.9);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	font-family: sans-serif;
	font-size: 1.2rem;
	color: #333;
	visibility: hidden;
}

#processing-overlay.active {
	visibility: visible;
}

.spinner {
	border: 4px solid #f3f3f3;
	border-top: 4px solid #10b981;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
	margin-bottom: 1rem;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* CSS Module: Layout Components */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.header {
	display: flex;
	flex-wrap: wrap;
	background: var(--secondary-color);
	box-shadow: var(--shadow);
	position: sticky;
	top: 0;
	z-index: 100;
}

.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 0;
}

.logo {
	font-size: 1.5rem;
	font-weight: bold;
	color: var(--primary-color);
}
.logo img {
	width: 35%;
}
.rkLogo {
	display: flex;
	justify-content: center;
	max-width: 60%;
	margin: 0 2rem 0 2rem;
}
.rkLogo img {
	width: 90%;
}
.cart-icon {
	position: relative;
	cursor: pointer;
	padding: 0.5rem;
	border: 2px solid var(--primary-color);
	border-radius: var(--border-radius);
	transition: var(--transition);
}

.cart-icon:hover {
	background: var(--primary-color);
	color: var(--secondary-color);
}

.cart-count {
	position: absolute;
	top: -8px;
	right: -8px;
	background: var(--error-color);
	color: var(--secondary-color);
	border-radius: 50%;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8rem;
	font-weight: bold;
}

/* CSS Module: Product Display */
.product-section {
	background: var(--secondary-color);
	padding: 4rem 1rem;
	margin: 2rem 0;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow);
}

.product-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
	align-items: start;
}

.product-image {
	background: white;
	border-radius: var(--border-radius);
	padding: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 400px;
	position: relative;
	overflow: hidden;
}

.product-image::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.1) 50%, transparent 55%);
	animation: shimmer 3s infinite;
}
.product-image img {
	width: 100%;
}
@keyframes shimmer {
	0% {
		transform: translateX(-100%);
	}

	100% {
		transform: translateX(200%);
	}
}

.tshirt-design {
	color: var(--secondary-color);
	font-size: 3rem;
	font-weight: bold;
	text-align: center;
	position: relative;
	z-index: 2;
}

.tshirt-design img {
	width: 100%;
}

.product-info h1 {
	font-size: 1.6rem;
	margin-bottom: 1rem;
	background: linear-gradient(135deg, #667eea, #764ba2);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.product-info .price {
	font-size: 2rem;
	font-weight: bold;
	color: var(--success-color);
	margin-bottom: 2rem;
}

/* CSS Module: Product Options */
.product-options {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.option-group {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.option-group label {
	font-weight: 600;
	color: var(--accent-color);
}

.size-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 1rem;
}

.size-option {
	padding: 1rem;
	text-align: center;
	border: 2px solid #ddd;
	border-radius: var(--border-radius);
	cursor: pointer;
	transition: var(--transition);
	position: relative;
	background: var(--secondary-color);
	font-weight: 500;
}

.size-option:hover {
	border-color: var(--success-color);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Changed from .selected to .active to match JS */
.size-option.active {
	border-color: var(--success-color);
	background: var(--success-color);
	color: var(--secondary-color);
	font-weight: bold;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
	max-width: 50%;
	margin-top: 1rem;
}

.size-option.active::after {
	content: "✓";
	position: absolute;
	top: 5px;
	right: 8px;
	font-weight: bold;
	font-size: 1.2rem;
}

/* CSS Module: Quantity Control */
.quantity-control {
	display: flex;
	align-items: center;
	gap: 1rem;
	max-width: 150px;
}

.quantity-btn {
	width: 36px;
	height: 36px;
	border: 2px solid var(--primary-color);
	background: var(--secondary-color);
	border-radius: 50%;
	cursor: pointer;
	font-size: 1.2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--transition);
}

.quantity-btn:hover {
	background: var(--primary-color);
	color: var(--secondary-color);
}

.quantity-input {
	width: 60px;
	text-align: center;
	padding: 0.5rem;
	border: 2px solid #ddd;
	border-radius: var(--border-radius);
	font-size: 1rem;
}
/* Square Card Container States */
#card-container {
	min-height: 50px;
	transition: all 0.2s ease;
}

#card-container.card-focused {
	box-shadow: 0 0 0 2px #10b981;
	border-radius: 6px;
}

#card-container.card-error {
	box-shadow: 0 0 0 2px #ef4444;
	border-radius: 6px;
}

/* Square loading spinner animation */
@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Payment button states */
.payment-button:disabled {
	background: #9ca3af !important;
	cursor: not-allowed !important;
}
/* CSS Module: Buttons */
.add-to-cart-btn {
	padding: 1.2rem 2.5rem;
	background: var(--success-color);
	color: var(--secondary-color);
	border: none;
	border-radius: var(--border-radius);
	font-size: 1.2rem;
	font-weight: bold;
	cursor: pointer;
	transition: var(--transition);
	text-transform: uppercase;
	letter-spacing: 1px;
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
	margin-top: 1rem;
}

.add-to-cart-btn:hover {
	background: #059669;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.add-to-cart-btn:active {
	transform: translateY(0);
}

/* CSS Module: Cart Sidebar */
.cart-sidebar {
	position: fixed;
	right: -400px;
	top: 0;
	width: 400px;
	height: 100%;
	background: var(--secondary-color);
	box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
	transition: right 0.3s ease;
	z-index: 1000;
	display: flex;
	flex-direction: column;
}

.cart-sidebar.open {
	right: 0;
}

.cart-header {
	padding: 1.5rem;
	border-bottom: 1px solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.close-cart {
	background: none;
	border: none;
	font-size: 2rem;
	cursor: pointer;
	color: var(--accent-color);
}

.cart-items {
	flex: 1;
	overflow-y: auto;
	padding: 1rem;
}

.cart-item {
	display: flex;
	justify-content: space-between;
	padding: 1rem;
	border-bottom: 1px solid #eee;
	margin-bottom: 0.5rem;
}

.cart-item-info {
	flex: 1;
}

.cart-item-controls {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
}

.cart-total {
	padding: 1.5rem;
	border-top: 2px solid #eee;
}

.cart-item-thumb img {
	width: 100px;
	height: auto;
	border-radius: 4px;
	object-fit: cover;
	padding: 4px;
}

.cart-item-info {
	flex: 1;
}

.cart-item-remove {
	background: none;
	border: none;
	font-size: 1.2rem;
	cursor: pointer;
}
.total-row {
	display: flex;
	justify-content: space-between;
	margin-bottom: 0.75rem;
	font-size: 1.1rem;
}

.total-row.final {
	font-size: 1.4rem;
	font-weight: bold;
	border-top: 2px solid #eee;
	padding-top: 0.75rem;
}

.checkout-btn {
	width: 100%;
	padding: 1.2rem;
	background: var(--primary-color);
	color: var(--secondary-color);
	border: none;
	border-radius: var(--border-radius);
	font-size: 1.1rem;
	font-weight: bold;
	cursor: pointer;
	transition: var(--transition);
	margin-top: 1rem;
}

.checkout-btn:hover {
	background: var(--accent-color);
}

/* CSS Module: Modal */
.modal-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 2000;
	align-items: center;
	justify-content: center;
}

.modal-overlay.show {
	display: flex;
}

.modal {
	background: var(--secondary-color);
	padding: 2rem;
	border-radius: var(--border-radius);
	max-width: 600px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
}

.modal-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: none;
	border: none;
	font-size: 2rem;
	cursor: pointer;
	color: var(--accent-color);
}

/* CSS Module: Forms */
.checkout-form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}
/* Cart Item Quantity Controls */
.cart-item-quantity {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.5rem 0;
}

.qty-btn {
	width: 28px;
	height: 28px;
	border: 1px solid #ccc;
	background: #f9fafb;
	border-radius: 6px;
	font-size: 1.1rem;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	color: #333;
	padding: 0;
	line-height: 1;
}

.qty-btn:hover:not(:disabled) {
	background: #10b981;
	border-color: #10b981;
	color: #fff;
}

.qty-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.qty-value {
	min-width: 24px;
	text-align: center;
	font-weight: 600;
	font-size: 1rem;
}

/* Updated cart item price display */
.cart-item-price {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.cart-item-price .unit-price {
	font-size: 0.8rem;
	color: #666;
}

.cart-item-price .line-total {
	font-size: 1rem;
	font-weight: 600;
	color: #10b981;
}

/* Cart item backtext styling */
.cart-item-backtext {
	font-size: 0.85rem;
	color: #666;
	font-style: italic;
	margin-top: 0.25rem;
}
/* Cart icon animation */
#cart-toggle {
	transition: transform 0.3s ease;
}

#cart-toggle:hover {
	transform: scale(1.05);
}

/* Cart count badge pulse animation */
.cart-count {
	transition: all 0.3s ease;
}

.cart-count.pulse-animation {
	animation: pulse-badge 0.6s ease-in-out infinite;
}

@keyframes pulse-badge {
	0%,
	100% {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
	}
	50% {
		transform: scale(1.2);
		box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
	}
}

/* Cart count badge glow when has items */
.cart-count.has-items {
	background: #ef4444;
	animation: glow-badge 2s ease-in-out infinite;
}

@keyframes glow-badge {
	0%,
	100% {
		box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
	}
	50% {
		box-shadow: 0 0 15px rgba(239, 68, 68, 0.8);
	}
}

/* Welcome notification responsive */
@media (max-width: 480px) {
	#cart-welcome-notification {
		right: 10px;
		left: 10px;
		max-width: none;
	}
	.rkLogo {
		display: flex;
		justify-content: center;
		max-width: 98%;
		margin: 0 2rem 0 2rem;
	}
}
.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.form-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1rem;
}

.form-group label {
	font-weight: 600;
	color: var(--accent-color);
}

.form-group input {
	padding: 0.75rem;
	border: 2px solid #ddd;
	border-radius: var(--border-radius);
	font-size: 1rem;
	transition: var(--transition);
}

.form-group input:focus {
	outline: none;
	border-color: var(--success-color);
}

.payment-button {
	padding: 1.2rem;
	background: var(--success-color);
	color: var(--secondary-color);
	border: none;
	border-radius: var(--border-radius);
	font-size: 1.2rem;
	font-weight: bold;
	cursor: pointer;
	transition: var(--transition);
	margin-top: 1rem;
}

.payment-button:hover {
	background: #059669;
}

/* CSS Module: Square Payment */
#card-container {
	border: 2px solid #ddd;
	border-radius: var(--border-radius);
	padding: 1rem;
	min-height: 100px;
}

.secure-payment {
	text-align: center;
	padding: 1rem;
	background: #f5f5f5;
	border-radius: var(--border-radius);
	margin-top: 1rem;
}

.secure-payment p {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0.5rem 0;
}

.lock-icon {
	font-size: 1.2rem;
}

.square-logo {
	height: 20px;
}

.ssl-note {
	font-size: 0.9rem;
	color: #666;
}

/* CSS Module: Responsive Design */
@media (max-width: 768px) {
	.product-grid {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.cart-sidebar {
		width: 100%;
		right: -100%;
	}

	.modal {
		padding: 1rem;
		width: 95%;
	}
}

/* CSS Module: Utilities */
.hidden {
	display: none !important;
}

.loading {
	opacity: 0.6;
	pointer-events: none;
}

.error-message {
	background: #fee;
	color: #c00;
	padding: 1rem;
	border-radius: var(--border-radius);
	margin: 1rem 0;
}

.success-message {
	background: #efe;
	color: #060;
	padding: 1rem;
	border-radius: var(--border-radius);
	margin: 1rem 0;
}
