@import './reset.css';

* {
    box-sizing: border-box;
}

html,
body {
    height: 100dvh;
}

body {
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23e0e0e0' fill-opacity='0.35'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    font-family: "Afacad", sans-serif;
    color: #222;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
}

hr {
    border-top: 1px solid #ddd;
    border-bottom: none;
    border-right: none;
    border-left: none;
    width: 100%;
    margin: 10px 0;
}

a {
    text-decoration: none;
}

header {
    display: flex;
    padding: 10px 15px;
    width: 100%;
    border-bottom: solid 1px #aaa;
    font-weight: 700;
    text-align: left;
    background: #fff;
}

header div.header_logo {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    margin-right: 25px;
    padding-top: 10px;
    text-align: center;
}

header div.header_logo a {
    color: #000;
    text-decoration: none;
}

header div.header_logo a:hover {
    color: #f58a00;
}

.header_icon_cart {
    cursor: pointer;
    display: block;
    margin-left: auto;
    text-align: center;
    position: relative;
}

.header_icon_cart span {
    display: none;
    position: absolute;
    left: 75%;
    transform: translate(-50%, 0);
    margin-top: 2px;
    padding: 3px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 0.9;
    color: #fff;
    background-color: #222;
    border-radius: 10px;
}

main {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: row;
    min-height: 0;
}

footer {
    box-sizing: border-box;
    width: 100%;
    border-top: solid 1px #ddd;
    background: #fff;
}

canvas {
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25);
}


#base_left {
    background-color: #fff;
    display: flex;
    flex-direction: row;
    min-height: 0;
    border-right: 1px solid #ccc;
    color: #222;
}

#base_center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.fabric-canvas-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    width: 100%;
}

@media screen and (orientation:portrait) {
    #base_left {
        display: none;
    }
}

@media screen and (orientation:landscape) {
    footer {
        display: none;
    }
}

/* SIDED CONTROL — Pill Toggle */
.sided_control {
    display: inline-flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 12px;
    border: 1.5px solid #e0e0e0;
    padding: 4px;
    gap: 4px;
    margin: 0 auto 10px;
}

.sided_option {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #999;
    font-family: "Afacad", sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sided_option:hover {
    color: #666;
}

.sided_option.active {
    background: #fff;
    color: #111;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sided_option svg {
    flex-shrink: 0;
}

.sided_divider {
    width: 1px;
    height: 24px;
    background: #ddd;
    margin: 0 2px;
}

.page_nav {
    display: flex;
    gap: 2px;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    transition: max-width 0.3s ease, opacity 0.25s ease;
}

.page_nav.visible {
    max-width: 250px;
    opacity: 1;
}

.page_btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #999;
    font-family: "Afacad", sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.page_btn:hover {
    background: #fff;
    color: #555;
}

.page_btn.active {
    background: #fff;
    color: #111;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

@media screen and (max-height: 900px) {
    .sided_option {
        padding: 6px 14px;
        font-size: 0.84rem;
    }
    .sided_option svg {
        width: 16px;
        height: 16px;
    }
    .page_btn {
        padding: 6px 10px;
        font-size: 0.82rem;
    }
}

/* WORKSPACE CONTROL — Elevated Tray (book/calendar page nav) */
.workspace_control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 0 auto 10px;
    background: #fff;
    border-radius: 16px;
    box-shadow: none;
    border: 1.5px solid #e0e0e0;
}

.workspace_control_title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
    text-align: center;
}

.workspace_control_page {
    font-size: 0.72rem;
    font-weight: 500;
    color: #999;
    margin-top: 1px;
    text-align: center;
}

.workspace_control_center {
    padding: 0 10px;
    min-width: 110px;
    text-align: center;
}

.workspace_control_divider {
    width: 1px;
    height: 26px;
    background: #eee;
}

.workspace_button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1.5px solid #e0e0e0;
    border-radius: 50%;
    background: #f7f7f7;
    color: #555;
    font-family: "Afacad", sans-serif;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.workspace_button:hover {
    background: #eee;
    border-color: #ccc;
    color: #333;
}

.workspace_button:active {
    background: #ddd;
}

.workspace_button:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.workspace_button:disabled:hover {
    background: #f7f7f7;
    border-color: #e0e0e0;
    color: #555;
}

.workspace_button.disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
}

.workspace_button svg {
    flex-shrink: 0;
}

.code_page_nav_button {
    width: auto;
    height: auto;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    gap: 5px;
}

.code_page_nav_button.active {
    background: #e8e8e8;
}

.code_page_nav_button.active:hover {
    background: #ddd;
}

.code_action_toggle_double_sided {
    width: auto;
    height: auto;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    gap: 5px;
}

@media screen and (max-height: 900px) {
    .workspace_button {
        width: 34px;
        height: 34px;
    }
    .workspace_button svg {
        width: 16px;
        height: 16px;
    }
    .code_page_nav_button,
    .code_action_toggle_double_sided {
        width: auto;
        height: auto;
    }
}


















/* BOTH LANDSCAPE AND PORTRAIT */
a div {
    color: #222;
    font-weight: 500;
    padding: 0 10px;
    font-size: 0.95em;
    margin-top: 2px;
}

span div {
    color: #777;
    font-weight: 500;
    padding: 0 10px;
    font-size: 0.95em;
    margin-top: 2px;
}

.landscape_image_control a,
.portrait_image_control a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    transition: all 0.15s ease;
}

.landscape_image_control a svg,
.portrait_image_control a svg {
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    box-sizing: content-box;
    transition: all 0.15s ease;
}

.landscape_image_control a:hover svg,
.portrait_image_control a:hover svg {
    background: #fff3e0;
    border-color: #f58a00;
    fill: none;
}

.landscape_image_control a div,
.portrait_image_control a div {
    color: #555;
    font-weight: 600;
    padding: 0;
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0;
}

.landscape_image_control a:hover div,
.portrait_image_control a:hover div {
    color: #555;
}

.landscape_image_control > div,
.portrait_image_control > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    opacity: 0.4;
}

.landscape_image_control > div svg,
.portrait_image_control > div svg {
    background: #f0f0f0;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    box-sizing: content-box;
}

.landscape_image_control > div div,
.portrait_image_control > div div {
    color: #999;
    font-weight: 600;
    padding: 0;
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0;
}

a:hover svg {
    fill: #f58a00;
}

a:hover div {
    color: #f58a00;
}

textarea {
    font-family: "Afacad", serif;
    font-weight: 500;
    text-align: center;
    width: 100%;
    border-radius: 3px;
    border: solid 2px #222;
    padding: 5px;
    resize: vertical;
}

button {
    cursor: pointer;
}

.template_tiny {
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.75);
}

/* BOTH LANDSCAPE AND PORTRAIT */










/* LANDSCAPE */
/* LANDSCAPE BASE MENU */
#landscape_base_menu {
    position: relative;
    z-index: 20;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' %3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' x2='0' y1='0' y2='1' gradientTransform='rotate(0,0.5,0.5)'%3E%3Cstop offset='0' stop-color='%23000000'/%3E%3Cstop offset='1' stop-color='%23000000'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpattern id='b' width='6' height='6' patternUnits='userSpaceOnUse'%3E%3Ccircle fill='%23FFFFFF' cx='3' cy='3' r='3'/%3E%3C/pattern%3E%3Crect width='100%25' height='100%25' fill='url(%23a)'/%3E%3Crect width='100%25' height='100%25' fill='url(%23b)' fill-opacity='0.07'/%3E%3C/svg%3E");
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
}

#landscape_base_menu a {
    padding: 10px;
    background-color: #333;
    border-radius: 5px;
    margin: 4px 4px;
}

#landscape_base_menu a+a {
    margin-top: 0px;
}

#landscape_base_menu a svg {
    fill: #ddd;
    color: #ddd;
}

#landscape_base_menu a.selected {
    background-color: #eee;
}

#landscape_base_menu a.selected svg {
    fill: #222;
    color: #222;
}

.color_button:hover {
    filter: brightness(1.2);
}

.color_button {
    line-height: 40px;
    min-width: 35px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.35),
        0 1px 3px rgba(0, 0, 0, 0.75);
}

.button_svg:hover {
    background: #eee;
}

.button_svg:hover svg {
    fill: inherit;
}

[data-option="none"] .button_svg:hover svg {
    fill: #aa0000;
}

.button_svg {
    padding: 6px;
    line-height: 0;
    border-radius: 5px;
    border: solid 1px #ccc;
    background: #fff;
}

/* LANDSCAPE BASE MENU */


.landscape_control {
    width: 230px;
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 10px 10px 5px 10px;
    min-height: 0;
    height: 100%;
}

/* LANDSCAPE IMAGE */
.landscape_image_control {
    display: flex;
    flex-direction: row;
    gap: 6px;
    justify-content: center;
}

.code_action_free_position.active {
    background-color: transparent;
}

.code_action_free_position.active svg {
    stroke: #0066cc;
}

.image_upload {
    flex: 0 0 auto;
    margin-bottom: 10px;
}

.image_upload a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    color: #666;
    transition: all 0.2s;
}

.image_upload a:hover {
    border-color: #888;
    background: #f9f9f9;
}

.image_upload a:hover svg {
    fill: none;
}

.image_upload a:hover div {
    color: #666;
}

.image_upload svg {
    margin-bottom: 8px;
}

.image_upload div {
    font-size: 0.85rem;
    font-weight: 500;
}

.landscape_images_container {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    align-items: stretch;
    padding: 5px;
    display: flex;
    flex-direction: column;
}

.landscape_images_container img {
    cursor: pointer;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.75);
}

/* LANDSCAPE IMAGE */

/* LANDSCAPE TEXT */
.landscape_text_menu {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    gap: 6px;
}

.landscape_text_menu>a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    background: none;
    border: none;
    transition: all 0.15s ease;
}

.landscape_text_menu>a svg {
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    box-sizing: content-box;
    transition: all 0.15s ease;
}

.landscape_text_menu>a:hover svg {
    background: #fff3e0;
    border-color: #f58a00;
}

.landscape_text_menu>span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    background: none;
    border: none;
    opacity: 0.4;
}

.landscape_text_menu>span svg {
    background: #f0f0f0;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    box-sizing: content-box;
}

.landscape_text_menu a div {
    color: #555;
    font-weight: 600;
    padding: 0;
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0;
}

.landscape_text_menu span div {
    color: #999;
    font-weight: 600;
    padding: 0;
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0;
}

.landscape_textarea {
    margin-top: 10px;
}

.landscape_text_control {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.landscape_text_control .button_svg,
.landscape_border_control .button_svg,
.portrait_text_size_control .button_svg {
    border-radius: 8px;
    padding: 7px;
    border: 1.5px solid #e0e0e0;
    transition: all 0.15s ease;
}

.landscape_border_control .button_svg {
    height: 36px;
    padding: 0 7px;
    display: flex;
    align-items: center;
    margin: 0;
}

.landscape_text_control .button_svg:hover,
.landscape_border_control .button_svg:hover,
.portrait_text_size_control .button_svg:hover {
    background: #fff3e0;
    border-color: #f58a00;
}

.landscape_text_control_grid,
.portrait_text_control_grid {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 6px;
    justify-content: center;
}

.portrait_text_control_grid {
    height: auto;
}

.landscape_font_control {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;

    margin-top: 12px;
    display: flex;
    flex-flow: wrap;
    flex-direction: row;
    justify-content: space-between;
    row-gap: 5px;
    padding: 0px 5px;
}

.landscape_font_control:nth-child(3n) {
    page-break-after: always;
}

.landscape_font_control button {
    width: 32%;
    min-height: 40px;
    font-size: 1.1rem;
    font-weight: 600;
    background-color: #fff;
    border-radius: 3px;
    border: solid 1px #ddd;
}

.landscape_color_control_wrapper {
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.landscape_font_control + .landscape_color_control_wrapper,
.landscape_color_control_wrapper + .landscape_color_control_wrapper {
    margin-top: 10px;
}

.landscape_color_control {
    display: flex;
    align-items: center;
    margin-top: 10px;
    padding: 0 10px;
}

.landscape_color_control input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 36px;
    padding: 0;
    border: 2px solid #ccc;
    border-radius: 8px;
    background: none;
    cursor: pointer;
}

.landscape_color_control input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 3px;
}

.landscape_color_control input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 5px;
}

.landscape_color_control input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 5px;
}

.landscape_template_colors_title {
    margin: 10px 0 10px 0;
    padding-left: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-align: left;
}

.landscape_template_colors {
    display: flex;
    flex-flow: wrap;
    flex-direction: row;
    gap: 2px;
    margin-top: 5px;
    padding-left: 12px;
}

.landscape_template_colors div {
    height: 40px;
}

.landscape_template_colors:nth-child(6n) {
    page-break-after: always;
}

.landscape_border_color_row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 0 10px;
}

.landscape_border_color_row input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    flex: 1;
    height: 36px;
    padding: 0;
    border: 2px solid #ccc;
    border-radius: 8px;
    background: none;
    cursor: pointer;
}

.landscape_border_color_row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 3px;
}

.landscape_border_color_row input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 5px;
}

.landscape_border_color_row input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 5px;
}

.landscape_border_control {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* LANDSCAPE TEXT */

.landscape_layout_control {
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    row-gap: 10px;
    column-gap: 6px;
    align-items: center;
    overflow: auto;
    justify-content: space-around;
}


/* LANDSCAPE */










/* PORTRAIT */
.portrait_base {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.portrait_base_layout {
    min-height: 220px;
    display: flex;
    flex-direction: row;
}

.portrait_image_control {
    display: flex;
    flex-direction: row;
    gap: 6px;
    justify-content: flex-start;
    padding: 10px 5px;
    margin: 0 5px;
}

.code_target_image_control_disabled {
    margin: 0 5px;
}
.portrait_images_base {
    display: flex;
}

.portrait_image_upload {
    flex: 0 0 auto;
    margin-bottom: 0px;
    align-self: center;
    display: flex;
}

.portrait_image_upload a {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
    padding: 10px 20px;
    flex: 1;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ccc;
    border-radius: 8px;
    color: #666;
    transition: all 0.2s;
}

.portrait_image_upload a:hover {
    border-color: #888;
    background: #f9f9f9;
}

.portrait_image_upload a:hover svg {
    fill: none;
}

.portrait_image_upload a:hover div {
    color: #666;
}

.portrait_image_upload svg {
    margin-bottom: 8px;
}

.portrait_images_container {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    height: 120px;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: stretch;
    padding: 5px;
    display: flex;
    flex-direction: row;
}

.portrait_images_container img {
    max-height: 100%;
    cursor: pointer;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.75);
}

.portrait_text_options_base {
    display: flex;
    flex-direction: row;
}

.portrait_text_font_options {
    overflow-x: scroll;
    padding: 5px;
}

.portrait_text_font_options button {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 2px 3px;
    background-color: #fff;
    border-radius: 3px;
    border: solid 1px #ddd;
}



.portrait_text_color_border_options {
    max-width: 100%;
    display: flex;
    gap: 5px;
    padding: 10px 5px 0 5px;
}

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

.portrait_border_color_label {
    font-size: 12px;
    line-height: 1.1;
    color: #888;
    flex-shrink: 0;
    text-align: left;
    text-transform: uppercase;
    margin-left: 4px;
    font-weight: 600;
}

.portrait_border_color_row input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    flex: 1;
    height: 36px;
    padding: 0;
    border: 2px solid #ccc;
    border-radius: 8px;
    background: none;
    cursor: pointer;
}

.portrait_border_color_row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 3px;
}

.portrait_border_color_row input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 5px;
}

.portrait_border_color_row input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 5px;
}

.portrait_border_control {
    display: flex;
    flex-direction: row;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}


.portrait_template_colors {
    overflow-x: auto;
    display: flex;
    flex-direction: row;
    padding: 5px;
}

.portrait_template_colors div {
    max-height: 40px;
    margin: 0 3px;
}

.portrait_text_control {
    background-color: #fff;
    margin-top: auto;
    display: flex;
    padding: 0px 5px 5px 5px;
    margin-bottom: 6px;
}

.portrait_text_control_content {
    width: 100%;
    display: flex;
    gap: 5px;
}

.portrait_textarea {
    min-height: 100%;
}

.portrait_text_size_control_wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-left: 5px;
}

.portrait_text_size_control {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 6px;
    justify-content: center;
    margin-left: 5px;
    width: 100%;
}

.portrait_text_menu {
    display: flex;
    flex-direction: row;
    gap: 6px;
    justify-content: flex-start;
    margin-left: 10px;
    margin-bottom: 6px;
}

.portrait_text_menu>a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    transition: all 0.15s ease;
}

.portrait_text_menu>a svg {
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    box-sizing: content-box;
    transition: all 0.15s ease;
}

.portrait_text_menu>a:hover svg {
    background: #fff3e0;
    border-color: #f58a00;
}

.portrait_text_menu>span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    opacity: 0.4;
}

.portrait_text_menu>span svg {
    background: #f0f0f0;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    box-sizing: content-box;
}

.portrait_text_menu a div {
    color: #555;
    font-weight: 600;
    padding: 0;
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0;
}

.portrait_text_menu span div {
    color: #999;
    font-weight: 600;
    padding: 0;
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0;
}


.portrait_layout_control {
    margin-left: 10px;
    padding-top: 0px;
    display: flex;
    gap: 10px;
    align-items: center;
    text-align: center;
    display: flex;
    overflow-x: scroll;
    width: 100%;
    justify-content: space-around;

}

.layout_button:hover {
    filter: brightness(1.1);
}

.layout_button {
    border: solid 1px #ccc;
}

/* PORTRAIT BASE MENU */
#portrait_base_menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' %3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' x2='0' y1='0' y2='1' gradientTransform='rotate(0,0.5,0.5)'%3E%3Cstop offset='0' stop-color='%23000000'/%3E%3Cstop offset='1' stop-color='%23000000'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpattern id='b' width='6' height='6' patternUnits='userSpaceOnUse'%3E%3Ccircle fill='%23FFFFFF' cx='3' cy='3' r='3'/%3E%3C/pattern%3E%3Crect width='100%25' height='100%25' fill='url(%23a)'/%3E%3Crect width='100%25' height='100%25' fill='url(%23b)' fill-opacity='0.07'/%3E%3C/svg%3E");
    background-attachment: fixed;
    display: flex;
    flex-direction: row;
}

#portrait_base_menu a {
    padding: 10px;
    background-color: #333;
    border-radius: 5px;
    margin: 4px 4px;
}

#portrait_base_menu a+a {
    margin-left: 0px;
}

#portrait_base_menu a svg {
    fill: #ddd;
    color: #ddd;
}

#portrait_base_menu a.selected {
    background-color: #eee;
}

#portrait_base_menu a.selected svg {
    fill: #222;
    color: #222;
}

/* PORTRAIT BASE MENU */
/* PORTRAIT */



/* POPUP TEMPLATES - Base styles (shared) */
.popup_templates {
    position: fixed;
    z-index: 100;
    background-color: #fff;
    height: 99%;
    width: 99%;
    margin: 0.5%;
    border-radius: 5px;
    display: flex;
    border: solid 1px #ccc;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23e0e0e0' fill-opacity='0.35'%3E%3Cpath opacity='.45' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.popup_templates_menu {
    padding: 15px 10px;
    display: flex;
    gap: 5px;
    background-color: #eee;
    align-items: center;
}

.popup_templates_menu hr {
    display: block;
}

.popup_templates_menu .code_action_select_size {
    padding: 6px 8px;
    font-size: 0.9rem;
}

.popup_templates_menu .code_action_select_size.selected {
    padding: 8px 8px;
    border: none;
    font-weight: 700;
    background-color: #f58b0063;
    color: #000;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.75),
        inset 0 0 2px rgba(0, 0, 0, 0.45);
}

.popup_templates_label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.08em;
    padding-left: 2px;
}

.popup_templates_menu button {
    padding: 8px 10px;
    border-radius: 5px;
    font-family: "Afacad", sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    border: solid 1px #ccc;
    background: #fff;
    color: #000;
    text-align: center;
    font-weight: 600;
}

.popup_templates_menu button:hover {
    background: #fcfcfc;
    color: #000;
}

.popup_templates_menu button.selected {
    cursor: pointer;
    user-select: none;
    padding-top: 10px;
    border-radius: 5px;
    text-align: center;
    border: none;
    font-weight: 700;
    background-color: #f58b0063;
    color: #000;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.75),
        inset 0 0 2px rgba(0, 0, 0, 0.45);
}

.popup_templates_content {
    flex: 1;
    padding: 15px;
    text-align: center;
    overflow-y: auto;
}

.popup_templates_content_category {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

/* POPUP TEMPLATES - Portrait orientation */
@media screen and (orientation: portrait) {
    .popup_templates {
        flex-direction: column;
    }

    .popup_templates_menu {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        overflow: auto;
        border-radius: 5px 5px 0 0;
        border-bottom: solid 1px #ccc;
    }

    .popup_templates_menu .popup_templates_label {
        display: none;
    }

    .popup_templates_menu .code_action_select_category {
        order: 0;
    }

    .popup_templates_menu hr {
        order: 2;
        flex-basis: 100%;
        height: 0;
        width: auto;
        border: none;
        margin: 2px 0;
        background: none;
        display: block;
    }

    .popup_templates_menu .code_action_select_size {
        order: 3;
        border-radius: 20px;
        padding: 5px 12px;
        font-size: 0.82rem;
        border-color: #bbb;
    }

    .popup_templates_menu .code_action_select_size.selected {
        border-radius: 20px;
        background: rgba(245, 139, 0, 0.35);
        border-color: rgba(245, 139, 0, 0.6);
    }

    .popup_templates_menu .code_action_close_layout {
        order: 1;
        margin-left: auto;
    }

    .popup_templates_menu .code_action_close_templates {
        order: 1;
        margin-left: auto;
    }

    .popup_templates_content {
        width: 100%;
        border-radius: 0 0 5px 5px;
    }
}

/* POPUP TEMPLATES - Landscape orientation */
@media screen and (orientation: landscape) {
    .popup_templates {
        flex-direction: row;
    }

    .popup_templates_menu {
        flex-direction: column;
        width: auto;
        min-width: 120px;
        border-radius: 5px 0 0 5px;
        border-right: solid 1px #ccc;
        align-items: stretch;
    }

    .popup_templates_menu .code_action_close_layout {
        order: 1;
        margin-bottom: 10px;
    }

    .popup_templates_menu .code_action_close_templates {
        order: 1;
        margin-bottom: 10px;
    }

    .popup_templates_menu .popup_templates_label {
        display: block;
        margin-top: 10px;
    }

    .popup_templates_menu .label_category {
        order: 2;
    }

    .popup_templates_menu .code_action_select_category {
        order: 2;
    }

    .popup_templates_menu hr {
        order: 2;
    }

    .popup_templates_menu .label_size {
        order: 3;
    }

    .popup_templates_menu .code_action_select_size {
        order: 3;
    }

    .popup_templates_content {
        border-radius: 0 5px 5px 0;
    }
}

/* TEMPLATE GRID fullscreen overlay */
#code_popup_templates:not(.popup_templates) {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23e0e0e0' fill-opacity='0.35'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

@media screen and (orientation:landscape) {
    #code_popup_templates:not(.popup_templates) {
        left: 60px;
    }
}

.layout_grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 20px;
    padding: 20px;
    overflow-y: auto;
    width: 100%;
    height: 100%;
}

.layout_grid a {
    text-align: center;
}







.popup_cart {
    position: fixed;
    box-sizing: border-box;
    min-width: 340px;
    top: 60px;
    right: 0;
    padding: 10px;
    margin-right: 5px;
    overflow-y: auto;
    border-radius: 4px;
    box-shadow: none;
    background-color: rgba(250, 250, 250, 0.95);
    border: solid 1px #ccc;
    color: #111;
    z-index: 100;
}

.popup_cart_control {
    display: flex;
    width: 100%;
    padding: 10px;
}

.popup_cart_control a {
    width: 50%;
}

.popup_cart_content {
    padding: 10px;
    max-height: 60vh;
    overflow-y: auto;
}



.cart_svg_button {
    color: #333;
    text-align: center;
}

.cart_svg_button svg {
    margin: 0 auto;
    display: block;
    margin-top: 5px;
}

.cart_svg_button div {
    margin-top: 5px;
}



input[type="checkbox"]:hover {
    background-color: #fff;
    border: solid 2px #666;
}

input[type="checkbox"] {
    appearance: none;
    cursor: pointer;
    background-color: #ffffff;
    margin: 0 auto;
    font: inherit;
    width: 24px;
    height: 24px;
    border: solid 2px #222;
    border-radius: 4px;
    transform: translateY(-0.075em);
    display: grid;
    place-content: center;

}

input[type="checkbox"]::before {
    content: "";
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: 120ms opacity ease-in-out;
    box-shadow: inset 1em 1em #000;
    clip-path: polygon(40% 65%, 75% 15%, 90% 25%, 40% 90%, 10% 65%, 20% 55%);
}

input[type="checkbox"]:checked::before {
    opacity: 1;
}

/* POPUP CONFIRM */
.popup_confirm {
    position: fixed;
    z-index: 100;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.popup_confirm p {
    font-family: "Afacad", sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: #222;
    margin: 0 0 20px 0;
}

.popup_confirm_buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.popup_confirm_buttons button {
    flex: 1;
    padding: 10px 16px;
    border-radius: 5px;
    font-family: "Afacad", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.popup_confirm_cancel {
    background: #f5f5f5;
    border: 1px solid #ccc;
    color: #333;
}

.popup_confirm_cancel:hover {
    background: #eee;
}

.popup_confirm_ok {
    background: #f58a00;
    border: 1px solid #e07d00;
    color: #fff;
}

.popup_confirm_ok:hover {
    background: #e07d00;
}


/* CART ITEM (unified) */
.uni_item {
    background: #f7f7f7;
    border-radius: 7px;
    overflow: hidden;
}

.uni_item + .uni_item {
    margin-top: 10px;
}

.uni_item_body {
    padding: 10px 12px;
}

.uni_item_header {
    display: flex;
    gap: 10px;
}

.uni_item_preview {
    width: 76px;
    min-width: 76px;
    height: 76px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uni_item_preview img {
    max-width: 76px;
    max-height: 76px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.uni_item_info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.uni_item_info_top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.uni_item_name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
}

.uni_item_delete {
    color: #c44;
    font-size: 0.72rem;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    padding-left: 8px;
}

.uni_item_delete:hover {
    text-decoration: underline;
}

.uni_item_template {
    font-size: 0.72rem;
    color: #888;
    margin-top: 1px;
}

.uni_item_price {
    font-size: 0.75rem;
    font-weight: 500;
    color: #888;
    margin-top: 3px;
}

.uni_item_options {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e8e8e8;
}

.uni_item_option {
    display: flex;
    align-items: center;
    gap: 6px;
}

.uni_item_option_label {
    font-size: 0.65rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: 75px;
    min-width: 75px;
}

.uni_item_option_buttons {
    display: flex;
    background: #e4e4e4;
    border-radius: 5px;
    padding: 2px;
    margin-left: auto;
}

.uni_item_option_buttons button {
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    background: transparent;
    font-size: 0.75rem;
    font-family: inherit;
    color: #888;
    cursor: pointer;
    transition: all 150ms ease;
}

.uni_item_option_buttons button.uni_selected {
    font-weight: 600;
    background: #fff;
    color: #111;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.uni_item_option_checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.uni_item_option_checkbox label {
    font-size: 0.75rem;
    color: #333;
    cursor: pointer;
}

.uni_item_footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e8e8e8;
}

.uni_item_quantity {
    display: flex;
    align-items: center;
    gap: 6px;
}

.uni_item_quantity button {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    color: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.uni_item_quantity button:hover {
    background: #eee;
}

.uni_item_quantity_value {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    color: #222;
}

.uni_item_quantity input {
    width: 36px;
    height: 30px;
    text-align: center;
    font-family: "Afacad", serif;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 3px;
    border: solid 2px #222;
    padding: 0;
    box-sizing: border-box;
}

.uni_item_total {
    font-size: 0.9rem;
    font-weight: 700;
    color: #111;
}

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

.uni_item_quantity_label {
    font-size: 0.72rem;
    color: #888;
    width: 48px;
    min-width: 48px;
}

.uni_item_quantities {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart_empty {
    color: #999;
    font-size: 0.85rem;
    text-align: center;
    padding: 20px 0;
}
/* CART ITEM */


#overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.25);
    z-index: 90;
    cursor: pointer;
}











.font_Oregano {
    font-family: "Oregano", cursive;
}

.font_Boogaloo {
    font-family: "Boogaloo";
}

.font_CarterOne {
    font-family: "CarterOne";
}

.font_Majalla {
    font-family: "Majalla";
}

.font_PassionOne {
    font-family: "PassionOne";
}

.font_SourGummy {
    font-family: "SourGummy";
}

.font_VAGRounded {
    font-family: "VAGRounded";
}

.font_PlayfairDisplay {
    font-family: "PlayfairDisplay", serif;
}

.font_CormorantGaramond {
    font-family: "CormorantGaramond", serif;
}

.font_DMSerifDisplay {
    font-family: "DMSerifDisplay", serif;
}


.font_NotoSerifDisplay {
    font-family: "NotoSerifDisplay", serif;
}

.font_GreatVibes {
    font-family: "GreatVibes", cursive;
}

.font_DancingScript {
    font-family: "DancingScript", cursive;
}

.font_Parisienne {
    font-family: "Parisienne", cursive;
}

.font_Sacramento {
    font-family: "Sacramento", cursive;
}

.font_Satisfy {
    font-family: "Satisfy", cursive;
}

.font_Tangerine {
    font-family: "Tangerine", cursive;
}

.font_Allura {
    font-family: "Allura", cursive;
}

.font_Cookie {
    font-family: "Cookie", cursive;
}

.font_Italianno {
    font-family: "Italianno", cursive;
}

.font_Montserrat {
    font-family: "Montserrat", sans-serif;
}

.font_Raleway {
    font-family: "Raleway", sans-serif;
}

.font_Poppins {
    font-family: "Poppins", sans-serif;
}

.font_Quicksand {
    font-family: "Quicksand", sans-serif;
}

.font_Nunito {
    font-family: "Nunito", sans-serif;
}

.font_Lato {
    font-family: "Lato", sans-serif;
}

.font_OpenSans {
    font-family: "OpenSans", sans-serif;
}

.font_JosefinSans {
    font-family: "JosefinSans", sans-serif;
}

.font_Fredoka {
    font-family: "Fredoka", sans-serif;
}

.font_Baloo2 {
    font-family: "Baloo2", sans-serif;
}

.font_Chewy {
    font-family: "Chewy", cursive;
}

.font_ComicNeue {
    font-family: "ComicNeue", sans-serif;
}

.font_LuckiestGuy {
    font-family: "LuckiestGuy", cursive;
}

.font_RubikBubbles {
    font-family: "RubikBubbles", cursive;
}

.font_ConcertOne {
    font-family: "ConcertOne", sans-serif;
}

.font_Caveat {
    font-family: "Caveat", cursive;
}






.font_ShadowsIntoLight {
    font-family: "ShadowsIntoLight", cursive;
}

.font_IndieFlower {
    font-family: "IndieFlower", cursive;
}

.font_PatrickHand {
    font-family: "PatrickHand", cursive;
}

.font_Handlee {
    font-family: "Handlee", cursive;
}

.font_ComingSoon {
    font-family: "ComingSoon", cursive;
}

.font_PermanentMarker {
    font-family: "PermanentMarker", cursive;
}

.font_Lobster {
    font-family: "Lobster", cursive;
}

.font_Pacifico {
    font-family: "Pacifico", cursive;
}

.font_AbrilFatface {
    font-family: "AbrilFatface", cursive;
}

.font_GloriaHallelujah {
    font-family: "GloriaHallelujah", cursive;
}

.font_BebasNeue {
    font-family: "BebasNeue", sans-serif;
}

.font_Righteous {
    font-family: "Righteous", cursive;
}

.font_FugazOne {
    font-family: "FugazOne", cursive;
}


/* CODE */
.code_init_hidden {
    display: none;
}

/* CODE */

/* IMAGE CHECKMARK */
.image_thumb {
    position: relative;
    flex-shrink: 0;
    margin: 5px;
}
.portrait_images_container .image_thumb {
    max-height: 100%;
    align-self: center;
}
.portrait_images_container .image_thumb img {
    display: block;
    max-height: 90px;
    width: auto;
}
.image_check {
    display: none;
    background: #555;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    pointer-events: none;
    z-index: 1;
}
.image_thumb.used .image_check {
    display: block;
    position: absolute;
    bottom: -5px;
    right: -5px;
}
/* IMAGE CHECKMARK */

/* VALIDATION MESSAGE */
.validation_message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 24px 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 200;
    max-width: 360px;
    text-align: center;
}

.validation_message span {
    display: block;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.4;
}

.validation_button {
    padding: 8px 24px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: "Afacad", sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.validation_button:hover {
    background-color: #444;
}
/* VALIDATION MESSAGE */