/* Smart Land Product Card Block */

:root {
	--sl-primary: #f48222;
	--sl-blue: #025a78;
	--sl-green: #3e8e40;
	--sl-brand-bg: #daf0f1;
	--sl-border: #ccc;
	--sl-gray: #666;
	--sl-shadow: 0 0 2px rgba(0, 0, 0, 0.24);
	--sl-radius-card: 12px;
	--sl-radius-btn: 40px;
	--sl-radius-badge: 4px;
}

/* Grid wrapper */
.sl-products-grid {
	display: grid;
	gap: 20px;
	width: 100%;
	align-items: stretch;
}

.sl-products-grid.sl-cols-1 { grid-template-columns: repeat(1, 1fr); }
.sl-products-grid.sl-cols-2 { grid-template-columns: repeat(2, 1fr); }
.sl-products-grid.sl-cols-3 { grid-template-columns: repeat(3, 1fr); }
.sl-products-grid.sl-cols-4 { grid-template-columns: repeat(4, 1fr); }
.sl-products-grid.sl-cols-5 { grid-template-columns: repeat(5, 1fr); }
.sl-products-grid.sl-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
	.sl-products-grid.sl-cols-4,
	.sl-products-grid.sl-cols-5,
	.sl-products-grid.sl-cols-6 {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.sl-products-grid {
		grid-template-columns: repeat(1, 1fr) !important;
	}
}

@media (max-width: 480px) {
	.sl-products-grid {
		grid-template-columns: repeat(1, 1fr) !important;
	}
}

/* Card */
.sl-product-card,
.wd-product .sl-product-card,
li.product .sl-product-card {
	background: #fff !important;
	border: 1px solid var(--sl-border) !important;
	border-radius: var(--sl-radius-card) !important;
	position: relative !important;
	display: flex !important;
	flex-direction: column !important;
	overflow: visible !important;
	transition: box-shadow 0.2s ease;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
}

.sl-product-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Sale badge — top-left (logical start corner) */
.sl-card-badge {
	position: absolute;
	top: 12px;
	inset-inline-start: 12px;
	z-index: 5;
	pointer-events: none;
}

/* Override Woodmart/WooCommerce .onsale badge position within our card */
.sl-product-card .onsale,
.sl-card-badge .onsale {
	position: static !important;
	display: inline-block !important;
	min-width: unset !important;
	min-height: unset !important;
	border-radius: 20px !important;
	padding: 4px 10px !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	white-space: nowrap !important;
	background: var(--sl-primary) !important;
	color: #fff !important;
}

/* Action buttons (wishlist / compare) - top right */
.sl-card-actions {
	position: absolute;
	top: 15px;
	right: 15px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	z-index: 5;
}

/* Our action button — wraps Woodmart's .wd-wishlist-btn / .wd-compare-btn */
.sl-card-actions .sl-action-btn {
	width: 40px !important;
	height: 40px !important;
	min-width: 40px !important;
	background: #fff !important;
	border-radius: 50% !important;
	box-shadow: var(--sl-shadow) !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-direction: row !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
	transition: box-shadow 0.2s ease !important;
}

.sl-card-actions .sl-action-btn:hover {
	box-shadow: var(--sl-shadow) !important;
}

/* Reset Woodmart's inner <a> styles */
.sl-card-actions .sl-action-btn > a {
	width: 40px !important;
	height: 40px !important;
	min-width: unset !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-direction: row !important;
	background: none !important;
	border: none !important;
	border-radius: 50% !important;
	padding: 0 !important;
	margin: 0 !important;
	color: var(--sl-primary) !important;
	text-decoration: none !important;
	font-size: 0 !important;
	transition: background 0.2s ease, color 0.2s ease !important;
}

/* Hover directly on the <a> — orange bg + white icon */
.sl-card-actions .sl-action-btn > a:hover {
	background: var(--sl-primary) !important;
	color: #fff !important;
}

/* Keep buttons visible in ALL Woodmart JS states (loading, added, active, etc.) */
.sl-product-card .wd-wishlist-btn,
.sl-product-card .wd-compare-btn,
.sl-product-card .wd-wishlist-btn.loading,
.sl-product-card .wd-wishlist-btn.added,
.sl-product-card .wd-wishlist-btn.added-to-wishlist,
.sl-product-card .wd-compare-btn.active,
.sl-product-card .wd-compare-btn.added,
.sl-product-card .wd-compare-btn.loading {
	opacity: 1 !important;
	visibility: visible !important;
	display: flex !important;
}

.sl-product-card .wd-wishlist-btn > a,
.sl-product-card .wd-compare-btn > a,
.sl-product-card .wd-wishlist-btn.added > a,
.sl-product-card .wd-compare-btn.active > a {
	opacity: 1 !important;
	visibility: visible !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

/* Hide Woodmart's text spans */
.sl-card-actions .wd-action-text,
.sl-card-actions .wd-check-icon {
	display: none !important;
}

/* Show our SVGs */
.sl-card-actions svg {
	width: 20px !important;
	height: 20px !important;
	pointer-events: none;
	display: block !important;
}

/* Product image */
.sl-card-image-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 30px 20px 20px;
	min-height: 240px;
	text-decoration: none;
}

.sl-card-image-wrap img {
	width: 200px;
	height: 200px;
	object-fit: contain;
	display: block;
}

/* Meta: brand + stock */
.sl-card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px;
	padding: 8px 16px 0;
}

.sl-brand {
	display: inline-block;
	background: var(--sl-brand-bg);
	color: var(--sl-primary);
	font-size: 14px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: var(--sl-radius-badge);
	text-decoration: none;
	line-height: 1.4;
}

.sl-brand:hover {
	text-decoration: underline;
}

.sl-stock {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.sl-stock--in    { color: var(--sl-green); }
.sl-stock--out   { color: #e02020; }
.sl-stock--backorder { color: var(--sl-primary); }

/* Right side of meta: rating star + stock */
.sl-meta-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Inline star rating (⭐ 4.5) */
.sl-card-inline-rating {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 13px;
	font-weight: 600;
	color: var(--sl-primary);
}

.sl-card-inline-rating svg {
	flex-shrink: 0;
	color: var(--sl-primary);
}

/* Title */
.sl-card-title {
	margin: 10px 16px 6px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.5;
	direction: rtl;
}

.sl-card-title a {
	color: var(--sl-blue);
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sl-card-title a:hover {
	color: var(--sl-primary);
}

/* Rating */
.sl-card-rating {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 16px;
}

.sl-card-rating .woocommerce-product-rating {
	display: inline-flex;
	align-items: center;
}

/* Color the filled stars */
.sl-card-rating .star-rating {
	color: var(--sl-primary) !important;
	font-size: 14px;
}

/* Make sure screen-reader-text stays visually hidden (our CSS must not override it) */
.sl-card-rating .screen-reader-text {
	border: 0 !important;
	clip: rect(1px, 1px, 1px, 1px) !important;
	clip-path: inset(50%) !important;
	height: 1px !important;
	margin: -1px !important;
	overflow: hidden !important;
	padding: 0 !important;
	position: absolute !important;
	width: 1px !important;
	word-wrap: normal !important;
	display: block !important;
}

.sl-rating-count {
	font-size: 13px;
	color: var(--sl-gray);
}

/* Footer: buttons + price */
.sl-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px 16px;
	margin-top: auto;
	gap: 8px;
}

/* Icon buttons (quick view / cart) */
.sl-card-buttons {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sl-btn-icon {
	width: 40px;
	height: 40px;
	background: #fff;
	border-radius: var(--sl-radius-btn);
	box-shadow: var(--sl-shadow);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: none;
	color: var(--sl-primary);
	text-decoration: none;
	transition: color 0.2s ease, background 0.2s ease;
	flex-shrink: 0;
}

.sl-btn-icon:hover {
	color: #fff;
	background: var(--sl-primary);
}

.sl-btn-icon svg {
	width: 22px;
	height: 22px;
	pointer-events: none;
}

/* Price */
.sl-card-price {
	text-align: end;
	flex: 1;
	min-width: 0;
}

/* Price container — force column stack */
.sl-card-price .price {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-end !important;
	gap: 2px;
	line-height: 1.4;
}

/* Crossed-out original price */
.sl-card-price del {
	display: block !important;
	text-decoration: line-through !important;
	color: var(--sl-gray) !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	opacity: 1 !important;
	white-space: nowrap;
}

.sl-card-price del .woocommerce-Price-amount,
.sl-card-price del bdi {
	color: var(--sl-gray) !important;
	font-size: 14px !important;
	font-weight: 400 !important;
}

/* Sale / active price */
.sl-card-price ins {
	display: block !important;
	text-decoration: none !important;
	white-space: nowrap;
}

.sl-card-price ins .woocommerce-Price-amount,
.sl-card-price ins bdi {
	font-size: 22px !important;
	font-weight: 700 !important;
	color: var(--sl-primary) !important;
}

/* All prices default to orange (del overrides back to gray below) */
.sl-card-price .woocommerce-Price-amount {
	font-size: 22px !important;
	font-weight: 700 !important;
	color: var(--sl-primary) !important;
}

/* Currency symbol */
.sl-card-price .woocommerce-Price-currencySymbol {
	font-size: 0.7em;
	font-weight: 500;
	color: var(--sl-gray);
	margin-inline-start: 3px;
}

/* Equal height cards in WooCommerce shop grid */
.products.columns-2 li.product,
.products.columns-3 li.product,
.products.columns-4 li.product,
.products.columns-5 li.product,
.products.columns-6 li.product {
	display: flex !important;
	flex-direction: column;
}

/* RTL: keep action buttons on the visual right side */
[dir="rtl"] .sl-card-actions {
	right: 15px;
	left: auto;
}

/* RTL: sale badge on the visual right (logical start = right in RTL) */
[dir="rtl"] .sl-card-badge {
	right: 12px;
	left: auto;
}

/* =====================================================
   Smart Land – Login / Register Toggle Form
   ===================================================== */

.sl-auth-wrap {
	max-width: 640px;
	margin: 50px auto;
	padding: 0 20px 60px;
}

/* ---- Tabs ---- */
.sl-auth-tabs {
	display: flex !important;
	background: #ecf0ff !important;
	border-radius: 8px !important;
	padding: 4px !important;
	width: 358px;
	max-width: 100%;
	margin: 0 auto 28px !important;
	box-shadow: none !important;
	border: none !important;
}

/* Both tabs base — force override Woodmart button styles */
.sl-auth-tabs .sl-auth-tab {
	flex: 1 !important;
	padding: 8px 20px !important;
	border: none !important;
	border-radius: 8px !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	cursor: pointer !important;
	white-space: nowrap !important;
	text-align: center !important;
	transition: background 0.22s ease, color 0.22s ease !important;
	box-shadow: none !important;
	outline: none !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	line-height: 1.4 !important;
	min-width: unset !important;
	min-height: unset !important;
	height: auto !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

/* Inactive tab */
.sl-auth-tabs .sl-auth-tab.sl-tab-inactive {
	background: transparent !important;
	background-color: transparent !important;
	color: #9c9aa5 !important;
}

/* Active tab */
.sl-auth-tabs .sl-auth-tab.sl-tab-active {
	background: #f48222 !important;
	background-color: #f48222 !important;
	color: #fff !important;
}

/* ---- Panels ---- */
.sl-auth-panel {
	display: none;
}

.sl-auth-panel.sl-panel-active {
	display: block;
	animation: sl-fadein 0.25s ease forwards;
}

.sl-auth-panel.sl-panel-out {
	animation: sl-fadeout 0.2s ease forwards;
}

@keyframes sl-fadein {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes sl-fadeout {
	from { opacity: 1; transform: translateY(0); }
	to   { opacity: 0; transform: translateY(-8px); }
}

/* ---- Title & subtitle ---- */
.sl-auth-title {
	font-size: 24px !important;
	font-weight: 600 !important;
	color: #025a78 !important;
	text-align: center !important;
	margin: 0 0 10px !important;
	border: none !important;
	padding: 0 !important;
}

.sl-auth-subtitle {
	font-size: 15px;
	color: #666;
	text-align: center;
	margin: 0 0 24px;
}

/* ---- Form fields ---- */
.sl-field {
	margin-bottom: 20px;
}

.sl-field label {
	display: block !important;
	font-size: 15px !important;
	color: #242424 !important;
	margin-bottom: 6px !important;
	font-weight: 400 !important;
}
.sl-auth-wrap[dir="ltr"] .sl-field label {
	text-align: left !important;
}
.sl-auth-wrap[dir="rtl"] .sl-field label {
	text-align: right !important;
}

.sl-req {
	color: #e01020;
	font-size: 16px;
	margin-inline-start: 2px;
}

.sl-input {
	width: 100% !important;
	height: 42px !important;
	border: 1px solid rgba(0,0,0,0.1) !important;
	border-radius: 12px !important;
	padding: 8px 14px !important;
	font-size: 15px !important;
	background: #fff !important;
	box-sizing: border-box !important;
	outline: none !important;
	box-shadow: none !important;
	transition: border-color 0.2s !important;
}

.sl-input:focus {
	border-color: #f48222 !important;
	box-shadow: none !important;
}

/* ---- Password eye toggle (using <span> not <button>) ---- */
.sl-pw-wrap {
	position: relative;
	display: block;
}

.sl-pw-wrap .sl-input {
	padding-inline-end: 44px !important;
}

.sl-eye {
	position: absolute;
	inset-inline-end: 0;
	top: 0;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #999;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
}

.sl-eye:hover,
.sl-eye--on {
	color: #f48222;
}

/* ---- Remember me + lost password ---- */
.sl-meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 8px;
}

.sl-remember {
	display: flex !important;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	color: #242424;
	cursor: pointer;
	font-weight: 400;
}

.sl-remember input[type="checkbox"] {
	width: 13px;
	height: 13px;
	cursor: pointer;
	margin: 0;
}

.sl-lost-pw {
	font-size: 15px;
	color: #f48222 !important;
	text-decoration: none !important;
}

.sl-lost-pw:hover {
	text-decoration: underline !important;
}

/* ---- Submit button ---- */
.sl-submit-btn {
	display: block !important;
	width: 100% !important;
	height: 42px !important;
	background: #f48222 !important;
	background-color: #f48222 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 5px !important;
	font-size: 18px !important;
	font-weight: 400 !important;
	cursor: pointer !important;
	transition: background 0.2s !important;
	margin: 0 !important;
	padding: 0 !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	line-height: 42px !important;
}

.sl-submit-btn:hover {
	background: #d97010 !important;
	background-color: #d97010 !important;
	color: #fff !important;
}

/* ---- WooCommerce-added content inside register form ---- */
/* Phone number / newsletter fields added via woocommerce_register_form hook */
.sl-auth-panel .woocommerce-form-row label {
	display: block !important;
	font-size: 15px !important;
	color: #242424 !important;
	margin-bottom: 6px !important;
}
.sl-auth-wrap[dir="ltr"] .sl-auth-panel .woocommerce-form-row label {
	text-align: left !important;
}
.sl-auth-wrap[dir="rtl"] .sl-auth-panel .woocommerce-form-row label {
	text-align: right !important;
}

.sl-auth-panel .woocommerce-form-row .woocommerce-Input {
	width: 100% !important;
	height: 42px !important;
	border: 1px solid rgba(0,0,0,0.1) !important;
	border-radius: 12px !important;
	padding: 8px 14px !important;
	font-size: 15px !important;
	background: #fff !important;
	box-sizing: border-box !important;
	box-shadow: none !important;
}

.sl-auth-panel .woocommerce-form-row {
	margin-bottom: 20px !important;
	padding: 0 !important;
}

/* Privacy / terms text added by WooCommerce hooks */
.sl-auth-panel .woocommerce-privacy-policy-text,
.sl-auth-panel .wc-terms-and-conditions,
.sl-auth-panel p:not(.sl-auth-subtitle):not(.sl-pw-note) {
	font-size: 14px;
	color: #666;
	line-height: 1.6;
	margin-bottom: 16px;
}
.sl-auth-wrap[dir="ltr"] .sl-auth-panel .wc-terms-and-conditions,
.sl-auth-wrap[dir="ltr"] .sl-auth-panel p:not(.sl-auth-subtitle):not(.sl-pw-note) {
	text-align: left;
}
.sl-auth-wrap[dir="rtl"] .sl-auth-panel .wc-terms-and-conditions,
.sl-auth-wrap[dir="rtl"] .sl-auth-panel p:not(.sl-auth-subtitle):not(.sl-pw-note) {
	text-align: right;
}

.sl-auth-panel .woocommerce-privacy-policy-text a,
.sl-auth-panel .wc-terms-and-conditions a {
	color: #025a78;
}

.sl-pw-note {
	font-size: 14px;
	color: #666;
	margin-bottom: 16px;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
	.sl-auth-wrap {
		margin-top: 30px;
		padding: 0 12px 40px;
	}
	.sl-auth-tabs {
		width: 100%;
	}
}
