/* =============================================================================
   AuraPress 360 — Frontend / Public CSS
   ============================================================================= */

:root {
	--ap-primary:      #028765;
	--ap-radius:       8px;
	--ap-shadow-lg:    0 10px 15px rgba(0,0,0,.15), 0 4px 6px rgba(0,0,0,.1);
}

/* =============================================================================
   Viewer Wrapper
   ============================================================================= */
.ap360-viewer-wrap {
	position: relative;
	display: block;
	line-height: 0;
}

.ap360-viewer-pano {
	position: relative;
	display: block;
	overflow: hidden;
	background: #111;
}

/* Override Pannellum container */
.ap360-viewer-pano .pnlm-container {
	border-radius: inherit;
}

/* =============================================================================
   Hotspots
   ============================================================================= */
.ap360-hotspot {
	background-color: #000 !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
	background-size: 55% !important;
	/* border: 2px solid rgba(255,255,255,.75) !important; */
	width: 30px !important;
	height: 30px !important;
	border-radius: 50% !important;
	cursor: pointer !important;
	transition: transform .2s, background-color .2s !important;
}

.ap360-hotspot:hover {
	background-color: #888 !important;
}

/* SVG icons per type */
.ap360-hs-info {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") !important;
}

.ap360-hs-scene {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E") !important;
}

.ap360-hs-url {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3'/%3E%3Cline x1='8' y1='12' x2='16' y2='12'/%3E%3C/svg%3E") !important;
}

.ap360-hs-product {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'/%3E%3Cline x1='7' y1='7' x2='7.01' y2='7'/%3E%3C/svg%3E") !important;
}

/* Pulsing ring animation */
.ap360-hotspot::after {
	content: '';
	position: absolute;
	top: -5px;
	left: -5px;
	right: -5px;
	bottom: -5px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,.4);
	animation: ap360-pulse 2s ease-out infinite;
	pointer-events: none;
}

@keyframes ap360-pulse {
	0%   { transform: scale(1); opacity: 1; }
	100% { transform: scale(1.6); opacity: 0; }
}

/* Tooltip text */
.ap360-hotspot.custom-tooltip p {
	background: rgba(0,0,0,.85) !important;
	color: #fff !important;
	border-radius: 6px !important;
	padding: 6px 12px !important;
	font-size: 12px !important;
	white-space: nowrap !important;
	backdrop-filter: blur(4px) !important;
}

/* =============================================================================
   Info Modal
   ============================================================================= */
.ap360-modal {
	position: absolute;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
}

/* .ap360-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.6);
	backdrop-filter: blur(3px);
	cursor: pointer;
} */

.ap360-modal__box {
	position: relative;
	background: #fff;
	border-radius: var(--ap-radius);
	box-shadow: var(--ap-shadow-lg);
	max-width: 480px;
	width: calc(100% - 40px);
	max-height: 80%;
	overflow-y: auto;
	z-index: 1;
}

.ap360-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	background: rgba(0,0,0,.06);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #555;
	transition: background .15s;
}
.ap360-modal__close:hover { background: rgba(0,0,0,.12); }

.ap360-modal__body {
	padding: 24px;
	font-size: 14px;
	line-height: 1.6;
	color: #333;
}
.ap360-modal__body img {
	max-width: 100%;
	border-radius: 6px;
}
.ap360-modal__body h1,
.ap360-modal__body h2,
.ap360-modal__body h3 { margin-top: 0; }

/* =============================================================================
   Product Modal
   ============================================================================= */
.ap360-product-modal .ap360-modal__box {
	max-width: 560px;
	padding: 0;
	overflow: hidden;
}

.ap360-product-modal__header {
	display: flex;
	gap: 14px;
	padding: 20px 20px 16px;
	border-bottom: 1px solid #f0f0f0;
	align-items: flex-start;
}

.ap360-product-modal__img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 8px;
	flex-shrink: 0;
	background: #f5f5f5;
}

.ap360-product-modal__info { flex: 1; min-width: 0; }
.ap360-product-modal__name {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 600;
	color: #111;
	line-height: 1.3;
}
.ap360-product-modal__price { font-size: 15px; color: #028765; font-weight: 500; }
.ap360-product-modal__price del { color: #999; font-weight: 400; margin-right: 6px; font-size: 13px; }

.ap360-product-modal__btn {
	display: inline-block;
	margin-top: 8px;
	padding: 14px;
	background: #028765;
	color: #fff;
	border-radius: 6px;
	font-size: 13px;
	text-decoration: none;
}

/* Tabs */
.ap360-product-modal__tabs { padding: 0 20px 20px; }

.ap360-product-tabs-nav {
	display: flex;
	gap: 0;
	border-bottom: 2px solid #f0f0f0;
	margin-bottom: 16px;
	overflow-x: auto;
}

.ap360-product-tab-btn {
	padding: 8px 16px;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	color: #666;
	white-space: nowrap;
	transition: color .15s, border-color .15s;
}

.ap360-product-tab-btn.active {
	color: #028765;
	border-bottom-color: #028765;
}

.ap360-product-tab-pane { display: none; font-size: 14px; line-height: 1.6; color: #333; }
.ap360-product-tab-pane.active { display: block; }
.ap360-product-tab-pane img { max-width: 100%; border-radius: 6px; }
.ap360-product-tab-pane .ap360-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 8px;
}
.ap360-product-tab-pane .ap360-gallery-grid img {
	width: 100%;
	height: 100px;
	object-fit: cover;
	border-radius: 6px;
}

.ap360-product-loading {
	text-align: center;
	padding: 24px;
	color: #999;
	font-size: 14px;
}

/* =============================================================================
   Product Modal — Display Styles
   ============================================================================= */

/* Default: center modal (same as generic .ap360-modal) */
.ap360-product-modal.ap360-style-modal {
	align-items: center;
	justify-content: center;
}
.ap360-product-modal.ap360-style-modal .ap360-modal__box {
	max-width: 560px;
	width: calc(100% - 40px);
	max-height: 80%;
	overflow-y: auto;
	border-radius: var(--ap-radius);
}

/* Sidebar Right */
.ap360-product-modal.ap360-style-sidebar-right {
	align-items: stretch;
	justify-content: flex-end;
}
.ap360-product-modal.ap360-style-sidebar-right .ap360-modal__box {
	width: min(400px, 50%);
	max-width: none;
	max-height: none;
	height: 100%;
	overflow-y: auto;
	border-radius: var(--ap-radius) 0 0 var(--ap-radius);
	animation: ap360-slide-in-right .22s ease;
}

/* Sidebar Left */
.ap360-product-modal.ap360-style-sidebar-left {
	align-items: stretch;
	justify-content: flex-start;
}
.ap360-product-modal.ap360-style-sidebar-left .ap360-modal__box {
	width: min(400px, 50%);
	max-width: none;
	max-height: none;
	height: 100%;
	overflow-y: auto;
	border-radius: 0 var(--ap-radius) var(--ap-radius) 0;
	animation: ap360-slide-in-left .22s ease;
}

@keyframes ap360-slide-in-right {
	from { transform: translateX(100%); }
	to   { transform: translateX(0); }
}
@keyframes ap360-slide-in-left {
	from { transform: translateX(-100%); }
	to   { transform: translateX(0); }
}

/* =============================================================================
   Floor Plan Mini-Map
   ============================================================================= */

/* Toggle button (map icon) */
.ap360-fp-toggle {
	position: absolute;
	bottom: 42px;
	right: 10px;
	z-index: 300;
	width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 6px;
	background: rgba(0,0,0,.55);
	border: 1px solid rgba(255,255,255,.2);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s, border-color .2s;
	line-height: 1;
}
.ap360-fp-toggle:hover,
.ap360-fp-toggle.active {
	background: var(--ap-primary);
	border-color: var(--ap-primary);
}

/* Overlay panel */
.ap360-fp-overlay {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 400;
	width: 220px;
	max-width: 42%;
	background: rgba(255,255,255,.97);
	border-radius: 10px;
	box-shadow: var(--ap-shadow-lg);
	overflow: hidden;
	animation: ap360-fp-fadein .18s ease;
}

@keyframes ap360-fp-fadein {
	from { opacity: 0; transform: translateY(-6px) scale(.97); }
	to   { opacity: 1; transform: none; }
}

.ap360-fp-overlay__inner {
	position: relative;
	line-height: 0;
}

.ap360-fp-overlay__img {
	display: block;
	width: 100%;
	height: auto;
	user-select: none;
}

.ap360-fp-overlay__close {
	position: absolute;
	top: 5px;
	right: 5px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(0,0,0,.45);
	border: none;
	color: #fff;
	cursor: pointer;
	font-size: 15px;
	line-height: 22px;
	text-align: center;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s;
	z-index: 1;
}
.ap360-fp-overlay__close:hover { background: rgba(0,0,0,.7); }

/* Pointer dots */
.ap360-fp-pointer-dot {
	position: absolute;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	border: 2px solid rgba(255,255,255,.85);
	box-shadow: 0 2px 8px rgba(0,0,0,.35);
	transition: transform .18s, box-shadow .18s;
	line-height: 1;
	user-select: none;
}
.ap360-fp-pointer-dot:hover,
.ap360-fp-pointer-dot:focus,
.ap360-fp-pointer-dot.active {
	transform: translate(-50%, -50%) scale(1.3);
	box-shadow: 0 4px 14px rgba(0,0,0,.45);
	outline: none;
}

/* =============================================================================
   Error state
   ============================================================================= */
.ap360-error {
	padding: 16px;
	background: #fee2e2;
	border: 1px solid #fecaca;
	border-radius: var(--ap-radius);
	color: #991b1b;
	font-size: 14px;
}
