/* shop.css
 * Skeuomorphic, Pottermore-style Shop Cupboard Theme
 * Heavy mahogany framing, wood columns, candle glows, gold coins, and hand-painted wood textures
 */

/* Local Font Imports - served directly from the extension to avoid CDN dependencies */

/* Cinzel */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 600 800; /* Handles 600, 700, and 800 weight mapping */
  font-display: swap;
  src: url('fonts/cinzel-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('fonts/cinzel-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* MedievalSharp */
@font-face {
  font-family: 'MedievalSharp';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/medievalsharp-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'MedievalSharp';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/medievalsharp-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Metamorphous */
@font-face {
  font-family: 'Metamorphous';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/metamorphous-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Metamorphous';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/metamorphous-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	--shop-base-color: #3f2716; /* Base warm mahogany/oak brown color */

	/* Derived relative wood colors using color-mix() */
	--shop-wood-light: color-mix(in srgb, var(--shop-base-color) 75%, #ffffff);
	--shop-wood-highlight: color-mix(in srgb, var(--shop-base-color) 88%, #ffffff);
	--shop-wood-soft-highlight: color-mix(in srgb, var(--shop-base-color) 94%, #ffffff);
	--shop-wood-shadow: color-mix(in srgb, var(--shop-base-color) 70%, #000000);
	--shop-wood-dark-shadow: color-mix(in srgb, var(--shop-base-color) 45%, #000000);
	--shop-wood-deep-black: color-mix(in srgb, var(--shop-base-color) 20%, #000000);

	/* Derived alcove inner background and lighting glow variables */
	--shop-alcove-bg: color-mix(in srgb, var(--shop-base-color) 28%, #000000);
	--shop-alcove-bg-alpha: color-mix(in srgb, var(--shop-alcove-bg) 75%, transparent);
	--shop-alcove-glow-start: color-mix(in srgb, var(--shop-base-color) 30%, #ffdcb4);
	--shop-alcove-glow-start-alpha: color-mix(in srgb, var(--shop-alcove-glow-start) 22%, transparent);
	--shop-alcove-glow-end-alpha: color-mix(in srgb, var(--shop-alcove-bg) 0%, transparent);
	--shop-dark-shadow-color: color-mix(in srgb, var(--shop-base-color) 18%, #000000);

	/* Layout & Bevel variables for physical miter calculations */
	--cabinet-padding: 24px;
	--frame-bevel-width: 4px;
	--frame-bottom-bevel-height: 6px;

	/* Pagination text variables for carved wood text */
	--pagination-text-color: #ffeed1; /* Crisp light cream */
	--pagination-text-hover: color-mix(in srgb, var(--pagination-text-color) 70%, #ffa500); /* More saturated warm amber gold */
	--pagination-text-muted: color-mix(in srgb, var(--pagination-text-color) 35%, var(--shop-wood-shadow)); /* Muted shadow blend */
	--pagination-shadow-dark: rgba(0, 0, 0, 0.95);
	--pagination-shadow-light: rgba(255, 255, 255, 0.15);

	/* Shared headers calculated relative wood cream color */
	--pagination-info-color: color-mix(in srgb, var(--shop-base-color) 15%, #ffe6c4);
}

/* Main Background */
.storefront-body-bg {
	background-color: #362a20; /* Medium-dark warm charcoal brown for soft-light blending */
	padding: 0;
	/* sepia vignette effect for a dusty, aged, fantasy look */
	filter: sepia(0.1) contrast(1.02);
	box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.7);
	position: relative;
}

.storefront-container {
	font-family: 'Metamorphous', Georgia, serif;
	max-width: 1080px;
	margin: 0 auto;
	padding: 0;
	color: #3e2612;
}

/* Reusable embossed carved wood text utility classes */
.embossed-carved-text {
	color: var(--pagination-text-color);
	font-family: 'Cinzel', Georgia, serif;
	font-weight: normal;
	text-shadow: 
		-1px -1px 1px var(--pagination-shadow-dark), 
		1px 1px 1px var(--pagination-shadow-light);
	text-decoration: none;
}

.embossed-carved-hover {
	transition: color 0.15s ease, text-shadow 0.15s ease;
}

.embossed-carved-hover:hover {
	color: var(--pagination-text-hover);
	text-shadow: 
		-1px -1px 1px var(--pagination-shadow-dark), 
		1px 1px 1.5px var(--pagination-shadow-light);
}

.embossed-carved-muted {
	color: var(--pagination-text-muted);
	pointer-events: none;
	text-shadow: 
		-1px -1px 0px rgba(0, 0, 0, 0.45), 
		1px 1px 0px rgba(255, 255, 255, 0.03);
}

.embossed-header-text {
	color: var(--pagination-info-color);
	font-family: 'Cinzel', Georgia, serif;
	text-shadow: 
		-1px -1px 1px var(--pagination-shadow-dark), 
		1px 1px 1px var(--pagination-shadow-light);
}

/* Cabinet dresser container with mahogany wood texture & 80% opaque gradient overlay */
.storefront-cabinet-frame {
	background-color: var(--shop-wood-dark-shadow);
	background-image: var(--shop-frame-texture), linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.65) 100%);
	background-size: 256px 256px, auto;
	background-repeat: repeat, no-repeat;
	background-blend-mode: overlay;
	
	/* Deep wooden cabinet border frame using relative variables */
	border-top: 14px solid var(--shop-wood-light);
	border-left: 14px solid var(--shop-wood-highlight);
	border-right: 14px solid var(--shop-wood-shadow);
	border-bottom: 20px solid var(--shop-wood-deep-black);
	
	/* Multi-layered 3D beveled wood molding effects */
	box-shadow: 
		/* Outer frame border miter highlights/shadows */
		0 -2px 0 rgba(255, 255, 255, 0.12),
		-2px 0 0 rgba(255, 255, 255, 0.08),
		0 2px 0 rgba(0, 0, 0, 0.5),
		2px 0 0 rgba(0, 0, 0, 0.4),
		/* Cabinet outer drop shadow */
		0 25px 50px rgba(0,0,0,0.75),
		/* Inner bevel profile shadows (stepped wood molding effect using calc) */
		inset var(--frame-bevel-width) 0 0 var(--shop-wood-highlight),
		inset 0 calc(-1 * var(--frame-bottom-bevel-height)) 0 var(--shop-wood-deep-black),
		inset calc(-1 * var(--frame-bevel-width)) 0 0 var(--shop-wood-dark-shadow),
		/* Inner recess cabinet backing shadow depth */
		inset 0 0 50px color-mix(in srgb, var(--shop-base-color) 75%, transparent);
		
	padding: var(--cabinet-padding);
	border-radius: 2px;
	box-sizing: border-box;
}

/* Mahogany Plaque / Header Bar (solid gradient) */
.storefront-header-bar {
	background-color: var(--shop-wood-shadow);
	background-image: linear-gradient(to right, var(--shop-wood-highlight) 0%, var(--shop-wood-shadow) 100%);
	border-radius: 0px;
	padding: 16px 24px;
	
	/* Flush margins on top, left and right to integrate into the cabinet frame */
	margin-top: calc(-1 * var(--cabinet-padding));
	margin-left: calc(-1 * var(--cabinet-padding) + var(--frame-bevel-width));
	margin-right: calc(-1 * var(--cabinet-padding));
	margin-bottom: 30px;
	
	/* Border bottom only, top/left/right removed to blend with the frame */
	border: none;
	border-bottom: 5px solid var(--shop-wood-deep-black);
	
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: relative;
}

/* Exit shop link */
.storefront-exit-link {
	display: inline-block;
	font-size: 0.95rem;
	font-family: 'Cinzel', Georgia, serif;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	user-select: none;
	cursor: pointer;
}

.storefront-shop-details-header {
	text-align: right;
}

.storefront-shop-name {
	font-family: 'MedievalSharp', cursive;
	font-size: 2.1rem;
	font-weight: 700;
	margin: 0 0 4px 0;
	color: #e3c49a;
	text-shadow: 2px 2px 2px #000000;
}

.storefront-shop-location {
	font-size: 0.85rem;
	color: #a88a64;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-shadow: 1px 1px 1px #000;
}

/* Location Listing Plaque with mahogany wood texture & 80% opaque gradient overlay */
.location-shops-grid {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.location-shop-card {
	background-color: var(--shop-wood-shadow);
	background-image: linear-gradient(to bottom, var(--shop-wood-highlight) 0%, var(--shop-wood-shadow) 100%);
	
	border-top: 3px solid var(--shop-wood-light);
	border-left: 3px solid var(--shop-wood-highlight);
	border-right: 3px solid var(--shop-wood-shadow);
	border-bottom: 5px solid var(--shop-wood-deep-black);
	border-radius: 0px;
	padding: 22px 26px;
	box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: space-between;
	text-decoration: none;
	color: #e3c49a;
	transition: all 0.2s ease;
}

.location-shop-card:hover {
	transform: translate(-2px, -2px);
	box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.55);
	background-color: #4a2d18;
}

.location-shop-details {
	display: flex;
	align-items: center;
	gap: 20px;
}

.location-shop-icon {
	font-size: 1.85rem;
	background: #1e1107;
	border: 2px solid #5c3a21;
	padding: 8px;
	color: #e3c49a;
}

.location-shop-info {
	display: flex;
	flex-direction: column;
}

.location-shop-name {
	font-family: 'MedievalSharp', cursive;
	font-size: 1.35rem;
	font-weight: 700;
	color: #e3c49a;
	margin: 0 0 4px 0;
	text-shadow: 1px 1px 1px #000;
}

.location-shop-desc {
	font-size: 0.88rem;
	color: #a88a64;
	font-family: Georgia, serif;
	font-style: italic;
	margin: 0;
}

.location-shop-arrow {
	font-family: 'MedievalSharp', cursive;
	font-size: 1rem;
	font-weight: 700;
	color: #e3c49a;
}

/* Location directory hero board with mahogany texture & 80% opaque gradient overlay */
.storefront-hero {
	background-color: var(--shop-wood-dark-shadow);
	background-image: linear-gradient(to bottom, var(--shop-base-color) 0%, var(--shop-wood-dark-shadow) 100%);
	
	border: 4px double var(--shop-wood-highlight);
	border-radius: 0;
	padding: 35px 30px;
	color: #ffeed1;
	box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.45);
	margin-bottom: 30px;
}

.storefront-location-tag {
	display: inline-block;
	background: #8b2500;
	color: #ffeed1;
	font-family: 'MedievalSharp', cursive;
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	padding: 4px 14px;
	border: 2px solid #d45d37;
	margin-bottom: 12px;
}

.storefront-title {
	font-family: 'MedievalSharp', cursive;
	font-size: 2.2rem;
	font-weight: 700;
	margin: 0 0 8px 0;
	color: #ffeed1;
}

.storefront-meta {
	font-size: 0.95rem;
	color: #cbd5e1;
	font-family: Georgia, serif;
	font-style: italic;
}

.storefront-section-title {
	font-family: 'MedievalSharp', cursive;
	font-size: 1.6rem;
	color: #ffeed1;
	text-shadow: 2px 2px 0 #000;
	margin: 0 0 25px 0;
	border-bottom: 3px double #78716c;
	padding-bottom: 12px;
}

/* Skeuomorphic Wooden Dresser Grid */
.storefront-wall-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 28px;
	padding: 24px 0;
}

/* 3D WOOD CABINET RECESS ALCOVE */
.storefront-alcove {
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: 0px;
	overflow: hidden;
	box-sizing: border-box;

	/* Outset wood column borders using variables */
	border-top: 6px solid var(--shop-wood-deep-black);      /* Ceiling header shadow */
	border-left: 8px solid var(--shop-wood-highlight);     /* Left wooden pillar */
	border-right: 8px solid var(--shop-wood-shadow);    /* Right wooden pillar shadow */
	border-bottom: 14px solid var(--shop-base-color);  /* Thick oak shelf board base */
	
	/* Shadow drop */
	box-shadow: 
		inset 0 1px 0 rgba(255, 255, 255, 0.05),
		3px 4px 8px rgba(0, 0, 0, 0.6);
	transition: all 0.25s ease;
}

.storefront-alcove:hover {
	border-bottom-color: var(--shop-wood-light);
}

/* INNER ALCOVE RECESS (The candle-lit display chamber) */
.alcove-inner {
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	overflow: hidden;
	position: relative;
	display: flex;
	flex-direction: column;
	
	/* Opaque dark back wall */
	background-color: var(--shop-alcove-bg);
	
	/* Warm ambient candle glow in the recess */
	background-image: 
		radial-gradient(circle at 50% 15%, var(--shop-alcove-glow-start-alpha) 0%, var(--shop-alcove-glow-end-alpha) 80%);

	/* Inner shadows simulating cupboard depth */
	box-shadow: 
		inset 8px 8px 20px rgba(0, 0, 0, 0.9),
		inset -4px -4px 12px rgba(0, 0, 0, 0.5);
}

/* Default View inside cupboard */
.alcove-default {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	padding: 8px;
	box-sizing: border-box;
}

.alcove-top-badges {
	display: flex;
	justify-content: space-between;
	width: 100%;
	z-index: 2;
}

/* Gold/Bronze/Silver coin price badge stack container */
.alcove-price-coin {
	position: relative;
	width: 54px;
	height: 36px;
	box-sizing: border-box;
	z-index: 2;
}

/* Individual Coin Layers */
.coin-layer {
	position: absolute;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1.5px solid #2c1704;
	box-shadow: 1.5px 1.5px 3px rgba(0,0,0,0.6);
}

/* Knut (Bronze coin) with bronze texture & overlay gradient (no multiply) */
.coin-layer.knut {
	background-color: #b85e2b;
	background-image: 
		radial-gradient(circle at 35% 35%, rgba(255, 220, 200, 0.72) 0%, rgba(92, 46, 22, 0.9) 100%),
		url("images/bronze_texture.png");
	background-size: auto, 48px 48px;
}

/* Sickle (Silver coin) with silver texture & overlay gradient */
.coin-layer.sickle {
	background-color: #9aa5a5;
	background-image: 
		radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.8) 0%, rgba(85, 95, 95, 0.9) 100%),
		url("images/silver_texture.png");
	background-size: auto, 48px 48px;
}

/* Galleon (Gold coin) with gold texture & overlay gradient */
.coin-layer.galleon {
	background-color: #e5a93b;
	background-image: 
		radial-gradient(circle at 35% 35%, rgba(255, 215, 0, 0.85) 0%, rgba(184, 124, 30, 0.85) 75%, rgba(133, 82, 9, 0.9) 100%),
		url("images/gold_texture.png");
	background-size: auto, 48px 48px;
}

/* Layer placement offsets for the 3-coin stack aligned to the top-left */
.coin-layer.layer-1 {
	left: 2px;
	top: 6px;
	z-index: 1;
}
.coin-layer.layer-2 {
	left: 12px;
	top: 2px;
	z-index: 2;
}
.coin-layer.layer-3 {
	left: 22px;
	top: 5px;
	z-index: 3;
}

/* Text overlaid centered on top of the pile */
.coin-price-text {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	text-align: center;
	z-index: 7;
	color: #ffeed1;
	font-family: 'Cinzel', Georgia, serif;
	font-size: 0.82rem;
	font-weight: 800;
	pointer-events: none;
	
	/* Simple thin dark outline around the price text */
	text-shadow: 
		-1px -1px 0 #000, 
		 1px -1px 0 #000, 
		-1px  1px 0 #000, 
		 1px  1px 0 #000;
}

/* Stock label box */
.alcove-stock-badge {
	background: color-mix(in srgb, var(--shop-alcove-bg) 85%, transparent);
	color: #a88a64;
	font-family: 'MedievalSharp', cursive;
	font-size: 0.7rem;
	font-weight: bold;
	padding: 2px 6px;
	border: 1px solid #5c3a21;
	border-radius: 0;
	height: fit-content;
}

/* Item Image Container - Takes full space of the transparent background recess */
.alcove-image-container {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	padding: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1;
	/* Hard shadow drop against the dark backing boards */
	filter: drop-shadow(4px 6px 3px rgba(0, 0, 0, 0.95));
	transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.3s ease;
}

.active-alcove:hover .alcove-image-container {
	transform: scale(1.08) translateY(-6px);
	filter: drop-shadow(0px 14px 10px rgba(0, 0, 0, 0.85));
	animation: subtleWiggle 0.4s ease-in-out infinite alternate;
}

@keyframes subtleWiggle {
	0% {
		transform: scale(1.08) translateY(-6px) rotate(-1.2deg);
	}
	100% {
		transform: scale(1.08) translateY(-6px) rotate(1.2deg);
	}
}

.alcove-item-icon {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.alcove-item-placeholder {
	font-family: 'MedievalSharp', cursive;
	font-size: 2.2rem;
	color: #4a2f13;
	text-shadow: 2px 2px 3px #000;
}

/* Oak Shelf Front board displaying Name with oak wood texture & 80% opaque overlay */
.alcove-name-overlay {
	width: calc(100% + 20px);
	margin-bottom: -10px;
	margin-top: auto;
	background-color: var(--shop-base-color);
	background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.25) 100%);
	box-sizing: border-box;
	z-index: 2;
	text-align: center;
	
	/* Wooden shelf top bevel line using variables */
	border-top: 2px solid var(--shop-wood-highlight);
	border-bottom: 2px solid var(--shop-wood-deep-black);
	padding: 6px 14px;
	overflow: hidden; /* Mask overflowing names */
	display: flex;
	justify-content: center;
}

/* If the marquee is active, align left so translation starts from 0 */
.alcove-name-overlay:has(.marquee-active) {
	justify-content: flex-start;
}

.alcove-item-name {
	font-family: 'Cinzel', Georgia, serif;
	font-size: 0.85rem;
	font-weight: 700;
	display: inline-block; /* Essential for dynamic translation width */
	white-space: nowrap;
	color: #e3c49a;
	text-shadow: 1px 1px 2px #000000;
}

/* Jagged character-by-character scrolling marquee */
.marquee-active {
	animation: marquee-scroll var(--scroll-duration, 7s) steps(var(--char-count)) infinite;
}

@keyframes marquee-scroll {
	0%, 20% {
		transform: translateX(0);
	}
	80%, 100% {
		transform: translateX(var(--scroll-width));
	}
}

.alcove-right-badges {
	display: flex;
	align-items: center;
	gap: 4px;
	height: fit-content;
	z-index: 5;
}

/* Info circular button */
.alcove-info-btn {
	background: color-mix(in srgb, var(--shop-alcove-bg) 85%, transparent);
	color: #ffd700; /* Gold */
	border: 1px solid #5c3a21;
	font-family: 'MedievalSharp', cursive;
	font-size: 0.72rem;
	font-weight: bold;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	transition: background 0.15s, color 0.15s, transform 0.15s;
	z-index: 10;
	outline: none;
}

.alcove-info-btn:hover {
	background: #ffd700;
	color: #120c08;
	transform: scale(1.15);
}

/* Parchment Modal Overlay Backdrop */
.parchment-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(14, 8, 4, 0.65);
	backdrop-filter: blur(4px);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

/* Modal Container sizing */
.parchment-modal-container {
	position: relative;
	width: 100%;
	max-width: 480px;
	height: auto;
	max-height: 90vh;
	z-index: 1001;
}

/* Close Button style */
.parchment-close-btn {
	position: absolute;
	top: -12px;
	right: -12px;
	width: 32px;
	height: 32px;
	background: #361f10;
	border: 2px solid #ffd700;
	border-radius: 50%;
	color: #ffeed1;
	font-size: 1.4rem;
	font-weight: bold;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
	z-index: 1010;
	transition: transform 0.15s, background-color 0.15s;
}
.parchment-close-btn:hover {
	transform: scale(1.1);
	background-color: #4a2d18;
	color: #ffd700;
}

/* Modal sheets stack container */
.parchment-modal-content {
	position: relative;
	width: 100%;
	height: auto;
}

/* Dynamic skeuomorphic parchment stack sheets */
.parchment-paper-page {
	background-color: #ecdcb9;
	background-image: 
		radial-gradient(circle, rgba(245, 232, 204, 0.4) 0%, rgba(219, 203, 159, 0.6) 100%),
		url("images/parchment_texture.png");
	background-size: auto, 192px 192px;
	border: 1.5px solid #2e1c0c;
	box-shadow: 2px 4px 10px rgba(0,0,0,0.5);
	box-sizing: border-box;
}

/* Backing sheet 1 rotated slightly negative */
.parchment-paper-page.stack-page-1 {
	position: absolute;
	top: 4px;
	left: -6px;
	width: 101%;
	height: 99%;
	transform: rotate(-2deg);
	z-index: 1;
	opacity: 0.9;
}

/* Backing sheet 2 rotated slightly positive */
.parchment-paper-page.stack-page-2 {
	position: absolute;
	top: -2px;
	left: 4px;
	width: 99%;
	height: 101%;
	transform: rotate(1.5deg);
	z-index: 2;
	opacity: 0.85;
}

/* Front sheet layout */
.parchment-paper-page.main-page {
	position: relative;
	z-index: 3;
	padding: 24px;
	min-height: 200px;
	max-height: 80vh;
	overflow-y: auto;
}

/* Border design on the paper page */
.parchment-inner-frame {
	border: 1px dashed rgba(92, 64, 51, 0.35);
	padding: 16px;
	height: auto;
	box-sizing: border-box;
}

/* Item headers inside parchment */
.parchment-item-header {
	display: flex;
	gap: 16px;
	align-items: center;
	margin-bottom: 16px;
}

.parchment-image-wrap {
	width: 72px;
	height: 72px;
	background: rgba(14, 8, 4, 0.1);
	border: 1px solid rgba(92, 64, 51, 0.2);
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px;
	box-sizing: border-box;
	flex-shrink: 0;
	filter: drop-shadow(2px 3px 2px rgba(0,0,0,0.15));
}
.parchment-image-wrap img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}
.parchment-image-wrap .alcove-item-placeholder {
	color: #6d4b29;
	text-shadow: none;
	font-size: 1.8rem;
}

.parchment-title-wrap {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.parchment-title-wrap h2 {
	font-family: 'Cinzel', Georgia, serif;
	font-size: 1.3rem;
	font-weight: 700;
	margin: 0;
	line-height: 1.25;
	text-shadow: 1px 1px 0 rgba(255,255,255,0.4);
}
.parchment-rarity-badge {
	font-family: 'MedievalSharp', cursive;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	padding: 2px 8px;
	border: 1px solid;
	align-self: flex-start;
	line-height: 1;
	margin-top: 2px;
}

/* Visual dividing rules */
.parchment-divider {
	border: 0;
	height: 1.5px;
	background: linear-gradient(90deg, rgba(92,64,51,0) 0%, rgba(92,64,51,0.4) 50%, rgba(92,64,51,0) 100%);
	margin: 16px 0;
}

/* Parchment details block */
.parchment-body {
	color: #2c1704;
	font-family: Georgia, serif;
}

.parchment-stat-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
	font-size: 0.9rem;
}
.parchment-stat-label {
	font-weight: bold;
	color: #5c4033;
}
.parchment-stat-val {
	font-weight: bold;
}

/* Modal Condition bar styling */
.parchment-cond-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}
.parchment-cond-bar {
	width: 80px;
	height: 10px;
	background-color: rgba(14, 8, 4, 0.15);
	border: 1px solid rgba(92, 64, 51, 0.4);
	overflow: hidden;
	border-radius: 2px;
}
.parchment-cond-fill {
	height: 100%;
}

.parchment-section-title {
	font-family: 'MedievalSharp', cursive;
	font-size: 1.05rem;
	color: #5c4033;
	margin: 18px 0 6px 0;
	border-bottom: 1px solid rgba(92, 64, 51, 0.2);
	padding-bottom: 4px;
}

.parchment-description {
	font-size: 0.88rem;
	line-height: 1.45;
	margin: 0;
	color: #3d2209;
	text-align: justify;
}

/* Responsive style adjustments for mobile viewports */
@media (max-width: 480px) {
	.parchment-modal-overlay {
		padding: 10px;
	}
	.parchment-paper-page.main-page {
		padding: 16px;
	}
	.parchment-inner-frame {
		padding: 10px;
	}
	.parchment-item-header {
		gap: 10px;
	}
	.parchment-image-wrap {
		width: 58px;
		height: 58px;
	}
	.parchment-title-wrap h2 {
		font-size: 1.15rem;
	}
}


.register-counter-scene {
	flex-grow: 1;
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.candle-glow-light {
	position: absolute;
	top: 15%;
	width: 35px;
	height: 35px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(253, 186, 116, 0.4) 0%, rgba(253, 186, 116, 0) 70%);
	filter: blur(2px);
}



/* Empty Alcove (Deep empty shadow showing the sandstone wall behind it) */
.empty-alcove {
	pointer-events: none;
}

.empty-alcove .alcove-inner {
	/* Opaque dark shadow color to block cabinet frame texture */
	background-color: var(--shop-dark-shadow-color);
}

.alcove-shadow-depth {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	/* Radial shadow perspective */
	background: radial-gradient(circle at 35% 35%, rgba(0,0,0,0) 15%, rgba(0, 0, 0, 0.72) 95%);
}

/* Empty State */
.storefront-empty-state {
	text-align: center;
	padding: 50px 20px;
	background-color: var(--shop-wood-shadow);
	background-image: linear-gradient(to bottom, var(--shop-wood-highlight) 0%, var(--shop-wood-shadow) 100%);
	
	border: 4px double var(--shop-wood-light);
	color: #e3c49a;
	box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.45);
	border-radius: 0;
}

.empty-icon {
	font-size: 2.5rem;
	margin-bottom: 12px;
}
/* 3D raised top-down countertop container */
.storefront-countertop {
	display: flex;
	flex-direction: column;
	width: calc(100% - 32px);
	margin-left: auto;
	margin-right: auto;
	aspect-ratio: 4 / 1.25;
	position: relative;
	box-sizing: border-box;
	margin-bottom: 24px;
	z-index: 5;
	border-radius: 6px;
	
	/* Deep 3D drop shadow making it float above the cabinet frame and back wall */
	box-shadow: 
		0 14px 28px rgba(0, 0, 0, 0.8), 
		0 10px 10px rgba(0, 0, 0, 0.6);
}

/* The actual top surface of the countertop, viewed slightly from top-down */
.countertop-surface {
	flex-grow: 1;
	width: 100%;
	position: relative;
	display: flex;
	flex-direction: column;
	background-color: var(--shop-wood-highlight);
	background-image: 
		radial-gradient(circle at 50% 15%, rgba(253, 186, 116, 0.42) 0%, rgba(253, 186, 116, 0.12) 35%, rgba(0, 0, 0, 0.45) 100%);
	border-radius: 6px;
	overflow: hidden;
	
	/* Soft inner shadow on the surface to create countertop thickness and depth */
	box-shadow: 
		inset 0 10px 20px rgba(0, 0, 0, 0.65), 
		inset 0 -10px 20px rgba(0, 0, 0, 0.655);
}

.countertop-surface::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: url("images/wood_texture_bw.png");
	background-repeat: repeat;
	background-size: 256px 256px;
	opacity: 0.2;
	mix-blend-mode: multiply;
	pointer-events: none;
}

/* Cabinet top border wood beam */
.storefront-cabinet-top-beam {
	height: 38px; /* Thicker wood beam */
	background-color: var(--shop-wood-shadow);
	background-image: linear-gradient(to right, var(--shop-wood-highlight) 0%, var(--shop-wood-shadow) 100%);
	box-sizing: border-box;
	
	/* Spans the entire width of storefront-cabinet-frame, breaking out of padding */
	margin-left: calc(-1 * var(--cabinet-padding) + var(--frame-bevel-width));
	margin-right: calc(-1 * var(--cabinet-padding));
	margin-bottom: 0;
	
	/* Centered label layout */
	display: flex;
	align-items: center;
	justify-content: center;
	
	/* No borders or outer shadows to make it feel like an integral, flush cross-beam of the frame */
	border: none;
	
	/* Inset bevel highlights/shadows with negative spread (only top and bottom inner edges are shaded) */
	box-shadow: 
		inset 0 var(--frame-bevel-width) 0 var(--shop-wood-soft-highlight),
		inset 0 calc(-1 * var(--frame-bottom-bevel-height)) 0 var(--shop-wood-deep-black);
}

.counter-beam-label {
	font-size: 1.1rem;
	font-weight: bold;
	letter-spacing: 2px;
	line-height: 1;
	user-select: none;
}


/* Responsiveness */
@media (max-width: 900px) {
	.storefront-wall-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 22px;
	}
	
	.storefront-exit-placard {
		padding: 8px 12px 8px 18px;
		font-size: 0.85rem;
	}

	.storefront-countertop {
		aspect-ratio: 3 / 1.1;
	}
}

@media (max-width: 645px) {
	.storefront-wall-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
	
	.storefront-countertop {
		aspect-ratio: 2 / 1;
	}
	
	.storefront-header-bar {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}
	
	.storefront-shop-details-header {
		text-align: left;
	}
}

/* Counter background effects */
.storefront-countertop .register-counter-scene {
	background-color: transparent;
}

/* Thematic Skeuomorphic Pagination Wood Plank */
.storefront-pagination-container {
	margin-top: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	
	/* Spans the entire width of storefront-cabinet-frame, and flush to the bottom */
	margin-left: calc(-1 * var(--cabinet-padding) + var(--frame-bevel-width));
	margin-right: calc(-1 * var(--cabinet-padding));
	margin-bottom: calc(-1 * (var(--cabinet-padding) + var(--frame-bottom-bevel-height)));
	padding: 16px 24px;
	box-sizing: border-box;
	
	/* Oak wood plank background styling matching the shelf overlay blend using variables */
	background-color: var(--shop-wood-shadow);
	background-image: linear-gradient(to right, var(--shop-wood-highlight) 0%, var(--shop-wood-shadow) 100%);
	
	/* No borders to make it feel like an integral, flush cross-beam of the frame */
	border: none;
	
	/* Inset bevel highlights/shadows matching the top beam (only top and bottom inner edges are shaded) */
	box-shadow: 
		inset 0 var(--frame-bevel-width) 0 var(--shop-wood-soft-highlight),
		inset 0 calc(-1 * var(--frame-bottom-bevel-height)) 0 var(--shop-wood-deep-black);
}

.storefront-pagination-plaque {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	width: 100%;
}

.prev-arrow {
	justify-self: start;
}

.pagination-info {
	justify-self: center;
	text-align: center;
}

.next-arrow {
	justify-self: end;
}

.pagination-arrow {
	display: inline-block;
	padding: 6px 12px;
	font-size: 0.95rem;
	cursor: pointer;
	user-select: none;
}

.pagination-arrow:active:not(.disabled) {
	transform: translateY(0.5px);
}

.pagination-info {
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.05em;
}

.counter-top-badges {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 10;
	display: flex;
	gap: 8px;
}

.counter-basket-btn, .counter-sell-btn {
	width: 28px !important;
	height: 28px !important;
	font-size: 1.15rem !important;
	box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.4);
}

/* Basket button badge count overlay */
.counter-basket-btn[data-count]::after {
	content: attr(data-count);
	position: absolute;
	top: -5px;
	right: -5px;
	background: #ef4444;
	color: #ffffff;
	border: 1.5px solid #2e1c0c;
	font-size: 0.65rem;
	font-weight: bold;
	font-family: Arial, sans-serif;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Container for dropped items on the desk counter */
.counter-dropped-items {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none; /* Let clicks pass through if empty, but we enable click on dropped items specifically */
}

/* Absolute positioned dropped item */
.dropped-item {
	position: absolute;
	width: 76px;
	height: 76px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	pointer-events: auto; /* Enable hover & click to remove! */
	transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
	filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.7));
	z-index: 15;
}

.dropped-item img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.dropped-item:hover {
	transform: translate(-50%, -50%) scale(1.2) !important; /* Retain centering translate */
	filter: drop-shadow(2px 4px 4px rgba(0,0,0,0.85));
}

.dropped-placeholder {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 1px dashed rgba(92, 64, 51, 0.4);
	background: rgba(92, 64, 51, 0.1);
	color: #5c4033;
	font-family: 'MedievalSharp', cursive;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
}

/* Tactile floating drag clone */
.dragging-item-clone {
	position: fixed;
	width: 64px;
	height: 64px;
	pointer-events: none;
	z-index: 9999;
	transform: translate(-50%, -50%) rotate(5deg) scale(1.1);
	filter: drop-shadow(4px 10px 6px rgba(0,0,0,0.6));
	transition: transform 0.1s ease, opacity 0.15s ease;
}

.dragging-item-clone img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Dynamic smoke puff particle */
.smoke-puff {
	position: absolute;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(230, 220, 205, 0.85) 0%, rgba(185, 175, 160, 0.45) 45%, rgba(140, 130, 120, 0) 70%);
	transform: translate(-50%, -50%) scale(0.1);
	animation: puff 0.6s cubic-bezier(0.15, 0.8, 0.3, 1) forwards;
	pointer-events: none;
	z-index: 100;
}

@keyframes puff {
	0% {
		transform: translate(-50%, -50%) scale(0.1);
		opacity: 1;
	}
	40% {
		opacity: 0.85;
	}
	100% {
		transform: translate(-50%, -50%) scale(1.6) rotate(15deg);
		opacity: 0;
		filter: blur(4px);
	}
}

/* Receipt Modal styles */
.parchment-receipt-title {
	font-family: 'MedievalSharp', cursive;
	font-size: 1.35rem;
	color: #5c4033;
	margin: 0 0 10px 0;
	text-shadow: 1px 1px 0 rgba(255,255,255,0.4);
	text-align: center;
}

.receipt-cart-list {
	max-height: 250px;
	overflow-y: auto;
	padding-right: 4px;
}

.empty-receipt-msg {
	text-align: center;
	color: #6e543c;
	font-style: italic;
	font-size: 0.88rem;
	margin: 30px 0;
}

.receipt-item-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px dashed rgba(92, 64, 51, 0.2);
	font-size: 0.88rem;
}

.receipt-item-info {
	display: flex;
	flex-direction: column;
	width: 45%;
}

.receipt-item-name {
	font-weight: bold;
	color: #2c1704;
}

.receipt-item-cost {
	font-size: 0.75rem;
	color: #6e543c;
}

.receipt-qty-adjuster {
	display: flex;
	align-items: center;
	gap: 8px;
}

.adjust-btn {
	background: #5c4033;
	color: #ffeed1;
	border: 1px solid #2e1c0c;
	width: 20px;
	height: 20px;
	border-radius: 3px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8rem;
	font-weight: bold;
	cursor: pointer;
	padding: 0;
	transition: background 0.15s;
}

.adjust-btn:hover {
	background: #7a5848;
}

.adjust-qty {
	font-family: 'Cinzel', Georgia, serif;
	font-weight: bold;
	min-width: 16px;
	text-align: center;
}

.receipt-item-total {
	font-family: 'Cinzel', Georgia, serif;
	font-weight: bold;
	width: 25%;
	text-align: right;
}

.receipt-summary-footer {
	margin-top: 15px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.receipt-total-row {
	display: flex;
	justify-content: space-between;
	font-size: 1.05rem;
	font-weight: bold;
	color: #2c1704;
}

.receipt-total-row strong {
	font-family: 'Cinzel', Georgia, serif;
	color: #b87c1e;
	text-shadow: 0.5px 0.5px 0 rgba(255,255,255,0.4);
}

.receipt-action-btn {
	background: #361f10;
	color: #ffeed1;
	border: 2px solid #5c3a21;
	padding: 10px 16px;
	font-family: 'MedievalSharp', cursive;
	font-size: 0.95rem;
	font-weight: bold;
	cursor: pointer;
	transition: background-color 0.15s, transform 0.1s;
	box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.receipt-action-btn:hover:not(:disabled) {
	background-color: #4a2d18;
	color: #ffd700;
	transform: translateY(-1px);
	box-shadow: 2px 3px 6px rgba(0,0,0,0.4);
}

.receipt-action-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Success Overlay View */
.receipt-success-view {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ecdcb9;
	background-image: 
		radial-gradient(circle, rgba(245, 232, 204, 0.4) 0%, rgba(219, 203, 159, 0.6) 100%),
		url("images/parchment_texture.png");
	background-size: auto, 192px 192px;
	z-index: 15;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px;
	box-sizing: border-box;
}

.success-seal {
	font-size: 3rem;
	margin-bottom: 12px;
	animation: popSeal 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popSeal {
	0% {
		transform: scale(0.1);
	}
	100% {
		transform: scale(1);
	}
}

.receipt-success-view h3 {
	font-family: 'MedievalSharp', cursive;
	color: #5c4033;
	font-size: 1.4rem;
	margin: 0 0 10px 0;
}

.receipt-success-view p {
	font-family: Georgia, serif;
	font-size: 0.9rem;
	color: #2c1704;
	line-height: 1.4;
	margin: 0 0 20px 0;
	max-width: 300px;
}

.receipt-success-view .ok-btn {
	padding: 8px 24px;
}

/* Custom Font Awesome Icon Styling & Alignments */
.alcove-info-btn .icon:before,
.counter-basket-btn .icon:before,
.counter-sell-btn .icon:before {
	padding-right: 0 !important;
}

.counter-basket-btn .icon,
.counter-sell-btn .icon,
.counter-basket-btn svg,
.counter-sell-btn svg {
	font-size: inherit; /* Inherit the 1.15rem size from the countertop buttons */
	width: 1em;
	height: 1em;
	display: inline-block;
	vertical-align: middle;
}

.alcove-info-btn .icon,
.alcove-info-btn svg {
	font-size: 0.72rem; /* Matches the original visual size of the question mark button */
	width: 1em;
	height: 1em;
	display: inline-block;
	vertical-align: middle;
}

/* Modal header icons */
.parchment-receipt-title .icon,
.parchment-receipt-title svg {
	font-size: 1.35rem;
	display: inline-block;
	vertical-align: middle;
	margin-right: 8px;
	color: #5c4033; /* Matches parchment title color */
}

/* Action button icons (checkout and complete sale) */
.receipt-action-btn .icon,
.receipt-action-btn svg {
	font-size: 0.95rem;
	display: inline-block;
	vertical-align: middle;
	margin-right: 6px;
	margin-top: -2px;
}
