/**
 * CART PAGE STYLES
 * Custom cart page design for Kamesetas theme.
 * Based on specification from Marge (UX Designer).
 *
 * @package Astra_Child
 * @version 1.0.0
 */

/* ============================================================================
   CART TITLE SECTION (Pink background con status pill)
   ============================================================================ */

.cart-title-section {
	background: var(--c-pink, #D63472);
	padding: 4rem 2vw 2rem;
	border-bottom: var(--border-thick, 3px solid var(--c-black, #0F0F0F));
	position: relative;
	overflow: hidden;
}

.status-pill {
	display: inline-block;
	background: var(--c-neon, #CDFF00);
	color: var(--c-black, #0F0F0F);
	padding: 0.5rem 1rem;
	font-weight: 700;
	text-transform: uppercase;
	transform: rotate(-2deg);
	margin-bottom: 1rem;
	font-size: 1.2rem;
}

.cart-title-section h1 {
	font-family: var(--font-display, 'Anton', sans-serif);
	font-size: clamp(4rem, 12vw, 12rem);
	line-height: 0.8;
	color: var(--c-white, #FAFAFA);
	text-transform: uppercase;
	position: relative;
	z-index: 2;
}

/* ============================================================================
   CART EMPTY MESSAGE
   ============================================================================ */

.cart-empty-wrapper {
	text-align: center;
	padding: 6rem 2rem;
	background: var(--c-white, #FAFAFA);
}

.cart-empty-message {
	font-family: var(--font-tech, 'Space Grotesk', sans-serif);
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 2rem;
	color: var(--c-black, #0F0F0F);
}

.btn-shop {
	display: inline-block;
	background: var(--c-black, #0F0F0F);
	color: var(--c-neon, #CDFF00);
	padding: 1rem 2rem;
	font-family: var(--font-display, 'Anton', sans-serif);
	font-size: 1.2rem;
	text-transform: uppercase;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-shop:hover {
	transform: scale(1.05) rotate(-1deg);
	box-shadow: 5px 5px 0px var(--c-pink, #D63472);
}

/* ============================================================================
   CART LAYOUT - GRID 2 COLUMNAS
   ============================================================================ */

.cart-layout {
	display: grid;
	grid-template-columns: 1fr 400px;
	min-height: 60vh;
}

/* ============================================================================
   CART ITEMS (Left Column)
   ============================================================================ */

.cart-items {
	border-right: var(--border-thick, 3px solid var(--c-black, #0F0F0F));
	background: var(--c-white, #FAFAFA);
}

/* Force screen reader text to be visible and black - HIGHEST SPECIFICITY */
.cart-items .quantity label.screen-reader-text,
.woocommerce-cart-form__cart-item .quantity label.screen-reader-text,
.screen-reader-text {
	position: static !important;
	width: auto !important;
	height: auto !important;
	clip: auto !important;
	clip-path: none !important;
	color: #000000 !important;
	font-size: 0.75rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	display: inline-block !important;
}

/* ============================================================================
   CART ITEM (Product Row)
   ============================================================================ */

.cart-item {
	display: grid;
	grid-template-columns: 200px 1fr auto;
	border-bottom: var(--border-thin, 1px solid var(--c-black, #0F0F0F));
	padding: 2rem;
	position: relative;
	transition: background 0.2s ease;
}

.cart-item:hover {
	background: #f0f0f0;
}

.item-img {
	width: 160px;
	height: 200px;
	background: #EBEBEB;
	border: var(--border-thin, 1px solid var(--c-black, #0F0F0F));
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: hidden;
}

.item-img img {
	width: 90%;
	height: auto;
	mix-blend-mode: multiply;
	object-fit: contain;
}

.item-details {
	padding-left: 2rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.item-sku {
	font-family: monospace;
	font-size: 0.7rem;
	opacity: 0.6;
	margin-bottom: 0.5rem;
}

.item-name {
	font-family: var(--font-display, 'Anton', sans-serif);
	font-size: 2.5rem;
	line-height: 1;
	text-transform: uppercase;
	margin-bottom: 1rem;
}

.item-name a {
	color: var(--c-black, #0F0F0F);
	text-decoration: none;
	transition: color 0.2s ease;
}

.item-name a:hover {
	color: var(--c-pink, #D63472);
}

.item-meta {
	font-weight: 700;
	font-size: 0.9rem;
	text-transform: uppercase;
	color: var(--c-black, #0F0F0F);
}

/* Quantity Controls */
.item-qty {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-top: 1rem;
}

/* WooCommerce Quantity Input Override */
.woocommerce .quantity {
	display: flex !important;
	align-items: center !important;
	gap: 1rem !important;
}

/* Fix for screen reader label - make it visible and black */
.woocommerce .quantity label.screen-reader-text,
.woocommerce-cart-form .quantity label.screen-reader-text,
.cart-item .quantity label.screen-reader-text {
	position: static !important;
	width: auto !important;
	height: auto !important;
	clip: auto !important;
	clip-path: none !important;
	color: #000000 !important;
	font-size: 0.75rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	margin-right: 0.5rem !important;
	display: inline-block !important;
}

.woocommerce .quantity input[type="number"] {
	width: 50px !important;
	height: 35px !important;
	padding: 0.3rem !important;
	text-align: center !important;
	font-family: var(--font-tech, 'Space Grotesk', sans-serif) !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	border: var(--border-thin, 1px solid var(--c-black, #0F0F0F)) !important;
	background: var(--c-white, #FAFAFA) !important;
	-moz-appearance: textfield !important;
}

.woocommerce .quantity input[type="number"]::-webkit-outer-spin-button,
.woocommerce .quantity input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none !important;
	margin: 0 !important;
}

.woocommerce .quantity input[type="number"]:focus {
	outline: 2px solid var(--c-neon, #CDFF00) !important;
	outline-offset: 2px !important;
}

/* Custom +/- Buttons (will be added via JS) */
.qty-btn {
	background: #0F0F0F !important;
	color: #FAFAFA !important;
	border: 1px solid #0F0F0F !important;
	width: 35px !important;
	height: 35px !important;
	font-weight: 700 !important;
	font-size: 1.2rem !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.qty-btn:hover {
	background: #D63472 !important;
	transform: scale(1.05) !important;
}

.qty-btn:focus {
	outline: 2px solid #CDFF00 !important;
	outline-offset: 2px !important;
}

.item-price-col {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-end;
	gap: 1rem;
}

.item-price {
	font-family: var(--font-display, 'Anton', sans-serif);
	font-size: 2rem;
	color: var(--c-black, #0F0F0F);
}

.remove-btn {
	background: transparent;
	border: none;
	text-decoration: underline;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.7rem;
	color: var(--c-black, #0F0F0F);
	cursor: pointer;
	padding: 0.5rem;
	transition: color 0.2s ease;
}

.remove-btn:hover {
	color: var(--c-pink, #D63472);
}

.remove-btn:focus {
	outline: 2px solid var(--c-neon, #CDFF00);
	outline-offset: 2px;
	border-radius: 2px;
}

/* ============================================================================
   CART SIDEBAR (Right Column - Black background)
   ============================================================================ */

.cart-sidebar {
	background: var(--c-black, #0F0F0F);
	color: var(--c-white, #FAFAFA);
	padding: 2rem;
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 80px;
	height: calc(100vh - 80px);
	overflow-y: auto;
}

.sidebar-title {
	font-family: var(--font-display, 'Anton', sans-serif);
	font-size: 2rem;
	border-bottom: 1px solid rgba(255,255,255,0.2);
	padding-bottom: 1rem;
	margin-bottom: 2rem;
	color: var(--c-white, #FAFAFA);
}

.summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--c-white, #FAFAFA);
}

.summary-row.total {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: var(--border-thick, 3px solid var(--c-neon, #CDFF00));
	font-size: 2.5rem;
	font-family: var(--font-display, 'Anton', sans-serif);
	color: var(--c-neon, #CDFF00);
}

/* ============================================================================
   COUPON SECTION
   ============================================================================ */

.coupon-section {
	margin-top: 3rem;
}

.coupon-section label {
	display: block;
	font-size: 0.7rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	opacity: 0.7;
	color: var(--c-white, #FAFAFA);
}

.coupon-input-wrapper {
	display: flex;
	border: 2px solid var(--c-white, #FAFAFA);
}

.coupon-input-wrapper input {
	background: transparent;
	border: none;
	padding: 0.8rem;
	color: var(--c-white, #FAFAFA);
	font-family: var(--font-tech, 'Space Grotesk', sans-serif);
	flex-grow: 1;
	outline: none;
	text-transform: uppercase;
}

.coupon-input-wrapper input::placeholder {
	color: rgba(250, 250, 250, 0.5);
}

.coupon-input-wrapper input:focus {
	outline: none;
}

.coupon-input-wrapper button {
	background: var(--c-white, #FAFAFA);
	border: none;
	padding: 0 1rem;
	font-family: var(--font-display, 'Anton', sans-serif);
	text-transform: uppercase;
	font-weight: 700;
	color: var(--c-black, #0F0F0F);
	cursor: pointer;
	transition: background 0.2s ease;
}

.coupon-input-wrapper button:hover {
	background: var(--c-neon, #CDFF00);
}

/* ============================================================================
   CHECKOUT BUTTON
   ============================================================================ */

.checkout-button {
	display: block;
	width: 100%;
	margin-top: 2rem;
	background: var(--c-neon, #CDFF00) !important;
	color: var(--c-black, #0F0F0F) !important;
	border: none;
	padding: 1.5rem;
	font-family: var(--font-display, 'Anton', sans-serif);
	font-size: 2rem;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	cursor: pointer;
}

.checkout-button:hover {
	transform: scale(1.02) rotate(-1deg);
	box-shadow: 10px 10px 0px var(--c-pink, #D63472);
}

.checkout-button:focus {
	outline: 2px solid var(--c-white, #FAFAFA);
	outline-offset: 4px;
}

.passive-aggressive-note {
	font-size: 0.8rem;
	font-style: italic;
	margin-top: 1rem;
	text-align: center;
	opacity: 0.6;
	color: var(--c-white, #FAFAFA);
}

/* ============================================================================
   HIDE PAYPAL EXPRESS BUTTONS ON CART
   ============================================================================ */

.woocommerce-cart .ppc-button-wrapper,
.woocommerce-cart #cpsw-payment-request-wrapper,
.woocommerce-cart .cpsw-payment-request-main-wrapper {
	display: none !important;
}

/* ============================================================================
   WOOCOMMERCE OVERRIDES
   ============================================================================ */

/* Hide default cart table headers */
.woocommerce-cart-form .shop_table {
	display: none;
}

/* Hide default actions row */
.woocommerce-cart-form__cart-item .actions {
	display: none;
}

/* ============================================================================
   RESPONSIVE BREAKPOINT (Tablet/Mobile ≤ 1024px)
   ============================================================================ */

@media (max-width: 1024px) {
	.cart-layout {
		grid-template-columns: 1fr;
	}

	.cart-sidebar {
		position: static;
		height: auto;
		border-top: var(--border-thick, 3px solid var(--c-black, #0F0F0F));
		min-height: auto;
	}

	.cart-item {
		grid-template-columns: 100px 1fr;
		padding: 1rem;
	}

	.item-img {
		width: 80px;
		height: 100px;
	}

	.item-img img {
		width: 85%;
	}

	.item-details {
		padding-left: 1rem;
	}

	.item-name {
		font-size: 1.8rem;
	}

	.item-price-col {
		grid-column: 1 / -1;
		flex-direction: row;
		justify-content: space-between;
		border-top: 1px solid #ddd;
		padding-top: 1rem;
		margin-top: 1rem;
	}

	.item-price {
		font-size: 1.5rem;
	}

	.sidebar-title {
		font-size: 1.5rem;
	}

	.summary-row.total {
		font-size: 2rem;
	}

	.checkout-button {
		font-size: 1.5rem;
		padding: 1rem;
	}
}

@media (max-width: 600px) {
	.cart-title-section h1 {
		font-size: clamp(3rem, 15vw, 6rem);
	}

	.item-name {
		font-size: 1.5rem;
	}

	.item-price {
		font-size: 1.2rem;
	}

	.summary-row.total {
		font-size: 1.8rem;
	}

	.checkout-button {
		font-size: 1.2rem;
		padding: 0.8rem;
	}
}
