/* --- Custom PDP Breadcrumbs --- */
.kiddi-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    margin-bottom: 12px;
}

.kiddi-breadcrumbs__link {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: clamp(0.875rem, 0.84rem + 0.20vw, 1rem);
    line-height: 138%;
    color: var(--text-300);
    text-decoration: none;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@media (hover: hover) {
    .kiddi-breadcrumbs__link:hover::after {
        opacity: 1;
    }

    .consent-text-link:hover::after {
        background: var(--color-additional-blue);
    }
}

.consent-text-link::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--color-text);
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kiddi-breadcrumbs__link::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-additional-blue);
    opacity: 0;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.consent-text-link {
    color: var(--color-text);
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-size: clamp(0.8125rem, 0.789rem + 0.102vw, 0.875rem);
}

.kiddi-breadcrumbs__sep {
    display: flex;
    align-items: center;
    justify-content: center;
}

.kiddi-breadcrumbs__current {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: clamp(0.875rem, 0.84rem + 0.20vw, 1rem);
    line-height: 138%;
    color: var(--color-text-100);
}

.woocommerce img,
.woocommerce-page img {
    height: unset;
    max-width: initial;
}

/* --- Main Layout --- */
.product-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
}

.product-wrapper__form-info {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    line-height: 128%;
    color: var(--color-text);
    margin-bottom: 12px;
    margin-top: 40px;
}

.product-wrapper__image-container {
    max-width: 620px;
    width: 100%;
    height: 548px;
    border-radius: 16px;
    overflow: hidden;
}

.product-wrapper__img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

.product-wrapper__info {
    flex: 1;
    min-width: 300px;
}

.product-wrapper__title {
    margin-bottom: 12px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: clamp(2rem, 1.75rem + 1vw, 2.5rem);
    line-height: 110%;
    color: var(--color-text-300);
}

.product-wrapper__title-part {
    font-family: var(--font3);
    font-style: italic;
}

.product-wrapper__description {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: clamp(0.875rem, 0.827rem + 0.203vw, 1rem);
    line-height: 138%;
    color: var(--color-text-200);
    margin-bottom: 32px;
}

.product-wrapper__price {
    margin-bottom: 40px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: clamp(1.25rem, 1.155rem + 0.406vw, 1.5rem);
    color: var(--color-text);
}

/* --- Top Format Selection --- */
.product-format {
    margin-bottom: 20px;
}

.product-format__label {
    display: block;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    color: var(--color-text);
    margin-bottom: 8px;
}

.product-format__options {
    display: flex;
    flex-direction: row;
    gap: 48px;
}

/* --- Custom SVG Radio Buttons --- */
.custom-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    width: fit-content;
}

.custom-radio__input {
    display: none;
}

.custom-radio__icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    position: relative;
    flex-shrink: 0;
}

.custom-radio__icon svg {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.2s ease;
}

.custom-radio__icon .svg-active {
    opacity: 0;
}

.custom-radio__icon .svg-inactive {
    opacity: 1;
}

.custom-radio__input:checked~.custom-radio__icon .svg-active {
    opacity: 1;
}

.custom-radio__input:checked~.custom-radio__icon .svg-inactive {
    opacity: 0;
}

.custom-radio__text {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: clamp(0.875rem, 0.827rem + 0.203vw, 1rem);
    line-height: 138%;
    color: var(--text-300);
    transition: color 0.2s ease;
}

.custom-radio__input:checked~.custom-radio__text {
    color: var(--color-text);
}

/* --- Setup Form (Step 1) --- */
.setup-form {
    background: var(--color-bg-dark-for-cards);
    border-radius: 16px;
    padding: 20px;
}

.setup-form__title {
    font-family: var(--font3);
    font-style: italic;
    font-weight: 600;
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    line-height: 128%;
    color: var(--text-300);
    margin-bottom: 20px;
}

.setup-form__group {
    margin-bottom: 32px;
}

.setup-form__group--last {
    margin-bottom: 32px;
}

.setup-form__group--select {
    margin-bottom: 26px;
}

.setup-form__label {
    display: block;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 1rem;
    line-height: 138%;
    color: var(--color-text);
    margin-bottom: 8px;
}

.setup-form__input {
    width: 100%;
    background: var(--color-white);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid transparent;
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 1rem;
    line-height: 138%;
    color: var(--color-text);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

.setup-form__input:focus {
    box-shadow: 0 0 0 1px #9f999a;
}

.setup-form__input::placeholder {
    color: #9f999a;
}

.setup-form__radios {
    display: flex;
    gap: 16px;
}

/* --- Custom Select --- */
.custom-select {
    position: relative;
    width: 100%;
    font-family: var(--font-family);
}

.custom-select__trigger {
    background: var(--color-white);
    border-radius: 8px;
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.custom-select.is-open .custom-select__trigger {
    box-shadow: 0 0 0 1px #9f999a;
}

.custom-select__value {
    font-size: clamp(0.9375rem, 0.913rem + 0.102vw, 1rem);
    font-weight: 400;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 20px;
}

.custom-select__arrow {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.custom-select.is-open .custom-select__arrow {
    transform: rotate(180deg);
}

.custom-select__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 12px 8px;
    box-shadow: 0 8px 24px 0 rgba(49, 49, 49, 0.04);
    z-index: 100;
    display: none;
    box-sizing: border-box;
}

.custom-select.is-open .custom-select__dropdown {
    display: block;
}

.custom-select__options {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
}

.custom-select__option {
    padding: 10px 12px;
    font-size: 14px;
    color: var(--color-text);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 2px;
}

.custom-select__option:hover {
    background-color: var(--color-bg-dark-for-cards);
}

.custom-select__option.is-selected {
    background: var(--color-bg-light-for-cards);
    border: 1px solid var(--color-accent);
    color: var(--text-300);
    font-weight: 600;
}

/* --- Custom Checkbox --- */
.custom-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.3s ease;
}

.custom-checkbox--disabled {
    opacity: 0.5;
    pointer-events: none;
}

.custom-checkbox__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-checkbox__icon {
    position: relative;
    width: 24px;
    height: 24px;
    margin-right: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-checkbox__svg {
    position: absolute;
}

.custom-checkbox__svg--checked {
    display: none;
}

.custom-checkbox__input:checked~.custom-checkbox__icon .custom-checkbox__svg--unchecked {
    display: none;
}

.custom-checkbox__input:checked~.custom-checkbox__icon .custom-checkbox__svg--checked {
    display: block;
}

.custom-checkbox__text {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 14px;
    line-height: 138%;
    color: var(--color-text-200);
    padding-top: 2px;
}

/* --- Setup Button --- */
.setup-form__button {
    width: 100%;
    max-width: 604px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 138%;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    margin: 0 auto;
}

.setup-form__button--disabled {
    border: 1px solid var(--color-grey-100);
    background: transparent;
    color: var(--color-text-200);
    pointer-events: none;
}

.setup-form__button:not(.setup-form__button--disabled) {
    border: 1px solid var(--color-accent);
    background: #f8f1dd;
    color: var(--text-300);
}

/* --- Step 1: Summary Style (Collapsed) --- */
.step-summary {
    background: var(--color-bg-dark-for-cards);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.step-summary__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.step-summary__title {
    font-family: var(--font3);
    font-style: italic;
    font-weight: 600;
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    line-height: 128%;
    color: var(--color-text);
    margin: 0;
}

.step-summary__edit {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #ccc6ba;
    padding: 4px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.step-summary__edit:hover {
    background: #b8b2a7;
}

.step-summary__text {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 138%;
    color: var(--text-200);
    margin: 0;
}

/* --- Step 2: Upload Styles --- */
.setup-form--step-2 {
    margin-top: 16px;
}

.setup-form--step-2 .setup-form__title {
    margin-bottom: 0;
    transition: margin-bottom 0.2s ease;
}

.setup-form--step-2.is-open .setup-form__title {
    margin-bottom: 20px;
}

.setup-form__subtitle {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 14px;
    line-height: 138%;
    color: var(--text-200);
    margin-bottom: 24px;
    margin-top: -16px;
}

.upload-rules {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.upload-rules__item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 138%;
    color: var(--text-300);
}

.upload-rules__item svg {
    flex-shrink: 0;
}

.upload-area {
    border: 1px dashed var(--color-grey-100);
    border-radius: 16px;
    width: 100%;
    max-width: 604px;
    height: 186px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    background: transparent;
}

.upload-area:hover {
    border-color: var(--color-accent);
    background: rgba(255, 188, 0, 0.05);
}

.upload-area__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.upload-area__content svg {
    margin-bottom: 24px;
}

.upload-area__text {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 138%;
    color: var(--text-300);
    margin-bottom: 8px;
}

.upload-area__link {
    text-decoration: underline;
    text-decoration-skip-ink: none;
    cursor: pointer;
}

.upload-area__subtext {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 14px;
    line-height: 138%;
    color: var(--text-200);
}

.files-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
}

.files-preview:not(:empty) {
    margin-top: 32px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.file-item__left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-item__thumb {
    width: 40px;
    height: 40px !important;
    border-radius: 8px;
    object-fit: cover;
}

.file-item__name {
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 12px;
    line-height: 138%;
    letter-spacing: -0.01em;
    color: var(--text-300);

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.file-item__size {
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 12px;
    line-height: 138%;
    letter-spacing: -0.01em;
    color: #68696f;
    margin-right: 12px;
}

.file-item__actions {
    display: flex;
    align-items: center;
}

.file-item__remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.file-item__remove svg {
    transition: cubic-bezier(0.4, 0, 0.2, 1);
}

.file-item__remove:hover svg path {
    fill: var(--color-accent);
}

.create-book-wrapper {
    margin-top: 32px;
    width: 100%;
}

.create-book-btn {
    width: 100%;
    max-width: 644px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 16px;
    line-height: 138%;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    margin: 0 auto;
}

.create-book-btn.disabled {
    background: var(--color-primary-100-disabled);
    color: var(--text-200);
    pointer-events: none;
}

.create-book-btn:not(.disabled) {
    background: var(--color-accent);
    color: var(--text-300);
}

.setup-form__header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media screen and (max-width: 1024px) {
    .product-wrapper {
        gap: 24px;
    }

    .product-wrapper__image-container {
        max-width: 350px;
        height: 350px;
    }

    .product-format__options {
        flex-direction: column;
        gap: 16px;
    }

    .file-item__name {
        width: 180px;
    }

    .setup-form__radios {
        gap: 32px;
    }

    .consent-text-link {
        border-bottom: 1px solid var(--color-text);
    }
}

@media screen and (max-width: 768px) {
    .product-wrapper {
        flex-direction: column;
    }

    .product-wrapper__image-container {
        max-width: 100%;
        height: 400px;
    }

    .setup-form__button {
        max-width: 100%;
    }

    .create-book-btn {
        max-width: 100%;
    }

    .upload-area {
        max-width: 100%;
    }

    .product-format__options {
        flex-direction: row;
        gap: 48px;
    }

    .product-card__price {
        margin-bottom: 32px !important;
    }
}

@media screen and (max-width: 576px) {
    .product-format__options {
        flex-direction: column;
        gap: 16px;
    }

    .product-wrapper__image-container {
        height: 300px;
    }

    .setup-form {
        padding: 16px;
    }

    .product-format__label {
        margin-bottom: 12px;
    }
}