/* Cart Styles - Based on Tailwind CSS design */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Arimo:wght@500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@200;300;500;600;700;800;900&display=swap');

/* Font families */
:root {
	--font-primary: 'Comfortaa', sans-serif;
	--font-secondary: 'Nunito Sans', sans-serif;
	--font-tertiary: 'Nunito Sans', sans-serif;
	--color-primary: #ee7675;
	--color-text-primary: #1a1a1a;
	--color-text-secondary: #4a5565;
	--color-text-muted: #717182;
	--color-border: #e5e7eb;
	--color-bg-gray: #f9fafb;
	--color-bg-gray-light: #f3f4f6;
	--color-success: #10b981;
}

.woocommerce-cart #page-header {
	min-height: 100px;
	height: auto;
}

.woocommerce-cart .buttons-container,#page-header .wtbx_vc_column .wtbx_vc_column_inner .wtbx_column_wrapper .wtbx_column_content{
	display: none !important;
}
#header-container {
	border-bottom: 1px solid #e5e5e5;
}
#page-wrap {
	padding-top: 20px !important;
}
/* Ukrycie przycisku Update cart dodawanego przez parent theme */
.woocommerce-cart .moved-update-btn,
.woocommerce-cart .moved-update-btn-proxy {
	display: none !important;
}

.cross-sells {
	display: none !important;
}

.woocommerce-cart .promo-body input,
.woocommerce-cart .promo-body input[type='text'] {
	padding: 10px !important;
}

.woocommerce-cart .promo-body .button {
	font-size: 15px;
   	font-weight: 700;
    font-family: var(--font-secondary);
}

input[type='number'] {
	padding: 0 !important;
	box-shadow: none !important;
}

/* Cart Header */
.cart-header {
	padding: 32px 24px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cart-title-wrapper {
	display: flex;
	justify-content: center;
	align-items: flex-start;
}

.cart-title {
	font-family: var(--font-primary);
	font-size: 36px;
	font-weight: 500;
	line-height: 40px;
	color: var(--color-text-primary);
	text-align: center;
	margin: 0;
}

.cart-continue-shopping {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 16px;
}

.continue-text {
	color: var(--color-text-secondary);
	font-size: 12px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 16px;
}

.continue-link {
	color: var(--color-primary);
	font-size: 12px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 16px;
	text-decoration: none;
	margin-left: 4px;
}

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

/* Cart Content */
.cart-content {
	padding: 0 24px;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

/* Cart Items Wrapper */
.cart-items-wrapper {
	background: white;
	overflow: hidden;
}

/* Cart Table Header */
.cart-table-header {
	width: 100%;
	border-bottom: 1px solid var(--color-border);
	display: flex;
	justify-content: center;
	align-items: center;
	padding-bottom: 17px;
}

.cart-header-product {
	flex: 1;
	padding-right: 450px;
	display: flex;
	justify-content: flex-start;
	align-items: center;
}

.cart-header-quantity {
	width: 185px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.cart-header-subtotal {
	width: 139px;
	padding-left: 67px;
	padding-right: 7px;
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

.cart-header-label {
	color: var(--color-text-secondary);
	font-size: 12px;
	font-family: var(--font-tertiary);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	line-height: 16px;
}

.cart-header-quantity .cart-header-label,
.cart-header-subtotal .cart-header-label {
	text-align: right;
}

/* Cart Items List */
.cart-items-list {
	display: flex;
	flex-direction: column;
}

/* Cart Item Row - produkty w rzędzie, jeden pod drugim (PRODUCT | QUANTITY | SUBTOTAL) */
.cart-item-row {
	width: 100%;
	border-bottom: 1px solid var(--color-border);
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	padding: 12px 0;
	position: relative;
	gap: 0;
}

.cart-item-product {
	flex: 1;
	padding-right: 16px;
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 16px;
}

.cart-item-image {
	width: 64px;
	height: 64px;
	background: var(--color-bg-gray);
	border-radius: 4px;
	overflow: hidden;
	position: relative;
	flex-shrink: 0;
}

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

.cart-item-details {
	flex: 1;
	min-height: 56px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 4px;
}

.cart-item-name {
	width: 100%;

	display: flex;
	justify-content: flex-start;
	align-items: flex-start;
}

.cart-item-name,
.cart-item-name a {
	color: var(--color-text-primary);
	font-size: 14px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 20px;
	text-decoration: none;
}

.cart-item-name a:hover {
	text-decoration: underline;
}

.cart-item-variations {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cart-item-variation-item {
	height: 16px;
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 4px;
}

.variation-key,
.variation-value {
	color: var(--color-text-muted);
	font-size: 12px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 16px;
}

.cart-item-price {
	height: 16px;
	color: var(--color-text-muted);
	font-size: 12px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 16px;
}

/* Quantity Controls */
.cart-item-quantity-wrapper {
	width: 185px;
	padding-left: 16px;
	padding-right: 16px;
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

.quantity-controls {
	width: 80px;
	height: 36px;
	min-height: 36px;
	background: var(--color-bg-gray-light);
	border-radius: 4px;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-shrink: 0;
}

button.qty-decrease,
button.qty-increase {
	width: 24px;
	height: 36px;
	display: flex;
	justify-content: center;
	align-items: center;
	background: transparent;
	border: none;
	color: var(--color-text-secondary);
	font-size: 14px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 20px;
	cursor: pointer;
	padding: 0;
	transition: opacity 0.2s;
}

button.qty-decrease:hover:not(.disabled),
button.qty-increase:hover:not(.disabled) {
	opacity: 0.7;
	background: transparent;
	color: var(--color-text-secondary);
}

button.qty-decrease.disabled,
button.qty-increase.disabled {
	opacity: 0.3;
	cursor: not-allowed;
	background: transparent;
	color: var(--color-text-secondary);
}

input[type=number].qty-input {
	flex: 1;
	min-width: 24px;
	height: 36px;
	text-align: center;
	color: var(--color-text-primary);
	font-size: 14px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 20px;
	background: transparent;
	border: none;
	padding: 0;
	-moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Subtotal + ikonka usuwania koło ceny */
.cart-item-subtotal-wrapper {
	width: 180px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	padding-left: 16px;
}

.cart-item-subtotal {
	flex: 0 0 auto;
	color: var(--color-text-primary);
	font-size: 14px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 20px;
	text-align: right;
}

/* Ikonka usuwania produktu koło ceny */
.cart-item-remove {
	flex: 0 0 auto;
}

.cart-item-remove .remove {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 24px;
	height: 24px;
	color: var(--color-text-secondary);
	font-size: 20px;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.2s;
}

.cart-item-remove .remove:hover {
	color: var(--color-primary);
}

/* Cart Summary Section - promo po lewej, podsumowanie po prawej */
.cart-summary-section {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	justify-content: space-between;
	gap: 32px;
	margin-top: 24px;
}

/* Coupon Section - Have a promo code? po lewej */
.cart-coupon-section {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 0 0 auto;
	min-width: 260px;
}

.coupon-link-wrapper,
.promo-trigger {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 8px;
	padding-bottom: 0.5px;
	cursor: pointer;
}

.coupon-icon,
.coupon-icon-arrow {
	display: inline-block;
	font-size: 12px;
}

.coupon-text {
	color: var(--color-text-secondary);
	font-size: 14px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 20px;
}

.coupon-form-wrapper {
	margin-top: 16px;
	width: 100%;
	max-width: 320px;
}

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

.coupon-input {
	flex: 1;
	min-width: 0;
	padding: 8px 12px;
	border: 1px solid var(--color-border);
	border-radius: 4px;
	font-size: 14px;
	font-family: var(--font-secondary);
}

.coupon-button {
	padding: 8px 16px;
	background: var(--color-primary);
	color: white;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-family: var(--font-secondary);
	cursor: pointer;
	transition: opacity 0.2s;
	flex-shrink: 0;
}

.coupon-button:hover {
	opacity: 0.9;
}

.woocommerce-cart-form .hypedome-custom-grid {
	margin: 0 !important ;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.promo-body button {
	background: oklch(92.8% 0.006 264.531) !important;
}

.promo-body input {
	padding: 10px !important;
}

/* Cart collaterals - podsumowanie po prawej */
.cart-summary-section .cart-collaterals {
	flex: 1;
	min-width: 0;
}

.hypedome-custom-grid .cart-collaterals {
	border: none !important;
	padding: 0 !important;
}

/* Cart Totals */
.cart_totals {
	margin-top: 0;
}

.cart-totals-wrapper {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cart-totals-content {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cart-totals-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
}

.cart-totals-label {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	font-size: 14px;
    line-height: 16px;
}

.cart-totals-label > span {
	color: var(--color-text-primary);
	font-size: 14px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 20px;
}

.cart-totals-value {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	color: var(--color-text-primary);
	font-size: 14px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 20px;
	text-align: right;
	min-width: 0;
}

/* Discount Row */
.cart-discount-row .coupon-code-text {
	color: var(--color-text-muted);
	font-size: 12px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 16px;
}

.cart-discount-row .discount-value {
	color: var(--color-success);
}

/* Shipping Row - naprawiony układ, brak nakładania */
.cart-shipping-row .shipping-label-wrapper {
	display: flex;
	align-items: flex-end;
	gap: 3px;
	padding-bottom: 0.5px;
}

.cart-shipping-row .cart-totals-label {
	flex: 0 0 auto;
	min-width: 80px;
	position: absolute;
}

.cart-shipping-row .cart-totals-value.cart-shipping-value {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
}

.cart-shipping-row .cart-totals-value.cart-shipping-value .text-left {
	text-align: left;
    margin: 0;
    color: #717182;
    font-size: 12px;
    line-height: 16px;
}

.cart-shipping-value .woocommerce-shipping-totals {
	width: 100%;
}

.cart-shipping-value .cart-shipping-value-inner {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cart-shipping-value .woocommerce-shipping-methods {
	list-style: none;
	margin: 0;
	padding: 0;
	text-align: right;
}

.cart-shipping-value .woocommerce-shipping-methods li {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.cart-shipping-value .woocommerce-shipping-destination {
	margin: 0;
	color: var(--color-text-muted);
	font-size: 12px;
	line-height: 16px;
	text-align: right;
}

.shipping-info-icon {
	font-size: 14px;
}

/* Total Row */
.cart-total-row {
	padding-top: 12px;
	border-top: 1px solid var(--color-border);
	margin-top: 0;
}

.cart-total-row .total-label {
	color: var(--color-text-primary);
	font-size: 16px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 24px;
}

.cart-total-row .total-value {
	flex-direction: column;
	align-items: flex-end;
	gap: 0;
}

.cart-total-row .total-value > *:first-child {
	color: var(--color-text-primary);
	font-size: 20px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 28px;
	text-align: right;
}

.wc-proceed-to-checkout .checkout-button {
	width: 100% !important;
}

.tax-included-text,
.cart-total-row .total-value .includes_tax {
	color: var(--color-text-muted);
	font-size: 12px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 16px;
	text-align: right;
	margin-top: 4px;
	display: block;
}

.promo-body {
	display: flex;
	flex-direction: column;
}

/* Checkout Button */
.wc-proceed-to-checkout {
	margin-top: 10px;
}

.checkout-button {
	display: flex;
	height: 44px;
	padding: 10px 20px;
	background: var(--color-primary);
	border-radius: 4px;
	justify-content: center;
	align-items: center;
	color: white;
	font-size: 14px;
	font-family: var(--font-secondary);
	font-weight: normal;
	line-height: 20px;
	text-align: center;
	text-decoration: none;
	transition: opacity 0.2s;
	cursor: pointer;
}

.checkout-button:hover {
	opacity: 0.9;
	color: white;
	text-decoration: none;
}

/* Update Cart Button */
.cart-actions {
	display: none;
}

.update-cart-button {
	display: none;
}

/* Loading States */
.cart-item-row.updating {
	opacity: 0.6;
	pointer-events: none;
}

.woocommerce-cart-form.updating {
	opacity: 0.8;
}

.woocommerce-cart-form.updating * {
	pointer-events: none;
}

/* tc-tooltip (same as checkout) – cart shipping tooltip */
.cart_totals .tc-tooltip-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.cart_totals .tc-tooltip-wrap .tc-tooltip-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: help;
}

.cart-total-row .tc-tooltip-wrap .tc-tooltip-trigger {
	font-size: 12px !important;
	color: #717182;
}

.cart_totals .tc-tooltip-wrap .tc-tooltip-trigger svg,.cart-total-row .tc-tooltip-wrap .tc-tooltip-trigger svg{
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	color: #717182;
}
.cart_totals .tc-tooltip-wrap .tc-tooltip {
	position: absolute;
    left: 0;
	top: auto;
    bottom: 100%;
    margin-top: 8px;
    width: 620px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    padding: 12px;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 50;
    pointer-events: none;
}

.cart-total-row .tc-tooltip-wrap .tc-tooltip {
	width: 242px;
}

.cart-total-row .tc-tooltip-wrap .tc-tooltip > *{
	text-align: left;
}
.tc-tooltip hr {
    margin: 12px 0;
    border: none;
    background: #364153;
    height: 1px;
}

.tc-tooltip h5{
	color: white;
    font-size: 14px;
    line-height: 20px;
    margin: 0 0 8px;
    font-weight: 600;
}

.cart_totals .tc-tooltip-wrap .tc-tooltip p {
	margin: 0 0 0.5em;
}
.cart_totals .tc-tooltip-wrap .tc-tooltip p:last-child {
	margin-bottom: 0;
}
.cart_totals .tc-tooltip-wrap .tc-tooltip-arrow {
	position: absolute;
	left: 16px;
	top: 100%;
	border: 8px solid transparent;
	border-top-color: #1f2937;
}
.cart_totals .tc-tooltip-wrap:hover .tc-tooltip,
.cart_totals .tc-tooltip-wrap:focus-within .tc-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.discount-value .woocommerce-Price-amount {
	margin-right: 8px;
}
/* Responsive */

@media (max-width: 768px) {
	.hypedome-custom-grid .promo-trigger {
        justify-content: start !important;
    }
	.cart-wrapper {
		padding: 16px;
	}

	.cart-header {
		padding: 16px 0;
	}

	.cart-content {
		padding: 0;
	}

	.cart-table-header {
		display: none;
	}

	.cart-item-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		padding: 16px 0;
	}

	.cart-item-product {
		width: 100%;
		padding-right: 0;
	}

	.cart-item-quantity-wrapper {
		width: 100%;
		padding: 0;
		justify-content: flex-start;
	}

	.cart-item-subtotal-wrapper {
		width: 100%;
		padding: 0;
		justify-content: flex-start;
	}

	.cart-header-quantity,
	.cart-header-subtotal {
		display: none;
	}

	.cart-totals-row {
		gap: 8px;
	    align-items: stretch;
    }
	
	.cart-totals-row .grid {
		width: 100%;
	}
	
	.cart-totals-value {
		justify-content: flex-start;
		text-align: left;
	}

	.cart-summary-section {
		flex-direction: column;
		align-items: stretch;
	}

	.cart-coupon-section {
		min-width: 0;
	}

	.coupon-form-wrapper {
		max-width: none;
	}
	
	.cart-shipping-value .cart-shipping-value-inner,.cart-total-row .total-value {
		align-items: flex-start;
	}
}


@media(max-width:768px){
	.cart-item-row.cart_item{
		display: grid;
    	grid-template-columns: 3fr 1fr ;
	}

	.cart-item-quantity-wrapper{
		grid-column: 2 / 3;
    	grid-row: 1 / 2;
	}

	.cart-item-subtotal-wrapper{
		grid-column: 2 / 3;
		grid-row: 1 / 2;
		margin-top: auto;
	}
	
	#page-wrap,.cart-wrapper,.cart-header {
		padding-top: 0 !important;
	}
}
/* =========================================================================
   Cart notice repositioning (coupon errors, success messages, info notices)
   -------------------------------------------------------------------------
   Problem: WooCommerce renders .woocommerce-notices-wrapper at the very top
   of .woocommerce, ABOVE the custom <h1 class="cart-title">Cart</h1> — so
   "Sorry, coupon ... is not applicable to selected products." appears
   left-aligned at the top of the page where most users never look.

   Fix: keep CSS-only. Use `display: contents` on .cart-wrapper to lift its
   children (.cart-header, .cart-content) up so they become flex siblings of
   .woocommerce-notices-wrapper inside .woocommerce, then reorder with
   `order` so the notice slots in between the header and the product table.
   Also center the notice and strip default list bullets/padding.
   ========================================================================= */

.woocommerce-cart .woocommerce {
	display: flex;
	flex-direction: column;
}

.woocommerce-cart .cart-wrapper {
	display: contents;
}

.woocommerce-cart .cart-header { order: 1; }
.woocommerce-cart .woocommerce-notices-wrapper { order: 2; }
.woocommerce-cart .cart-content { order: 3; }

.woocommerce-cart .woocommerce-notices-wrapper {
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	padding: 8px 24px 0;
	text-align: center;
	list-style: none;
}

.woocommerce-cart .woocommerce-notices-wrapper:empty {
	display: none;
}

.woocommerce-cart .woocommerce-notices-wrapper ul,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-info {
	list-style: none !important;
	padding: 10px 16px !important;
	margin: 0 auto 16px;
	max-width: 720px;
	text-align: center;
	font-family: var(--font-secondary, 'Nunito Sans', sans-serif);
	font-size: 13px;
	line-height: 1.4;
	border-radius: 6px;
	border: 1px solid transparent;
}

/* Error notice — red background */
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-error {
	background: #fdecec;
	border-color: #f5b5b4;
	color: #8a1a1a;
}

/* Success notice — neutral light green */
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message {
	background: #e6f7ec;
	border-color: #a7e0b9;
	color: #0f5132;
}

/* Info notice — neutral light grey */
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-info {
	background: #f3f4f6;
	border-color: #d1d5db;
	color: #374151;
}

.woocommerce-cart .woocommerce-notices-wrapper li {
	list-style: none !important;
	text-align: center;
	margin: 0;
}

/* Hide the default WooCommerce "Return to shop" / "View cart" buttons that
   come inside notices on the cart page — they clash with the centered alert */
.woocommerce-cart .woocommerce-notices-wrapper .button {
	display: none;
}

@media (max-width: 768px) {
	.woocommerce-cart .woocommerce-notices-wrapper {
		padding: 8px 16px 0;
	}
	.woocommerce-cart .woocommerce-notices-wrapper ul,
	.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-error,
	.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message,
	.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-info {
		font-size: 12px;
		padding: 8px 12px !important;
	}
}
