/**
 * FILE: assets/css/species-catalog.css
 * ROLE: Styles for Cactus Species E-commerce Catalog (Species.php & SpecieInner.php)
 *       Includes category sidebar badge, product card grid, discount badge,
 *       star rating, Shopee CTA button, and multi-image gallery.
 */

/* ── Sidebar Category Widget ────────────────────────────────────── */
.sp-sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sp-sidebar-list li {
	margin-bottom: 8px;
}

.sp-sidebar-list li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 18px;
	background: #ffffff;
	border: 1px solid #edf1ec;
	border-radius: 10px;
	color: #3b473d;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.2s ease;
}

.sp-sidebar-list li a:hover,
.sp-sidebar-list li.active a {
	background: #1e9400;
	border-color: #1e9400;
	color: #ffffff;
	transform: translateX(4px);
	box-shadow: 0 4px 14px rgba(30, 148, 0, 0.25);
}

.sp-sidebar-list li .sp-count-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	background: #eef4ed;
	color: #2f5233;
	font-size: 12px;
	font-weight: 600;
	transition: all 0.2s ease;
}

.sp-sidebar-list li a:hover .sp-count-badge,
.sp-sidebar-list li.active a .sp-count-badge {
	background: rgba(255, 255, 255, 0.25);
	color: #ffffff;
}

/* ── Catalog Top Toolbar ─────────────────────────────────────────── */
.sp-catalog-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 24px;
	padding-bottom: 14px;
	border-bottom: 1px solid #edf1ec;
	gap: 16px;
}

.sp-catalog-count {
	font-size: 14.5px;
	color: #637064;
	white-space: nowrap;
	flex-shrink: 0;
}

.sp-catalog-count b {
	color: #1e9400;
	font-weight: 700;
}

/* ── Search Box (Right Toolbar) ─────────────────────────────────── */
.sp-search-box {
	flex: 0 1 340px;
	max-width: 380px;
	margin: 0;
}

.sp-search-form {
	margin: 0;
	padding: 0;
	width: 100%;
}

.sp-search-input-wrap {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

.sp-search-icon {
	position: absolute;
	left: 14px;
	color: #8c9b8e;
	font-size: 13.5px;
	pointer-events: none;
	transition: color 0.2s ease;
}

.sp-search-input {
	width: 100%;
	height: 39px;
	padding: 0 34px 0 38px;
	background: #ffffff;
	border: 1px solid #e0e7df;
	border-radius: 999px;
	color: #3b463d;
	font-size: 13.5px;
	outline: none !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
	transition: all 0.2s ease;
}

.sp-search-input::placeholder {
	color: #9aa89c;
}

.sp-search-input:hover {
	border-color: #1e9400;
}

.sp-search-input:focus {
	border-color: #1e9400 !important;
	box-shadow: 0 4px 14px rgba(51, 255, 0, 0.15) !important;
	background: #ffffff !important;
}

.sp-search-input-wrap:focus-within .sp-search-icon {
	color: #1e9400;
}

.sp-search-clear {
	position: absolute;
	right: 12px;
	color: #a4b2a6;
	font-size: 15px;
	cursor: pointer;
	text-decoration: none !important;
	transition: color 0.2s ease, transform 0.15s ease;
	line-height: 1;
}

.sp-search-clear:hover {
	color: #ee4d2d;
	transform: scale(1.1);
}

/* ── Sort Dropdown ───────────────────────────────────────────────── */
.sp-sort-dropdown {
	position: relative;
	display: inline-block;
}

.sp-sort-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	background: #ffffff;
	border: 1px solid #e0e7df;
	border-radius: 12px;
	color: #435044;
	font-size: 13.5px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
	user-select: none;
	outline: none !important;
	-webkit-tap-highlight-color: transparent;
}

.sp-sort-btn:hover,
.sp-sort-btn:focus,
.sp-sort-btn:focus-visible,
.sp-sort-btn:active,
.sp-sort-dropdown.open .sp-sort-btn {
	border-color: #1e9400 !important;
	background: #ffffff !important;
	box-shadow: 0 4px 14px rgba(51, 255, 0, 0.12) !important;
	color: #1e9400 !important;
	outline: none !important;
}

.sp-sort-icon-box {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #728274;
	transition: color 0.2s ease;
}

.sp-sort-btn:hover .sp-sort-icon-box,
.sp-sort-dropdown.open .sp-sort-btn .sp-sort-icon-box {
	color: #1e9400;
}

.sp-sort-btn-text {
	color: #3b463d;
}

.sp-sort-btn-text b {
	color: #1e9400;
	font-weight: 600;
}

.sp-sort-chevron {
	font-size: 14px;
	color: #8c9b8e;
	margin-left: 2px;
	transition: transform 0.25s ease, color 0.2s ease;
}

.sp-sort-dropdown.open .sp-sort-chevron {
	transform: rotate(180deg);
	color: #1e9400;
}

.sp-sort-menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 200px;
	background: #ffffff;
	border: 1px solid #e2ece0;
	border-radius: 14px;
	box-shadow: 0 14px 34px rgba(25, 45, 25, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
	padding: 6px 0;
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	pointer-events: none;
}

.sp-sort-dropdown.open .sp-sort-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.sp-sort-item {
	display: flex;
	align-items: center;
	padding: 10px 16px;
	color: #4b584d;
	font-size: 13.5px;
	text-decoration: none !important;
	transition: background 0.15s ease, color 0.15s ease;
	position: relative;
}

.sp-sort-item:hover {
	background: #f3f8f2;
	color: #1e9400;
}

.sp-sort-item.active {
	background: #eef8ee;
	color: #1e9400;
	font-weight: 600;
}

.sp-sort-item-check {
	width: 20px;
	height: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	color: #1e9400;
	font-size: 13px;
	flex-shrink: 0;
}

.sp-sort-item-title {
	flex: 1;
}

/* ── Product Card Grid ───────────────────────────────────────────── */
.sp-grid-item {
	margin-bottom: 28px;
}

.sp-card {
	background: #ffffff;
	border: 1px solid #edf1ec;
	border-radius: 14px;
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
	position: relative;
}

.sp-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 32px rgba(45, 25, 25, 0.09);
	border-color: #d6e2d4;
}

.sp-card-link {
	color: inherit;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.sp-card-link:hover {
	color: inherit;
	text-decoration: none;
}

/* Card Image & Badges */
.sp-card-image-wrap {
	position: relative;
	background: #f7f9f6;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.sp-card-image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.sp-card:hover .sp-card-image-wrap img {
	transform: scale(1.05);
}

.sp-discount-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	background: #ee4d2d;
	color: #ffffff;
	z-index: 2;
	box-shadow: 0 2px 6px rgba(238, 77, 45, 0.35);
	letter-spacing: 0.02em;
}

/* Card Body */
.sp-card-body {
	padding: 16px 16px 18px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.sp-card-category {
	font-size: 12px;
	color: #8c988e;
	margin: 0 0 4px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.sp-card-title {
	font-size: 15px;
	font-weight: 600;
	color: #262e27;
	margin: 0 0 8px;
	line-height: 1.35;
	min-height: 40px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Star Rating */
.sp-rating-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
}

.sp-stars {
	color: #f5a623;
	font-size: 12px;
	display: inline-flex;
	gap: 2px;
}

.sp-rating-score {
	font-size: 12px;
	color: #7d8a7f;
	font-weight: 500;
}

/* Price & Button Footer */
.sp-card-footer-wrap {
	padding: 0 16px 16px;
	margin-top: auto;
}

.sp-card-footer {
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid #f1f4f0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.sp-card-footer:has(.sp-btn-detail:only-child),
.sp-card-body>.sp-card-footer {
	justify-content: flex-end;
}

.sp-price-box {
	display: flex;
	flex-direction: column;
}

.sp-sale-price {
	font-size: 17px;
	font-weight: 700;
	color: #1e9400;
	line-height: 1.2;
}

.sp-orig-price {
	font-size: 12px;
	color: #9aa59c;
	text-decoration: line-through;
	margin-top: 2px;
}

.sp-btn-detail {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 8px;
	background: #edf5eb;
	color: #1e9400 !important;
	font-size: 12.5px;
	font-weight: 600;
	text-align: center;
	text-decoration: none !important;
	border: 1px solid #d4e8cf;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.sp-btn-detail i {
	font-size: 13px;
	transition: transform 0.2s ease;
}

.sp-card:hover .sp-btn-detail,
.sp-btn-detail:hover {
	background: #1e9400;
	color: #ffffff !important;
	border-color: #1e9400;
	box-shadow: 0 3px 10px rgba(30, 148, 0, 0.25);
	transform: translateY(-1px);
}

.sp-card:hover .sp-btn-detail i {
	transform: scale(1.1);
}

.sp-btn-shopee-card {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 13px;
	border-radius: 8px;
	background: linear-gradient(135deg, #ff5722 0%, #ee4d2d 100%);
	color: #ffffff !important;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	text-decoration: none !important;
	border: none;
	box-shadow: 0 3px 8px rgba(238, 77, 45, 0.28);
	transition: all 0.2s ease;
	white-space: nowrap;
	cursor: pointer;
}

.sp-card:hover .sp-btn-shopee-card,
.sp-btn-shopee-card:hover {
	background: linear-gradient(135deg, #ff6b3d 0%, #f43e1c 100%);
	box-shadow: 0 5px 14px rgba(238, 77, 45, 0.4);
	transform: translateY(-1px);
	color: #ffffff !important;
}

.sp-btn-shopee-card i {
	font-size: 13px;
}

/* ── Specie Detail Page (SpecieInner.php) ────────────────────────── */
.sp-detail-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	margin-bottom: 30px;
}

.sp-detail-gallery {
	display: flex;
	gap: 16px;
	flex: 1 1 420px;
	max-width: 540px;
}

.sp-detail-thumbs {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 460px;
	overflow-y: auto;
	width: 72px;
	flex-shrink: 0;
	padding-right: 4px;
}

.sp-detail-thumbs::-webkit-scrollbar {
	width: 3px;
}

.sp-detail-thumbs::-webkit-scrollbar-thumb {
	background: #1e9400;
	border-radius: 4px;
}

.sp-detail-thumb-item {
	width: 66px;
	height: 66px;
	border-radius: 8px;
	border: 1px solid #dde3dc;
	overflow: hidden;
	cursor: pointer;
	background: #ffffff;
	transition: all 0.2s ease;
	flex-shrink: 0;
}

.sp-detail-thumb-item:hover {
	border-color: #1e9400;
	transform: translateY(-1px);
}

.sp-detail-thumb-item.active {
	border-color: #1e9400;
	box-shadow: 0 0 0 2px rgba(30, 148, 0, 0.25);
}

.sp-detail-thumb-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sp-detail-main-img {
	flex: 1;
	position: relative;
	background: #ffffff;
	border: 1px solid #edf1ec;
	border-radius: 16px;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	box-shadow: 0 12px 32px rgba(25, 45, 25, 0.08);
}

.sp-detail-main-link {
	display: block;
	width: 100%;
	height: 100%;
	position: relative;
	cursor: zoom-in;
}

.sp-detail-main-link img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.sp-detail-main-link:hover img {
	transform: scale(1.03);
}

.sp-detail-zoom-icon {
	position: absolute;
	right: 12px;
	bottom: 12px;
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #1e9400;
	font-size: 15px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	opacity: 0.85;
	transition: transform 0.2s ease;
}

.sp-detail-main-link:hover .sp-detail-zoom-icon {
	transform: scale(1.1);
}

/* Info Section */
.sp-detail-info {
	flex: 1 1 360px;
}

.sp-detail-category-tag {
	display: inline-block;
	padding: 5px 14px;
	background: #eef8ee;
	color: #1e9400;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	margin-bottom: 12px;
}

.sp-detail-title {
	font-size: 26px;
	font-weight: 700;
	color: #19211a;
	line-height: 1.3;
	margin: 0 0 12px;
}

.sp-detail-rating {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
}

.sp-detail-rating .sp-stars {
	font-size: 15px;
}

.sp-detail-rating-text {
	font-size: 13px;
	color: #637064;
	font-weight: 500;
}

.sp-detail-price-box {
	background: #f7faf6;
	border: 1px solid #e7eee5;
	border-radius: 12px;
	padding: 16px 20px;
	margin-bottom: 24px;
	display: flex;
	align-items: baseline;
	gap: 14px;
	flex-wrap: wrap;
}

.sp-detail-sale-price {
	font-size: 28px;
	font-weight: 800;
	color: #1e9400;
}

.sp-detail-orig-price {
	font-size: 15px;
	color: #8c988e;
	text-decoration: line-through;
}

.sp-detail-discount-tag {
	padding: 3px 8px;
	background: #ee4d2d;
	color: #ffffff;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 700;
}

/* Shopee CTA Button */
.sp-btn-shopee {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 14px 26px;
	border-radius: 10px;
	background: linear-gradient(135deg, #ff5722 0%, #ee4d2d 100%);
	color: #ffffff !important;
	font-size: 16px;
	font-weight: 700;
	text-decoration: none !important;
	box-shadow: 0 8px 20px rgba(238, 77, 45, 0.35);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	margin-bottom: 20px;
}

.sp-btn-shopee:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(238, 77, 45, 0.45);
	color: #ffffff !important;
}

/* Short Description text above CTA */
.sp-detail-short-desc {
	margin: 14px 0 18px;
	color: #556257;
	line-height: 1.7;
}

/* Botanical Care Highlights Grid */
.sp-detail-care-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin: 18px 0 22px;
	padding: 16px;
	background: #f8faf7;
	border: 1px solid #e2ece0;
	border-radius: 12px;
}

.sp-care-item {
	display: flex;
	align-items: center;
	gap: 12px;
}

.sp-care-icon {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: #ffffff;
	border: 1px solid #d5e6d2;
	color: #1e9400;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.sp-care-info {
	display: flex;
	flex-direction: column;
}

.sp-care-label {
	color: #818f83;
	font-weight: 500;
	line-height: 1.2;
}

.sp-care-value {
	color: #212c22;
	font-weight: 600;
	line-height: 1.3;
	margin-top: 2px;
}

@media (max-width: 480px) {
	.sp-detail-care-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}
}

/* Scroll Down to Related Products Button */
.sp-btn-scroll-related {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: 380px;
	padding: 14px 26px;
	border-radius: 12px;
	background: linear-gradient(135deg, #1e9400 0%, #177a00 100%);
	color: #ffffff !important;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none !important;
	box-shadow: 0 6px 18px rgba(30, 148, 0, 0.28);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	cursor: pointer;
	margin-top: 18px;
	margin-bottom: 20px;
}

.sp-btn-scroll-related:hover {
	transform: translateY(-2px);
	background: linear-gradient(135deg, #24aa02 0%, #1e9400 100%);
	box-shadow: 0 10px 24px rgba(30, 148, 0, 0.38);
	color: #ffffff !important;
}

.sp-btn-scroll-related i.fa-angle-down {
	transition: transform 0.25s ease;
}

.sp-btn-scroll-related:hover i.fa-angle-down {
	transform: translateY(3px);
}

.sp-btn-shopee i {
	font-size: 18px;
}

.sp-btn-shopee.sp-btn-disabled {
	background: #e5e9e5;
	color: #8c988e !important;
	box-shadow: none;
	pointer-events: none;
	cursor: default;
}

/* Detail Description Section */
.sp-detail-desc {
	border-top: 2px solid #1e9400;
	padding-top: 28px;
	margin-top: 36px;
}

.sp-detail-desc-title {
	font-size: 20px;
	font-weight: 700;
	color: #19211a;
	margin: 0 0 16px;
}

.sp-detail-desc-content {
	line-height: 1.8;
	color: #445045;
}

.sp-detail-desc-content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}

.sp-detail-desc-content p {
	margin-bottom: 14px;
}

.sp-detail-desc-content ul {
	list-style: disc !important;
	padding-left: 24px;
	margin: 12px 0 16px;
}

.sp-detail-desc-content ol {
	list-style: decimal !important;
	padding-left: 24px;
	margin: 12px 0 16px;
}

.sp-detail-desc-content li {
	list-style: inherit !important;
	margin-bottom: 6px;
}

.sp-detail-desc-content ul ul,
.sp-detail-desc-content ol ul {
	list-style: circle !important;
	margin: 4px 0 6px 20px;
}

.sp-detail-desc-content ul ol,
.sp-detail-desc-content ol ol {
	list-style: lower-latin !important;
	margin: 4px 0 6px 20px;
}

/* Related Products Grid */
.sp-related-section {
	margin-top: 50px;
	padding-top: 30px;
	border-top: 1px solid #edf1ec;
}

.sp-related-title {
	font-size: 22px;
	font-weight: 700;
	color: #19211a;
	margin: 0 0 24px;
	text-align: center;
}

@media (max-width: 768px) {
	.sp-catalog-toolbar {
		flex-wrap: wrap;
		gap: 12px;
	}

	.sp-catalog-count {
		order: 1;
	}

	.sp-search-box {
		order: 2;
		max-width: 100%;
		width: 100%;
		margin: 0;
		flex-basis: 100%;
	}
}

@media (max-width: 576px) {
	.sp-catalog-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.sp-catalog-count {
		order: 1;
	}

	.sp-search-box {
		order: 2;
		width: 100%;
		max-width: 100%;
		margin: 0;
	}

	.sp-detail-gallery {
		flex-direction: column-reverse;
	}

	.sp-detail-thumbs {
		flex-direction: row;
		width: 100%;
		max-height: none;
		overflow-x: auto;
		overflow-y: hidden;
		padding-bottom: 6px;
		padding-right: 0;
	}
}