/**
 * NexaShop Single Product Description Styles
 * Modern, High-End Iranian E-Commerce Design (Digikala, Woodmart, Prestige)
 *
 * @package NexaShop
 * @subpackage ElementorWidgets\SingleProduct
 */

:root {
	--desc-bg-color: #ffffff;
	--desc-fade-color: #ffffff;
	--desc-fade-h: 95px;
	--desc-btn-bg: #f8fafc;
	--desc-btn-color: #1e293b;
	--desc-btn-border: #e2e8f0;
	--desc-btn-radius: 999px;
}

.nexashop-product-desc-box {
	width: 100%;
	background-color: var(--desc-bg-color, #ffffff);
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 24px 26px;
	box-sizing: border-box;
	direction: rtl;
	margin-bottom: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
	scroll-margin-top: 90px;
	position: relative;
	transition: box-shadow 0.25s ease;
}

/* Header Section */
.nexashop-desc-header {
	margin-bottom: 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 14px;
}

.nexashop-desc-title {
	font-size: 17px;
	font-weight: 800;
	color: #0f172a;
	margin: 0;
	letter-spacing: -0.3px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.nexashop-desc-subtitle {
	font-size: 12.5px;
	color: #94a3b8;
	font-weight: 500;
}

/* Content Wrapper & Text */
.nexashop-desc-content-wrap {
	position: relative;
	overflow: hidden;
	transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: max-height;
}

.nexashop-desc-content-wrap.is-collapsed {
	max-height: var(--desc-collapsed-h, 180px);
}

.nexashop-desc-content {
	font-size: 14px;
	line-height: 2.15;
	color: #334155;
	word-break: break-word;
}

.nexashop-desc-content p {
	margin-top: 0;
	margin-bottom: 14px;
}

.nexashop-desc-content p:last-child {
	margin-bottom: 0;
}

.nexashop-desc-content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	margin: 12px 0;
	display: block;
}

.nexashop-desc-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 16px 0;
}

.nexashop-desc-content table td,
.nexashop-desc-content table th {
	padding: 10px 14px;
	border: 1px solid #e2e8f0;
}

/* Gradient Fade Overlay */
.nexashop-desc-fade-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: var(--desc-fade-h, 95px);
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, var(--desc-fade-color, #ffffff) 90%);
	pointer-events: none;
	transition: opacity 0.35s ease, visibility 0.35s ease;
	z-index: 2;
}

.nexashop-desc-content-wrap.is-expanded .nexashop-desc-fade-overlay {
	opacity: 0;
	visibility: hidden;
}

/* Footer & Toggle Button Area */
.nexashop-desc-footer {
	margin-top: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 3;
}

.nexashop-desc-toggle-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background-color: var(--desc-btn-bg, #f8fafc);
	color: var(--desc-btn-color, #1e293b);
	border: 1px solid var(--desc-btn-border, #e2e8f0);
	border-radius: var(--desc-btn-radius, 999px);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	padding: 9px 24px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	user-select: none;
	text-decoration: none;
	outline: none;
}

.nexashop-desc-toggle-btn:hover {
	background-color: #f1f5f9;
	color: #4f46e5;
	border-color: #cbd5e1;
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.nexashop-desc-toggle-btn:active {
	transform: translateY(0);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.nexashop-desc-toggle-btn .btn-text {
	line-height: 1;
}

.nexashop-desc-toggle-btn .chevron-icon {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
	flex-shrink: 0;
}

.nexashop-desc-toggle-btn.is-active .chevron-icon {
	transform: rotate(180deg);
}

/* ==========================================================================
   BUTTON STYLE PRESETS
   ========================================================================== */

/* 1. Pill Capsule (Modern Default - Digikala style) */
.nexashop-desc-btn--pill {
	border-radius: 999px;
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	color: #1e293b;
}

.nexashop-desc-btn--pill:hover {
	background-color: #f8fafc;
	border-color: #cbd5e1;
	color: #4f46e5;
	box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12);
}

/* 2. Soft Tinted Card */
.nexashop-desc-btn--soft {
	background-color: rgba(99, 102, 241, 0.08);
	color: #4f46e5;
	border: 1px solid rgba(99, 102, 241, 0.15);
	border-radius: 12px;
	box-shadow: none;
}

.nexashop-desc-btn--soft:hover {
	background-color: rgba(99, 102, 241, 0.16);
	color: #4338ca;
	border-color: rgba(99, 102, 241, 0.28);
	box-shadow: 0 3px 10px rgba(99, 102, 241, 0.15);
}

/* 3. Outline Border */
.nexashop-desc-btn--outline {
	background-color: transparent;
	border: 1.5px solid currentColor;
	border-radius: 10px;
	box-shadow: none;
	color: #4f46e5;
}

.nexashop-desc-btn--outline:hover {
	background-color: rgba(79, 70, 229, 0.06);
	box-shadow: none;
}

/* 4. Solid Filled */
.nexashop-desc-btn--solid {
	background-color: #4f46e5;
	color: #ffffff;
	border: 1px solid transparent;
	border-radius: 10px;
	box-shadow: 0 3px 10px rgba(79, 70, 229, 0.25);
}

.nexashop-desc-btn--solid:hover {
	background-color: #4338ca;
	color: #ffffff;
	box-shadow: 0 5px 16px rgba(79, 70, 229, 0.35);
}

/* 5. Minimal Text Link */
.nexashop-desc-btn--minimal {
	background-color: transparent;
	border: none;
	box-shadow: none;
	padding: 6px 12px;
	color: #4f46e5;
	font-weight: 700;
}

.nexashop-desc-btn--minimal:hover {
	background-color: transparent;
	box-shadow: none;
	opacity: 0.85;
	transform: none;
}

/* Alignment presets */
.nexashop-desc-footer--center     { justify-content: center; }
.nexashop-desc-footer--flex-start { justify-content: flex-start; }
.nexashop-desc-footer--flex-end   { justify-content: flex-end; }
.nexashop-desc-footer--stretch .nexashop-desc-toggle-btn { width: 100%; }

/* Mobile Optimization */
@media (max-width: 768px) {
	.nexashop-product-desc-box {
		padding: 18px 16px;
		border-radius: 14px;
		margin-bottom: 18px;
	}

	.nexashop-desc-header {
		margin-bottom: 14px;
		padding-bottom: 10px;
	}

	.nexashop-desc-title {
		font-size: 15.5px;
	}

	.nexashop-desc-content {
		font-size: 13.5px;
		line-height: 2.05;
	}

	.nexashop-desc-toggle-btn {
		font-size: 12.5px;
		padding: 8px 20px;
	}
}
