.upload-label{text-transform: uppercase;}
.products-uploads-field-type-file_upload label {width: 100%;}
.products-uploads-dragandrophandler-container { display: block; width: 100%; margin-bottom: 20px !important;}
.products-uploads-dragandrophandler{
  border: 2px dotted var(--color-primary) !important;
  background-color: var(--color-bg);
  width: 100%;
  text-align: center;
  vertical-align: middle;
  padding: 20px;
  position: relative;
  margin-bottom: 10px;
}
.products-uploads-dragandrophandler p{font-weight: bold; margin-bottom: 0;}
.products-uploads-text-browser a {
  display: inline-block;
  background: var(--color-dark);
  padding: 8px 16px;
  color:#fff !important;
  margin-top: 10px; text-transform: uppercase;
}
.products-uploads-text-browser a:hover { opacity:0.75; }

.products-uploads-drop-statusbar{
  width: 25%;
  padding: 4px; margin:  0 0 -1px -1px;
  display: flex; position: relative;
  flex-direction: column; font-size: 70%;
  border: 1px solid var(--color-border); background: #fff;
}

.products-uploads-files{display: flex;flex-direction: row;flex-wrap: wrap;align-content: flex-start;align-items: stretch;}
.products-uploads-drop-img { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; text-align: center; vertical-align: middle; }
.products-uploads-drop-img img { width: 100%; height: 100%; object-fit: cover; }
.products-uploads-drop-progressBar { width: 100%; display: block; font-size: 0; position: absolute; left: 0; bottom: 0; }
.products-uploads-drop-progressBar div { height: 4px; width: 0; background-color: #20cf00;  }
.products-uploads_file_upload_remove{
  position: absolute; top: 0; right: 0;
  display: inline-block;
  background: var(--color-danger); color: #fff;
  width: 20px; height: 20px;
  cursor: pointer; text-align: center; line-height: 20px; font-size: 20px;
}

.products-uploads-files .file-info{padding: 5px; position: absolute; z-index: 1; background-color: #fff; display: none;}
.products-uploads-drop-filename{display: block;}

.products-uploads-drop-statusbar.error{background: var(--color-danger-bg);}
.products-uploads-drop-statusbar.error .products-uploads-drop-text-error{
  background: var(--color-danger); color: #ffffff; position: absolute; bottom: 0; left: 0; width: 100%; 
  text-align: center; line-height: var(--line-height-large);
}

dd.variation-Upload_Files a{display: inline-block !important; margin: 0 !important; }

#uploaded-lightbox-overlay {
  display: none;
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center; align-items: center;
  z-index: 9999; text-align: center; overflow-x: auto; 
  padding: 30px;
}

#uploaded-lightbox-overlay img {
  width: 100%; max-width: 400px; background: #fff;
  height: auto; margin: auto !important;
  border-radius: 8px; box-shadow: 0 0 20px rgba(0,0,0,0.5);
}


/* =========================
   BASE WRAPPER
========================= */
.products-uploads-wrapper {
    margin: 20px 0;
}

/* =========================
   MAIN BUTTON (SHINE)
========================= */
.pfuwc-open-modal-btn {
    position: relative;
    width: 100%;
    padding: 18px 20px;
    border-radius: 12px;
    background: #111;
    color: #fff;
    border: none;
    cursor: pointer;
    overflow: hidden;

    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 14px;
    letter-spacing: 0.5px;
}

/* Shine animation */
.pfuwc-open-modal-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,0.4),
        transparent
    );
    transform: skewX(-20deg);
    animation: shine 5s infinite;
}

@keyframes shine {
    0% { left: -120%; }
    20% { left: 130%; }
    100% { left: 130%; }
}

.btn-counter {
    opacity: 0.7;
    font-size: 13px;
}

/* =========================
   MODAL
========================= */
.pfuwc-modal {
    position: fixed !important; inset: 0;
    padding: 10px; z-index: 999999;
    background: rgba(0,0,0,0.5);
    display: none;
}
.pfuwc-modal.processing::before, .pfuwc-modal .processing::before{display: none;}
.pfuwc-modal.active { display: block; }
.pfuwc-modal-container {
    width: 100%; height: 100%; padding: 15px;
    background: #fff; border-radius: var(--radius-large);
    display: flex; flex-direction: column;
    overflow: hidden;
}

.pfuwc-btn{
    background: var(--color-dark, #333333); color: #fff; transition: var(--transition, .3s ease);
    margin: 0; border: none; border-radius: var(--radius-medium, 6px);
}

/* =========================
   HEADER
========================= */
.pfuwc-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid #dddddd;
}
.modal-title {font-weight: bold; margin: 0; font-size: var(--font-medium, 1.15em)}
.pfuwc-modal button.pfuwc-modal-close {
    width: 24px !important; height: 24px !important; line-height: 24px !important;
	min-height: 24px !important; min-width: 24px !important;
	margin: 0; padding: 0 !important; border-radius: 99px;
	background-color: var(--color-dark); color: #fff; font-size: 24px; text-align: center;
}
.pfuwc-modal-close:hover {opacity: 0.8;}

/* =========================
   BODY LAYOUT
========================= */
.pfuwc-modal-body {
	display: flex;
	flex-direction: row;
	flex: 1;
	overflow: hidden;
	justify-content: flex-start;
	flex-wrap: nowrap;
}

/* =========================
   LEFT: GALLERY
========================= */
.pfuwc-uploaded-wrapper {
    padding: 15px 0; border-right: 1px solid #dddddd;
    display: flex; flex-direction: column;
	flex: 1 1 33%; width: 30%;
}
.uploaded-title {
	display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center;
	margin-bottom: 15px;
}
.uploaded-title p {margin: 0;}
.modal-counter {
	display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 99px;
	background-color: rgba(0,0,0, 0.2);
}
.modal-counter span{margin: 0 2px;}

.uploaded-images-gallery {
    flex: 0 1 auto; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	align-content: start; grid-auto-rows: min-content;
	overflow-y: auto; scrollbar-gutter: stable; padding-right: 15px;
}
.empty-gallery { display: none; text-align: center; opacity: 0.5; }
#pfuwc-modal.empty .empty-gallery{display: block;}

/* Gallery Item */
.pfuwc-gallery-item {
    position: relative;
    background: #f5f5f5;
    border-radius: var(--radius-medium);
    border: 1px solid #eeeeee;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    transition: var(--transition, 0.3s ease);
}
.pfuwc-gallery-item:hover img{ opacity: .8; }
.pfuwc-gallery-item img {width: 100%;height: 100%;object-fit: cover;}

/* Remove */
.pfuwc-gallery-item .remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgb(218 0 0 / 70%);
    color: #fff;
    width: 20px; height: 20px; line-height: 20px; font-size: 16px; 
    border-radius: var(--radius-normal, 4px);
    display: flex;
    align-items: center;
    justify-content: center;
	cursor: pointer;
	transition: var(--transition, 0.3s ease);
}
.pfuwc-gallery-item .remove:hover{background: #da0000;}

/* Uploaded mark */
.pfuwc-gallery-item.uploaded::after {
    content: "âœ”";
    position: absolute; bottom: 0; left: 0;
    background: rgb(1 56 0 / 80%); color: #ffffff;
    width: 20px; height: 20px; line-height: 18px; font-size: 16px; padding: 2px;
	text-align: center; border-radius: 0 12px 0 0; 
}

/* =========================
   RIGHT: DROPZONE
========================= */
.process-state, .upload-state-full{
	position: absolute; top: 0; left: 0;
	flex-direction: column;justify-content: center;align-items: center;
	width: 100%; height: 100%; z-index: 999; cursor: not-allowed;
	background-color: rgb(0 0 0 / 70%); color: #fff;
	font-size: var(--font-medium); text-transform: uppercase; text-align: center;
}
#pfuwc-modal.loading .process-state, #pfuwc-modal.full .upload-state-full {display: flex !important;}

.upload-state-full{background-color: #fff; color: inherit; text-transform: unset;}
.upload-state-full p{margin: 20px 0;}

#pfuwc-modal .process-state #pfuwc-try-again-btn{background-color: #fec7c7; color: var(--color-dark, #111111);}
#pfuwc-modal.loading.uploading .process-state .uploading{display: block !important;}
#pfuwc-modal.loading.processing .process-state .processing{display: block !important;}
#pfuwc-modal.loading.try-again .process-state #pfuwc-try-again-btn{display: block !important;}

.loader {
  width: 32px; height: 32px; margin-bottom: 10px;
  border: 4px solid #f3f3f3; border-top: 4px solid #0099ff;
  animation: spin 0.5s linear infinite; border-radius: 99px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.pfuwc-dropzone-area {
	position: relative; width: 70%; flex: 1 1 70%;
	display: flex; flex-direction: column;
	height: 100%; min-height: 0; padding: 15px 0 0 15px;
}

/* Drag State */
.pfuwc-drag-state {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: 2px dashed #ddd; border-radius: var(--radius-medium, 8px); text-align: center;
	transition: var(--transition, all 0.3s ease);
}
.pfuwc-drag-state.dragover {
	border-color: transparent;
	background-color: #f0f0f0;
	background-image: linear-gradient(90deg, #111111 50%, transparent 50%), linear-gradient(90deg, #111111 50%, transparent 50%), linear-gradient(0deg, #111111 50%, transparent 50%), linear-gradient(0deg, #111111 50%, transparent 50%);
	background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
	background-size: 15px 2px, 15px 2px, 2px 15px, 2px 15px;
	background-position: left top, right bottom, left bottom, right top;
	animation: border-dance 0.4s infinite linear;
}
@keyframes border-dance {
	0% { background-position: left top, right bottom, left bottom, right top; }
	100% { background-position: left 15px top, right 15px bottom, left bottom 15px, right top 15px; }
}

.drag-icon { font-size: 2em; margin-bottom: 10px; }
.drag-or { opacity: 0.5; margin: 0 0 20px 0; }
.drag-browse-btn:hover{transform: scale(1.05);}

/* =========================
   CROP AREA
========================= */
.pfuwc-crop-state { flex: 1; min-height: 0; display: flex; }
.crop-container { flex: 1; min-height: 0; width: 100%; position: relative; }
.crop-container .cropper-container { width: 100% !important; height: 100% !important; }
.crop-container img { max-width: 100%; }

/* =========================
   ACTIONS
========================= */
.pfuwc-upload-actions { display: flex; gap: 10px; margin-top: 15px; }
.pfuwc-upload-btn { width: 100%; flex: 1; }
.pfuwc-cancel-btn { background: #f3f3f3; color: #111; }
.pfuwc-upload-actions > *:hover { opacity: .9; }

@media (max-width: 850px){
	.uploaded-images-gallery {
		display: grid; grid-auto-flow: column; grid-auto-columns: 90px; align-items: start;
		grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
		padding: 0; overflow-x: auto; overflow-y: hidden;
		scroll-behavior: smooth; -webkit-overflow-scrolling: touch; 
	}
	.pfuwc-modal-body{
		flex-direction: column;
	}
	.pfuwc-uploaded-wrapper{
		width: 100%; flex: 0 0 auto; max-width: none; border: none; order: 2;  padding: 20px 0 0 0;
	}
	
	.pfuwc-dropzone-area{
		width: 100%; flex: 1; order: 1; height: 100%; padding: 15px 0 0 0;
	}
}



/* =======================
 * GUIDED ADD TO CART */

.guided-nav {list-style: none; padding: 0; margin: 0;}

.guided-nav li {
  position: relative; text-transform: uppercase; font-size: 14px;
  display: inline-block;
  background: #e0e0e0; color: #666;
  height: 24px; line-height: 24px;
  padding: 0 8px 0 16px; margin: 0 -18px 0 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.guided-nav li:first-child {
  padding-left: 12px; border-radius: 6px 0 0 6px; margin-left: 0;
}

.guided-nav li::after {
  content: "";
  position: absolute; right: -8px; top: 0;
  width: 0; height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 8px solid #e0e0e0;
  z-index: 2;
  transition: border-color 0.3s ease;
}

.guided-nav li::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 0; height: 0; z-index: 1;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 8px solid #fff;
}

.guided-nav li:last-child{padding-right: 12px; border-radius: 0 6px 6px 0;}

.guided-nav li:first-child::before, .guided-nav li:last-child::after{ display: none; }

.guided-nav li.active { background: #007bff; color: #fff; }
.guided-nav li.active::after { border-left-color: #007bff;}

.guided-nav li:hover:not(.active) {background: #d4d4d4;}
.guided-nav li:hover:not(.active)::after {border-left-color: #d4d4d4;}

.guided-step {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	background: #fff;
	margin-bottom: 12px;
	overflow: hidden;
}

.guided-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	background: #fafafa;
	cursor: default;
}

.guided-check {
	color: #c5c5c5;
	font-size: 14px;
	flex-shrink: 0;
}

.guided-step.complete .guided-check {
	color: #16a34a;
}

.guided-title {
	font-weight: 600;
	flex-shrink: 0;
}

.guided-summary {
	margin-left: auto;
	font-size: 13px;
	line-height: 1.4;
	color: #666;
	text-align: right;
}

.guided-body {
	max-height: 0;
	overflow: hidden;
	padding: 0 16px;
	transition:
		max-height .3s ease,
		padding .3s ease;
}

.guided-step.active .guided-body {
	max-height: 1500px;
	padding: 16px;
}