/* =============================================
   DIAMONDS INVENTORY - PUBLIC CSS
   Apple-inspired Design System
   ============================================= */

:root {
	/* Apple Design System Colors */
	--apple-blue: #0071e3;
	--apple-blue-hover: #0077ed;
	--apple-text: #1d1d1f;
	--apple-text-secondary: #86868b;
	--apple-bg: transparent;
	--apple-card-bg: #ffffff;
	--apple-border: #d2d2d7;
	--apple-border-light: #e8e8ed;
	--apple-input-bg: #f5f5f7;

	/* Dimensions & Spacing */
	--apple-radius: 18px;
	--apple-radius-sm: 12px;
	--apple-radius-xs: 8px;
	--apple-radius-pill: 999px;

	/* Shadows */
	--apple-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
	--apple-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
	--apple-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);

	/* Fonts */
	--apple-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	/* Transitions */
	--apple-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* =============================================
   BASE STYLES
   ============================================= */
.dim-inventory-widget,
.dim-search,
.dim-theme {
	font-family: var(--apple-font);
	color: var(--apple-text);
	background: transparent;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	line-height: 1.5;
}

.dim-inventory-widget *,
.dim-search *,
.dim-theme * {
	box-sizing: border-box;
}

/* Container */
.dim-search {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	padding: 12px;
}

/* =============================================
   FILTERS SECTION
   ============================================= */
.dim-filters {
	background: transparent;
	border: none;
	padding: 0;
	margin-bottom: 24px;
	max-width: 100%;
}

.dim-filter-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 18px;
	margin-bottom: 20px;
}

.dim-filter-row:last-child {
	margin-bottom: 0;
}

/* Full row for shapes and chips */
.dim-filter-row.dim-full-row {
	grid-template-columns: 1fr;
}

/* Center the chip list in full-row (shapes) - only when not overflowing */
.dim-full-row .dim-chip-list {
	justify-content: center;
}

/* When scrollbar is active, don't center (would break scroll) */
.dim-full-row .dim-chip-group.has-more .dim-chip-list {
	justify-content: flex-start;
}

/* Filter Labels */
.dim-filter-label,
.dim-filter label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--apple-text);
	margin-bottom: 10px;
	letter-spacing: -0.01em;
}

/* =============================================
   CUSTOM SELECT STYLING
   ============================================= */
.dim-filter {
	position: relative;
}

.dim-filter select {
	width: 100%;
	height: 48px;
	padding: 0 44px 0 16px;
	font-size: 15px;
	font-weight: 400;
	color: var(--apple-text);
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2386868b' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'%3E%3C/path%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 16px;
	border: 1px solid var(--apple-border-light);
	border-radius: var(--apple-radius-sm);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	transition: all 0.2s var(--apple-ease);
}

.dim-filter select:hover {
	background-color: #fff;
}

.dim-filter select:focus {
	outline: none;
	background-color: #fff;
	border-color: var(--apple-blue);
	box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

/* Text Inputs */
.dim-filter input[type="text"],
.dim-filter input[type="number"] {
	width: 100%;
	height: 48px;
	padding: 0 16px;
	font-size: 15px;
	font-weight: 400;
	color: var(--apple-text);
	background-color: #fff;
	border: 1px solid var(--apple-border-light);
	border-radius: var(--apple-radius-sm);
	transition: all 0.2s var(--apple-ease);
}

.dim-filter input[type="text"]:hover,
.dim-filter input[type="number"]:hover {
	background-color: #ebebf0;
}

.dim-filter input[type="text"]:focus,
.dim-filter input[type="number"]:focus {
	outline: none;
	background-color: #fff;
	border-color: var(--apple-blue);
	box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.dim-filter input::placeholder {
	color: var(--apple-text-secondary);
}

/* Inline inputs (min/max) */
.dim-inline {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

/* =============================================
   CHIP SELECTORS (Shape, Color, Clarity, Cut)
   ============================================= */
.dim-chip-group {
	width: 100%;
	max-width: 100%;
	position: relative;
}

/* Scrollable chip list with fade edges */
.dim-chip-list {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 4px 0;
	scrollbar-width: none;
	-ms-overflow-style: none;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
}

.dim-chip-list::-webkit-scrollbar {
	display: none;
}

/* Subtle scroll hint animation on load */
@keyframes scrollHint {
	0%, 100% { transform: translateX(0); }
	50% { transform: translateX(-8px); }
}

.dim-chip-list.scroll-hint {
	animation: scrollHint 0.6s ease-out;
}

/* Interactive scrollbar under chip list */
.dim-chip-group.has-more {
	padding-bottom: 10px;
}

.dim-scrollbar {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 6px;
	background: var(--apple-border-light, #e8e8ed);
	border-radius: 3px;
	cursor: pointer;
}

.dim-scroll-thumb {
	position: absolute;
	top: 0;
	height: 100%;
	background: var(--apple-gray, #86868b);
	border-radius: 3px;
	cursor: grab;
	transition: background 0.15s ease, transform 0.1s ease;
	min-width: 30px;
}

.dim-scroll-thumb:hover {
	background: var(--apple-text-secondary, #6e6e73);
}

.dim-scroll-thumb.is-dragging {
	cursor: grabbing;
	background: var(--apple-blue, #0071e3);
}

/* Hide actual checkbox */
.dim-chip-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

/* Chip button - compact version */
.dim-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 4px;
	min-width: auto;
	padding: 8px 12px;
	background: #fff;
	border: 1px solid var(--apple-border-light);
	border-radius: var(--apple-radius-xs);
	font-size: 11px;
	font-weight: 600;
	color: var(--apple-text);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: all 0.2s var(--apple-ease);
	user-select: none;
	text-align: center;
	white-space: nowrap;
	flex-shrink: 0;
}

.dim-chip:hover {
	background: var(--apple-input-bg);
}

.dim-chip-input:checked + .dim-chip {
	background: var(--apple-text, #1d1d1f);
	color: #fff;
	border-color: var(--apple-text, #1d1d1f);
}

/* Chip with icon (shapes) - compact inline */
.dim-chip-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
}

.dim-chip-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	filter: grayscale(1) brightness(0.5);
	opacity: 0.8;
	transition: all 0.2s var(--apple-ease);
}

/* Make SVG icons white when chip is selected */
.dim-chip-input:checked + .dim-chip .dim-chip-icon img {
	filter: brightness(0) invert(1);
	opacity: 1;
}

/* Texte du chip */
.dim-chip-text {
	line-height: 1.2;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Shape chips with icon - horizontal layout */
.dim-chip:has(.dim-chip-icon) {
	flex-direction: row;
	gap: 6px;
	align-items: center;
	justify-content: center;
	padding: 6px 10px;
}

/* Triple column layout for compact filters */
.dim-triple-row {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

/* Fix overflow: grid children must have min-width: 0 to respect column bounds */
.dim-triple-row > .dim-chip-group,
.dim-triple-row > .dim-filter {
	min-width: 0;
}

/* Apply overflow hidden only to chip-list, not the label */
.dim-triple-row .dim-chip-list {
	max-width: 100%;
}

/* Compact filters form */
.dim-filters-compact .dim-filter-row {
	margin-bottom: 14px;
}

.dim-filters-compact .dim-filter-label,
.dim-filters-compact .dim-filter label {
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--apple-text-secondary, #6e6e73);
}

/* Responsive: stack on mobile */
@media (max-width: 900px) {
	.dim-triple-row {
		grid-template-columns: 1fr;
		gap: 12px;
	}
}

/* =============================================
   RANGE SLIDERS
   ============================================= */
.dim-range {
	position: relative;
	height: 4px;
	background: var(--apple-border-light);
	border-radius: 2px;
	margin: 16px 0 8px;
}

.dim-range input[type="range"] {
	position: absolute;
	width: 100%;
	height: 4px;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
	top: 0;
	margin: 0;
}

.dim-range input[type="range"]::-webkit-slider-thumb {
	pointer-events: auto;
	-webkit-appearance: none;
	height: 22px;
	width: 22px;
	border-radius: 50%;
	background: #ffffff;
	border: none;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
	margin-top: -9px;
	transition: transform 0.15s var(--apple-ease);
}

.dim-range input[type="range"]::-webkit-slider-thumb:hover {
	transform: scale(1.1);
}

.dim-range input[type="range"]::-webkit-slider-thumb:active {
	transform: scale(0.95);
}

/* =============================================
   FILTER ACTIONS
   ============================================= */
.dim-filter-actions {
	display: flex;
	gap: 12px;
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--apple-border-light);
	flex-wrap: wrap;
}

.button,
.dim-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 48px;
	padding: 0 24px;
	border-radius: var(--apple-radius-pill);
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s var(--apple-ease);
	text-decoration: none;
	border: none;
}

.button-primary,
.dim-btn-primary {
	background: var(--apple-blue);
	color: #ffffff;
}

.button-primary:hover,
.dim-btn-primary:hover {
	background: var(--apple-blue-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
}

.button:not(.button-primary),
.dim-btn-secondary,
.dim-reset {
	background: var(--apple-input-bg);
	color: var(--apple-text);
	border: none;
}

.button:not(.button-primary):hover,
.dim-btn-secondary:hover,
.dim-reset:hover {
	background: #ebebf0;
}

/* =============================================
   TOOLBAR (Results Header)
   ============================================= */
.dim-toolbar,
.dim-results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	gap: 16px;
	flex-wrap: wrap;
}

.dim-results-info,
.dim-count {
	font-size: 15px;
	color: var(--apple-text-secondary);
}

.dim-results-count {
	font-weight: 600;
	color: var(--apple-text);
}

/* =============================================
   VIEW TOGGLE (Grid/Table Switch)
   ============================================= */
.dim-view-toggle {
	display: inline-flex;
	background: var(--apple-input-bg);
	border-radius: var(--apple-radius-xs);
	padding: 4px;
	gap: 4px;
}

.dim-view-btn,
.dim-view-toggle a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 36px;
	padding: 0 14px;
	border: none;
	background: transparent;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	color: var(--apple-text-secondary);
	cursor: pointer;
	transition: all 0.2s var(--apple-ease);
	text-decoration: none;
}

.dim-view-btn:hover,
.dim-view-toggle a:hover {
	color: var(--apple-text);
}

.dim-view-btn.active,
.dim-view-toggle a.active {
	background: #ffffff;
	color: var(--apple-text);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dim-view-btn svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

/* =============================================
   VIEW SWITCHING (Grid/Table Toggle)
   ============================================= */
.dim-grid {
	display: block;
}

/* =============================================
   GRID VIEW
   ============================================= */
.dim-grid.dim-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

/* Card */
.dim-card {
	background: #fff;
	border-radius: var(--apple-radius);
	overflow: hidden;
	transition: all 0.3s var(--apple-ease);
	display: flex;
	flex-direction: column;
	box-shadow: var(--apple-shadow-sm);
	border: 1px solid var(--apple-border-light);
}

.dim-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--apple-shadow-lg);
}

/* Card Media */
.dim-card-media,
.dim-card__image {
	position: relative;
	padding-top: 100%;
	background: #f8f9fa;
	overflow: hidden;
	margin: 12px;
	border-radius: var(--apple-radius-sm);
}

.dim-card-media img,
.dim-card__image img {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: auto;
	height: auto;
	max-width: 85%;
	max-height: 85%;
	object-fit: contain;
	transition: transform 0.4s var(--apple-ease);
}

.dim-card:hover .dim-card-media img,
.dim-card:hover .dim-card__image img {
	transform: translate(-50%, -50%) scale(1.05);
}

/* Card Body */
.dim-card-body {
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.dim-card-meta,
.dim-card__sku {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--apple-text-secondary);
	margin-bottom: 6px;
	letter-spacing: 0.03em;
}

.dim-card-title,
.dim-card__title {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 8px 0;
	line-height: 1.3;
	color: var(--apple-text);
}

.dim-card-title a {
	color: inherit;
	text-decoration: none;
}

.dim-card-attrs,
.dim-card__specs {
	font-size: 14px;
	color: var(--apple-text-secondary);
	margin: 0 0 16px 0;
	line-height: 1.5;
}

/* Card Footer */
.dim-card-footer {
	margin-top: auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 16px;
	border-top: 1px solid var(--apple-border-light);
	gap: 12px;
}

.dim-price,
.dim-card__price {
	font-size: 18px;
	font-weight: 700;
	color: var(--apple-text);
	letter-spacing: -0.02em;
}

/* Card Actions */
.dim-card-actions,
.dim-card__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.dim-view,
.dim-card__view-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	padding: 0 16px;
	background: var(--apple-blue);
	color: #fff;
	border-radius: var(--apple-radius-pill);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.2s var(--apple-ease);
	border: none;
	cursor: pointer;
}

.dim-view:hover,
.dim-card__view-btn:hover {
	background: var(--apple-blue-hover);
	color: #fff;
}

/* Icon Buttons */
.dim-icon-btn,
.dim-card__action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 50%;
	background: transparent;
	border: 1px solid var(--apple-border);
	cursor: pointer;
	transition: all 0.2s var(--apple-ease);
}

.dim-icon-btn:hover,
.dim-card__action-btn:hover {
	background: var(--apple-blue);
	border-color: var(--apple-blue);
}

.dim-icon-btn:hover .dim-icon-svg,
.dim-card__action-btn:hover svg {
	filter: brightness(0) invert(1);
}

.dim-icon-svg {
	width: 16px;
	height: 16px;
	transition: filter 0.2s var(--apple-ease);
}

/* Compare Label */
.dim-compare-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--apple-border);
	cursor: pointer;
	transition: all 0.2s var(--apple-ease);
	position: relative;
}

.dim-compare-label:hover {
	background: var(--apple-blue);
	border-color: var(--apple-blue);
}

.dim-compare-label:hover .dim-icon-svg {
	filter: brightness(0) invert(1);
}

.dim-compare-label .dim-compare {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
	margin: 0;
	padding: 0;
}

.dim-compare-label:has(.dim-compare:checked) {
	background: var(--apple-blue);
	border-color: var(--apple-blue);
}

.dim-compare-label:has(.dim-compare:checked) .dim-icon-svg {
	filter: brightness(0) invert(1);
}

/* =============================================
   SINGLE PAGE ACTION ICONS
   ============================================= */
.dim-action-icons {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Compare button on single page - hide checkbox, style label */
.dim-compare-btn {
	position: relative;
}

.dim-compare-btn .dim-compare {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
	margin: 0;
	padding: 0;
	z-index: 1;
}

/* When compare is checked */
.dim-compare-btn:has(.dim-compare:checked) {
	background: var(--apple-blue);
	border-color: var(--apple-blue);
}

.dim-compare-btn:has(.dim-compare:checked) .dim-icon-svg {
	filter: brightness(0) invert(1);
}

/* =============================================
   TABLE VIEW
   ============================================= */
.dim-table-wrap {
	background: transparent;
	border-radius: 0;
	overflow: visible;
	box-shadow: none;
	border: none;
	width: 100%;
}

.dim-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0 12px;
	font-size: 15px;
}

/* Table Header - customizable via CSS variables */
.dim-table thead {
	position: sticky;
	top: 0;
	z-index: 10;
}

.dim-table th {
	padding: 16px 16px;
	text-align: left;
	font-weight: 600;
	font-size: 12px;
	color: var(--dim-table-header-text, var(--apple-text-secondary));
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
	background: var(--dim-table-header-bg, #f8f9fa);
}

.dim-table th:first-child {
	padding-left: 24px;
	border-radius: var(--apple-radius-sm) 0 0 var(--apple-radius-sm);
}

.dim-table th:last-child {
	padding-right: 24px;
	border-radius: 0 var(--apple-radius-sm) var(--apple-radius-sm) 0;
}

/* Table Body Rows */
.dim-table tbody tr {
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	transition: all 0.2s var(--apple-ease);
	outline: 2px solid transparent;
	outline-offset: -2px;
	border-radius: var(--apple-radius-sm);
}

.dim-table tbody tr:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
	outline-color: var(--apple-blue);
	background: #fafbff;
}

.dim-table td {
	padding: 18px 16px;
	color: var(--apple-text);
	vertical-align: middle;
	background: inherit;
}

.dim-table td:first-child {
	padding-left: 24px;
	border-radius: var(--apple-radius-sm) 0 0 var(--apple-radius-sm);
}

.dim-table td:last-child {
	padding-right: 24px;
	border-radius: 0 var(--apple-radius-sm) var(--apple-radius-sm) 0;
}

/* Shape cell with photo */
.dim-table-shape {
	min-width: 160px;
}

.dim-table-shape-link {
	display: flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	color: inherit;
}

.dim-table-shape-link:hover .dim-table-shape-name {
	color: var(--apple-blue);
}

.dim-table-thumb {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 1px solid var(--apple-border-light);
}

.dim-table-shape-name {
	font-weight: 500;
	color: var(--apple-text);
	transition: color 0.2s ease;
}

/* Price cell */
.dim-table-price {
	font-weight: 600;
	color: #16a34a;
	white-space: nowrap;
}

/* Actions cell */
.dim-table-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	justify-content: flex-end;
}

.dim-table-actions .dim-compare-label {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: #f5f5f7;
	border: 1px solid var(--apple-border-light);
}

.dim-table-actions .dim-compare-label .dim-icon-svg {
	width: 18px;
	height: 18px;
}

.dim-table-video-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: #f5f5f7;
	border: 1px solid var(--apple-border-light);
	text-decoration: none;
	transition: all 0.2s ease;
}

.dim-table-video-btn:hover {
	background: var(--apple-blue);
	border-color: var(--apple-blue);
}

.dim-table-video-btn:hover .dim-icon-360 {
	color: #fff;
}

.dim-icon-360 {
	font-size: 11px;
	font-weight: 700;
	color: var(--apple-text-secondary);
	transition: color 0.2s ease;
}

/* Quick View button in table */
.dim-table-quick-view {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: #f5f5f7;
	border: 1px solid var(--apple-border-light);
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 0;
}

.dim-table-quick-view .dim-icon-svg {
	width: 18px;
	height: 18px;
	opacity: 0.7;
	transition: opacity 0.2s ease;
}

.dim-table-quick-view:hover {
	background: var(--apple-blue);
	border-color: var(--apple-blue);
}

.dim-table-quick-view:hover .dim-icon-svg {
	filter: brightness(0) invert(1);
	opacity: 1;
}

/* Responsive table */
@media (max-width: 900px) {
	.dim-table {
		font-size: 13px;
	}

	.dim-table th,
	.dim-table td {
		padding: 14px 10px;
	}

	.dim-table td:first-child,
	.dim-table th:first-child {
		padding-left: 14px;
	}

	.dim-table td:last-child,
	.dim-table th:last-child {
		padding-right: 14px;
	}

	.dim-table-thumb {
		width: 40px;
		height: 40px;
	}

	.dim-table-shape {
		min-width: 120px;
	}
}

@media (max-width: 640px) {
	.dim-table-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.dim-table {
		min-width: 700px;
	}
}

/* =============================================
   PAGINATION
   ============================================= */
.dim-pagination {
	margin-top: 48px;
	display: flex;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

@media (max-width: 1024px) {
	.dim-filter-row {
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
		gap: 14px;
	}
	.dim-filter-actions {
		flex-direction: column;
		align-items: stretch;
	}
	.dim-results-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
}

@media (max-width: 640px) {
	.dim-filter-row {
		grid-template-columns: 1fr;
	}
	.dim-chip-list {
		justify-content: flex-start;
	}
	.dim-view-toggle {
		width: 100%;
	}
	.dim-view-toggle a {
		flex: 1;
		justify-content: center;
	}
}

.dim-page a,
.dim-page span,
.dim-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border-radius: var(--apple-radius-xs);
	background: transparent;
	color: var(--apple-text);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: all 0.2s var(--apple-ease);
}

.dim-page a:hover,
.dim-page-btn:hover {
	background: var(--apple-input-bg);
}

.dim-page .current,
.dim-page-btn.current {
	background: var(--apple-text);
	color: #fff;
}

/* =============================================
   EMPTY STATE
   ============================================= */
.dim-empty-state,
.dim-no-results {
	text-align: center;
	padding: 60px 24px;
	color: var(--apple-text-secondary);
	background: var(--apple-input-bg);
	border-radius: var(--apple-radius);
}

.dim-empty-state .dim-empty-icon {
	font-size: 48px;
	margin-bottom: 16px;
	opacity: 0.4;
}

.dim-empty-state p,
.dim-no-results {
	font-size: 16px;
	font-weight: 500;
	margin: 0;
}

/* =============================================
   ACTIVE FILTERS TAGS
   ============================================= */
.dim-active-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}

.dim-active-filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	background: rgba(0, 113, 227, 0.08);
	border-radius: var(--apple-radius-pill);
	font-size: 13px;
	color: var(--apple-blue);
}

.dim-active-filter .dim-filter-name {
	font-weight: 500;
	color: var(--apple-text-secondary);
}

.dim-active-filter .dim-filter-value {
	font-weight: 600;
}

.dim-active-filter .dim-remove-filter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	border: none;
	background: rgba(0, 113, 227, 0.15);
	border-radius: 50%;
	cursor: pointer;
	font-size: 12px;
	line-height: 1;
	color: var(--apple-blue);
	transition: all 0.15s ease;
}

.dim-active-filter .dim-remove-filter:hover {
	background: var(--apple-blue);
	color: #fff;
}

.dim-clear-all {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	background: transparent;
	border: 1px solid var(--apple-border);
	border-radius: var(--apple-radius-pill);
	font-size: 13px;
	font-weight: 500;
	color: var(--apple-text-secondary);
	cursor: pointer;
	transition: all 0.2s ease;
}

.dim-clear-all:hover {
	border-color: #ef4444;
	color: #ef4444;
	background: rgba(239, 68, 68, 0.05);
}

/* =============================================
   LOADING STATES
   ============================================= */
.dim-inventory-container.dim-loading,
.dim-results.is-loading {
	position: relative;
	pointer-events: none;
}

/* Background overlay removed - keeping spinner only */

.dim-inventory-container.dim-loading::after,
.dim-results.is-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 32px;
	height: 32px;
	margin: -16px 0 0 -16px;
	border: 3px solid var(--apple-border);
	border-top-color: var(--apple-blue);
	border-radius: 50%;
	z-index: 11;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* =============================================
   QUICK VIEW MODAL
   ============================================= */
.dim-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 999999;
	overflow: hidden;
}

.dim-modal.is-open {
	display: block;
}

.dim-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(255, 255, 255, 0.1);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
}

.dim-modal-container {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	width: 90%;
	max-width: 900px;
	max-height: 85vh;
	border-radius: var(--apple-radius);
	box-shadow: var(--apple-shadow-lg);
	overflow-y: auto;
	z-index: 1;
	padding: 40px;
	animation: modalSlideUp 0.3s var(--apple-ease);
}

@keyframes modalSlideUp {
	from {
		opacity: 0;
		transform: translate(-50%, -50%) translateY(20px);
	}
	to {
		opacity: 1;
		transform: translate(-50%, -50%) translateY(0);
	}
}

.dim-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--apple-input-bg);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
	z-index: 10;
}

.dim-modal-close:hover {
	background: #e5e5e5;
}

.dim-modal-close::before,
.dim-modal-close::after {
	content: '';
	position: absolute;
	width: 14px;
	height: 2px;
	background: var(--apple-text);
}

.dim-modal-close::before {
	transform: rotate(45deg);
}

.dim-modal-close::after {
	transform: rotate(-45deg);
}

/* Quick View Body */
.dim-quick-view-body {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	align-items: start;
}

.dim-qv-media {
	background: var(--apple-input-bg);
	border-radius: var(--apple-radius);
	padding: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
}

.dim-qv-media img {
	max-width: 100%;
	max-height: 280px;
	object-fit: contain;
}

.dim-qv-details h2 {
	font-size: 22px;
	font-weight: 600;
	margin: 0 0 12px 0;
	color: var(--apple-text);
}

.dim-qv-price {
	font-size: 26px;
	font-weight: 700;
	color: var(--apple-text);
	margin-bottom: 20px;
}

.dim-qv-specs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-bottom: 24px;
	padding: 16px;
	background: var(--apple-input-bg);
	border-radius: var(--apple-radius-sm);
}

.dim-spec-item {
	text-align: center;
}

.dim-spec-item .label {
	font-size: 10px;
	text-transform: uppercase;
	color: var(--apple-text-secondary);
	font-weight: 600;
	margin-bottom: 4px;
	letter-spacing: 0.05em;
}

.dim-spec-item .value {
	font-size: 15px;
	font-weight: 600;
	color: var(--apple-text);
}

.dim-qv-actions {
	display: flex;
	gap: 12px;
}

.dim-qv-view-btn {
	flex: 1;
	height: 48px;
}

body.dim-modal-active {
	overflow: hidden;
}

/* =============================================
   WISHLIST & TOAST
   ============================================= */
.dim-wishlist-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--apple-border);
	background: transparent;
	cursor: pointer;
	transition: all 0.2s var(--apple-ease);
}

.dim-wishlist-btn:hover {
	border-color: #ff4757;
	background: rgba(255, 71, 87, 0.1);
}

.dim-wishlist-btn.is-active {
	background: #ff4757;
	border-color: #ff4757;
}

.dim-wishlist-btn.is-active .dim-icon-svg {
	filter: brightness(0) invert(1);
}

/* Toast */
.dim-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(100px);
	padding: 14px 24px;
	background: var(--apple-text);
	color: #fff;
	border-radius: var(--apple-radius-pill);
	font-size: 14px;
	font-weight: 500;
	box-shadow: var(--apple-shadow-lg);
	z-index: 9999999;
	opacity: 0;
	transition: all 0.3s var(--apple-ease);
}

.dim-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* =============================================
   FLOATING COMPARE BAR
   ============================================= */
.dim-floating-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--apple-text);
	color: #fff;
	padding: 16px 24px;
	z-index: 999998;
	transform: translateY(100%);
	transition: transform 0.3s var(--apple-ease);
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.dim-floating-bar.is-visible {
	transform: translateY(0);
}

.dim-floating-bar-content {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
}

.dim-btn-compare-now {
	background: var(--apple-blue);
	color: #fff;
	border: none;
	padding: 12px 24px;
	border-radius: var(--apple-radius-pill);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

/* =============================================
   SINGLE DIAMOND PAGE
   ============================================= */
.dim-single {
	background: var(--apple-card-bg);
	border-radius: var(--apple-radius);
	box-shadow: var(--apple-shadow-md);
	padding: 40px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	max-width: 1200px;
	margin: 0 auto;
}

.dim-single-header {
	grid-column: 1 / -1;
	text-align: center;
	margin-bottom: 16px;
}

.dim-single h2 {
	font-size: 36px;
	font-weight: 700;
	margin: 16px 0;
	letter-spacing: -0.02em;
}

.dim-single-actions {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid var(--apple-border-light);
}

/* WooCommerce buttons in specs table */
.dim-wc-buttons-row td {
	padding-top: 20px !important;
	border-bottom: none !important;
}

.dim-wc-buttons {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
}

.dim-wc-buttons .button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}


/* Gallery */
.dim-gallery-carousel {
	position: relative;
	background: var(--apple-input-bg);
	border-radius: var(--apple-radius);
	overflow: hidden;
}

.dim-slide {
	display: none;
}

.dim-slide.active {
	display: block;
}

.dim-slide img {
	width: 100%;
	height: auto;
	max-height: 500px;
	object-fit: contain;
}

.dim-carousel-nav {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	display: flex;
	justify-content: space-between;
	padding: 0 12px;
	pointer-events: none;
}

.dim-prev,
.dim-next {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	box-shadow: var(--apple-shadow-sm);
	cursor: pointer;
	pointer-events: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s var(--apple-ease);
}

.dim-prev:hover,
.dim-next:hover {
	background: #fff;
	transform: scale(1.05);
}

.dim-gallery-thumbs {
	display: flex;
	gap: 8px;
	padding: 12px;
	overflow-x: auto;
	background: #fff;
}

.dim-gallery-thumb {
	width: 64px;
	height: 64px;
	border-radius: var(--apple-radius-xs);
	overflow: hidden;
	cursor: pointer;
	border: 2px solid transparent;
	flex-shrink: 0;
	transition: border-color 0.2s;
}

.dim-gallery-thumb.active {
	border-color: var(--apple-blue);
}

.dim-gallery-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Single Table */
.dim-single-table table {
	width: 100%;
}

.dim-single-table th {
	width: 40%;
	color: var(--apple-text-secondary);
	font-weight: 500;
	padding: 14px 0;
	border-bottom: 1px solid var(--apple-border-light);
	text-align: left;
}

.dim-single-table td {
	font-weight: 500;
	color: var(--apple-text);
	padding: 14px 0;
	border-bottom: 1px solid var(--apple-border-light);
	text-align: right;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

/* Tablet */
@media (max-width: 1024px) {
	.dim-filter-row {
		grid-template-columns: repeat(2, 1fr);
	}

	.dim-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}

	.dim-single {
		grid-template-columns: 1fr;
		padding: 24px;
	}

	.dim-quick-view-body {
		grid-template-columns: 1fr;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.dim-filter-row {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.dim-chip-list {
		gap: 8px;
	}

	.dim-chip {
		min-width: 70px;
		padding: 12px 14px;
		font-size: 11px;
	}

	.dim-compact-chips .dim-chip {
		min-width: 44px;
		padding: 8px 10px;
		font-size: 10px;
	}

	.dim-filter-actions {
		flex-direction: column;
	}

	.dim-filter-actions .button,
	.dim-filter-actions .dim-btn {
		width: 100%;
	}

	.dim-toolbar,
	.dim-results-header {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.dim-view-toggle {
		align-self: flex-end;
	}

	.dim-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.dim-card-footer {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.dim-card-actions {
		justify-content: space-between;
	}

	.dim-view {
		flex: 1;
		justify-content: center;
	}

	/* Table responsive */
	.dim-table-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.dim-table {
		min-width: 600px;
	}

	.dim-table th,
	.dim-table td {
		padding: 12px 14px;
		font-size: 13px;
	}

	/* Modal */
	.dim-modal-container {
		width: 95%;
		padding: 24px;
	}

	.dim-qv-specs {
		grid-template-columns: repeat(2, 1fr);
	}

	.dim-qv-actions {
		flex-direction: column;
	}

	.dim-qv-view-btn {
		width: 100%;
	}

	/* Single page */
	.dim-single h2 {
		font-size: 26px;
	}

	.dim-single-actions {
		flex-direction: column;
	}

	.dim-single-actions .button {
		width: 100%;
	}

	/* Pagination */
	.dim-pagination {
		gap: 4px;
	}

	.dim-page a,
	.dim-page span,
	.dim-page-btn {
		min-width: 40px;
		height: 40px;
		padding: 0 10px;
		font-size: 14px;
	}
}

/* Small Mobile */
@media (max-width: 480px) {
	.dim-chip {
		min-width: 60px;
		padding: 10px 12px;
	}

	.dim-chip-icon {
		width: 28px;
		height: 28px;
	}

	.dim-inline {
		grid-template-columns: 1fr;
	}

	.dim-filter select,
	.dim-filter input[type="text"],
	.dim-filter input[type="number"] {
		height: 44px;
		font-size: 14px;
	}

	.button,
	.dim-btn {
		height: 44px;
		font-size: 14px;
	}
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

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

/* Card animation on load */
.dim-card {
	animation: fadeIn 0.4s var(--apple-ease);
}

/* =============================================
   IMAGE HOVER EFFECTS
   ============================================= */
.dim-image-hover-none .dim-card:hover .dim-card-media img {
	transform: translate(-50%, -50%);
}

.dim-image-hover-zoom .dim-card:hover .dim-card-media img {
	transform: translate(-50%, -50%) scale(1.1);
}

.dim-image-hover-rotate .dim-card:hover .dim-card-media img {
	transform: translate(-50%, -50%) rotate(2deg) scale(1.03);
}

/* =============================================
   LIGHTBOX
   ============================================= */
.dim-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 9999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dim-lightbox-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
	backdrop-filter: blur(10px);
}

.dim-lightbox-content {
	position: relative;
	max-width: 90%;
	max-height: 90vh;
}

.dim-lightbox-image-wrap img {
	max-width: 100%;
	max-height: 85vh;
	object-fit: contain;
}

.dim-lightbox-close {
	position: absolute;
	top: -50px;
	right: 0;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 32px;
	cursor: pointer;
	opacity: 0.8;
}

.dim-lightbox-close:hover {
	opacity: 1;
}

body.dim-lightbox-active {
	overflow: hidden;
}

/* =============================================
   LIVE SEARCH
   ============================================= */
.dim-live-search {
	position: relative;
	max-width: 400px;
	margin: 0 auto 32px;
}

.dim-live-search-input {
	width: 100%;
	height: 48px;
	padding: 0 20px 0 48px;
	border: 1px solid transparent;
	border-radius: var(--apple-radius-pill);
	font-size: 15px;
	background-color: var(--apple-input-bg);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%2386868b' viewBox='0 0 256 256'%3E%3Cpath d='M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 16px center;
	transition: all 0.2s var(--apple-ease);
}

.dim-live-search-input:focus {
	outline: none;
	background-color: #fff;
	border-color: var(--apple-blue);
	box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.dim-live-search-results {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border-radius: var(--apple-radius);
	box-shadow: var(--apple-shadow-lg);
	margin-top: 8px;
	max-height: 400px;
	overflow-y: auto;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: all 0.2s var(--apple-ease);
	z-index: 1000;
}

.dim-live-search-results.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.dim-live-result-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	text-decoration: none;
	color: var(--apple-text);
	transition: background 0.15s;
}

.dim-live-result-item:hover {
	background: var(--apple-input-bg);
}

.dim-live-result-img {
	width: 48px;
	height: 48px;
	border-radius: var(--apple-radius-xs);
	overflow: hidden;
	background: var(--apple-input-bg);
	flex-shrink: 0;
}

.dim-live-result-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dim-live-result-title {
	font-weight: 600;
	font-size: 14px;
}

.dim-live-result-meta {
	font-size: 12px;
	color: var(--apple-text-secondary);
}

.dim-live-result-price {
	font-weight: 600;
	color: var(--apple-blue);
}

/* =============================================
   ELEMENTOR SINGLE WIDGET
   ============================================= */
.dim-single-elementor {
	font-family: var(--apple-font);
	color: var(--apple-text);
}

.dim-single-elementor .dim-single-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
}

.dim-single-elementor.dim-layout-split .dim-single-grid {
	flex-wrap: nowrap;
}

.dim-single-elementor.dim-layout-split .dim-single-media,
.dim-single-elementor.dim-layout-split .dim-single-content {
	flex: 0 0 50%;
	max-width: 50%;
}

.dim-single-title {
	font-size: 32px;
	font-weight: 700;
	margin: 0 0 8px 0;
	letter-spacing: -0.02em;
}

.dim-single-price {
	font-size: 28px;
	font-weight: 700;
	margin-bottom: 24px;
}

.dim-single-sku {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--apple-text-secondary);
	margin-bottom: 8px;
}

.dim-status-badge {
	display: inline-block;
	padding: 6px 14px;
	border-radius: var(--apple-radius-pill);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin-bottom: 16px;
}

.dim-status-badge.available {
	background: #d4edda;
	color: #155724;
}

.dim-status-badge.sold {
	background: #f8d7da;
	color: #721c24;
}

.dim-status-badge.reserved {
	background: #fff3cd;
	color: #856404;
}

/* Specs Grid */
.dim-single-specs.dim-specs-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-bottom: 24px;
	padding: 20px;
	background: var(--apple-input-bg);
	border-radius: var(--apple-radius-sm);
}

.dim-single-specs .dim-spec-item {
	text-align: center;
	padding: 12px;
	background: #fff;
	border-radius: var(--apple-radius-xs);
}

.dim-single-specs .dim-spec-label {
	font-size: 11px;
	text-transform: uppercase;
	color: var(--apple-text-secondary);
	font-weight: 600;
	margin-bottom: 4px;
	letter-spacing: 0.05em;
}

.dim-single-specs .dim-spec-value {
	font-size: 15px;
	font-weight: 600;
	color: var(--apple-text);
}

/* Similar section - Slider */
.dim-similar-section {
	margin-top: 60px;
	padding-top: 40px;
	border-top: 1px solid var(--apple-border-light);
}

.dim-similar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 24px;
}

.dim-similar-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0;
}

.dim-similar-nav {
	display: flex;
	gap: 8px;
}

.dim-similar-prev,
.dim-similar-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--apple-input-bg);
	border: 1px solid var(--apple-border-light);
	color: var(--apple-text);
	cursor: pointer;
	transition: all 0.2s var(--apple-ease);
}

.dim-similar-prev:hover,
.dim-similar-next:hover {
	background: var(--apple-blue);
	border-color: var(--apple-blue);
	color: #fff;
}

.dim-similar-prev:disabled,
.dim-similar-next:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

.dim-similar-slider {
	position: relative;
	overflow: hidden;
}

.dim-similar-track {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 24px;
	transition: transform 0.4s var(--apple-ease);
}

.dim-similar-track > .dim-card {
	flex: 0 0 calc(25% - 18px) !important;
	max-width: calc(25% - 18px) !important;
	min-width: 220px;
	width: auto !important;
}

/* Fallback grid for non-JS */
.dim-similar-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

@media (max-width: 1024px) {
	.dim-single-elementor.dim-layout-split .dim-single-media,
	.dim-single-elementor.dim-layout-split .dim-single-content {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.dim-single-specs.dim-specs-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.dim-similar-track > .dim-card {
		flex: 0 0 calc(33.333% - 16px) !important;
		max-width: calc(33.333% - 16px) !important;
	}

	.dim-similar-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.dim-similar-track > .dim-card {
		flex: 0 0 calc(50% - 12px) !important;
		max-width: calc(50% - 12px) !important;
		min-width: 180px;
	}
}

@media (max-width: 480px) {
	.dim-similar-track > .dim-card {
		flex: 0 0 85% !important;
		max-width: 85% !important;
		min-width: 240px;
	}
}

@media (max-width: 768px) {
	.dim-single-title {
		font-size: 24px;
	}

	.dim-single-price {
		font-size: 22px;
	}

	.dim-single-specs.dim-specs-grid {
		grid-template-columns: 1fr;
	}

	.dim-similar-grid {
		grid-template-columns: 1fr;
	}
}

/* Similar diamonds slider */
.dim-related {
	margin-top: 32px;
}

.dim-related .dim-related-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.dim-related .dim-related-nav {
	display: inline-flex;
	gap: 8px;
}

.dim-related .dim-related-btn {
	background: var(--dim-card-bg);
	color: var(--dim-text);
	border: 1px solid var(--dim-border);
	border-radius: var(--dim-radius-sm, 10px);
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: var(--dim-shadow);
}

.dim-related .dim-related-btn:hover {
	background: var(--dim-primary);
	color: #fff;
	border-color: var(--dim-primary);
}

.dim-related .dim-related-track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 8px;
}

.dim-related .dim-related-track .dim-card {
	flex: 0 0 320px;
	scroll-snap-align: start;
	height: 100%;
}

.dim-related .dim-related-track::-webkit-scrollbar {
	height: 8px;
}

.dim-related .dim-related-track::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 20px;
}

.dim-related .dim-related-track::-webkit-scrollbar-thumb {
	background: #c7c7cc;
	border-radius: 20px;
}

.dim-related .dim-related-track::-webkit-scrollbar-thumb:hover {
	background: #a1a1aa;
}

.dim-related h3 {
	margin-bottom: 0;
}

/* Make related section span full width in single layout */
.dim-single .dim-related {
	grid-column: 1 / -1;
}

/* =============================================
   PRINT STYLES - Clean Diamond Sheet
   ============================================= */
@media print {
	/* Reset and basics */
	* {
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
	}

	body {
		background: #fff !important;
		font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
		font-size: 11pt !important;
		line-height: 1.4 !important;
		color: #000 !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	/* Hide all non-essential elements */
	header,
	footer,
	nav,
	aside,
	.site-header,
	.site-footer,
	.wp-block-navigation,
	.navigation,
	.menu,
	.sidebar,
	.widget,
	.comments,
	.related,
	.dim-similar-section,
	.dim-floating-bar,
	.dim-toast,
	.dim-modal,
	.dim-lightbox,
	.dim-carousel-nav,
	.dim-gallery-thumbs,
	.dim-single-actions,
	.dim-compare-label,
	.dim-btn,
	.button,
	.dim-prev,
	.dim-next,
	#wpadminbar,
	.admin-bar,
	.elementor-widget-container > style,
	.elementor-element:not(:has(.dim-single)):not(:has(.dim-single-elementor)) {
		display: none !important;
	}

	/* Diamond single page container */
	.dim-single,
	.dim-single-elementor {
		display: block !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		box-shadow: none !important;
		border: none !important;
		background: #fff !important;
	}

	/* Print Header */
	.dim-single::before,
	.dim-single-elementor::before {
		content: '';
		display: block;
		width: 100%;
		height: 3px;
		background: linear-gradient(90deg, #0071e3, #00c6ff) !important;
		margin-bottom: 24pt;
	}

	/* Title section */
	.dim-single-header,
	.dim-single-content {
		text-align: center !important;
		margin-bottom: 20pt !important;
		padding: 0 !important;
	}

	.dim-single h2,
	.dim-single-title {
		font-size: 22pt !important;
		font-weight: 700 !important;
		margin: 0 0 6pt 0 !important;
		color: #000 !important;
		letter-spacing: -0.02em !important;
	}

	.dim-label,
	.dim-single-sku {
		font-size: 10pt !important;
		color: #666 !important;
		text-transform: uppercase !important;
		letter-spacing: 0.05em !important;
		margin-bottom: 4pt !important;
	}

	.dim-single-meta {
		font-size: 12pt !important;
		color: #444 !important;
		margin-bottom: 8pt !important;
	}

	.dim-single-price {
		font-size: 18pt !important;
		font-weight: 700 !important;
		color: #000 !important;
		margin-bottom: 16pt !important;
	}

	/* Gallery - show only first image */
	.dim-gallery-carousel,
	.dim-single-media {
		display: block !important;
		text-align: center !important;
		margin: 0 auto 24pt !important;
		background: #f8f9fa !important;
		border-radius: 8pt !important;
		padding: 16pt !important;
		max-width: 280pt !important;
		page-break-inside: avoid !important;
	}

	.dim-slide {
		display: none !important;
	}

	.dim-slide:first-child,
	.dim-slide.active {
		display: block !important;
	}

	.dim-slide img,
	.dim-single-media img,
	.dim-main-image {
		max-width: 240pt !important;
		max-height: 240pt !important;
		width: auto !important;
		height: auto !important;
		object-fit: contain !important;
		margin: 0 auto !important;
		display: block !important;
	}

	/* Hide video iframe in print */
	.dim-slide iframe {
		display: none !important;
	}

	/* Specs table */
	.dim-single-table,
	.dim-single-specs {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 auto 20pt !important;
		padding: 0 !important;
		background: transparent !important;
		page-break-inside: avoid !important;
	}

	.dim-single-table table {
		width: 100% !important;
		border-collapse: collapse !important;
	}

	.dim-single-table th,
	.dim-single-table td {
		padding: 8pt 12pt !important;
		border-bottom: 1px solid #e5e5e5 !important;
		font-size: 10pt !important;
		text-align: left !important;
	}

	.dim-single-table th {
		width: 40% !important;
		color: #666 !important;
		font-weight: 500 !important;
	}

	.dim-single-table td {
		font-weight: 600 !important;
		color: #000 !important;
		text-align: right !important;
	}

	.dim-single-table tr:last-child th,
	.dim-single-table tr:last-child td {
		border-bottom: none !important;
	}

	/* Grid specs (Elementor widget) */
	.dim-single-specs.dim-specs-grid {
		display: grid !important;
		grid-template-columns: repeat(3, 1fr) !important;
		gap: 8pt !important;
		background: #f8f9fa !important;
		border-radius: 6pt !important;
		padding: 12pt !important;
	}

	.dim-single-specs .dim-spec-item {
		text-align: center !important;
		padding: 8pt !important;
		background: #fff !important;
		border-radius: 4pt !important;
	}

	.dim-single-specs .dim-spec-label {
		font-size: 8pt !important;
		color: #666 !important;
		text-transform: uppercase !important;
		margin-bottom: 2pt !important;
	}

	.dim-single-specs .dim-spec-value {
		font-size: 11pt !important;
		font-weight: 600 !important;
		color: #000 !important;
	}

	/* Status badge */
	.dim-status-badge {
		display: inline-block !important;
		padding: 4pt 10pt !important;
		border-radius: 10pt !important;
		font-size: 9pt !important;
		font-weight: 600 !important;
		margin-bottom: 12pt !important;
	}

	.dim-status-badge.available {
		background: #d4edda !important;
		color: #155724 !important;
	}

	/* Print footer with URL */
	.dim-single::after,
	.dim-single-elementor::after {
		content: '';
		display: block;
		margin-top: 24pt;
		padding-top: 12pt;
		border-top: 1px solid #e5e5e5;
		font-size: 9pt;
		color: #999;
		text-align: center;
	}

	/* Page settings */
	@page {
		margin: 1.5cm;
		size: A4;
	}

	/* Prevent breaks inside key elements */
	.dim-single-header,
	.dim-single-table,
	.dim-gallery-carousel,
	.dim-single-specs {
		page-break-inside: avoid !important;
	}

	/* Link styling for print */
	a[href]::after {
		content: none !important;
	}

	.dim-single-table a {
		color: #0071e3 !important;
		text-decoration: none !important;
	}
}
