/**
 * Cart and Checkout Page Styles
 * Proper CSS without inline styles or quick fixes
 *
 * @package Afriyah
 */

/* ============================================
   CART PAGE STYLES
   ============================================ */

/* Hide sidebars on cart page */
.woocommerce-cart #wf-sidebar,
.woocommerce-cart .wf_widget-area,
.woocommerce-cart aside.widget-area,
.woocommerce-cart .sidebar,
.woocommerce-cart aside.shop-sidebar {
	display: none;
	visibility: hidden;
}

/* Cart wrapper */
.woocommerce-cart-wrapper {
	width: 100%;
}

.woocommerce-cart-wrapper .wf-row {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
}

/* Cart form styling */
.woocommerce-cart-form {
	margin-bottom: 0;
}

.woocommerce-cart-form .actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	flex-wrap: wrap;
	margin-top: 20px;
}

.woocommerce-cart-form .coupon {
	display: flex;
	gap: 10px;
	align-items: center;
	flex: 1;
	min-width: 250px;
}

.woocommerce-cart-form .coupon input {
	flex: 1;
	min-width: 200px;
	padding: 10px 15px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 14px;
}

.woocommerce-cart-form .coupon button {
	padding: 10px 20px;
	background: #006400;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
}

.woocommerce-cart-form .coupon button:hover {
	background: #004d00;
	transform: translateY(-2px);
}

.woocommerce-cart-form .button[name="update_cart"] {
	padding: 10px 20px;
	background: #666;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
}

.woocommerce-cart-form .button[name="update_cart"]:hover {
	background: #555;
}

/* Cart totals - sticky on desktop */
.cart-collaterals {
	position: sticky;
	top: 20px;
	align-self: start;
}

@media (max-width: 991px) {
	.cart-collaterals {
		position: relative;
		top: auto;
		margin-top: 30px;
	}
}

/* New in Store section */
.new-in-store-wrapper {
	margin-top: 40px;
}

.new-in-store-section {
	padding: 40px 20px;
	background: #f8f9fa;
	border-radius: 12px;
}

.woocommerce-cart-empty .new-in-store-section {
	margin-top: 60px;
}

.new-in-store-section h3 {
	font-size: 24px;
	font-weight: 700;
	color: #333;
	margin: 0 0 30px;
	text-align: center;
}

.new-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 24px;
	max-width: 1200px;
	margin: 0 auto;
	align-items: stretch;
}

.new-product-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	transition: transform 0.3s;
	display: flex;
	flex-direction: column;
	position: relative;
	height: 100%;
}

.new-product-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.new-product-card .product-image-wrapper {
	position: relative;
	height: 220px;
	overflow: hidden;
	background: #f0f0f0;
	width: 100%;
	min-height: 220px;
	flex-shrink: 0;
	display: block;
}

.new-product-card .product-image-wrapper img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	visibility: visible;
	opacity: 1;
	background: #f0f0f0;
	min-width: 100%;
	min-height: 100%;
}

.new-product-card .product-info {
	padding: 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.new-product-card .product-info h4 {
	font-size: 15px;
	font-weight: 600;
	color: #333;
	margin: 0 0 8px;
	min-height: 44px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.4;
}

.new-product-card .product-price {
	font-size: 18px;
	font-weight: 700;
	color: #006400;
	margin-bottom: 12px;
	margin-top: auto;
}

.new-product-card .product-button-wrapper {
	padding: 0 16px 16px;
	margin-top: auto;
}

.new-product-card .product-button {
	display: block;
	padding: 12px 16px;
	background: #006400;
	color: #fff;
	border-radius: 8px;
	text-align: center;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	transition: background 0.3s;
	width: 100%;
	box-sizing: border-box;
	min-height: 44px;
	line-height: 1.5;
}

.new-product-card .product-button:hover {
	background: #009900;
}

.new-product-card .product-button.out-of-stock {
	background: #ccc;
	color: #666;
	cursor: not-allowed;
}

.new-product-card .product-link {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	flex: 1;
}

@media (max-width: 768px) {
	.new-products-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
	.new-in-store-section {
		padding: 30px 15px;
	}
}

@media (max-width: 480px) {
	.new-products-grid {
		grid-template-columns: 1fr;
	}
}

/* ============================================
   EMPTY CART PAGE STYLES
   ============================================ */

.woocommerce-cart-empty {
	width: 100%;
}

.cart-empty-content {
	text-align: center;
	padding: 60px 20px;
}

.cart-empty-icon {
	font-size: 80px;
	margin-bottom: 20px;
}

.cart-empty-title {
	font-size: 28px;
	font-weight: 700;
	color: #333;
	margin: 0 0 15px;
}

.cart-empty-message {
	font-size: 16px;
	color: #666;
	margin: 0 0 30px;
}

.af-btn-primary {
	display: inline-block;
	padding: 16px 32px;
	background: #006400;
	color: #fff;
	border-radius: 50px;
	text-decoration: none;
	font-weight: 700;
	font-size: 16px;
	transition: all 0.3s;
	box-shadow: 0 4px 12px rgba(0,100,0,0.3);
}

.af-btn-primary:hover {
	background: #008000;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 100, 0, 0.4);
}

/* ============================================
   CHECKOUT PAGE STYLES
   ============================================ */

/* Checkout shipping estimate */
.af-checkout-shipping-info {
	margin: 20px 0;
	padding: 16px;
	background: #f7faf7;
	border-radius: 12px;
	border-left: 4px solid #006400;
}

.af-checkout-shipping-info-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.af-checkout-shipping-info-header i {
	color: #006400;
	font-size: 18px;
}

.af-checkout-shipping-info-header strong {
	color: #333;
	font-size: 16px;
}

.af-checkout-shipping-info p {
	margin: 0;
	color: #666;
	font-size: 14px;
}
