/**
 * Sagor Royal Product Card Stylesheet
 * Featuring Vertical & Horizontal Layouts, Trending Overlay Badge, Price Units, and AJAX Off-Canvas Cart
 */

/* ==========================================================================
   0. ELEMENTOR WRAPPER & GRID CONTAINER
   ========================================================================== */
.elementor-widget-explore_more_varieties_card {
	width: 100%;
	max-width: 100%;
	overflow: visible;
}

.elementor-widget-explore_more_varieties_card > .elementor-widget-container {
	width: 100%;
	max-width: 100%;
	overflow: visible;
	display: block;
}

.explore-more-varieties-grid,
.sagor-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(1, minmax(0, auto));
	grid-auto-flow: row;
	gap: 24px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	justify-items: stretch;
	align-items: stretch;
}

.explore-more-varieties-grid > .product-card,
.sagor-grid > .product-card {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	height: 100%;
	box-sizing: border-box;
}

/* Grid Outline Mode */
.sagor-grid-outline-yes .explore-more-varieties-grid > .product-card,
.explore-more-varieties-grid.sagor-grid-outline > .product-card {
	outline: 2px dashed #cba36b !important;
	outline-offset: -2px !important;
}

/* ==========================================================================
   1. MAIN CARD CONTAINER
   ========================================================================== */
.product-card,
.sagor-product-card {
	box-sizing: border-box;
	background-color: #1f140f;
	border: 1px solid #2e1d16;
	color: #f6efe9;
	position: relative;
	overflow: hidden;
	width: 100%;
	max-width: 100%;
	transition: all 0.35s ease;
	margin: 0 auto;
}

.product-card *,
.product-card *::before,
.product-card *::after {
	box-sizing: border-box;
}

.product-card__inner {
	display: flex;
	flex-direction: column; /* Default Vertical Layout */
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	position: relative;
	overflow: hidden;
}

/* Horizontal Layout Modifiers */
.product-layout-row .product-card__inner {
	flex-direction: row;
}

.product-layout-row-reverse .product-card__inner {
	flex-direction: row-reverse;
}

.product-layout-row .product-image,
.product-layout-row-reverse .product-image {
	flex: 0 0 46%;
	max-width: 46%;
	width: 46%;
	height: auto;
	min-height: 100%;
}

.product-layout-row .product-content,
.product-layout-row-reverse .product-content {
	flex: 0 0 54%;
	max-width: 54%;
	width: 54%;
}

/* ==========================================================================
   2. PRODUCT IMAGE & OVERLAY BADGE
   ========================================================================== */
.product-image,
.sagor-product-image {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #140d09;
	width: 100%;
	max-width: 100%;
	height: 240px;
	flex-shrink: 0;
}

.product-image__link {
	display: block;
	width: 100%;
	height: 100%;
}

.product-image__tag,
.product-image img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.4s ease;
}

.product-card:hover .product-image__tag {
	transform: scale(1.06);
}

/* Overlay Badges (TRENDING) */
.product-badge,
.sagor-product-badge {
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 11px;
	font-weight: 600;
	color: #cba36b;
	text-transform: uppercase;
	letter-spacing: 2px;
	padding: 6px 14px;
	background-color: rgba(24, 16, 11, 0.75);
	border: 1px solid #5a412b;
	border-radius: 2px;
	z-index: 5;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	user-select: none;
	max-width: 90%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.product-badge--top-left {
	position: absolute;
	top: 16px;
	left: 16px;
}

.product-badge--top-right {
	position: absolute;
	top: 16px;
	right: 16px;
}

.product-badge--bottom-left {
	position: absolute;
	bottom: 16px;
	left: 16px;
}

.product-badge--bottom-right {
	position: absolute;
	bottom: 16px;
	right: 16px;
}

.product-badge--inline {
	display: inline-block;
	margin-bottom: 14px;
}

/* ==========================================================================
   3. PRODUCT CONTENT
   ========================================================================== */
.product-content,
.sagor-product-content {
	padding: 28px 25px 28px 25px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center; /* Center aligned for Screenshot 2 */
	text-align: center;
	position: relative;
	flex: 1 1 auto;
	width: 100%;
	max-width: 100%;
	word-break: break-word;
	overflow-wrap: break-word;
}

/* Header & Title */
.product-title,
.sagor-product-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 28px;
	font-weight: 600;
	line-height: 1.2;
	color: #f6efe9;
	margin: 0 0 12px 0;
	letter-spacing: -0.3px;
	max-width: 100%;
	word-break: break-word;
}

.product-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

.product-title a:hover {
	color: #cba36b;
}

/* ==========================================================================
   4. PRICE & UNIT (৳ 450 / kg)
   ========================================================================== */
.product-price,
.sagor-product-price {
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 18px;
	font-weight: 400;
	color: #cba36b;
	margin: 0 0 22px 0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	max-width: 100%;
}

.product-price__currency {
	font-size: 1.1em;
	color: #cba36b;
	font-weight: 400;
}

.product-price__amount {
	font-weight: 500;
	color: #cba36b;
}

.product-price__unit {
	font-size: 0.95em;
	color: #cba36b;
	opacity: 0.9;
	margin-left: 2px;
}

/* ==========================================================================
   5. ACTION BUTTON / ADD TO CART
   ========================================================================== */
.product-button,
.sagor-product-button {
	display: inline-flex;
	justify-content: center;
	margin-top: auto;
	max-width: 100%;
	width: auto;
}

.product-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none !important;
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	transition: all 0.3s ease;
	cursor: pointer;
	position: relative;
	box-sizing: border-box;
	max-width: 100%;
}

/* 5.1 Outline Style (Exact match to Screenshot 2) */
.product-button--outline .product-button__link {
	border: 1px solid #5a412b;
	background-color: transparent;
	color: #cba36b;
	padding: 11px 24px;
	border-radius: 2px;
}

.product-button--outline .product-button__link:hover {
	border-color: #cba36b;
	background-color: rgba(203, 163, 107, 0.1);
	color: #ffffff;
}

/* 5.2 Solid Style */
.product-button--solid .product-button__link {
	background-color: #cba36b;
	color: #140d09;
	padding: 12px 26px;
	border-radius: 2px;
}

.product-button--solid .product-button__link:hover {
	background-color: #dfb983;
	color: #140d09;
}

/* 5.3 Underline Style (Screenshot 1) */
.product-button--underline .product-button__link {
	flex-direction: column;
	align-items: flex-start;
	color: #d8a76a;
}

.product-button__bar {
	display: block;
	width: 100%;
	height: 1.5px;
	background-color: #cda262;
	margin-top: 8px;
	transition: background-color 0.3s ease;
}

.product-button--underline .product-button__link:hover {
	color: #ffffff;
}

.product-button--underline .product-button__link:hover .product-button__bar {
	background-color: #ffffff;
}

/* Loading State for AJAX Add to Cart */
.product-button__link.loading {
	opacity: 0.6;
	pointer-events: none;
}

.product-button__link.added::after {
	content: ' ✓';
	color: #27ae60;
	margin-left: 6px;
}

/* ==========================================================================
   6. AJAX OFF-CANVAS CART DRAWER
   ========================================================================== */
.sagor-offcanvas-cart {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.35s ease, visibility 0.35s ease;
}

.sagor-offcanvas-cart.is-open {
	visibility: visible;
	opacity: 1;
}

.sagor-offcanvas-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
}

.sagor-offcanvas-drawer {
	position: absolute;
	top: 0;
	right: 0;
	width: 380px;
	max-width: 90%;
	height: 100%;
	background-color: #1b120c;
	color: #f6efe9;
	border-left: 1px solid #38251c;
	box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
	transform: translateX(100%);
	transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
	display: flex;
	flex-direction: column;
}

.sagor-offcanvas-cart.is-open .sagor-offcanvas-drawer {
	transform: translateX(0);
}

/* Drawer Header */
.sagor-offcanvas-header {
	padding: 22px 24px;
	border-bottom: 1px solid #2e1d16;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.sagor-offcanvas-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 20px;
	font-weight: 600;
	color: #f6efe9;
	display: flex;
	align-items: center;
}

.sagor-offcanvas-close {
	background: transparent;
	border: none;
	color: #a4968d;
	font-size: 28px;
	cursor: pointer;
	line-height: 1;
	transition: color 0.2s ease;
}

.sagor-offcanvas-close:hover {
	color: #ffffff;
}

/* Drawer Body & Mini Cart Content */
.sagor-offcanvas-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 24px;
}

.sagor-offcanvas-body .woocommerce-mini-cart {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sagor-offcanvas-body .woocommerce-mini-cart-item {
	display: flex;
	align-items: center;
	padding: 14px 0;
	border-bottom: 1px solid #2e1d16;
	position: relative;
}

.sagor-offcanvas-body .woocommerce-mini-cart-item img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	margin-right: 14px;
}

.sagor-offcanvas-body .woocommerce-mini-cart__total {
	margin-top: 20px;
	padding: 16px 0;
	border-top: 1px solid #38251c;
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 18px;
	color: #f6efe9;
	display: flex;
	justify-content: space-between;
}

.sagor-offcanvas-body .woocommerce-mini-cart__buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 15px;
}

.sagor-offcanvas-body .woocommerce-mini-cart__buttons a.button {
	display: block;
	text-align: center;
	padding: 12px 20px;
	background-color: #cba36b;
	color: #140d09;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	text-decoration: none;
	border-radius: 2px;
	transition: background-color 0.3s ease;
}

.sagor-offcanvas-body .woocommerce-mini-cart__buttons a.button:hover {
	background-color: #dfb983;
}

.sagor-offcanvas-body .woocommerce-mini-cart__buttons a.button.checkout {
	background-color: #2e1d16;
	color: #cba36b;
	border: 1px solid #5a412b;
}

.sagor-offcanvas-body .woocommerce-mini-cart__buttons a.button.checkout:hover {
	background-color: #cba36b;
	color: #140d09;
}

/* ==========================================================================
   7. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 767px) {
	.explore-more-varieties-grid {
		grid-template-columns: repeat(1, minmax(0, 1fr));
	}

	.product-card__inner,
	.product-layout-row .product-card__inner,
	.product-layout-row-reverse .product-card__inner {
		flex-direction: column !important;
	}

	.product-image,
	.product-layout-row .product-image,
	.product-layout-row-reverse .product-image {
		flex: 0 0 100% !important;
		max-width: 100% !important;
		width: 100% !important;
		min-height: 200px;
	}

	.product-content,
	.product-layout-row .product-content,
	.product-layout-row-reverse .product-content {
		flex: 0 0 100% !important;
		max-width: 100% !important;
		width: 100% !important;
		padding: 24px 20px;
	}

	.product-title {
		font-size: 24px;
	}
}

/* ==========================================================================
   8. INSTANT CHECKOUT DRAWER FORM STYLING
   ========================================================================== */
.sagor-offcanvas-section-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 16px;
	font-weight: 700;
	color: #cba36b;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(203, 163, 107, 0.2);
	margin-bottom: 14px;
}

.sagor-form-row {
	margin-bottom: 14px;
}

.sagor-form-row label {
	display: block;
	font-family: 'Poppins', sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: #e0d0c0;
	margin-bottom: 6px;
}

.sagor-form-row input[type="text"],
.sagor-form-row input[type="tel"],
.sagor-form-row textarea {
	width: 100%;
	padding: 10px 14px;
	background-color: #1a100b;
	border: 1px solid rgba(203, 163, 107, 0.3);
	border-radius: 6px;
	color: #fdfaf5;
	font-family: 'Poppins', sans-serif;
	font-size: 13px;
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.25s ease;
}

.sagor-form-row input[type="text"]:focus,
.sagor-form-row input[type="tel"]:focus,
.sagor-form-row textarea:focus {
	border-color: #cba36b;
}

.sagor-radio-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sagor-radio-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background-color: #1a100b;
	border: 1px solid rgba(203, 163, 107, 0.2);
	border-radius: 6px;
	cursor: pointer;
	font-size: 12px;
	color: #e0d0c0;
}

.sagor-payment-options {
	display: flex;
	gap: 10px;
}

.sagor-payment-badge {
	flex: 1;
	text-align: center;
	padding: 8px 10px;
	background-color: #1a100b;
	border: 1px solid rgba(203, 163, 107, 0.25);
	border-radius: 6px;
	cursor: pointer;
	font-size: 12px;
	color: #e0d0c0;
	transition: all 0.2s ease;
}

.sagor-payment-badge.active,
.sagor-payment-badge:hover {
	border-color: #cba36b;
	background-color: rgba(203, 163, 107, 0.12);
	color: #cba36b;
}

.sagor-payment-badge input {
	display: none;
}

.sagor-drawer-summary {
	background-color: #1a100b;
	border: 1px solid rgba(203, 163, 107, 0.25);
	border-radius: 8px;
	padding: 14px 16px;
	margin: 18px 0;
}

.sagor-summary-row {
	display: flex;
	justify-content: space-between;
	font-family: 'Poppins', sans-serif;
	font-size: 13px;
	color: #b0a090;
	margin-bottom: 6px;
}

.sagor-summary-row.sagor-summary-total {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 16px;
	font-weight: 700;
	color: #fdfaf5;
	padding-top: 8px;
	border-top: 1px solid rgba(203, 163, 107, 0.2);
	margin-top: 6px;
	margin-bottom: 0;
}

.sagor-place-order-button {
	width: 100%;
	padding: 14px 20px;
	background: linear-gradient(135deg, #cba36b 0%, #a8763e 100%);
	color: #ffffff;
	border: none;
	border-radius: 6px;
	font-family: 'Poppins', sans-serif;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(168, 118, 62, 0.3);
}

.sagor-place-order-button:hover {
	opacity: 0.95;
	transform: translateY(-2px);
}

.sagor-checkout-msg {
	margin-top: 12px;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 12px;
}

.sagor-checkout-msg.error {
	background-color: rgba(220, 53, 69, 0.15);
	border: 1px solid #dc3545;
	color: #ff858d;
}

.sagor-order-success {
	text-align: center;
	padding: 40px 20px;
}

.sagor-success-icon {
	width: 60px;
	height: 60px;
	line-height: 60px;
	border-radius: 50%;
	background-color: #28a745;
	color: #ffffff;
	font-size: 28px;
	margin: 0 auto 16px auto;
}

.sagor-order-success h3 {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 22px;
	color: #fdfaf5;
	margin-bottom: 8px;
}

.sagor-order-success .sagor-success-lead {
	color: #cba36b;
	font-size: 15px;
	margin-bottom: 12px;
}

.sagor-order-success p {
	color: #b0a090;
	font-size: 13px;
	line-height: 1.6;
	margin-bottom: 24px;
}

.sagor-continue-btn {
	padding: 10px 24px;
	background-color: #cba36b;
	color: #1a100b;
	border: none;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
}
