/**
 * Intervals Cart - Shopify-inspired Design
 * Single column layout with modern card-based items
 */

/* ============================================================================
   RESET & OVERRIDE KADENCE THEME - FULL WIDTH FIX
   ============================================================================ */

/* Force full width on all Kadence containers */
.woocommerce-cart .site-container,
.woocommerce-cart .content-wrap,
.woocommerce-cart .content-container,
.woocommerce-cart .site-main,
.woocommerce-cart .entry-content-wrap,
.woocommerce-cart .entry-content,
.woocommerce-cart .single-content,
.woocommerce-cart .woocommerce {
	max-width: 100% !important;
	width: 100% !important;
	padding-left: 20px !important;
	padding-right: 20px !important;
	box-sizing: border-box !important;
}

/* Content area full width */
.woocommerce-cart .content-area {
	max-width: 1400px !important;
	width: 100% !important;
	margin: 0 auto !important;
}

/* Remove any width restrictions */
.woocommerce-cart article.entry {
	max-width: 100% !important;
	width: 100% !important;
}

/* ============================================================================
   CART WRAPPER
   ============================================================================ */

.intervals-cart-wrapper {
	max-width: 1400px !important;
	width: 100% !important;
	margin: 0 auto !important;
	padding: 2rem 20px !important;
	clear: both !important;
	overflow: visible !important;
	display: block !important;
	box-sizing: border-box !important;
}

.intervals-cart-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 2rem;
	padding-bottom: 1rem;
	border-bottom: 2px solid #e5e7eb;
}

.intervals-cart-header h1 {
	margin: 0;
	font-size: 2rem;
	font-weight: 700;
}

.intervals-cart-header .cart-count {
	font-size: 1.125rem;
	color: #6b7280;
}

/* ============================================================================
   CART ITEMS - CARD STYLE
   ============================================================================ */

.intervals-cart-items {
	margin-bottom: 2rem;
	width: 100%;
	max-width: 100%;
	clear: both;
}

.intervals-cart-item {
	display: grid;
	grid-template-columns: 100px 1fr auto auto auto;
	gap: 1.5rem;
	align-items: center;
	padding: 1.5rem;
	margin-bottom: 1rem;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	position: relative;
	transition: box-shadow 0.2s ease;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.intervals-cart-item:hover {
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Image */
.cart-item-image {
	width: 100px;
	height: 100px;
}

.cart-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 4px;
}

/* Details */
.cart-item-details {
	flex: 1;
	min-width: 0;
}

.cart-item-name {
	font-size: 1.125rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.cart-item-name a {
	color: #111827;
	text-decoration: none;
	transition: color 0.2s ease;
}

.cart-item-name a:hover {
	color: #f59e0b;
}

.cart-item-price {
	font-size: 0.875rem;
	color: #6b7280;
	margin-top: 0.5rem;
}

.cart-item-price .price-label {
	display: inline-block;
	margin-right: 0.5rem;
}

.cart-item-price .amount {
	font-weight: 600;
	color: #111827;
}

/* Quantity */
.cart-item-quantity {
	display: flex;
	align-items: center;
}

.cart-item-quantity .quantity {
	display: flex;
	align-items: center;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	overflow: hidden;
}

.cart-item-quantity input[type="number"] {
	width: 60px;
	padding: 0.5rem;
	text-align: center;
	border: none;
	font-size: 1rem;
	-moz-appearance: textfield;
}

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

/* Subtotal */
.cart-item-subtotal {
	font-size: 1.25rem;
	font-weight: 700;
	color: #111827;
	text-align: right;
	min-width: 120px;
}

/* Remove button */
.cart-item-remove {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
}

.cart-item-remove .remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	font-size: 1.5rem;
	line-height: 1;
	color: #9ca3af;
	text-decoration: none;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.cart-item-remove .remove:hover {
	background: #fee2e2;
	color: #dc2626;
}

/* ============================================================================
   CART ACTIONS
   ============================================================================ */

.intervals-cart-actions {
	display: flex;
	justify-content: flex-end;
	padding: 1rem 0;
	margin-top: 1rem;
	border-top: 1px solid #e5e7eb;
}

.intervals-update-cart {
	padding: 0.75rem 2rem;
	background: #f3f4f6;
	color: #374151;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.intervals-update-cart:hover {
	background: #e5e7eb;
}

/* ============================================================================
   CART SUMMARY
   ============================================================================ */

.intervals-cart-summary {
	max-width: 500px;
	margin: 0 auto 2rem;
}

/* Coupon Section */
.intervals-coupon-section {
	background: #fef3c7;
	border: 2px solid #fbbf24;
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 2rem;
}

.intervals-coupon-section h3 {
	margin: 0 0 1rem 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: #92400e;
}

.intervals-coupon-section .coupon {
	display: flex;
	gap: 0.75rem;
}

.intervals-coupon-section input[type="text"] {
	flex: 1;
	padding: 0.75rem 1rem;
	border: 1px solid #d97706;
	border-radius: 6px;
	font-size: 1rem;
	background: #ffffff;
}

.intervals-coupon-section button {
	padding: 0.75rem 2rem;
	background: #f59e0b;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
	white-space: nowrap;
}

.intervals-coupon-section button:hover {
	background: #d97706;
}

/* Totals */
.cart_totals {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 1.5rem;
}

.cart_totals h2 {
	margin: 0 0 1rem 0;
	font-size: 1.25rem;
	font-weight: 600;
	padding-bottom: 1rem;
	border-bottom: 1px solid #e5e7eb;
}

.cart_totals .shop_table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5rem;
}

.cart_totals .shop_table tr {
	border-bottom: 1px solid #e5e7eb;
}

.cart_totals .shop_table th,
.cart_totals .shop_table td {
	padding: 0.875rem 0;
	text-align: left;
}

.cart_totals .shop_table th {
	font-weight: 500;
	color: #6b7280;
}

.cart_totals .shop_table td {
	text-align: right;
	font-weight: 600;
	color: #111827;
}

.cart_totals .order-total th,
.cart_totals .order-total td {
	font-size: 1.25rem;
	font-weight: 700;
	padding-top: 1rem;
	border-top: 2px solid #d1d5db;
}

.cart_totals .order-total .amount {
	color: #f59e0b;
}

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

.wc-proceed-to-checkout .checkout-button {
	display: block;
	width: 100%;
	padding: 1.125rem 2rem;
	background: #f59e0b;
	color: #ffffff;
	text-align: center;
	text-decoration: none;
	font-size: 1.125rem;
	font-weight: 700;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.wc-proceed-to-checkout .checkout-button:hover {
	background: #d97706;
	transform: translateY(-2px);
	box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15);
}

/* ============================================================================
   CONTINUE SHOPPING
   ============================================================================ */

.intervals-continue-shopping {
	text-align: center;
	padding: 1rem 0;
}

.intervals-continue-shopping .button-secondary {
	padding: 0.75rem 2rem;
	background: transparent;
	color: #6b7280;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	text-decoration: none;
	font-size: 1rem;
	font-weight: 500;
	transition: all 0.2s ease;
	display: inline-block;
}

.intervals-continue-shopping .button-secondary:hover {
	background: #f3f4f6;
	color: #111827;
	border-color: #9ca3af;
}

/* ============================================================================
   RESPONSIVE - MOBILE
   ============================================================================ */

@media (max-width: 768px) {
	.intervals-cart-wrapper {
		padding: 1rem 0.75rem;
	}

	.intervals-cart-header h1 {
		font-size: 1.5rem;
	}

	.intervals-cart-item {
		grid-template-columns: 80px 1fr;
		gap: 1rem;
		padding: 1rem;
		grid-template-areas:
			"image details"
			"image quantity"
			"subtotal subtotal";
	}

	.cart-item-image {
		grid-area: image;
		width: 80px;
		height: 80px;
	}

	.cart-item-details {
		grid-area: details;
	}

	.cart-item-quantity {
		grid-area: quantity;
		justify-self: start;
		margin-top: 0.5rem;
	}

	.cart-item-subtotal {
		grid-area: subtotal;
		text-align: center;
		margin-top: 1rem;
		padding-top: 1rem;
		border-top: 1px solid #e5e7eb;
	}

	.cart-item-remove {
		top: 0.5rem;
		right: 0.5rem;
	}

	.intervals-coupon-section {
		padding: 1rem;
	}

	.intervals-coupon-section .coupon {
		flex-direction: column;
	}

	.intervals-coupon-section button {
		width: 100%;
	}
}

/* ============================================================================
   DARK MODE SUPPORT
   ============================================================================ */

@media (prefers-color-scheme: dark) {
	.intervals-cart-item {
		background: #1f2937;
		border-color: #374151;
	}

	.cart-item-name a {
		color: #f9fafb;
	}

	.cart-item-subtotal,
	.cart_totals .shop_table td {
		color: #f9fafb;
	}

	.cart_totals {
		background: #1f2937;
		border-color: #374151;
	}
}
