/* ===== PEN COLLECTION WIDGET V2 - ENHANCED STYLES ===== */

/* Gallery Header */
[class*="pen-collection-wrapper-"] .gallery-header {
	margin-bottom: 32px;
	text-align: left;
}

[class*="pen-collection-wrapper-"] .gallery-title {
	margin: 0 0 8px;
	font-size: 28px;
	font-weight: 700;
	color: #ffffff;
	letter-spacing: -0.5px;
}

[class*="pen-collection-wrapper-"] .gallery-description {
	margin: 0;
	color: #b3b3b3;
	font-size: 14px;
	line-height: 1.6;
}

/* Grid Layout */
[class*="pen-collection-wrapper-"] .pen-grid {
	display: grid;
	gap: 20px;
	margin-bottom: 24px;
}

/* Card Container */
[class*="pen-collection-wrapper-"] .pen-card {
	border: none;
	border-radius: 12px;
	padding: 0;
	background: transparent;
	position: relative;
	transition: all 0.3s ease;
	cursor: pointer;
	overflow: visible;
	height: 300px;
	box-sizing: border-box;
}

[class*="pen-collection-wrapper-"] .pen-card:hover {
	transform: translateY(-4px);
	z-index: 50;
}

/* Front Face (the always-visible card content) */
[class*="pen-collection-wrapper-"] .pen-card-front {
	position: absolute;
	inset: 0;
	border: 1px solid #dc2626;
	border-radius: 12px;
	padding: 16px;
	background: #141414;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	overflow: hidden;
	box-sizing: border-box;
	transition: box-shadow 0.3s ease;
}

[class*="pen-collection-wrapper-"] .pen-card:hover .pen-card-front {
	box-shadow: 0 10px 25px rgba(220, 38, 38, 0.25);
}

/* Image Container */
[class*="pen-collection-wrapper-"] .pen-image {
	width: 100%;
	height: 150px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
	border-radius: 8px;
	font-size: 48px;
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	overflow: hidden;
	flex-shrink: 0;
	box-sizing: border-box;
}

[class*="pen-collection-wrapper-"] .pen-image.no-image {
	background-color: #1f1f1f;
	color: #6b6b6b;
	font-size: 32px;
}

/* Text Content - Front of Card */
[class*="pen-collection-wrapper-"] .pen-name {
	font-weight: 600;
	margin-bottom: 4px;
	text-align: center;
	width: 100%;
	font-size: 16px;
	color: #ffffff;
	line-height: 1.4;
	word-break: break-word;
}

[class*="pen-collection-wrapper-"] .pen-desc {
	font-size: 12px;
	color: #b3b3b3;
	text-align: center;
	width: 100%;
	margin-bottom: 8px;
	line-height: 1.4;
}

[class*="pen-collection-wrapper-"] .pen-price {
	font-size: 14px;
	font-weight: 600;
	color: #ef4444;
	text-align: center;
	margin-bottom: 0;
	margin-top: auto;
}

/* ===== HOVER DETAILS OVERLAY (floating popup) ===== */
[class*="pen-collection-wrapper-"] .hover-details {
	position: absolute;
	top: -16px;
	left: -16px;
	right: -16px;
	bottom: auto;
	min-height: calc(100% + 32px);
	max-height: 480px;
	background: #0d0d0d;
	border-radius: 16px;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(6px) scale(0.96);
	transform-origin: center top;
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
	overflow-y: auto;
	border: 1px solid #dc2626;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	z-index: 40;
	box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

[class*="pen-collection-wrapper-"] .pen-card:hover .hover-details {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

/* Details Content */
[class*="pen-collection-wrapper-"] .details-title {
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 8px;
	color: #ffffff;
	text-align: left;
	word-break: break-word;
}

[class*="pen-collection-wrapper-"] .details-description {
	font-size: 12px;
	color: #b3b3b3;
	margin-bottom: 8px;
	line-height: 1.4;
	text-align: left;
}

[class*="pen-collection-wrapper-"] .details-list {
	font-size: 11px;
	line-height: 1.6;
	color: #b3b3b3;
	overflow-y: auto;
	flex: 1;
	text-align: left;
}

[class*="pen-collection-wrapper-"] .details-item {
	margin-bottom: 6px;
	display: flex;
	justify-content: space-between;
	gap: 8px;
	word-break: break-word;
}

[class*="pen-collection-wrapper-"] .details-item-label {
	font-weight: 500;
	color: #9ca3af;
	flex: 0 0 auto;
}

[class*="pen-collection-wrapper-"] .details-item-value {
	color: #ef4444;
	font-weight: 500;
	text-align: right;
	flex: 1;
	word-break: break-word;
}

/* Availability Badge */
[class*="pen-collection-wrapper-"] .details-availability {
	margin-top: 8px;
	padding: 6px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 500;
	text-align: center;
	background-color: rgba(34, 197, 94, 0.18);
	color: #4ade80;
}

[class*="pen-collection-wrapper-"] .details-availability.limited {
	background-color: rgba(245, 158, 11, 0.18);
	color: #fbbf24;
}

[class*="pen-collection-wrapper-"] .details-availability.out-of-stock {
	background-color: rgba(239, 68, 68, 0.18);
	color: #f87171;
}

/* Rating Display */
[class*="pen-collection-wrapper-"] .details-rating {
	margin-top: 6px;
	font-size: 12px;
	font-weight: 500;
	color: #ffffff;
	text-align: center;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
	[class*="pen-collection-wrapper-"] .gallery-title {
		font-size: 24px;
	}

	[class*="pen-collection-wrapper-"] .pen-card {
		height: 280px;
	}

	[class*="pen-collection-wrapper-"] .pen-image {
		height: 130px;
	}
}

@media (max-width: 768px) {
	[class*="pen-collection-wrapper-"] .gallery-title {
		font-size: 22px;
	}

	[class*="pen-collection-wrapper-"] .pen-card {
		height: 260px;
	}

	[class*="pen-collection-wrapper-"] .pen-card-front {
		padding: 14px;
	}

	[class*="pen-collection-wrapper-"] .pen-image {
		height: 120px;
		margin-bottom: 10px;
	}

	[class*="pen-collection-wrapper-"] .pen-name {
		font-size: 15px;
	}

	[class*="pen-collection-wrapper-"] .pen-desc {
		font-size: 11px;
	}

	[class*="pen-collection-wrapper-"] .details-list {
		font-size: 10px;
	}

	[class*="pen-collection-wrapper-"] .hover-details {
		padding: 14px;
	}

	[class*="pen-collection-wrapper-"] .details-title {
		font-size: 13px;
	}

	[class*="pen-collection-wrapper-"] .details-description {
		font-size: 11px;
	}
}

@media (max-width: 480px) {
	[class*="pen-collection-wrapper-"] .gallery-title {
		font-size: 18px;
	}

	[class*="pen-collection-wrapper-"] .gallery-description {
		font-size: 13px;
	}

	[class*="pen-collection-wrapper-"] .pen-card {
		height: 240px;
	}

	[class*="pen-collection-wrapper-"] .pen-card-front {
		padding: 12px;
	}

	[class*="pen-collection-wrapper-"] .pen-image {
		height: 100px;
		margin-bottom: 8px;
	}

	[class*="pen-collection-wrapper-"] .pen-name {
		font-size: 14px;
	}

	[class*="pen-collection-wrapper-"] .pen-desc {
		font-size: 10px;
	}

	[class*="pen-collection-wrapper-"] .pen-price {
		font-size: 13px;
	}

	[class*="pen-collection-wrapper-"] .details-title {
		font-size: 12px;
	}

	[class*="pen-collection-wrapper-"] .details-item {
		margin-bottom: 5px;
		font-size: 10px;
	}

	[class*="pen-collection-wrapper-"] .details-availability {
		font-size: 10px;
	}

	[class*="pen-collection-wrapper-"] .details-rating {
		font-size: 11px;
	}
}

/* Scrollbar Styling for Details */
[class*="pen-collection-wrapper-"] .hover-details::-webkit-scrollbar {
	width: 4px;
}

[class*="pen-collection-wrapper-"] .hover-details::-webkit-scrollbar-track {
	background: transparent;
}

[class*="pen-collection-wrapper-"] .hover-details::-webkit-scrollbar-thumb {
	background: #dc2626;
	border-radius: 2px;
}

[class*="pen-collection-wrapper-"] .hover-details::-webkit-scrollbar-thumb:hover {
	background: #ef4444;
}

/* Smooth Transitions */
[class*="pen-collection-wrapper-"] .pen-card {
	transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[class*="pen-collection-wrapper-"] .hover-details {
	transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
		transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
		visibility 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ======================================================
   LIGHT MODE OVERRIDES
   Applies when: (a) theme_mode = Auto AND the site's own
   toggle marks the page as light via one of the common
   conventions below, or (b) theme_mode = Always Light.
   If your site's toggle uses a different class/attribute,
   add the matching selector to this list.
   ====================================================== */

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .pen-card-front,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .pen-card-front,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .pen-card-front,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .pen-card-front,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .pen-card-front,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .pen-card-front,
[class*="pen-collection-wrapper-"].pen-theme-light .pen-card-front {
	background-color: #ffffff !important;
	border-color: #dc2626 !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .pen-image.no-image,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .pen-image.no-image,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .pen-image.no-image,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .pen-image.no-image,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .pen-image.no-image,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .pen-image.no-image,
[class*="pen-collection-wrapper-"].pen-theme-light .pen-image.no-image {
	background-color: #f3f4f6 !important;
	color: #9ca3af !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .pen-name,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .pen-name,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .pen-name,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .pen-name,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .pen-name,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .pen-name,
[class*="pen-collection-wrapper-"].pen-theme-light .pen-name {
	color: #1f2937 !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .pen-desc,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .pen-desc,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .pen-desc,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .pen-desc,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .pen-desc,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .pen-desc,
[class*="pen-collection-wrapper-"].pen-theme-light .pen-desc {
	color: #6b7280 !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .pen-price,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .pen-price,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .pen-price,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .pen-price,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .pen-price,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .pen-price,
[class*="pen-collection-wrapper-"].pen-theme-light .pen-price {
	color: #dc2626 !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .hover-details,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .hover-details,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .hover-details,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .hover-details,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .hover-details,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .hover-details,
[class*="pen-collection-wrapper-"].pen-theme-light .hover-details {
	background-color: #ffffff !important;
	border-color: #dc2626 !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-title,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-title,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-title,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-title,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-title,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-title,
[class*="pen-collection-wrapper-"].pen-theme-light .details-title {
	color: #1f2937 !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-description,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-description,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-description,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-description,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-description,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-description,
[class*="pen-collection-wrapper-"].pen-theme-light .details-description {
	color: #6b7280 !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-list,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-list,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-list,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-list,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-list,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-list,
[class*="pen-collection-wrapper-"].pen-theme-light .details-list {
	color: #6b7280 !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-item-label,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-item-label,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-item-label,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-item-label,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-item-label,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-item-label,
[class*="pen-collection-wrapper-"].pen-theme-light .details-item-label {
	color: #4b5563 !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-item-value,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-item-value,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-item-value,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-item-value,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-item-value,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-item-value,
[class*="pen-collection-wrapper-"].pen-theme-light .details-item-value {
	color: #dc2626 !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .gallery-title,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .gallery-title,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .gallery-title,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .gallery-title,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .gallery-title,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .gallery-title,
[class*="pen-collection-wrapper-"].pen-theme-light .gallery-title {
	color: #1f2937 !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .gallery-description,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .gallery-description,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .gallery-description,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .gallery-description,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .gallery-description,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .gallery-description,
[class*="pen-collection-wrapper-"].pen-theme-light .gallery-description {
	color: #6b7280 !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability,
[class*="pen-collection-wrapper-"].pen-theme-light .details-availability {
	background-color: #f0fdf4 !important;
	color: #16a34a !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability.limited,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability.limited,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability.limited,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability.limited,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability.limited,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability.limited,
[class*="pen-collection-wrapper-"].pen-theme-light .details-availability.limited {
	background-color: #fef3c7 !important;
	color: #b45309 !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability.out-of-stock,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability.out-of-stock,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability.out-of-stock,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability.out-of-stock,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability.out-of-stock,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-availability.out-of-stock,
[class*="pen-collection-wrapper-"].pen-theme-light .details-availability.out-of-stock {
	background-color: #fee2e2 !important;
	color: #b91c1c !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-rating,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .details-rating,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-rating,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .details-rating,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-rating,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .details-rating,
[class*="pen-collection-wrapper-"].pen-theme-light .details-rating {
	color: #1f2937 !important;
}

body.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .hover-details::-webkit-scrollbar-thumb,
html.light-mode [class*="pen-collection-wrapper-"].pen-theme-auto .hover-details::-webkit-scrollbar-thumb,
body.light [class*="pen-collection-wrapper-"].pen-theme-auto .hover-details::-webkit-scrollbar-thumb,
html.light [class*="pen-collection-wrapper-"].pen-theme-auto .hover-details::-webkit-scrollbar-thumb,
body[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .hover-details::-webkit-scrollbar-thumb,
html[data-theme="light"] [class*="pen-collection-wrapper-"].pen-theme-auto .hover-details::-webkit-scrollbar-thumb,
[class*="pen-collection-wrapper-"].pen-theme-light .hover-details::-webkit-scrollbar-thumb {
	background: #d1d5db !important;
}
