/* =========================================
   Popup Wrapper
   ========================================= */
#customization-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1rem;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    z-index: 9999;
    font-family: "Lexend Deca" !important;
}

#customization-popup.active {
    display: flex;
}


/* =========================================
   Overlay
   ========================================= */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 9998;
}

.popup-overlay.active {
    display: block;
}


/* =========================================
   Popup Box
   ========================================= */
.popup-box {
    position: relative;
    background-color: var(--e-global-color-primar, #FFF);
    padding: 24px 24px 0 24px;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    max-width: 640px;
    width: 100%;
    z-index: 9999;
    animation: popup-fade 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@keyframes popup-fade {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* =========================================
   Popup Header & Titles
   ========================================= */
.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    /* transform: translateY(calc(-24px + 12px)); */
    /* margin-bottom: -10px; */
    /* min-height: 48px; */

}

.popup-header  .close-popup {
    cursor: pointer;
    background-color: var(--e-global-color-accent, #eaf2fa4d);
    color: #000;
    border-radius: 100%;
    border: none;
    font-size: 24px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 14px !important;
    position: absolute;
    line-height: 0%;
    display: flex;
    right: 20px;
    text-align: center;
    aspect-ratio: 1 / 1;
}
.popup-header .step-title{
    color: var(--Colour-Text, #1D1921);
    font-family: "Lexend Deca";
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    display: none;
    max-width: 80%;
}

.popup-step h3 {
    margin: 0;
    color: #379859;
    font-family: "Lexend Deca";
    font-size: 16px;
    font-weight: 600;
    line-height: 120%;
}


/* =========================================
   Step Base Styles
   ========================================= */
.popup-step {
    display: none;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 24px;

}

.popup-step.active {
    display: flex;
}

.popup-step input[type="file"],
.popup-step select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
}

.popup-step label {
    margin-top: 1rem;
    font-weight: 500;
}


/* =========================================
   Step 1: Confirmation Details
   ========================================= */
.popup-product {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* border-bottom: 1px solid var(--Colour-Accent-1, #ECEBF3); */
    flex-wrap: wrap;
    gap: 16px;
}

.popup-product .left {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}
.popup-product .left img {
    width: 115px;
    aspect-ratio: 1/1;
    border-radius: 2px;
    object-fit: contain;
    object-position: center top;
}
.popup-product .right{
    width: 20%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.popup-total .summary-total {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-total .summary-total .right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-product .popup-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
    width: 100%;
}

.popup-product .popup-details .top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    align-self: stretch;
    text-wrap: nowrap;
}
.popup-product .popup-details .top > span {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 4px;
    align-self: stretch;
    text-wrap: nowrap;
    justify-content: space-between;
}


.popup-details .single-product-price{
    /* display: none; */
}

.popup-product h4 {
    margin: 0;
    color: var(--Colour-Primary, #453784);
    font-family: "Lexend Deca";
    font-size: 20px;
    font-weight: 600;
    line-height: 120%;
    text-wrap: wrap;
}

.popup-product .size,
.popup-product .color {
    margin: 0;
    color: var(--Colour-Text, #000527);
    font-family: "Lexend Deca";
    font-size: 14px;
    font-weight: 400;
    line-height: 120%;
}

.size-item {
    display: inline-block;
    background-color: #f2f2f2;
    padding: 2px 8px;
    margin: 2px;
    border-radius: 4px;
    font-size: 0.9em;
}
.popup-step .single-product-price{
    color: var(--Colour-Text, #1D1921);
    font-size: 16px;
    font-weight: 600;
    line-height: 120%;
}

/* =========================================
   Total Section
   ========================================= */
.popup-total {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-direction: column;
    gap: 8px;
}

.popup-total .left {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
}

.popup-total .left .single-product-quantity {
    margin: 0;
    color: var(--Colour-Primary, #453784);
    font-family: "Lexend Deca";
    font-size: 16px;
    font-weight: 600;
    line-height: 120%;
}
.popup-total .left .single-product-quantity span:first-of-type{
    display: inline-block;
    max-width: 200px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    vertical-align: top;
}

.popup-total .left .single-product-price {
    color: var(--Colour-Text, #1D1921);
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
}

.popup-total .right p {
    margin: 0;
    color: var(--Colour-Primary, #453784);
    font-family: "Lexend Deca";
    font-size: 20px;
    font-weight: 600;
    line-height: 120%;
}

.popup-total .right .total-price {
    color: var(--Colour-Text, #1D1921);
    font-size: 16px;
    font-weight: 600;
    line-height: 120%;
}

.popup-total .right span:last-child {
    color: var(--Colour-Text, #1D1921);
    font-size: 20px;
    font-weight: 600;
}


/* =========================================
   Form Inputs (Step 2)
   ========================================= */
.popup-step .top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    align-self: stretch;
}

.popup-step .top div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
}

.popup-step .top div:first-child h3 {
    color: var(--Colour-Text, #1D1921);
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
}

.popup-step .top div:first-child h4 {
    color: var(--Colour-Text, #1D1921);
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
}
@media screen and (max-width: 768px) {
    .popup-step .top div:first-child h4 {
        text-align: end;
    }
}
.popup-step .top .radio-group {
    display: flex;
    width: 100%;
    align-items: center;
    border-radius: 999px;
    background: #F3F3F3;
    margin: 0;
}

.popup-step .top .radio-group label {
    display: flex;
    padding: 8px 23.805px;
    justify-content: center;
    align-items: center;
    flex: 1 0 0;
    border-radius: 999px;
    background: var(--Colour-Accent-1, #F3F3F3);

    color: #000;

    /* H5 */
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    /* 19.2px */
    margin: 0;
}

.popup-step .top .radio-group label input {
    display: none;
}

.popup-step .top .radio-group label.selected {
    display: flex;
    padding: 8px 23.805px;
    justify-content: center;
    align-items: center;
    flex: 1 0 0;
    border-radius: 999px;
    background: var(--Colour-Primary, #453784);
    color: #FFF;

    /* H5 */
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    margin: 0;
}

.popup-step .main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    align-self: stretch;
}

.popup-step .main .heading {
    display: flex;
    align-items: center;
    gap: 8px;
}



.popup-step .main .heading h3 {
    color: var(--Colour-Text, #1D1921);

    /* H6 */
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    /* 16.8px */
}

.popup-step .main #position-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

@media screen and (max-width: 768px) {
    .popup-step .main #position-options {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;

    }
    .popup-steps{
        overflow-y: scroll;
        max-height: 550px;
        /* hide scrollbar */
        -ms-overflow-style: none;  
        scrollbar-width: none;
    }
    .popup-steps::-webkit-scrollbar {
        display: none;
    }
}

.popup-step .main #position-options .position {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    border: 1.5px solid var(--Colour-Accent-1, #ECEBF3);
    border-radius: 8px;
    background-color: #FFF;
    cursor: pointer;
}

.popup-step .main #position-options .position.selected {
    border-color: var(--Colour-Primary, var(--e-global-color-primary, #453784));
}

.popup-step .main #position-options .position.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
    border-color: #ddd;
    background-color: #f9f9f9;
}

.popup-step .main #position-options .position.disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
    border-radius: 6px;
}

.popup-step .main #position-options .position.disabled::before {
    content: 'Already used';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.popup-step .main #position-options .position.disabled:hover::before {
    opacity: 1;
}

.popup-step .main #position-options .position img {
    max-width: 100%;
    height: auto;
    display: block;
}

.popup-step .main #position-options .position .position-label {
    margin-top: 0.5rem;
    font-family: "Lexend Deca";
    font-size: 14px;
    text-align: center;
}

.popup-step .info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    align-self: stretch;
}
.popup-step .info.hidden {
    display: none;
}
.popup-step .info .left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}



.popup-step .info .left .down {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.popup-step .info .left .down p:first-child {
    color: var(--Colour-Text, #1D1921);

    /* H6 */
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    /* 16.8px */
    margin: 0;
}

.popup-step .info .left .down p:last-child {
    color: var(--Colour-Text, #1D1921);

    /* H6 */
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    /* 16.8px */
}

.popup-step .info .right {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 4px;
}

.popup-step .info .right h6 {
    color: #1D1921;

    /* H6 */
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    /* 16.8px */
}
.popup-step .info .detail-title {
    color: var(--Colour-Primary, #453784) !important;

    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 120% !important;
}
.popup-step .info .right .down {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.popup-step .info .right .down .og_method_price {
    color: rgba(29, 25, 33, 0.20);

    /* H5 */
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    /* 19.2px */
    text-decoration-line: line-through;
}

.popup-step .info .right .down .new_method_price {
    color: var(--Colour-Text, #1D1921);

    /* H5 */
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    /* 19.2px */
}

.popup-step .info .right .down p {
    color: var(--Colour-Text, #1D1921);

    /* H6 */
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    /* 16.8px */
}

.popup-step .total {

    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
}
.popup-step .total.hidden {
    display: none;
}

.popup-step .total p {
    color: var(--Colour-Primary, #453784);

    /* H5 */
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    /* 19.2px */
}

.popup-step .total p .total_method_price {
    color: var(--Colour-Text, #1D1921);

    /* H5 */
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    /* 19.2px */
}

.popup-step .total p span:last-child {
    color: var(--Colour-Text, #1D1921);

    /* H6 */
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    /* 16.8px */
}

@media screen and (max-width: 1024px) { 
    .popup-step[data-step="2"]  .popup-actions > button{
        min-width: 100%;
    }
}









/* =========================================
   Logo/Text Sections (Step 3)
   ========================================= */

/* Hide text section by default (logo is selected by default) */
.popup-step[data-step="3"] .text-section {
    display: none;
}

.popup-step[data-step="3"] .logo-section,
.popup-step[data-step="3"] .text-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =========================================
   Position Options (Step 3)
   ========================================= */

.popup-step[data-step="3"] .top{
    display: flex;
    flex-direction: row;
    padding: 24px;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    border-radius: 8px;
    background: var(--Colour-Accent-1, #ECEBF3);
    flex-wrap: wrap;
}

.popup-step[data-step="3"] .top .left{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
}

.popup-step[data-step="3"] .top .left p:first-child{
    color: var(--Colour-Text, #1D1921);
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%; /* 16.8px */
    margin: 0;
}

.popup-step[data-step="3"] .top a{
    display: flex;
    max-width: 197px;
    padding: 8px 24px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: #453784;
    border: none;
    color: #FFF;
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%; /* 19.2px */
    white-space: nowrap;
}
    

.popup-step[data-step="3"] .top .left p:last-child{
    color: var(--Colour-Text, #1D1921);
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 300;
    line-height: 150%; /* 21px */
}

.popup-step[data-step="3"] .top .left h4{
    color: var(--Colour-Text, #1D1921);

    /* H6 */
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    /* 16.8px */
}

.popup-step[data-step="3"] .radio-group {
    display: flex;
    width: 100%;
    padding: 4px;
    align-items: center;
    border-radius: 999px;
    background: #F3F3F3;
    margin: 0;
}

.popup-step[data-step="3"] .radio-group label {
    display: flex;
    padding: 8px 23.805px;
    justify-content: center;
    align-items: center;
    flex: 1 0 0;
    border-radius: 999px;
    background: var(--Colour-Accent-1, #F3F3F3);

    color: #000;

    /* H5 */
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    /* 19.2px */
    margin: 0;
}

.popup-step[data-step="3"] .radio-group label input {
    display: none;
}

.popup-step[data-step="3"] .radio-group label.selected {
    display: flex;
    padding: 8px 23.805px;
    justify-content: center;
    align-items: center;
    flex: 1 0 0;
    border-radius: 999px;
    background: var(--Colour-Primary, #453784);
    color: #FFF;

    /* H5 */
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    margin: 0;
}
.popup-step[data-step="3"] .main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    align-self: stretch;
}
.popup-step[data-step="3"] .main h6{
    color: var(--Colour-Text, #1D1921);

    /* H6 */
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%; /* 16.8px */
}
.popup-step[data-step="3"] .main .logo-upload{
    display: flex;
    padding: 24px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    align-self: stretch;
    border-radius: 8px;
    background: var(--Colour-Accent-1, #ECEBF3);
}
/* 1. Hide the native file-picker button */
.popup-step[data-step="3"] .main .logo-upload input::-webkit-file-upload-button,
.popup-step[data-step="3"] .main .logo-upload input::-ms-browse,
.popup-step[data-step="3"] .main .logo-upload input::-moz-file-upload-button {
  visibility: hidden;
  width: 0;    /* collapse any remaining space */
  height: 0;
  padding: 0;
  border: none;
  margin: 0;
}
.popup-step input#file-upload-button{
    display: none;
}
.popup-step input::file-selector-button{
    display: none;
}
.popup-step input#custom-logo::after{
    content:'';
}
/* 2. Position the real <input> as the click target */
.popup-step[data-step="3"] .main .logo-upload input {
  position: relative;
  overflow: hidden;  /* clip our pseudo-elements */
  color: transparent;/* hide the default filename text */
  cursor: pointer;
  display: flex;
  max-width: 197px;
  height: 48px;
  padding: 0px 24px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #453784;
  border: none;
  font-family: "Lexend Deca";
  font-size: 16px;
  font-weight: 500;
  line-height: 120%;
}

/* 3. Inject your own “button” (icon + label) */
.popup-step[data-step="3"] .main .logo-upload input::before {
  content: url('/wp-content/uploads/2025/05/publish.svg') ' Add New Logo';
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;  /* let clicks fall through */
  color: #FFF;
}

/* Hover/focus on your faux-button */
.popup-step[data-step="3"] .main .logo-upload input:hover::before,
.popup-step[data-step="3"] .main .logo-upload input:focus::before {
  /* e.g. lighten background or icon */
  color: #DDD;
}

/* 4. Show the filename (or “No file chosen”) */
.popup-step[data-step="3"] .main .logo-upload input::after {
  content: attr(data-file-name, 'No file chosen');
  position: absolute;
  top: 50%;
  right: 16px;           /* adjust to sit nicely */
  transform: translateY(-50%);
  color: #FFF;
  font-size: 0.9em;
  pointer-events: none;
}

.popup-step[data-step="3"] .main .logo-upload  .bottom{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.popup-step[data-step="3"] .main .logo-upload  .bottom p:first-child{
    color: var(--Colour-Text, #1D1921);
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%; /* 16.8px */
    margin: 0;
}
.popup-step[data-step="3"] .main .logo-upload  .bottom p:last-child{
    color: var(--Colour-Text, #1D1921);
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 300;
    line-height: 150%; /* 21px */
    text-align: center;
}
.popup-step[data-step="3"] .info {
    display: none;
    justify-content: space-between;
    align-items: flex-end;
    align-self: stretch;
}

.popup-step[data-step="3"] .info .left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.popup-step[data-step="3"] .info .left h6 {
    color: var(--Colour-Primary, #453784);

    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
}

.popup-step[data-step="3"] .info .left .down {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.popup-step[data-step="3"] .info .left .down p:first-child {
    color: var(--Colour-Text, #1D1921);

    /* H6 */
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    /* 16.8px */
}

.popup-step[data-step="3"] .info .left .down p:last-child {
    color: var(--Colour-Text, #1D1921);

    /* H6 */
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    /* 16.8px */
}

.popup-step[data-step="3"] .info .right {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
}

.popup-step[data-step="3"] .info .right h6 {
    color: #1D1921;

    /* H6 */
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    /* 16.8px */
}

.popup-step[data-step="3"] .info .right .down {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.popup-step[data-step="3"] .info .right .down .og_method_price {
    color: rgba(29, 25, 33, 0.20);

    /* H5 */
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    /* 19.2px */
    text-decoration-line: line-through;
}

.popup-step[data-step="3"] .info .right .down .new_method_price {
    color: var(--Colour-Text, #1D1921);

    /* H5 */
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    /* 19.2px */
}

.popup-step[data-step="3"] .info .right .down p {
    color: var(--Colour-Text, #1D1921);

    /* H6 */
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    /* 16.8px */
}

.popup-step[data-step="3"] .total {

    display: none;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
}

.popup-step[data-step="3"] .total p {
    color: var(--Colour-Primary, #453784);

    /* H5 */
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    /* 19.2px */
}

.popup-step[data-step="3"] .total p .total_method_price {
    color: var(--Colour-Text, #1D1921);

    /* H5 */
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    /* 19.2px */
}

.popup-step[data-step="3"] .total p span:last-child {
    color: var(--Colour-Text, #1D1921);

    /* H6 */
    font-family: "Lexend Deca";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    /* 16.8px */
}

/* Text Section */
/* Text Section */
.popup-step[data-step="3"] .text-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  /* Config inputs */
  .popup-step[data-step="3"] .text-section .text-config {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
  }
  .popup-step[data-step="3"] .text-config label{
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    /* padding-left: 24px; */
  }
  .popup-step[data-step="3"] .text-config input,
  .popup-step[data-step="3"] .text-config select {
    /* flex: 1 1 200px; */
    padding: 8px 24px;
    border: 1px solid #ECEBF3;
    border-radius: 24px;
  }
  .popup-step[data-step="3"] .text-config select {
    /* hide native arrow */
    -webkit-appearance: none;
    -moz-appearance:    none;
    appearance:         none;   
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
    max-width: 48%;
    color: var(--e-global-color-text) !important;
  }
  .popup-step select:focus,
  .popup-step select:focus-visible{
    outline: none !important;
  }
  .popup-step input:focus,
  .popup-step input:focus-visible{
    outline: none !important;
  }
  /* Preview box */
  .popup-step[data-step="3"] .text-section .text-preview {
    width: 100%;
  }
  .popup-step[data-step="3"] .text-preview-content {
    width: 100%;
    min-height: 100px;
    padding: 16px;
    border: 1px solid #ECEBF3;
    border-radius: 8px;
    background-color: white;
    transition: background-color 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
  }
  .popup-step[data-step="3"] .text-preview-content p {
    margin: 0;
    text-align: center;
    color: var(--Colour-Text, #1D1921);
    font-size: 20px;
    font-weight: 600;
    line-height: 120%;
  }
  

/* =========================================
   Buttons
   ========================================= */
.popup-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.popup-actions button {
    display: flex;
    height: 48px;
    padding: 0px 24px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex: 1 0 0;
    border-radius: 999px;
    background: #453784;
    border: none;
    color: #FFF;

    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
    /* 19.2px */
}

.popup-actions button:hover,
.popup-actions button:focus {
    background: #3B2F7C;
}

.popup-actions .alt {
    display: flex !important;
    height: 48px !important;
    padding: 0px 24px !important;
    justify-content: center !important;
    align-items: center !important;
    background: #FFF !important;
    gap: 8px !important;
    flex: 1 0 0 !important;
    border-radius: 999px !important;
    border: 2px solid var(--Colour-Primary, #453784) !important;
    color: var(--Colour-Text, #1D1921) !important;

    font-family: "Lexend Deca" !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 500 !important;
    line-height: 120% !important;
    text-wrap: nowrap !important;
}

.popup-actions .alt:hover,
.popup-actions .alt:focus {
    background: #FFF !important;
    color: var(--Colour-Primary, #3B2F7C) ;
}
.popup-step .add_another_logo{
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
}
.popup-step .add_another_logo p{
    color: var(--Colour-Text, #1D1921);
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%; /* 19.2px */
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
    cursor: pointer;
    position: relative;
}
.popup-step .add_another_logo span{
    color: var(--Colour-Primary, #453784);
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
}

/* Customization summary section in step 1 */
.customization-summary {
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.customization-summary h4 {
    color: var(--Colour-Text, #1D1921);
    font-family: "Lexend Deca";
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px !important;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    position: relative;
    flex-wrap: wrap;
    gap: 4px;
}

.summary-item:not(:last-of-type){
    border-bottom: 1px dashed var(--e-global-color-accent, #ECEBF3);
    padding-bottom: 8px;
}
    

@media screen and (max-width: 767px) {
    .summary-item{
        gap: 0 !important;
        row-gap: 4px !important;
    }
    .summary-item .content{
        width: 50% !important;
    }
    /* .summary-item .method{
        width: 50% !important;
        padding-right: 30px !important;
        flex-grow: 0 !important;
        justify-content: flex-end !important;
    }
    .summary-item .price{
        justify-content: flex-end !important;
        width: 100% !important;
    } */
}
@media screen and (max-width: 550px) {
    .summary-item{
        gap: 0 !important;
        row-gap: 4px !important;
    }
    .summary-item .content{
        width: 100% !important;
    }

    .popup-details .single-product-price{
        display: flex;
    }
    .popup-product .right{
        display: none;
    }
    .popup-product .left{
        width: 100%;
        flex-direction: column;
    }

}
.summary-item-right{
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.summary-content {
    flex: 1;
}

.summary-content p {
    margin: 3px 0;
    font-size: 14px;
}

.summary-price {
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

.summary-total {
    text-align: right;
    font-weight: 600;
}

.summary-list .price{
    color: var(--e-global-color-primary, #453784) !important;

    /* Body-Text */
    font-family: "Lexend Deca";
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 300 !important;
    line-height: 150%; /* 24px */
}

/* Logo thumbnail in summary */
.summary-logo-thumb {
    max-width: 60px !important;
    object-fit: contain !important;
    border: 1px solid var(--e-global-color-accent) !important;
    border-radius: 8px !important;
    box-shadow: -1px 4px 8px 0px rgba(0, 0, 0, 0.05) !important;
    aspect-ratio: 4/3 !important;
}

/* Delete button styles */
.delete-customization,
.delete-setup-fee,
.delete-logo {
    color: #ff3b30;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
}

.summary-item .delete-customization,
.summary-item .delete-setup-fee {
    right: 0;
}

.image .delete-logo {
    top: 5px;
    right: 5px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.image:hover .delete-logo {
    opacity: 1;
}

/* Adjust summary items to make space for delete button */
/* .summary-item strong {
    flex: 1;
    margin-right: 10px;
} */

.summary-item .content {
    width: 300px;
    text-wrap: wrap;
    justify-content: flex-start;
}

.summary-item .method {
    display: flex;
    align-items: center;
}

.summary-item .price {
    text-align: right;
    width: fit-content;
    text-wrap: nowrap;
    display: flex;
    align-items: center;
}

/* Add customization link styles */
.add-customization {
    margin: 15px 0;
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
}

.add-customization-link {
    color: var(--Colour-Text, #1D1921);
    font-family: "Lexend Deca";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    text-decoration-line: underline;
    cursor: pointer;
    position: relative;
}

.add-customization-link span {
    color: var(--Colour-Primary, #453784);
    font-weight: 600;
}

/* Delete button styles for summary items and used images */
.delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.delete-btn:hover {
    opacity: 1;
}

/* Special styling for used-images delete button */
.popup-step .logo-box .image-container .image .delete-btn {
    z-index: 10;
    opacity: 0;
}

.popup-step .logo-box .image-container .image:hover .delete-btn {
    opacity: 0.7;
}

.popup-step .logo-box .image-container .image:hover .delete-btn:hover {
    opacity: 1;
}

/* Disabled states for both old and new elements */
.popup-step .add_another_logo.disabled,
.popup-step .add-customization.disabled,
.popup-actions .popup-next.disabled {
    opacity: 0.5;
}

.popup-step .add_another_logo.disabled p,
.popup-step .add-customization.disabled .add-customization-link {
    color: #999;
    cursor: not-allowed;
    text-decoration-color: #999;
}

.popup-step .add_another_logo.disabled span,
.popup-step .add-customization.disabled span {
    color: #999;
    text-decoration-color: #999;
}

.popup-step .add_another_logo.disabled:hover::after,
.popup-step .add-customization.disabled:hover::after,
.popup-actions .popup-next.disabled:hover::after {
    content: 'All positions have been used';
    position: absolute;
    left: 0;
    bottom: -25px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: normal;
    text-decoration: none;
    white-space: nowrap;
    z-index: 2;
}
/* =========================================
   Used Images Section
   ========================================= */
.used-images {
    padding: 10px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}


/* Database Logo Styling */
.image.from-database {
    position: relative;
    border: 2px solid #4CAF50; /* Green border for database logos */
}

.image .db-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: #4CAF50;
    color: white;
    font-size: 10px;
    padding: 2px 4px;
    border-top-right-radius: 4px;
    z-index: 10;
    white-space: nowrap;
}

.used-images h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--Colour-Text, #1D1921);
    font-family: "Lexend Deca";
    font-weight: 500;
}

.image-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    max-height: 200px;
}


@media screen and (max-width: 1024px) {
    .image-container {
        max-height: 250px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .image-container {
        max-height: 250px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Webkit scrollbar styling */
.image-container::-webkit-scrollbar {
    height: 6px;
}

.image-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.image-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.image-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.image-container .image {
    width: 70px;
    height: 70px;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f9f9f9;
    transition: all 0.2s ease;
}
@media screen and (max-width: 1024px) {
    .image-container .image {
        width: 100%;
    }
}
.image-container .image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-container .image.selected {
    border: 2px solid var(--Colour-Primary, #453784);
    box-shadow: 0 0 5px rgba(69, 55, 132, 0.5);
}

.image-container .image:hover {
    border-color: var(--Colour-Primary, #453784);
    transform: translateY(-2px);
}

.image-container .empty {
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #aaa;
    font-size: 12px;
}

.image-container .empty::after {
    content: '+';
    font-size: 24px;
}

/* Position button disabled state */
.position-button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

.position-button.disabled::after {
    content: 'Already used';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.position-button.disabled:hover::after {
    opacity: 1;
}

/* =========================================
   Message Box (Optional)
   ========================================= */
.popup-message {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #444;
}


/* =========================================
   No Customization Button
   ========================================= */
.alt.no-customization:hover {
    background-color: var(--e-global-color-primary, #453784) !important;
    color: #fff !important;
}

