/* ============================================
   CITREE ECOMMERCE STYLESHEET
   Consolidates all styles for Products, Cart, and Checkout pages
   ============================================ */

/* Reset & Base Styles */
:root {
	--eco-primary: #3c642d;
	--eco-primary-dark: #2f5124;
	--eco-accent: #d7be73;
	--eco-accent-dark: #b89f58;
	--eco-bg: #f2f3ef;
	--eco-border: #dcdcdc;
	--eco-danger: #a94442;
	--eco-danger-dark: #8b3331;
	--eco-success: #446e32;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	color: #333;
	background-color: var(--eco-bg);
}

/* ============================================
   CONTAINERS
   ============================================ */

.ecommerce-container,
.cart-container,
.checkout-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

/* ============================================
   HEADERS
   ============================================ */

.shop-header,
.cart-header,
.checkout-header {
	background: linear-gradient(135deg, var(--eco-primary) 0%, var(--eco-primary-dark) 100%);
	color: white;
	padding: 30px;
	border-radius: 10px;
	margin-bottom: 30px;
	text-align: center;
	box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.shop-header h1,
.cart-header h1,
.checkout-header h1 {
	font-size: 36px;
	font-weight: 700;
	margin-bottom: 5px;
}

.shop-header p,
.checkout-header p {
	font-size: 16px;
	opacity: 0.95;
}

.shop-header h1 {
	font-size: 42px;
}

/* ============================================
   PROGRESS BAR (Checkout)
   ============================================ */

.progress-bar-container {
	display: flex;
	justify-content: space-between;
	margin-bottom: 40px;
	position: relative;
}

.progress-step {
	flex: 1;
	text-align: center;
	position: relative;
}

.progress-step-number {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: #e0e0e0;
	color: #999;
	font-weight: 700;
	font-size: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 10px;
	z-index: 2;
	position: relative;
}

.progress-step.active .progress-step-number {
	background: linear-gradient(135deg, var(--eco-primary) 0%, var(--eco-primary-dark) 100%);
	color: white;
}

.progress-step.completed .progress-step-number {
	background: var(--eco-success);
	color: white;
}

.progress-step-label {
	font-size: 12px;
	color: #999;
	font-weight: 600;
	text-transform: uppercase;
}

.progress-step.active .progress-step-label {
	color: var(--eco-primary);
}

/* ============================================
   TOPBAR & SEARCH (Products)
   ============================================ */

.shop-top-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
	flex-wrap: wrap;
	gap: 20px;
}

.cart-counter {
	background: var(--eco-primary);
	color: white;
	padding: 10px 20px;
	border-radius: 25px;
	font-weight: 600;
	display: inline-block;
}

.cart-counter i {
	margin-right: 8px;
}

.search-bar {
	flex: 1;
	min-width: 250px;
}

.search-bar input {
	width: 100%;
	padding: 12px 15px;
	border: 2px solid var(--eco-border);
	border-radius: 5px;
	font-size: 14px;
	transition: border-color 0.3s;
}

.search-bar input:focus {
	outline: none;
	border-color: var(--eco-primary);
}

/* ============================================
   CONTENT LAYOUTS
   ============================================ */

.shop-content {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 30px;
}

.shop-content.shop-content-full {
	display: block;
}

.checkout-content {
	display: grid;
	grid-template-columns: 1fr 350px;
	gap: 30px;
	margin-bottom: 30px;
}

.cart-content {
	display: grid;
	grid-template-columns: 1fr 350px;
	gap: 30px;
	margin-bottom: 30px;
}

/* ============================================
   SIDEBAR (Products)
   ============================================ */

.shop-sidebar {
	background: #f8f9fa;
	padding: 20px;
	border-radius: 8px;
	height: fit-content;
}

.filter-section {
	margin-bottom: 25px;
}

.filter-section h3 {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 15px;
	color: #333;
	border-bottom: 2px solid #667eea;
	padding-bottom: 10px;
}

.filter-option {
	margin-bottom: 10px;
}

.filter-option label {
	display: flex;
	align-items: center;
	cursor: pointer;
	font-size: 14px;
	color: #555;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
	margin-right: 8px;
	cursor: pointer;
}

.price-range {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 10px;
	gap: 10px;
}

.price-range input {
	width: 70px;
	padding: 5px;
	border: 1px solid #ddd;
	border-radius: 4px;
}

/* ============================================
   PRODUCTS GRID & CARDS
   ============================================ */

.products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 25px;
}

.products-grid-section {
	margin-bottom: 28px;
}

.products-section-title {
	position: sticky;
	top: 12px;
	z-index: 5;
	background: #fff;
	padding: 10px 12px;
	border-radius: 10px;
	box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
	margin: 8px 0 14px;
}

.product-card {
	background: white;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	transition: all 0.3s ease;
	position: relative;
}

.product-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.product-image {
	position: relative;
	overflow: hidden;
	height: 220px;
	background: #f5f5f5;
}

.product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
	transform: scale(1.1);
}

.product-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background: var(--eco-accent-dark);
	color: white;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	z-index: 2;
}

.product-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(60, 100, 45, 0.95);
	padding: 15px;
	transform: translateY(100%);
	transition: transform 0.3s ease;
}

.product-card:hover .product-overlay {
	transform: translateY(0);
}

.product-overlay-actions {
	display: flex;
	gap: 10px;
	justify-content: space-between;
}

.product-overlay button {
	flex: 1;
	padding: 8px;
	border: none;
	border-radius: 4px;
	color: white;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s;
}

.btn-quick-view {
	background: rgba(255,255,255,0.2);
	border: 1px solid white;
}

.btn-view-details {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 16px;
	line-height: 1.2;
	box-sizing: border-box;
	text-decoration: none;
	text-align: center;
}

.btn-quick-view:hover {
	background: rgba(255,255,255,0.3);
}

.product-info {
	padding: 15px;
}

.product-category {
	font-size: 12px;
	color: #999;
	text-transform: uppercase;
	margin-bottom: 5px;
	font-weight: 600;
}

.product-name {
	font-size: 16px;
	font-weight: 700;
	color: #333;
	margin-bottom: 10px;
	line-height: 1.3;
	height: 36px;
	overflow: hidden;
}

.product-name-link {
	text-decoration: none;
	color: inherit;
}

.product-rating {
	display: flex;
	align-items: center;
	margin-bottom: 10px;
	font-size: 13px;
}

.stars {
	color: #ffc107;
	margin-right: 5px;
}

.product-price {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	padding-top: 10px;
	border-top: 1px solid #eee;
}

.price-amount {
	font-size: 22px;
	font-weight: 700;
	color: var(--eco-primary);
}

.original-price {
	font-size: 14px;
	color: #999;
	text-decoration: line-through;
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
	text-align: center;
	padding: 60px 20px;
	grid-column: 1 / -1;
}

.empty-state-icon,
.empty-cart-icon {
	font-size: 64px;
	margin-bottom: 20px;
	opacity: 0.3;
}

.empty-state h2,
.empty-cart h2 {
	font-size: 24px;
	color: #333;
	margin-bottom: 10px;
}

.empty-state p,
.empty-cart p {
	color: #999;
	margin-bottom: 20px;
}

.empty-cart {
	text-align: center;
	padding: 60px 20px;
	background: white;
	border-radius: 10px;
	border: 1px solid #e0e0e0;
}

/* ============================================
   CART PAGE STYLES
   ============================================ */

.cart-items-section {
	background: white;
	border-radius: 10px;
	border: 1px solid #e0e0e0;
	overflow: hidden;
}

.cart-items-header {
	background: #f8f9fa;
	padding: 15px 20px;
	border-bottom: 2px solid #e0e0e0;
	display: grid;
	grid-template-columns: 1fr 100px 100px 100px 80px;
	gap: 10px;
	font-weight: 600;
	color: #333;
}

.cart-item {
	padding: 20px;
	border-bottom: 1px solid #e0e0e0;
	display: grid;
	grid-template-columns: 1fr 100px 100px 100px 80px;
	gap: 10px;
	align-items: center;
}

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

.item-details {
	display: flex;
	gap: 15px;
}

.item-image {
	width: 80px;
	height: 80px;
	border-radius: 8px;
	overflow: hidden;
	background: #f5f5f5;
	flex-shrink: 0;
}

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

.item-info h3 {
	font-size: 16px;
	font-weight: 600;
	color: #333;
	margin-bottom: 5px;
}

.item-price {
	font-size: 18px;
	font-weight: 700;
	color: var(--eco-primary);
	text-align: center;
}

.item-quantity {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

.qty-btn {
	width: 30px;
	height: 30px;
	border: 1px solid #ddd;
	background: white;
	cursor: pointer;
	border-radius: 4px;
	font-weight: 600;
	transition: all 0.3s;
}

.qty-btn:hover {
	background: var(--eco-primary);
	color: white;
	border-color: var(--eco-primary);
}

.qty-input {
	width: 40px;
	text-align: center;
	border: 1px solid #ddd;
	padding: 5px;
	border-radius: 4px;
}

.item-total {
	font-size: 16px;
	font-weight: 700;
	color: #333;
	text-align: center;
}

.remove-btn {
	background: var(--eco-danger);
	color: white;
	border: none;
	padding: 8px 12px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 12px;
	transition: all 0.3s;
	width: 100%;
}

.remove-btn:hover {
	background: var(--eco-danger-dark);
	transform: scale(1.05);
}

/* ============================================
   CHECKOUT FORM STYLES
   ============================================ */

.checkout-form {
	background: white;
	border-radius: 10px;
	border: 1px solid #e0e0e0;
	padding: 30px;
}

.form-section {
	margin-bottom: 30px;
}

.form-section:last-child {
	margin-bottom: 0;
}

.form-section h2 {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 20px;
	color: #333;
	border-bottom: 2px solid #f0f0f0;
	padding-bottom: 15px;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 20px;
}

.form-row.full {
	grid-template-columns: 1fr;
}

.form-group {
	margin-bottom: 15px;
}

.form-group:last-child {
	margin-bottom: 0;
}

label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
	font-size: 14px;
}

label .required {
	color: #dc3545;
}

input, select, textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 5px;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--eco-primary);
	box-shadow: 0 0 0 3px rgba(60, 100, 45, 0.12);
}

textarea {
	resize: vertical;
	min-height: 100px;
}

/* Terms & Conditions */
.terms-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 20px 0;
	padding: 15px;
	background: #f8f9fa;
	border-radius: 5px;
}

.terms-checkbox input[type="checkbox"] {
	width: auto;
	margin-top: 3px;
	cursor: pointer;
}

.terms-checkbox label {
	margin: 0;
	font-size: 13px;
	color: #666;
}

.terms-checkbox a {
	color: var(--eco-primary);
	text-decoration: none;
}

.terms-checkbox a:hover {
	text-decoration: underline;
}

/* ============================================
   SUMMARY SIDEBARS (Cart & Checkout)
   ============================================ */

.cart-summary,
.order-summary {
	background: white;
	border-radius: 10px;
	border: 1px solid #e0e0e0;
	padding: 25px;
	height: fit-content;
	position: sticky;
	top: 20px;
}

.cart-summary h2,
.order-summary h2 {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 20px;
	color: #333;
	border-bottom: 2px solid #e0e0e0;
	padding-bottom: 15px;
}

.summary-row,
.summary-item {
	display: flex;
	justify-content: space-between;
	margin-bottom: 12px;
	font-size: 14px;
	color: #666;
}

.summary-row strong,
.summary-item strong {
	color: #333;
}

.summary-item-image {
	width: 60px;
	height: 60px;
	border-radius: 5px;
	overflow: hidden;
	background: #f5f5f5;
	margin-bottom: 10px;
}

.summary-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.summary-item-name {
	font-size: 13px;
	font-weight: 600;
	color: #333;
	margin-bottom: 3px;
}

.summary-item-details {
	font-size: 12px;
	color: #999;
}

.summary-divider {
	border-top: 2px solid #e0e0e0;
	margin: 15px 0;
}

.summary-total {
	display: flex;
	justify-content: space-between;
	font-size: 20px;
	font-weight: 700;
	color: #333;
	margin-bottom: 20px;
}

.summary-total .price {
	color: var(--eco-primary);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-add-to-cart,
.btn-checkout,
.btn-place-order {
	width: 100%;
	padding: 12px;
	background: linear-gradient(135deg, var(--eco-primary) 0%, var(--eco-primary-dark) 100%);
	color: white;
	border: none;
	border-radius: 5px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.btn-place-order {
	font-size: 16px;
	padding: 14px;
}

.btn-add-to-cart:hover,
.btn-checkout:hover,
.btn-place-order:hover:not(:disabled) {
	transform: scale(1.02);
	box-shadow: 0 4px 12px rgba(60, 100, 45, 0.35);
}

.btn-add-to-cart.loading,
.btn-checkout.loading,
.btn-place-order.loading {
	opacity: 0.7;
	cursor: not-allowed;
}

.btn-place-order:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.btn-continue-shopping,
.btn-continue {
	display: inline-block;
	background: linear-gradient(135deg, var(--eco-primary) 0%, var(--eco-primary-dark) 100%);
	color: white;
	padding: 12px 30px;
	border-radius: 5px;
	text-decoration: none;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: all 0.3s;
	font-size: 14px;
}

.btn-inline-flex {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

.btn-continue-shopping:hover,
.btn-continue:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 12px rgba(60, 100, 45, 0.35);
}

.btn-continue {
	width: 100%;
	padding: 10px;
	background: white;
	color: var(--eco-primary);
	border: 2px solid var(--eco-primary);
	margin-bottom: 10px;
}

.btn-continue:hover {
	background: #f8f9fa;
}

/* ============================================
   MESSAGES
   ============================================ */

.error-message {
	background: #f8d7da;
	color: #721c24;
	padding: 12px 15px;
	border-radius: 5px;
	margin-bottom: 20px;
	border: 1px solid #f5c6cb;
}

.success-message {
	background: #d4edda;
	color: #155724;
	padding: 12px 15px;
	border-radius: 5px;
	margin-bottom: 20px;
	border: 1px solid #c3e6cb;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background: var(--eco-success);
	color: white;
	padding: 15px 20px;
	border-radius: 5px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	z-index: 1000;
	animation: slideIn 0.3s ease;
}

.toast.error {
	background: var(--eco-danger);
}

.back-products-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	margin-top: 12px;
	border-radius: 999px;
	background: linear-gradient(135deg, #f6f7f2 0%, #ecefdf 100%);
	border: 1px solid rgba(60, 100, 45, 0.22);
	color: #374151;
	text-decoration: none;
	font-weight: 600;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
	transition: all .2s ease;
}

.back-products-link:hover {
	transform: translateY(-1px);
	color: #111827;
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.10);
}

.checkout-security-note {
	font-size: 12px;
	color: #999;
	text-align: center;
	margin-top: 15px;
}

.quick-view-modal {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 9999;
	align-items: center;
	justify-content: center;
}

.quick-view-dialog {
	background: #fff;
	width: 90%;
	max-width: 540px;
	border-radius: 10px;
	overflow: hidden;
}

.quick-view-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	border-bottom: 1px solid #eee;
}

.quick-view-title {
	margin: 0;
}

.quick-view-close {
	border: 0;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.quick-view-body {
	padding: 16px;
}

.quick-view-image {
	width: 100%;
	max-height: 280px;
	object-fit: cover;
	border-radius: 8px;
}

.quick-view-name {
	margin: 12px 0 6px;
}

.quick-view-description {
	margin: 0 0 8px;
	color: #666;
}

.quick-view-price {
	margin: 0;
}

.quick-view-link-wrap {
	margin-top: 12px;
}

.detail-row {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: flex-start;
}

.detail-image-col {
	flex: 1 1 380px;
}

.detail-info-col {
	flex: 1 1 360px;
}

.detail-main-image {
	width: 100%;
	max-height: 460px;
	object-fit: cover;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.detail-category {
	margin-bottom: 10px;
}

.detail-title {
	margin: 0 0 8px;
}

.detail-short {
	color: #666;
	margin-bottom: 16px;
}

.detail-price {
	color: var(--eco-primary);
	margin-bottom: 18px;
}

.detail-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 10px;
}

@keyframes slideIn {
	from {
		transform: translateX(400px);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 40px;
	grid-column: 1 / -1;
}

.pagination a, .pagination span {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s;
	text-decoration: none;
	color: #333;
}

.pagination a:hover {
	background: var(--eco-primary);
	color: white;
	border-color: var(--eco-primary);
}

.pagination .active {
	background: var(--eco-primary);
	color: white;
	border-color: var(--eco-primary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
	/* Shop/Products */
	.shop-content {
		grid-template-columns: 1fr;
	}

	.shop-sidebar {
		display: none;
	}

	.products-grid {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		gap: 15px;
	}

	.shop-header h1 {
		font-size: 32px;
	}

	.shop-top-bar {
		flex-direction: column;
	}

	.search-bar {
		width: 100%;
	}

	/* Cart */
	.cart-content {
		grid-template-columns: 1fr;
	}

	.cart-summary {
		position: static;
	}

	.cart-items-header,
	.cart-item {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.item-details {
		flex-direction: column;
	}

	.item-image {
		width: 100%;
		height: auto;
		min-height: 150px;
	}

	/* Checkout */
	.checkout-content {
		grid-template-columns: 1fr;
	}

	.order-summary {
		position: static;
	}

	.form-row {
		grid-template-columns: 1fr;
	}

	.progress-bar-container {
		flex-direction: column;
		gap: 20px;
	}

	/* Headers */
	.cart-header h1,
	.checkout-header h1 {
		font-size: 28px;
	}

	/* Containers */
	.ecommerce-container,
	.cart-container,
	.checkout-container {
		padding: 15px;
	}
}

@media (max-width: 480px) {
	.shop-header h1 {
		font-size: 24px;
	}

	.cart-header h1,
	.checkout-header h1 {
		font-size: 22px;
	}

	.products-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 10px;
	}

	.product-card {
		padding: 10px;
	}

	.btn-add-to-cart,
	.btn-checkout,
	.btn-place-order,
	.btn-continue {
		padding: 10px;
		font-size: 13px;
	}

	.toast {
		bottom: 10px;
		right: 10px;
		left: 10px;
		transform: none;
	}
}
