/* 
 Theme Name:   Universal Storefront Theme
 Theme URI:    https://example.com
 Description:  Uniwersalny motyw potomny Storefront do szybkiego wdrażania w różnych sklepach WooCommerce. Łatwa personalizacja poprzez customizer WordPress.
 Author:       Twoja Nazwa
 Author URI:   https://example.com
 Template:     storefront
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  universal-theme
 Tags:         woocommerce, ecommerce, storefront, responsive, customizable

 Uniwersalny motyw do kopiowania między sklepami.
 Zmień tylko kolory, czcionki i logo w customizer WordPress.
*/

/* === GŁÓWNE STYLE MOTYWU === */

/* === UKRYCIE SIDEBAR === */
.widget-area,
.sidebar,
#secondary {
	display: none !important;
}

/* Rozszerzenie content area gdy sidebar ukryty */
.no-wc-breadcrumb:not(.page-template-template-fullwidth) #primary {
	width: 100% !important;
	max-width: 100% !important;
}

.content-area {
	width: 100% !important;
	max-width: 100% !important;
}

/* === MENU NAVIGATION FIX === */
/* Przepisz dokładnie tak jak w Storefront */
@media (min-width: 768px) {
	/* Ukryj mobile menu elements jak w Storefront */
	.menu-toggle,
	.handheld-navigation,
	.main-navigation.toggled .handheld-navigation,
	.main-navigation.toggled div.menu,
	.universal-header-mobile-toggle,
	.universal-mobile-menu-toggle {
		display: none !important;
	}

	/* Pokaż primary navigation jak w Storefront */
	.primary-navigation {
		display: block !important;
	}

	/* Main navigation styling jak w Storefront */
	.main-navigation,
	.secondary-navigation {
		clear: both;
		display: block;
		width: 100%;
	}

	.main-navigation ul.menu,
	.main-navigation ul.nav-menu {
		max-height: none !important;
		overflow: visible !important;
		margin-left: -1em;
		transition: none;
		display: block !important;
	}

	.main-navigation ul li {
		position: relative;
		display: inline-block !important;
		text-align: left;
	}

	.main-navigation ul li a {
		display: block;
	}

	.main-navigation ul.menu > li > a,
	.main-navigation ul.nav-menu > li > a {
		padding: 1.618em 1em;
	}
}

/* Mobile: tylko hamburger */
@media (max-width: 767px) {
	.primary-navigation {
		display: none !important;
	}

	.menu-toggle {
		display: block !important;
	}

	.main-navigation ul {
		overflow: hidden;
		max-height: 0;
		transition: all, ease, 0.8s;
	}

	.main-navigation.toggled .handheld-navigation,
	.main-navigation.toggled .menu > ul:not(.nav-menu),
	.main-navigation.toggled ul[aria-expanded='true'] {
		max-height: 9999px;
	}
} /* Podstawowe zmienne - będą nadpisane przez customizer */
:root {
	--primary-color: #e74c3c;
	--secondary-color: #3498db;
	--accent-color: #f39c12;
	--text-dark: #2c3e50;
	--text-light: #7f8c8d;
	--background: #ffffff;
	--background-alt: #f8f9fa;
	--border-radius: 8px;
	--box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	--font-primary: 'Inter', sans-serif;
}

/* Nadpisanie stylów Storefront */
body.universal-theme {
	font-family: var(--font-primary);
	color: var(--text-dark);
	line-height: 1.6;
}

/* Header */
.site-header {
	background-color: white;
	box-shadow: var(--box-shadow);
	/* Header background image zostanie dodany przez PHP jeśli ustawiony w theme-config.php */
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	position: relative;
}

/* Nakładka na header background (jeśli potrzebna) */
.site-header::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.3); /* Domyślna nakładka - można zmienić w theme-config.php */
	z-index: 1;
	display: none; /* Pokazuje się tylko gdy jest header background image */
}

.site-header.has-background-image::before {
	display: block;
}

.site-header > * {
	position: relative;
	z-index: 2;
}

/* Header jest teraz zarządzany przez header-functions.php */

.site-title a,
.site-description {
	color: white;
}

/* Navigation */
.main-navigation ul li a {
	color: white;
	font-weight: 500;
	transition: all 0.3s ease;
}

.main-navigation ul li a:hover {
	color: var(--accent-color);
	background-color: rgba(255, 255, 255, 0.1);
}

/* WooCommerce przegląd produktów */
.woocommerce-loop-product__title {
	font-weight: 600;
	color: var(--text-dark);
}

.woocommerce .star-rating span:before {
	color: var(--accent-color);
}

/* Przyciski */
.button,
.woocommerce .button,
input[type='submit'] {
	background-color: var(--accent-color);
	border: none;
	border-radius: var(--border-radius);
	font-weight: 500;
	transition: all 0.3s ease;
}

.button:hover,
.woocommerce .button:hover,
input[type='submit']:hover {
	background-color: var(--primary-color);
	transform: translateY(-2px);
	box-shadow: var(--box-shadow);
}

.button.alt,
.woocommerce .button.alt {
	background-color: var(--primary-color);
}

.button.alt:hover,
.woocommerce .button.alt:hover {
	background-color: var(--secondary-color);
}

/* Ceny */
.woocommerce .price {
	color: var(--primary-color);
	font-weight: 600;
}

.woocommerce .price del {
	color: var(--text-light);
}

/* Responsywność mobilna */
@media (max-width: 768px) {
	.main-navigation {
		display: none;
	}

	.main-navigation.mobile-open {
		display: block;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--primary-color);
		z-index: 999;
	}

	.main-navigation.mobile-open ul {
		flex-direction: column;
	}

	.main-navigation.mobile-open ul li {
		width: 100%;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}
}

/* Animacje dla dodawania do koszyka */
.woocommerce .button.added {
	background-color: #27ae60 !important;
	transform: scale(0.95);
}

.cart-contents-count.bounce {
	animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
	0% {
		transform: scale(0.3);
	}
	50% {
		transform: scale(1.2);
	}
	100% {
		transform: scale(1);
	}
}

/* === ONE-CLICK CHECKOUT STYLES === */

/* Wrapper dla przycisku one-click */
.universal-one-click-wrapper {
	margin-top: 1rem;
	margin-bottom: 1rem;
}

/* Loading state */
.universal-one-click-btn.loading {
	pointer-events: none;
	opacity: 0.8;
}

.universal-one-click-btn.loading .btn-text {
	opacity: 0;
}

.universal-one-click-btn.loading .btn-loading {
	display: flex !important;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

/* Success state */
.universal-one-click-btn.success {
	background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
}

.universal-one-click-btn.success::after {
	content: '✓';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 20px;
	animation: checkmark 0.6s ease;
}

@keyframes checkmark {
	0% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(0);
	}
	50% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1.2);
	}
	100% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1);
	}
}

/* Error state */
.universal-one-click-btn.error {
	background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
	animation: shake 0.6s ease;
}

@keyframes shake {
	0%,
	100% {
		transform: translateX(0);
	}
	10%,
	30%,
	50%,
	70%,
	90% {
		transform: translateX(-5px);
	}
	20%,
	40%,
	60%,
	80% {
		transform: translateX(5px);
	}
}

/* Przycisk one-click w loop produktów */
.universal-one-click-btn-loop {
	background: var(--accent-color) !important;
	color: white !important;
	border: none !important;
	border-radius: var(--border-radius) !important;
	padding: 8px 16px !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	text-transform: none;
	margin-top: 8px;
	width: 100%;
	transition: all 0.3s ease !important;
	position: relative;
	overflow: hidden;
}

.universal-one-click-btn-loop:hover {
	background: var(--primary-color) !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
}

.universal-one-click-btn-loop::before {
	content: '';
	position: absolute;
	top: 50%;
	left: -100%;
	width: 100%;
	height: 2px;
	background: rgba(255, 255, 255, 0.3);
	transition: left 0.6s ease;
}

.universal-one-click-btn-loop:hover::before {
	left: 100%;
}

/* Spinner dla loading state */
.spinner {
	animation: spin 1s linear infinite;
}

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

/* Responsywność dla przycisków one-click */
@media (max-width: 768px) {
	.universal-one-click-btn {
		padding: 12px 24px !important;
		font-size: 14px !important;
		max-width: 100%;
	}

	.universal-one-click-wrapper {
		margin: 0.8rem 0;
	}
}

/* Pulse effect dla nowych użytkowników */
.universal-one-click-btn.pulse {
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0% {
		box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	}
	50% {
		box-shadow:
			0 4px 25px rgba(0, 0, 0, 0.4),
			0 0 20px var(--accent-color);
	}
	100% {
		box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	}
}

/* Notyfikacje */
.universal-notifications {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 9999;
}

.universal-notification {
	background: white;
	padding: 1rem 1.5rem;
	margin-bottom: 0.5rem;
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
	transform: translateX(100%);
	transition: transform 0.3s ease;
	border-left: 4px solid var(--accent-color);
}

.universal-notification.show {
	transform: translateX(0);
}

.universal-notification-success {
	border-left-color: #27ae60;
}

.universal-notification-error {
	border-left-color: #e74c3c;
}

.universal-notification-warning {
	border-left-color: #f39c12;
}

.universal-notification .notification-link {
	display: inline-block;
	margin-left: 8px;
	color: #27ae60;
	text-decoration: underline;
	font-weight: 500;
}

.universal-notification .notification-link:hover {
	color: #1e8449;
}

/* Modal dla Quick View */
.universal-modal {
	display: none;
	position: fixed;
	z-index: 10000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	animation: fadeIn 0.3s ease;
}

.universal-modal.show {
	display: flex !important;
	align-items: center;
	justify-content: center;
}

.universal-modal-content {
	background-color: white;
	margin: 2rem;
	padding: 0;
	border-radius: var(--border-radius);
	width: 90%;
	max-width: 800px;
	max-height: 90vh;
	position: relative;
	animation: slideUp 0.3s ease;
	overflow: hidden;
	box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

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

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(50px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* === MODAL CHECKOUT STYLES === */

.universal-modal-header {
	background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
	color: white;
	padding: 1.5rem 2rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.universal-modal-title {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
}

.universal-close {
	background: none;
	border: none;
	color: white;
	font-size: 2rem;
	cursor: pointer;
	padding: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.universal-close:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: rotate(90deg);
}

.universal-modal-body {
	padding: 2rem;
	max-height: 70vh;
	overflow-y: auto;
}

.universal-checkout-form {
	display: grid;
	gap: 2rem;
}

.checkout-section {
	background: #f8f9fa;
	padding: 1.5rem;
	border-radius: var(--border-radius);
	border: 1px solid #e9ecef;
}

.checkout-section h3 {
	margin: 0 0 1rem 0;
	color: var(--text-dark);
	font-size: 1.2rem;
	font-weight: 600;
	border-bottom: 2px solid var(--accent-color);
	padding-bottom: 0.5rem;
}

/* Order Summary */
.order-summary {
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.order-items {
	margin-bottom: 1rem;
}

.order-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem;
	background: white;
	border-radius: var(--border-radius);
	margin-bottom: 0.5rem;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.order-item-info {
	flex-grow: 1;
}

.order-item-name {
	font-weight: 600;
	color: var(--text-dark);
}

.order-item-details {
	font-size: 0.9rem;
	color: var(--text-light);
}

.order-item-price {
	font-weight: 600;
	color: var(--primary-color);
	font-size: 1.1rem;
}

.order-totals {
	background: white;
	padding: 1rem;
	border-radius: var(--border-radius);
	border: 2px solid var(--accent-color);
}

.total-row {
	display: flex;
	justify-content: space-between;
	margin-bottom: 0.5rem;
}

.total-row:last-child {
	margin-bottom: 0;
	font-weight: 600;
	font-size: 1.2rem;
	color: var(--primary-color);
	border-top: 1px solid #eee;
	padding-top: 0.5rem;
}

/* Form Styles */
.form-row {
	display: flex;
	gap: 1rem;
	margin-bottom: 1rem;
}

.form-group {
	flex: 1;
}

.form-group.half {
	flex: 0.5;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: var(--text-dark);
}

.form-group .required {
	color: #e74c3c;
}

.form-group input {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid #e9ecef;
	border-radius: var(--border-radius);
	font-size: 1rem;
	transition: all 0.3s ease;
	box-sizing: border-box;
}

.form-group input:focus {
	border-color: var(--accent-color);
	box-shadow: 0 0 0 3px rgba(127, 84, 179, 0.1);
	outline: none;
}

.form-group input.error {
	border-color: #e74c3c;
	box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Payment Methods */
.payment-methods {
	background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.payment-method {
	margin-bottom: 1rem;
	padding: 1rem;
	background: white;
	border: 2px solid #e9ecef;
	border-radius: var(--border-radius);
	cursor: pointer;
	transition: all 0.3s ease;
}

.payment-method:hover {
	border-color: var(--accent-color);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.payment-method label {
	display: flex;
	align-items: center;
	cursor: pointer;
	margin: 0;
}

.payment-method input[type='radio'] {
	margin-right: 12px;
	transform: scale(1.2);
	accent-color: var(--accent-color);
}

.payment-method.selected {
	border-color: var(--accent-color);
	background: linear-gradient(135deg, #f8f9fa 0%, rgba(127, 84, 179, 0.1) 100%);
}

.payment-label {
	font-weight: 500;
	color: var(--text-dark);
}

/* Submit Button */
.submit-section {
	background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
	text-align: center;
}

.universal-submit-order {
	background: white !important;
	color: var(--primary-color) !important;
	border: none !important;
	padding: 15px 40px !important;
	font-size: 1.1rem !important;
	font-weight: 600 !important;
	border-radius: var(--border-radius) !important;
	cursor: pointer;
	transition: all 0.3s ease !important;
	text-transform: uppercase;
	letter-spacing: 1px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	min-width: 200px;
}

.universal-submit-order:hover {
	background: var(--primary-color) !important;
	color: white !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

.universal-submit-order.loading {
	opacity: 0.7;
	cursor: not-allowed;
	pointer-events: none;
}

.universal-submit-order.loading::after {
	content: '';
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid currentColor;
	border-radius: 50%;
	border-top: 2px solid transparent;
	animation: spin 1s linear infinite;
	margin-left: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.universal-modal-content {
		margin: 1rem;
		width: calc(100% - 2rem);
		max-height: 95vh;
	}

	.universal-modal-header {
		padding: 1rem 1.5rem;
	}

	.universal-modal-title {
		font-size: 1.3rem;
	}

	.universal-modal-body {
		padding: 1.5rem;
	}

	.form-row {
		flex-direction: column;
		gap: 0;
	}

	.form-group.half {
		flex: 1;
	}

	.checkout-section {
		padding: 1rem;
	}

	.order-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}

	.universal-submit-order {
		width: 100% !important;
		padding: 12px 20px !important;
		font-size: 1rem !important;
	}
}

/* Loading States */
.checkout-section.loading {
	opacity: 0.6;
	pointer-events: none;
	position: relative;
}

.checkout-section.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 30px;
	height: 30px;
	border: 3px solid var(--accent-color);
	border-radius: 50%;
	border-top: 3px solid transparent;
	animation: spin 1s linear infinite;
}

/* Success Animation */
@keyframes checkmark {
	0% {
		opacity: 0;
		transform: scale(0);
	}
	50% {
		opacity: 1;
		transform: scale(1.2);
	}
	100% {
		opacity: 1;
		transform: scale(1);
	}
}

.success-checkmark {
	color: #27ae60;
	animation: checkmark 0.6s ease;
}

/* === CUSTOM CHECKOUT PAGE LAYOUT === */

.universal-checkout-container {
	max-width: 1536px;
	margin: 0 auto;
	padding: 2rem;
}

.universal-checkout-header {
	text-align: center;
	margin-bottom: 3rem;
}

.checkout-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--text-dark);
	margin-bottom: 1rem;
}

.checkout-progress {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 2rem;
}

.progress-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	position: relative;
}

.progress-step::after {
	content: '';
	position: absolute;
	top: 15px;
	left: 100%;
	width: 2rem;
	height: 2px;
	background: #e9ecef;
	z-index: 1;
}

.progress-step:last-child::after {
	display: none;
}

.progress-step.active::after {
	background: var(--accent-color);
}

.step-number {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #e9ecef;
	color: var(--text-light);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 0.9rem;
	position: relative;
	z-index: 2;
}

.progress-step.active .step-number {
	background: var(--accent-color);
	color: white;
}

.step-title {
	font-size: 0.85rem;
	color: var(--text-light);
	font-weight: 500;
}

.progress-step.active .step-title {
	color: var(--accent-color);
}

/* Checkout Layout */
.universal-checkout-layout {
	display: grid;
	grid-template-columns: 1fr 400px;
	gap: 3rem;
	align-items: start;
}

.checkout-form-column {
	background: white;
}

.checkout-review-column {
	background: #f8f9fa;
	border-radius: var(--border-radius);
	padding: 0;
	position: sticky;
	top: 2rem;
}

.order-review-wrapper {
	padding: 0;
}

/* Checkout Sections */
.checkout-section {
	background: white;
	border: 1px solid #e9ecef;
	border-radius: var(--border-radius);
	padding: 2rem;
	margin-bottom: 1.5rem;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.checkout-section h3 {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1.5rem 0;
	font-size: 1.3rem;
	font-weight: 600;
	color: var(--text-dark);
	border-bottom: 2px solid var(--accent-color);
	padding-bottom: 0.75rem;
}

.checkout-icon {
	font-size: 1.2rem;
	opacity: 0.8;
}

/* Form Styles */
.checkout-section .form-row {
	margin-bottom: 1rem;
}

.checkout-section .form-row-wide {
	width: 100%;
}

.checkout-section .form-row-first,
.checkout-section .form-row-last {
	width: 48%;
	float: left;
}

.checkout-section .form-row-last {
	float: right;
}

.checkout-section label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: var(--text-dark);
}

.checkout-section .required {
	color: #e74c3c;
}

.checkout-section input[type='text'],
.checkout-section input[type='email'],
.checkout-section input[type='tel'],
.checkout-section select,
.checkout-section textarea {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid #e9ecef;
	border-radius: var(--border-radius);
	font-size: 1rem;
	transition: all 0.3s ease;
	box-sizing: border-box;
}

.checkout-section input:focus,
.checkout-section select:focus,
.checkout-section textarea:focus {
	border-color: var(--accent-color);
	box-shadow: 0 0 0 3px rgba(127, 84, 179, 0.1);
	outline: none;
}

/* Logged in info */
.logged-in-info {
	background: #e8f5e8;
	border: 1px solid #c3e6c3;
	border-radius: var(--border-radius);
	padding: 1rem;
	margin-bottom: 1rem;
}

.logout-link {
	color: var(--accent-color);
	text-decoration: none;
	font-weight: 500;
	margin-left: 1rem;
}

.logout-link:hover {
	text-decoration: underline;
}

/* Shipping Different Address */
.shipping-different {
	margin-bottom: 1rem;
}

.shipping-different label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	font-weight: normal;
}

/* Payment Methods */
.wc_payment_methods {
	list-style: none;
	padding: 0;
	margin: 0;
}

.wc_payment_method {
	margin-bottom: 1rem;
	border: 2px solid #e9ecef;
	border-radius: var(--border-radius);
	overflow: hidden;
	transition: all 0.3s ease;
}

.wc_payment_method:hover {
	border-color: var(--accent-color);
}

.wc_payment_method label {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem;
	margin: 0;
	cursor: pointer;
	font-weight: 500;
}

.wc_payment_method input[type='radio'] {
	margin: 0;
	transform: scale(1.2);
	accent-color: var(--accent-color);
}

.payment_box {
	background: #f8f9fa;
	border-top: 1px solid #e9ecef;
	padding: 1rem;
}

/* Order Review Column */
.checkout-review-column .checkout-section {
	background: white;
	margin-bottom: 1rem;
}

.checkout-review-column .checkout-section:last-child {
	margin-bottom: 0;
}

/* Security Badges */
.checkout-security-badges {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.5rem;
	background: white;
	border: 1px solid #e9ecef;
	border-radius: var(--border-radius);
	margin-bottom: 1rem;
}

.security-badge {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
	color: var(--text-dark);
}

.security-icon {
	font-size: 1.1rem;
}

/* Place Order Button */
.place-order-button {
	padding: 1.5rem;
	background: white;
	border: 1px solid #e9ecef;
	border-radius: var(--border-radius);
}

.place-order-button button {
	width: 100% !important;
	background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%) !important;
	color: white !important;
	border: none !important;
	padding: 18px 24px !important;
	font-size: 1.1rem !important;
	font-weight: 600 !important;
	border-radius: var(--border-radius) !important;
	cursor: pointer;
	transition: all 0.3s ease !important;
	text-transform: uppercase;
	letter-spacing: 1px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.place-order-button button:hover {
	transform: translateY(-2px) !important;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
}

.button-total {
	background: rgba(255, 255, 255, 0.2);
	padding: 0.3rem 0.8rem;
	border-radius: 20px;
	font-weight: 700;
}

/* Order Summary Styles */
.woocommerce-checkout-review-order table {
	width: 100%;
	border-collapse: collapse;
}

.woocommerce-checkout-review-order th,
.woocommerce-checkout-review-order td {
	padding: 1rem;
	border-bottom: 1px solid #e9ecef;
	text-align: left;
}

.woocommerce-checkout-review-order .cart_item {
	border-bottom: 1px solid #f0f0f0;
}

.woocommerce-checkout-review-order .cart_item:last-child {
	border-bottom: 2px solid var(--accent-color);
}

.woocommerce-checkout-review-order .order-total {
	font-weight: 700;
	font-size: 1.2rem;
	color: var(--primary-color);
}

.woocommerce-checkout-review-order .order-total td {
	border-bottom: none;
	padding-top: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
	.universal-checkout-layout {
		grid-template-columns: 1fr 350px;
		gap: 2rem;
	}

	.checkout-review-column {
		position: static;
	}
}

@media (max-width: 768px) {
	.universal-checkout-container {
		padding: 1rem;
	}

	.checkout-title {
		font-size: 2rem;
	}

	.checkout-progress {
		gap: 1rem;
	}

	.progress-step::after {
		width: 1rem;
	}

	.universal-checkout-layout {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.checkout-section {
		padding: 1.5rem;
	}

	.checkout-section .form-row-first,
	.checkout-section .form-row-last {
		width: 100%;
		float: none;
		margin-bottom: 1rem;
	}

	.checkout-security-badges {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: space-around;
	}

	.security-badge {
		flex-direction: column;
		text-align: center;
		gap: 0.3rem;
		flex-basis: 30%;
	}
}

@media (max-width: 480px) {
	.checkout-progress {
		flex-direction: column;
		gap: 1rem;
	}

	.progress-step::after {
		display: none;
	}

	.checkout-section h3 {
		font-size: 1.1rem;
		flex-direction: column;
		gap: 0.5rem;
		text-align: center;
	}

	.place-order-button button {
		flex-direction: column;
		gap: 0.5rem;
		padding: 15px 20px !important;
		font-size: 1rem !important;
	}
}

/* Loading States for Checkout */
.checkout-section.processing {
	opacity: 0.7;
	pointer-events: none;
	position: relative;
}

.checkout-section.processing::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 30px;
	height: 30px;
	border: 3px solid var(--accent-color);
	border-radius: 50%;
	border-top: 3px solid transparent;
	animation: spin 1s linear infinite;
	z-index: 10;
}

.place-order-button button.loading {
	opacity: 0.8;
	cursor: not-allowed;
	pointer-events: none;
}

.place-order-button button.loading::after {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-radius: 50%;
	border-top: 2px solid transparent;
	animation: spin 1s linear infinite;
	margin-left: 10px;
}

/* === CHECKOUT CROSS-SELL SECTION === */

/* Override TYLKO dla naszej sekcji cross-sell i problematycznych elementów */
.custom-crosssell-added {
	max-width: none !important;
	width: 100% !important;
}

.custom-crosssell-added.wc-block-components-totals-wrapper {
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Globalne nadpisanie col-full dla całej strony */
.col-full {
	max-width: none !important;
	width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding: 0 !important;
}

/* Precyzyjne poprawki dla elementów które mają problem z szerokością */
.wp-block-woocommerce-checkout .col-full,
.woocommerce-checkout .col-full {
	width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

.site-main {
	max-width: 1380px !important; /* Przywracamy kontrolowaną szerokość */
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Ale dla cross-sell - bez ograniczeń */
.custom-crosssell-added,
.crosssell-products,
.crosssell-product {
	max-width: none !important;
	width: 100% !important;
}

.checkout-crosssell-section {
	margin-top: 1.5rem;
}

/* Free Shipping Progress */
.free-shipping-progress,
.free-shipping-achieved {
	color: black;
	border-radius: var(--border-radius);
}

.shipping-progress-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.shipping-progress-header h3 {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-size: 1.2rem;
	font-weight: 600;
}

.shipping-icon {
	font-size: 1.3rem;
}

.remaining-amount {
	font-size: 0.95rem;
	background: rgba(255, 255, 255, 0.2);
	padding: 0.3rem 0.8rem;
	border-radius: 20px;
}

.shipping-progress-bar {
	margin-top: 1rem;
}

.progress-track {
	width: 100%;
	height: 8px;
	background: rgba(255, 255, 255, 0.3);
	border-radius: 4px;
	overflow: hidden;
	position: relative;
}

.progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #f39c12 0%, #e67e22 100%);
	border-radius: 4px;
	transition: width 0.8s ease;
	position: relative;
}

.progress-fill.updating {
	animation: progressPulse 0.8s ease;
}

@keyframes progressPulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

.progress-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 0.5rem;
	font-size: 0.85rem;
	opacity: 0.9;
}

.free-shipping-achieved h3 {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0;
	font-size: 1.3rem;
	font-weight: 600;
	text-align: center;
}

/* Cross-sell Products */
.crosssell-products {
	background: white;
	border: 1px solid #e9ecef;
	border-radius: var(--border-radius);
	padding: 1.5rem;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.crosssell-header {
	text-align: center;
	margin-bottom: 1.5rem;
}

.crosssell-header h3 {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0 0 0.5rem 0;
	font-size: 1.3rem;
	font-weight: 600;
	color: var(--text-dark);
}

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

.crosssell-subtitle {
	margin: 0;
	color: var(--text-light);
	font-size: 0.95rem;
}

.crosssell-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin: 1.5rem 0;
}

/* Custom crosssell items - flex with wrap */
.universal-crosssell-items {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin: 1.5rem 0;
	align-items: flex-start;
}

.crosssell-product-item {
	text-align: center;
	transition: all 0.3s ease;
	position: relative;
	min-width: 180px;
	flex: 0 1 calc(25% - 0.75rem);
}

.crosssell-product-item.product-added {
	opacity: 0.7;
	transform: scale(0.98);
	border-color: #27ae60;
}

.crosssell-product-image {
	position: relative;
}

.crosssell-product-image img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	margin: 0 auto;
	display: block;
}

.crosssell-sale-badge {
	position: absolute;
	top: -5px;
	right: -5px;
	background: #e74c3c;
	color: white;
	font-size: 0.7rem;
	font-weight: 600;
	padding: 0.2rem 0.5rem;
	border-radius: 10px;
	text-transform: uppercase;
}

.crosssell-product-info {
	margin-bottom: 1rem;
	text-align: left;
}

.crosssell-product-name {
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 0.5rem 0;
	color: var(--text-dark);
	line-height: 1.3;
}

.crosssell-product-price {
	font-weight: 600;
	color: black;
	margin-bottom: 0.5rem;
}

.crosssell-product-description {
	font-size: 0.85rem;
	color: var(--text-light);
	margin: 0;
	line-height: 1.3;
}

.crosssell-product-actions {
	margin-top: 1rem;
}

.crosssell-add-btn:hover:not(.disabled) {
	transform: translateY(-1px) !important;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
	text-decoration: none;
	color: white !important;
}

.crosssell-add-btn.adding {
	background: #95a5a6 !important;
	cursor: not-allowed;
	pointer-events: none;
}

.crosssell-add-btn.added {
	background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
	animation: addedSuccess 0.6s ease;
}

@keyframes addedSuccess {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
	100% {
		transform: scale(1);
	}
}

.crosssell-add-btn.disabled {
	background: #bdc3c7 !important;
	color: #7f8c8d !important;
	cursor: not-allowed;
	pointer-events: none;
}

.btn-icon {
	font-size: 0.9rem;
	font-weight: 600;
}

.btn-text {
	font-weight: 500;
}

.btn-price {
	font-weight: 600;
	opacity: 0.9;
	font-size: 0.8rem;
}

/* Cross-sell Benefits */
.crosssell-benefits {
	display: flex;
	justify-content: center;
	gap: 2rem;
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid #e9ecef;
}

.benefit-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.85rem;
	color: var(--text-light);
}

.benefit-icon {
	font-size: 1rem;
	opacity: 0.8;
}

/* Notifications */
.crosssell-notification {
	background: white;
	border: 2px solid #e9ecef;
	border-radius: var(--border-radius);
	padding: 1rem 1.5rem;
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	transform: translateY(-10px);
	opacity: 0;
	transition: all 0.3s ease;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.crosssell-notification.show {
	transform: translateY(0);
	opacity: 1;
}

.crosssell-notification-success {
	border-color: #27ae60;
	background: linear-gradient(135deg, #d5f4e6 0%, #f0fdf4 100%);
	color: #1e7e34;
}

.crosssell-notification-error {
	border-color: #e74c3c;
	background: linear-gradient(135deg, #fdeaea 0%, #fdf2f2 100%);
	color: #c62d42;
}

.crosssell-notification-info {
	border-color: #3498db;
	background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%);
	color: #1976d2;
}

.notification-icon {
	font-size: 1.1rem;
}

.notification-message {
	font-weight: 500;
	flex-grow: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
	.crosssell-products-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}

	.universal-crosssell-items {
		flex-wrap: wrap;
		gap: 0.75rem;
	}

	.crosssell-product-item {
		min-width: 150px;
		flex: 0 1 calc(50% - 0.375rem);
	}

	.crosssell-product-image img {
		width: 60px;
		height: 60px;
	}

	.crosssell-product-name {
		font-size: 0.85rem;
	}

	.crosssell-benefits {
		flex-direction: column;
		gap: 0.75rem;
		align-items: center;
	}

	.shipping-progress-header {
		flex-direction: column;
		gap: 0.5rem;
		text-align: center;
	}

	.progress-labels {
		flex-direction: column;
		gap: 0.25rem;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.universal-crosssell-items {
		flex-direction: column;
	}

	.product-benefits .benefit-item {
		align-items: flex-start !important;
		margin-top: 3px;
	}

	.crosssell-product-item {
		flex: 0 1 100% !important;
		min-width: 100% !important;
		max-width: 100% !important;
	}

	.crosssell-products-grid {
		grid-template-columns: 1fr;
	}

	.crosssell-product-image img {
		width: 70px;
		height: 70px;
	}
}

@media (min-width: 768px) {
	/* mobile-toggle jest teraz zarządzany przez header-functions.php */
	.universal-mobile-toggle {
		display: none !important; /* Nadpisane przez header-functions.php */
	}
}

/* Ukryj duplikat universal-mobile-toggle na wszystkich urządzeniach */
.universal-mobile-toggle {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
}

/* === CUSTOM CHECKOUT REVIEW TABLE === */

.universal-checkout-totals {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 2px solid #ddd;
}

.universal-checkout-totals tr {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
}

.universal-checkout-totals .woocommerce-table--totals {
	width: 100%;
	border-collapse: collapse;
}

.universal-checkout-totals th,
.universal-checkout-totals td {
	padding: 10px 0;
	text-align: left;
}

.universal-checkout-totals td {
	text-align: right;
	font-weight: 600;
}

.universal-checkout-totals tr.order-total td {
	font-size: 18px;
	font-weight: 700;
	color: black;
	padding-top: 15px;
}

.universal-checkout-review-wrapper {
	margin: 20px 0;
	padding: 20px;
	background: #f8f9fa;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
}

.universal-checkout-review-title h3 {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 16px 0;
	color: #000;
}

.universal-checkout-review-title .subtitle {
	font-size: 14px;
	font-weight: 400;
	color: #666;
}

.universal-checkout-review-table-custom {
	display: flex;
	flex-direction: column;
	gap: 0;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
}

/* Pojedynczy produkt w checkout */
.universal-checkout-item {
	display: flex;
	justify-content: space-between;
	gap: 30px;
	padding: 16px;
	background: white;
	align-items: center;
	position: relative;
}

.checkout-item-left {
	display: flex;
	gap: 12px;
	align-items: center;
	position: relative;
}

@media (max-width: 639px) {
	.universal-checkout-item {
		display: block;
	}

	.universal-checkout-review-wrapper {
		padding: 0;
	}

	.universal-checkout-review-wrapper {
		background-color: rgba(234, 234, 234, 1) !important;
	}

	.universal-checkout-item:last-child {
		border-bottom: none;
	}

	/* Lewa część: Miniaturka + Nazwa + Cena */
	.checkout-item-left {
		align-items: flex-start;
	}

	.checkout-item-thumbnail {
		width: 70px;
		height: 70px;
		border-radius: 4px;
		overflow: visible;
		background: #f5f5f5;
		flex-shrink: 0;
		position: relative;
	}

	.checkout-item-thumbnail .cart-item-image {
		width: 100%;
		height: 100%;
		position: relative;
		overflow: hidden;
		border-radius: inherit;
	}

	.checkout-item-thumbnail .cart-item-discount-badge {
		position: absolute;
		top: 6px;
		left: 6px;
		z-index: 2;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 46px;
		height: auto;
		padding: 2px 6px;
		border-radius: 999px;
		background: #c62828;
		color: #fff;
		font-size: 11px;
		font-weight: 700;
		line-height: 1;
		box-shadow: 0 6px 14px rgba(198, 40, 40, 0.22);
		pointer-events: none;
	}

	.checkout-item-thumbnail img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.checkout-item-details {
		display: flex;
		flex-direction: column;
		gap: 4px;
	}

	.checkout-item-name {
		font-size: 14px;
		font-weight: 600;
		color: #000;
		line-height: 1.4;
	}

	.checkout-item-unit-price {
		font-size: 16px;
		font-weight: 700;
		color: #000;
	}

	/* Środek: Ilość */
	.checkout-item-quantity-wrapper {
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 8px;
		margin-left: auto;
	}

	.qty-label {
		font-size: 13px;
		color: #666;
		font-weight: 600;
	}

	.checkout-item-quantity-controls {
		display: flex;
		align-items: center;
		gap: 4px;
	}

	.checkout-item-quantity-controls .qty-btn {
		width: 28px;
		height: 28px;
		border: 1px solid #ddd;
		background: white;
		color: #333;
		border-radius: 3px;
		font-size: 16px;
		font-weight: bold;
		cursor: pointer;
		display: flex;
		align-items: center;
		justify-content: center;
		transition: all 0.2s ease;
		padding: 0;
		line-height: 1;
	}

	.checkout-item-quantity-controls .qty-btn:hover {
		background: #f5f5f5;
		border-color: #999;
	}

	.checkout-item-quantity-controls .qty-display {
		min-width: 40px;
		text-align: center;
		font-weight: 600;
		font-size: 14px;
		padding: 4px 8px;
		border: 1px solid #ddd;
		border-radius: 3px;
		background: white;
		cursor: pointer;
		transition: all 0.2s ease;
		user-select: none;
	}

	.checkout-item-quantity-controls .qty-display:hover {
		border-color: black;
		background: #f0f7ff;
	}

	.checkout-item-quantity-controls .qty-input {
		min-width: 40px;
		text-align: center;
		font-weight: 600;
		font-size: 14px;
		padding: 4px 6px;
		border: 2px solid black;
		border-radius: 3px;
		background: white;
		outline: none;
	}

	/* Prawa część: Cena całkowita + Remove */
	.checkout-item-right {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		gap: 8px;
	}

	.checkout-item-remove-btn {
		position: absolute;
		top: -8px;
		right: -8px;
		background: #dc3545;
		color: white;
		border: none;
		width: 24px;
		height: 24px;
		border-radius: 50%;
		font-size: 16px;
		font-weight: bold;
		cursor: pointer;
		display: flex;
		align-items: center;
		justify-content: center;
		transition: all 0.2s ease;
		padding: 0;
		line-height: 1;
		opacity: 0;
		visibility: hidden;
		box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
		z-index: 10;
	}

	.universal-checkout-item:hover .checkout-item-remove-btn {
		opacity: 1;
		visibility: visible;
	}

	.checkout-item-remove-btn:hover {
		background: #c82333;
		transform: scale(1.15);
	}

	.checkout-item-total-price {
		font-size: 18px;
		font-weight: 700;
		color: #000;
	}

	/* Ceny */
	.checkout-item-prices {
		display: flex;
		flex-direction: column;
		gap: 8px;
		text-align: right;
	}

	.checkout-item-price-unit,
	.checkout-item-price-total {
		display: flex;
		flex-direction: column;
		gap: 4px;
	}

	.checkout-item-price-unit .label,
	.checkout-item-price-total .label {
		font-size: 12px;
		color: #666;
		text-transform: uppercase;
		letter-spacing: 0.5px;
	}

	.checkout-item-price-unit .price,
	.checkout-item-price-total .price {
		font-size: 16px;
		font-weight: 700;
		color: #333;
	}

	.checkout-item-price-total .price {
		color: black;
		font-size: 18px;
	}

	/* Responsive: Tablet */
	@media (max-width: 1024px) {
		.universal-checkout-item {
			grid-template-columns: 70px 1fr 120px;
			gap: 12px;
			padding: 12px;
		}

		.checkout-item-thumbnail {
			width: 70px;
			height: 70px;
		}

		.checkout-item-name {
			font-size: 14px;
		}

		.checkout-item-prices {
			font-size: 14px;
		}
	}

	/* Responsive: Mobile */
	@media (max-width: 767px) {
		.universal-checkout-review-title {
			font-size: 18px;
		}

		.checkout-item-quantity-wrapper {
			padding-top: 20px;
		}

		.universal-checkout-review-title .subtitle {
			font-size: 12px;
		}

		.universal-checkout-item {
			grid-template-columns: 1fr;
			gap: 12px;
			padding: 12px;
		}

		.checkout-item-left {
			gap: 10px;
		}

		.checkout-item-thumbnail {
			width: 60px;
			height: 60px;
		}

		.checkout-item-name {
			font-size: 13px;
		}

		.checkout-item-unit-price {
			font-size: 14px;
		}

		.checkout-item-remove-btn {
			width: 20px;
			height: 20px;
			font-size: 14px;
		}

		.checkout-item-total-price {
			font-size: 16px;
		}

		.universal-coupon-wrapper {
			padding: 12px !important;
			margin: 16px 0;
		}

		.coupon-title {
			font-size: 14px;
			margin-bottom: 10px;
		}

		.universal-coupon-form {
			flex-direction: column;
			gap: 10px;
		}

		.universal-coupon-apply-btn {
			width: 100%;
		}
	}
	.universal-coupon-apply-btn {
		justify-content: space-between;
	}

	.checkout-item-price-unit,
	.checkout-item-price-total {
		flex-direction: row;
		gap: 6px;
		align-items: center;
	}

	.checkout-item-price-unit .label,
	.checkout-item-price-total .label {
		font-size: 11px;
		min-width: 45px;
	}

	.checkout-item-price-unit .price,
	.checkout-item-price-total .price {
		font-size: 14px;
	}

	.checkout-item-price-total .price {
		font-size: 15px;
	}
}

.checkout-item-quantity-controls {
	flex-direction: row;
	justify-content: flex-start;
	gap: 10px;
	display: flex;
}

/* === REMOVE BUTTON STYLES === */

.checkout-thumbnail-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
}

.checkout-item-remove-btn {
	position: absolute;
	top: 0;
	left: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
	border: 2px solid white;
	color: white;
	font-size: 20px;
	font-weight: bold;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
	transition: all 0.3s ease;
	padding: 0;
	opacity: 0;
	transform: scale(0.7);
	z-index: 100;
	visibility: hidden;
}

.universal-checkout-item:hover .checkout-item-remove-btn,
.checkout-item-thumbnail:hover .checkout-item-remove-btn,
.checkout-item-thumbnail:focus-within .checkout-item-remove-btn {
	opacity: 1;
	visibility: visible;
	transform: scale(1);
}

.checkout-item-remove-btn:hover {
	background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
	box-shadow: 0 4px 12px rgba(231, 76, 60, 0.6);
	transform: scale(1.1);
}

.checkout-item-remove-btn:active {
	transform: scale(0.95);
}

/* Modal potwierdzenia usunięcia */
.remove-confirm-modal {
	display: none;
	position: fixed;
	z-index: 99999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	animation: fadeIn 0.3s ease;
	align-items: center;
	justify-content: center;
}

.remove-confirm-modal.show {
	display: flex !important;
}

.remove-confirm-content {
	background-color: white;
	padding: 0;
	border-radius: 8px;
	width: 90%;
	max-width: 400px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	animation: slideUp 0.3s ease;
}

.remove-confirm-header {
	background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
	color: white;
	padding: 20px;
	border-radius: 8px 8px 0 0;
	display: flex;
	align-items: center;
	gap: 12px;
}

.remove-confirm-header-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
}

.remove-confirm-icon {
	font-size: 24px;
	line-height: 1;
}

.remove-confirm-body {
	padding: 24px;
	text-align: center;
}

.remove-confirm-product-info {
	margin-bottom: 20px;
}

.remove-confirm-product-name {
	font-size: 16px;
	font-weight: 600;
	color: #333;
	margin: 0 0 8px 0;
	line-height: 1.4;
	word-break: break-word;
}

.remove-confirm-product-qty {
	font-size: 14px;
	color: #666;
	margin: 0;
}

.remove-confirm-message {
	font-size: 14px;
	color: #666;
	margin: 16px 0 24px 0;
	line-height: 1.6;
}

.remove-confirm-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
}

.remove-confirm-btn {
	padding: 12px 28px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	flex: 1;
	max-width: 140px;
}

.remove-confirm-btn-yes {
	background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
	color: white;
	box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.remove-confirm-btn-yes:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.remove-confirm-btn-yes:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

.remove-confirm-btn-no {
	background: white;
	color: #666;
	border: 2px solid #ddd;
}

.remove-confirm-btn-no:hover {
	border-color: #999;
	background: #f8f9fa;
}

.remove-confirm-btn-no:active {
	background: #e9ecef;
}

/* Loading state dla remove button */
.remove-confirm-btn-yes.loading {
	opacity: 0.8;
	pointer-events: none;
}

.remove-confirm-btn-yes.loading::after {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid white;
	border-radius: 50%;
	border-top: 2px solid transparent;
	animation: spin 1s linear infinite;
	margin-left: 8px;
}

/* Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

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

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

/* Responsive dla modalu */
@media (max-width: 480px) {
	.remove-confirm-content {
		width: 95%;
		max-width: 100%;
		margin: 20px;
	}

	.remove-confirm-header {
		padding: 16px;
	}

	.remove-confirm-header-title {
		font-size: 16px;
	}

	.remove-confirm-body {
		padding: 16px;
	}

	.remove-confirm-actions {
		flex-direction: column;
	}

	.remove-confirm-btn {
		max-width: 100%;
		padding: 14px 20px;
	}
}

/* === COUPON FIELD STYLES === */

/* Ukryj domyślny toggle dla kuponu */
.woocommerce-form-coupon-toggle {
	display: none !important;
}

/* Wrapper kuponu z tytułem */
.universal-coupon-wrapper {
	margin: 24px 0;
	background: white;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 16px;
}

.coupon-title {
	font-size: 16px;
	font-weight: 700;
	color: #000;
	margin: 0 0 12px 0;
}

.universal-coupon-form {
	display: flex;
	gap: 8px;
	align-items: center;
}

.universal-coupon-form input[type='text'] {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 14px;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.universal-coupon-form input[type='text']:focus {
	border-color: black;
	outline: none;
}

.universal-coupon-apply-btn {
	background: black;
	color: white;
	border: none;
	padding: 10px 24px;
	border-radius: 3px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.universal-coupon-apply-btn:active {
	transform: scale(0.98);
}

.universal-coupon-apply-btn.loading::after {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid white;
	border-radius: 50%;
	border-top: 2px solid transparent;
	animation: spin 1s linear infinite;
	margin-left: 8px;
}

/* Responsive dla coupon form */
@media (max-width: 768px) {
	.universal-coupon-form {
		flex-direction: column;
		gap: 8px;
	}

	.universal-coupon-form-group {
		min-width: auto;
	}

	.universal-coupon-apply-btn {
		width: 100%;
	}
}

/* === IMPROVED TOTALS STYLING === */

/* Format: Sub total: Kwota | Shipping: Kwota | Total: Kwota */
.universal-checkout-totals {
	margin-top: 20px;
	padding: 20px;
	background: white;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
}

.universal-checkout-totals .woocommerce-table--totals {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
}

.universal-checkout-totals table tbody tr {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	font-size: 14px !important;
	border-collapse: separate !important;
}

.universal-checkout-totals table tbody tr:last-child {
	border-bottom: none !important;
}

.universal-checkout-totals table tbody tr th {
	font-weight: 600 !important;
	color: #333 !important;
	text-align: left !important;
	border: none !important;
	display: inline !important;
	flex: 0 !important;
	margin: 0 !important;
}

.universal-checkout-totals table tbody tr td {
	text-align: right !important;
	font-weight: 500 !important;
	color: #333 !important;
	border: none !important;
	display: inline !important;
	margin: 0 !important;
}

.universal-checkout-totals tr.cart-subtotal th {
	color: #666 !important;
	font-weight: 600 !important;
}

.universal-checkout-totals tr.cart-subtotal td {
	color: #333 !important;
	font-weight: 600 !important;
}

/* Shipping */

.universal-checkout-totals tr.shipping-totals th {
	color: #666 !important;
	font-weight: 600 !important;
}

.universal-checkout-totals tr.shipping-totals td {
	color: #333 !important;
	font-weight: 600 !important;
}

/* Tax (jeśli jest) */
.universal-checkout-totals tr.tax-total {
	padding: 12px 0 !important;
}

.universal-checkout-totals tr.tax-total th {
	color: #999 !important;
	font-size: 13px !important;
}

.universal-checkout-totals tr.tax-total td {
	color: #666 !important;
	font-size: 13px !important;
}

/* Order Total - wyróżniony */
.universal-checkout-totals tr.order-total {
	border-bottom: none !important;
	padding-top: 5px !important;
	margin-top: 16px !important;
	border-top: 1px solid #ddd !important;
}

.universal-checkout-totals tr.order-total th {
	font-size: 16px !important;
	font-weight: 700 !important;
	color: black !important;
}

.universal-checkout-totals tr.order-total td {
	font-size: 18px !important;
	font-weight: 700 !important;
	color: black !important;
}

/* Responsive */
@media (max-width: 768px) {
	.universal-checkout-totals {
		padding: 16px;
	}

	.universal-checkout-totals tr {
		padding: 10px 0;
		font-size: 13px;
	}

	.universal-checkout-totals tr.order-total th,
	.universal-checkout-totals tr.order-total td {
		font-size: 16px;
	}
}

/* === BILLING DETAILS STYLING === */

/* Woocommerce Billing Section */
.woocommerce-billing-fields {
	margin-bottom: 24px;
}

.woocommerce-billing-fields .form-row {
	margin-bottom: 16px;
}

.woocommerce-billing-fields .form-row label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	color: #333;
	font-size: 14px;
}

.woocommerce-billing-fields .form-row label .required {
	color: #d32f2f;
	margin-left: 2px;
}

.woocommerce-billing-fields input[type='text'],
.woocommerce-billing-fields input[type='email'],
.woocommerce-billing-fields input[type='tel'],
.woocommerce-billing-fields input[type='password'],
.woocommerce-billing-fields input[type='number'],
.woocommerce-billing-fields select,
.woocommerce-billing-fields textarea {
	width: 100%;
	padding: 6px 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 13px;
	font-family: inherit;
	background: white;
	color: #333;
	transition: all 0.2s ease;
	box-sizing: border-box;
	line-height: 1.4;
	height: auto;
}

.woocommerce-billing-fields input[type='text']:focus,
.woocommerce-billing-fields input[type='email']:focus,
.woocommerce-billing-fields input[type='tel']:focus,
.woocommerce-billing-fields input[type='password']:focus,
.woocommerce-billing-fields input[type='number']:focus,
.woocommerce-billing-fields select:focus,
.woocommerce-billing-fields textarea:focus {
	outline: none;
	border-color: black;
	box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
	background: #f0f7ff;
}

/* Form Row - 2 kolumny na desktop */
.woocommerce-billing-fields .form-row-first,
.woocommerce-billing-fields .form-row-last {
	width: 48% !important;
	display: inline-block !important;
	vertical-align: top !important;
	box-sizing: border-box !important;
	float: none !important;
}

.woocommerce-billing-fields .form-row-first {
	margin-right: 4% !important;
	clear: left !important;
}

.woocommerce-billing-fields .form-row-last {
	margin-right: 0 !important;
	clear: none !important;
}

.woocommerce-billing-fields .form-row.form-row-wide {
	display: block !important;
	clear: both !important;
	width: 100% !important;
}

/* Checkboxes */
.woocommerce-billing-fields .woocommerce-form__label-checkbox {
	display: flex;
	align-items: center;
	margin-top: 16px;
}

.woocommerce-billing-fields input[type='checkbox'] {
	margin-right: 8px;
	width: auto;
	height: auto;
	cursor: pointer;
	accent-color: black;
}

.woocommerce-billing-fields .woocommerce-form__label-checkbox label {
	margin: 0;
	font-weight: 400;
	display: inline;
	cursor: pointer;
}

/* Responsive: Tablet */
@media (max-width: 1024px) {
	.woocommerce-billing-fields h3 {
		font-size: 16px;
		margin-bottom: 16px;
	}

	.woocommerce-billing-fields .form-row {
		margin-bottom: 14px;
	}

	.woocommerce-billing-fields input[type='text'],
	.woocommerce-billing-fields input[type='email'],
	.woocommerce-billing-fields input[type='tel'],
	.woocommerce-billing-fields input[type='password'],
	.woocommerce-billing-fields input[type='number'],
	.woocommerce-billing-fields select,
	.woocommerce-billing-fields textarea {
		font-size: 13px;
		padding: 6px 8px;
	}
}

/* Responsive: Mobile */
@media (max-width: 767px) {
	.woocommerce-billing-fields h3 {
		font-size: 15px;
		margin-bottom: 14px;
		padding-bottom: 10px;
	}

	.woocommerce-billing-fields .form-row {
		margin-bottom: 12px;
	}

	.woocommerce-billing-fields .form-row label {
		font-size: 13px;
		margin-bottom: 5px;
	}

	.woocommerce-billing-fields input[type='text'],
	.woocommerce-billing-fields input[type='email'],
	.woocommerce-billing-fields input[type='tel'],
	.woocommerce-billing-fields input[type='password'],
	.woocommerce-billing-fields input[type='number'],
	.woocommerce-billing-fields select,
	.woocommerce-billing-fields textarea {
		font-size: 12px;
		padding: 5px 7px;
	}

	/* Mobile - 1 kolumna */
	.woocommerce-billing-fields .form-row-first,
	.woocommerce-billing-fields .form-row-last {
		width: 100%;
		margin-right: 0;
		display: block;
	}
}
