/* Photobook Flow: product list and upload page */

.photobook-flow-wrap {
	max-width: 85%;
	margin: 1.5em auto;
	padding: 0 1em;
}

/* Dark theme product list (sample-style) */
/* .photobook-products-wrap--dark {
	max-width: 1100px;
	padding: 2em 1.5em;
	background: #2d3136;
	min-height: 60vh;
	border-radius: 12px;
} */

.photobook-products-wrap--dark .photobook-flow-title {
	color: #7a9e9e;
	font-size: 2.05em;
	font-weight: 600;
	margin-bottom: 1.5em;
	text-align: center;
}

.photobook-flow-message {
	padding: 1em;
	background: #f8f9fa;
	border-left: 4px solid #2271b1;
}

.photobook-flow-message.photobook-flow-error {
	border-left-color: #d63638;
}

.photobook-flow-title {
	margin-bottom: 0.5em;
	font-size: 1.5em;
}

.photobook-flow-description {
	color: #50575e;
	margin-bottom: 1.5em;
}

/* Product grid - horizontal cards, centered */
.photobook-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 4em;
	justify-items: center;
	align-items: start;
}

.photobook-product-card {
	width: 350px;
	height: 460px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photobook-product-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

/* Card variant: light beige */
.photobook-product-card--light {
	background: #f5f2eb;
}

.photobook-product-card--light .photobook-product-name,
.photobook-product-card--light .photobook-product-description,
.photobook-product-card--light .photobook-product-price {
	color: #2d3136;
}

.photobook-product-card--light .photobook-product-description {
	color: #4a4a4a;
}

/* Card variant: teal */
.photobook-product-card--teal {
	background: #7a9e9e;
}

.photobook-product-card--teal .photobook-product-name,
.photobook-product-card--teal .photobook-product-description,
.photobook-product-card--teal .photobook-product-price {
	color: #1d2327;
}

.photobook-product-card--teal .photobook-product-description {
	color: #2d3136;
}

.photobook-product-card__image {
	width: 100%;
	height: 210px;
	flex-shrink: 0;
	background: #e8e6e1;
	overflow: hidden;
}

.photobook-product-card:hover img {
	transform: scale(1.2) rotate(8deg);
}

.photobook-product-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
	transform: scale(1);
}

.photobook-product-card__body {
	padding: 1.25em 1.5em;
	display: flex;
	flex-direction: column;
	flex: 1;
}

/* Even-numbered cards: white text in body */
.photobook-product-card:nth-child(even) .photobook-product-card__body .photobook-product-name,
.photobook-product-card:nth-child(even) .photobook-product-card__body .photobook-product-description,
.photobook-product-card:nth-child(even) .photobook-product-card__body .photobook-product-price,
.photobook-product-card:nth-child(even) .photobook-product-card__body .photobook-product-size {
	color: white;
}

/* Odd-numbered cards: teal text in body */
.photobook-product-card:nth-child(odd) .photobook-product-card__body .photobook-product-name,
.photobook-product-card:nth-child(odd) .photobook-product-card__body .photobook-product-description,
.photobook-product-card:nth-child(odd) .photobook-product-card__body .photobook-product-price,
.photobook-product-card:nth-child(odd) .photobook-product-card__body .photobook-product-size {
	color: #4d8d8d;
}

.photobook-product-name {
	margin: 0 0 0.6em;
	font-size: 1.65em;
	font-weight: 600;
	line-height: 1.25;
}

.photobook-product-size {
	margin: 0 0 0.6em;
	font-size: 0.95em;
	font-weight: 500;
	line-height: 1.3;
	opacity: 0.9;
}

.photobook-product-description {
	margin: 0 0 1em;
	font-size: 0.95em;
	line-height: 1.5;
}

.photobook-product-description p {
	margin: 0 0 0.5em;
}

.photobook-product-description p:last-child {
	margin-bottom: 0;
}

.photobook-product-price {
	margin: 0 0 1.25em;
	font-size: 1.15em;
	font-weight: 600;
}

.photobook-product-card__footer {
	margin-top: auto;
	display: flex;
	justify-content: flex-end;
}

.photobook-btn-create-project {
	display: inline-block;
	padding: 0.6em 1.5em;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 24px;
	font-size: 0.9em;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.photobook-btn-create-project:hover {
	background: #135e96;
}

/* Odd product (light card): button background #f5f2eb, color #7a9e9e */
.photobook-product-card--light .photobook-btn-create-project {
	background: #7a9e9e;
	color: #f5f2eb;
}

.photobook-product-card--light .photobook-btn-create-project:hover {
	background: #557474;
	color: #f5f2eb;
}

/* Even product (teal card): button background #7a9e9e, color #f5f2eb */
.photobook-product-card--teal .photobook-btn-create-project {
	background: #f5f2eb;
	color: #7a9e9e;
}

.photobook-product-card--teal .photobook-btn-create-project:hover {
	background: #cac8c2;
	color: #7a9e9e;
}

.photobook-btn-create-project:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.photobook-product-meta {
	margin: 0 0 0.5em;
	font-size: 0.9em;
	color: #50575e;
}

.photobook-product-meta .photobook-product-template {
	display: block;
	font-weight: 600;
	color: #1d2327;
}

/* Upload page */
.photobook-upload-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1em;
	flex-wrap: wrap;
	margin-bottom: 1em;
	border-radius: 8px;
}

.photobook-upload-header .photobook-upload-count {
	flex: 1;
	width: 50%;
	min-width: 80px;
	font-size: 0.95em;
	color: #2d3136;
}

.photobook-upload-header .photobook-btn-back {
	background: #d0d0d0;
	color: white;
	border: none;
	padding: 0.7em 1.2em;
	border-radius: 6px;
	cursor: pointer;
	font-size: 1.15em;
	font-weight: 700;
}

.photobook-upload-header .photobook-btn-back:hover {
	background: #c0c0c0;
	color: white;
	font-weight: 700;
}

.photobook-upload-header .photobook-btn-add-pictures {
	background: #c00;
	color: #fff;
	border: none;
	padding: 0.5em 1em;
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.95em;
}

.photobook-upload-header .photobook-btn-add-pictures:hover {
	background: #a00;
	color: #fff;
}

.photobook-upload-header .photobook-btn-next {
	text-decoration: none;
	padding: 0.4em 1.2em;
	border-radius: 6px;
	font-size: 1.15em;
	font-weight: 700;
	color: white;
	border: none;
	cursor: pointer;
}

.photobook-upload-header .photobook-btn-next:not(.photobook-btn-next--disabled) {
	background: #2271b1;
	color: #fff;
}

.photobook-upload-header .photobook-btn-next:not(.photobook-btn-next--disabled):hover {
	background: #135e96;
	color: #fff;
}

.photobook-upload-header .photobook-btn-next.photobook-btn-next--disabled {
	background: #d0d0d0;
	color: white;
	font-weight: 700;
	cursor: not-allowed;
	pointer-events: none;
}

.photobook-upload-wrap {
	max-width: 100% !important;
	position: relative;
}

/* Upload loading overlay + spinner (Flow upload page) - works in .photobook-upload-wrap or body */
.photobook-upload-loading-overlay,
.photobook-upload-wrap .photobook-upload-loading-overlay {
	position: fixed !important;
	inset: 0 !important;
	z-index: 99999 !important;
	display: flex;
	align-items: center !important;
	justify-content: center !important;
	background: rgba(255, 255, 255, 0.92) !important;
}

.photobook-upload-loading-overlay .photobook-upload-loading-content {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 12px !important;
}

.photobook-upload-loading-content {
	text-align: center;
}

.photobook-upload-loading-content SVG {
	display: block !important;
	margin: auto !important;
}

.photobook-upload-wrap .photobook-upload-zone {
	border: 2px dashed #c3c4c7;
	border-radius: 8px;
	padding: 3em 2em;
	text-align: center;
	background: #f5f2eb;
	margin-bottom: 1.5em;
	transition: padding 0.2s ease;
	height: 58vh;
}

/* When photos uploaded: hide dotted zone entirely, show grid only */
.photobook-upload-wrap .photobook-upload-zone.photobook-upload-zone--has-items {
	display: none;
}

/* Header middle: count + Add more + ellipsis (shown when photos exist); Next stays in same place */
.photobook-upload-header-middle {
	display: flex;
	align-items: center;
	gap: 1em;
	margin-right: auto;
	min-width: 0;
	box-shadow: 0 5px 5px #0000001a;
	padding: 1em;
}

.photobook-upload-header-middle .photobook-upload-count {
	width: 45%;
	font-size: 0.65em;
	color: #2d3136b0;
	font-weight: 500;
}

.photobook-upload-header-middle .photobook-header-add-pictures {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
}

.photobook-upload-header-middle .photobook-btn-add-pictures-header {
	display: inline-flex;
    align-items: center;
    gap: 0.5em;
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 0.7em 1.35em;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.05em;
    outline: none;
}

.photobook-upload-header-middle .photobook-btn-add-pictures-header:hover {
	background: #135e96;
	color: #fff;
}

.photobook-upload-header-middle .photobook-icon-add-pictures {
	display: inline-flex;
	line-height: 0;
}

.photobook-upload-header-middle .photobook-icon-add-pictures svg {
	width: 1.25em;
	height: 1.25em;
	flex-shrink: 0;
}

.photobook-upload-header-middle .photobook-btn-ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	color: #2d3136;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	outline: none;
	transform: rotate(90deg);
	background: white !important;
    border: 1px solid #8080803d;
}

.photobook-upload-header-middle .photobook-btn-ellipsis:hover {
	transform: rotate(90deg);
}

.photobook-upload-header-middle .photobook-btn-ellipsis svg {
	width: 20px;
	height: 20px;
}

/* .photobook-upload-wrap .photobook-upload-zone:hover,
.photobook-upload-wrap .photobook-upload-zone.dragover {
	border-color: #2271b1;
	background: #f8fafc;
} */

.photobook-upload-wrap .photobook-upload-hint--main {
	margin: 0 0 0.35em;
	font-size: 1.95em;
	color: #2d3136bd;
	font-weight: 500;
}

.photobook-upload-wrap .photobook-upload-hint--sub {
	margin: 0 0 1.25em;
	font-size: 1em;
	color: #50575e;
	font-weight: 400;
}

/* Add pictures: button + dropdown */
.photobook-add-pictures-wrap {
	position: relative;
	display: inline-block;
}

.photobook-add-pictures-dropdown {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(-6px);
	margin-top: 0px;
	min-width: 200px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	border: 1px solid #e0e0e0;
	list-style: none;
	padding: 6px 0;
	z-index: 100;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.photobook-add-pictures-dropdown--open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

/* Ellipsis button: own dropdown (Remove all pictures) */
.photobook-ellipsis-wrap {
	position: relative;
	display: inline-block;
}

.photobook-ellipsis-dropdown {
	position: absolute;
	top: 108%;
	right: 0;
	left: auto;
	min-width: 200px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	border: 1px solid #e0e0e0;
	list-style: none;
	z-index: 100;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	transform: translateY(-6px);
}

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

.photobook-ellipsis-dropdown .photobook-dropdown-item {
	font-size: 0.85em;
	justify-content: left;
}

.photobook-dropdown-item {
	display: flex;
	justify-content: left;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px 15px;
	border: none;
	background: none;
	font-size: 0.95em;
	color: #2d313673;
	text-align: left;
	cursor: pointer;
	transition: background 0.15s ease;
	outline: none;
}

.photobook-dropdown-item:hover {
	background: #f0f0f0;
}

.photobook-dropdown-item--danger {
	color: #2d3136a6;
}

.photobook-dropdown-icon {
	display: inline-flex;
	flex-shrink: 0;
	line-height: 0;
}

.photobook-dropdown-icon svg {
	width: 20px;
	height: 20px;
}

.photobook-dropdown-divider {
	width: 82%;
	margin: 5px auto 0;
	border: none;
	border-top: 1px solid #e0e0e0;
}

.photobook-upload-wrap .photobook-btn-add-pictures-large {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	background: #2271b1;
	color: #fff;
	border: none;
	padding: 0.5em 2.35em;
	border-radius: 6px;
	cursor: pointer;
	font-size: 1.05em;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	outline: none;
}

.photobook-upload-wrap .photobook-icon-add-pictures {
	display: inline-flex;
	line-height: 0;
}

.photobook-upload-wrap .photobook-icon-add-pictures svg {
	width: 1.75em;
	height: 1.75em;
	flex-shrink: 0;
}

.photobook-upload-wrap .photobook-btn-add-pictures-large:hover {
	background: #135e96;
	color: #fff;
}

/* Grid: up to 5 photos per row, all same size */
.photobook-uploaded-list-wrap {
	margin-top: 1em;
}

.photobook-uploaded-list {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 12px;
}

.photobook-flow-upload-item {
	position: relative;
	width: 100%;
	height: 230px;
	aspect-ratio: 1;
	border-radius: 5px;
	overflow: hidden;
	background: #eee;
}

.photobook-flow-upload-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.photobook-flow-upload-item__loading {
	display: none;
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	align-items: center;
	justify-content: center;
	border-radius: 6px;
}

.photobook-flow-upload-item--loading .photobook-flow-upload-item__loading {
	display: flex;
}

/* Thumbnail toolbar: Delete + Zoom (bottom right) */
.photobook-flow-upload-item__toolbar {
	position: absolute;
	bottom: 0;
	right: 0;
	display: flex;
	gap: 4px;
	padding: 6px;
}

.photobook-flow-upload-item-delete,
.photobook-flow-upload-item-zoom {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	background: #00000042;
	border-radius: 6px;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	transition: background 0.15s ease;
	outline: none;
	border: none;
}

.photobook-flow-upload-item-delete:hover,
.photobook-flow-upload-item-zoom:hover {
	background: rgba(0, 0, 0, 0.6);
}

.photobook-flow-upload-item-delete svg,
.photobook-flow-upload-item-zoom svg {
	display: block;
	width: 18px;
	height: 18px;
	color: #fff;
	fill: currentColor;
}

/* View image modal (Close + Delete only, no Rotate) – appears flexibly with transition */
.photobook-flow-view-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.photobook-flow-view-modal--open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.photobook-flow-view-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	cursor: pointer;
}

.photobook-flow-view-modal__content {
	position: relative;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
	width: min(90vw, 560px);
	height: min(100vh, 620px);
	max-width: 90vw;
	max-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: scale(0.96);
	transition: transform 0.45s ease;
}

.photobook-flow-view-modal--open .photobook-flow-view-modal__content {
	transform: scale(1);
}

.photobook-flow-view-modal__image-wrap {
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1em;
	background: #f5f5f5;
}

.photobook-flow-view-modal__image-wrap img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.photobook-flow-view-modal__actions {
	display: flex;
	gap: 10px;
	justify-content: space-between;
	padding: 0.7em 0.7em;
	border-top: 1px solid #e0e0e0;
	background: #fff;
}

.photobook-flow-view-modal-close {
	background: #2d3136;
	color: #fff;
	border: none;
	padding: 0.4em 0.8em;
	border-radius: 6px;
	font-size: 0.95em;
	cursor: pointer;
}

.photobook-flow-view-modal-close:hover {
	background: #1d2327;
	color: #fff;
}

.photobook-flow-view-modal-delete {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #f0f0f0;
	color: #2d3136a6;
	border: 0px solid #ccc;
	padding: 0.6em 0.8em;
	border-radius: 6px;
	font-size: 0.95em;
	cursor: pointer;
}

.photobook-flow-view-modal-delete:hover {
	background: #2d31361a;
	color: #2d3136a6;
}

.photobook-flow-upload-item__loading::after {
	content: '';
	width: 28px;
	height: 28px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: photobook-flow-spin 0.8s linear infinite;
}

.photobook-product-size-select {
	width: 100%;
	padding: 0.8em 1em 0.8em 0;
	border: none;
	box-shadow: none !important;
	font-size: 0.95em;
	color: #2d3136;
	outline: none;
	cursor: pointer;
	margin-bottom: 0 !important;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-color: transparent;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232d3136' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.25em center;
	background-size: 12px 8px;
}

.photobook-product-card--light .photobook-product-size-select {
	background-color: #f5f2eb;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234d8d8d' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	color: #4d8d8d;
	border-color: #d5d0c6;
}

.photobook-product-card--light .photobook-product-size-select:focus {
	background-color: #f5f2eb !important;
}

.photobook-product-card--teal .photobook-product-size-select {
	background-color: #7a9e9e;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffffff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	color: #fff;
	border-color: #6b8e8e;
}

.photobook-product-card--teal .photobook-product-size-select:focus {
	background-color: #7f9f9f !important;
}

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

@media (max-width: 1700px) {
	.photobook-uploaded-list {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (max-width: 1400px) {
	.photobook-uploaded-list {
		grid-template-columns: repeat(3, 1fr);
	}
}


@media (max-width: 960px) {
	.photobook-uploaded-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.photobook-uploaded-list {
		grid-template-columns: repeat(1, 1fr);
	}
}

@media only screen and (min-width: 1240px) {
	.the_content .section_wrapper, .container {
		max-width: 100%;
    }
}

@media (max-width: 1800px) {
	.photobook-products-grid {
		grid-template-columns: repeat(auto-fill, minmax(335px, 1fr));
	}
}