body {
    margin: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    height: 100vh;
    background: #181c25;
    color: #f3f6fa;
}
.container {
    display: flex;
    height: 100vh;
}
.sidebar {
    width: 380px;
    background: #151820;
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 100vh;
    box-shadow: 2px 0 8px #0005;
	box-shadow: 2px 0 8px #0005;
   border-left: #09ab7c solid 8px;
  border-right: #09ab7c solid 8px;
  border-top: #09ab7c solid 8px;
  border-bottom: #09ab7c solid 8px;
}
.sidebar-header {
    padding: 24px 0 12px 0;
    background: #0e1016;
    text-align: center;
    border-bottom: 1px solid #222;
}
.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 16px 0;
}
.sidebar-btn {
    width: 90%;
    margin: 12px auto;
    display: block;
    padding: 14px 0;
    background: #09ab7c;
    border: none;
    border-radius: 7px;
    color: #fff;
    font-size: 1.1em;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background .2s;
}
.sidebar-btn:hover {
    background: linear-gradient(90deg,#0b2f53 60%, #0a3462 100%);
}
.tool-btn{
    width: 90%;
    margin: 12px auto;
    display: block;
    padding: 14px 0;
    background: #09ab7c;
    border: none;
    border-radius: 7px;
    color: #fff;
    font-size: 1.1em;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background .2s;
}
.tool-btn:hover {
    background: linear-gradient(90deg,#0b2f53 60%, #0a3462 100%);
}
.element-list {
    flex: 1;
    overflow: auto;
    margin: 0 10px 0 10px;
    padding: 0;
}
.element-list h3 {
    margin: 18px 0 10px 0;
    font-size: 1em;
    color: #4cb3ff;
    letter-spacing: 2px;
}
#canvas-elements {
    list-style: none;
    padding: 0;
    margin: 0;
}
#canvas-elements li {
    background: #23273a;
    border-radius: 4px;
    padding: 5px 8px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .97em;
    cursor: pointer;
    transition: background .16s;
}
#canvas-elements li.selected,
#canvas-elements li:hover {
    background: #0e60a8;
}
.cart-btn {
    margin: 16px auto 32px auto;
    display: block;
    width: 90%;
    padding: 14px 0;
    background: #09ab7c;
    border: none;
    border-radius: 7px;
    color: #fff;
    font-size: 1.1em;
    cursor: pointer;
    transition: background .2s;
}
.cart-btn:hover {
    background: linear-gradient(90deg,#1a2332 60%, #0a3462 100%);
}
.main-canvas {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #10131b;
    height: 100vh;
}
canvas#tshirt-canvas {
    background: #292e3a;
    border-radius: 16px;
    box-shadow: 0 2px 12px #0007;
    display: block;
    margin: auto;
    border: 8px solid #09ab7c;
}
.popup-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; right: 0; bottom: 0;
    background: #0008;
}
.popup {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    min-width: 340px;
    max-width: 350px;
    background: #181e2a;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 48px #000b;
    padding: 26px 22px;
}
.popup.active, .popup-overlay.active {
    display: block;
}
.popup .close-popup {
    position: absolute;
    right: 15px; top: 13px;
    background: none;
    border: none;
    color: #8cbfff;
    font-size: 1.2em;
    cursor: pointer;
}
.popup h3 {
    color: #38a8ea;
    font-size: 1.1em;
    margin-bottom: 16px;
}
.gallery-grid, .clipart-grid, .emoji-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 10px;
}
.gallery-item, .clipart-item, .emoji-item {
    width: 50px; height: 50px;
    border-radius: 7px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border .15s, transform .15s;
}
.gallery-item:hover, .clipart-item:hover, .emoji-item:hover {
    border-color: #39a7e1;
    transform: scale(2.0);
    z-index: 2;
}
.category-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.category-selector button {
    background: #0d4a8c;
    border: none;
    border-radius: 6px;
    color: #fff;
    padding: 6px 14px;
    font-size: .97em;
    cursor: pointer;
    transition: background .16s;
}
.category-selector button.active,
.category-selector button:hover {
    background: #1c6fc6;
}
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    margin-bottom: 3px;
    color: #4cb3ff;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: none;
    background: #232e3a;
    color: #fff;
    font-size: 1em;
}
.form-row {
    display: flex;
    gap: 10px;
}
.form-row .form-group {
    flex: 1;
}
.price-box, .total-box {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.2em;
    margin: 18px 0 10px 0;
}
.download-btn, .order-btn {
    width: 100%;
    padding: 12px 0;
    background: #0d4a8c;
    border: none;
    border-radius: 7px;
    color: #fff;
    font-size: 1.07em;
    margin-top: 8px;
    cursor: pointer;
    transition: background .17s;
}
.download-btn:hover, .order-btn:hover {
    background: #06447b;
}
.terms-row {
    margin: 14px 0 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .97em;
}
.terms-row a {
    color: #38a8ea;
    text-decoration: underline;
    font-size: .97em;
}
@media (max-width: 1400px) {
    .main-canvas {
        padding: 0 8px;
    }
    canvas#tshirt-canvas {
        max-width: 100vw;
        width: 680px;
    }
}
@media (max-width: 1000px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100vw;
        flex-direction: row;
        height: auto;
        min-height: 160px;
        overflow-x: auto;
    }
    .main-canvas {
        height: auto;
    }
}
.galerie-grid, .clipart-grid, .emoji-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: flex-start;
}

.galerie-grid div,
.clipart-grid div,
.emoji-grid div {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}
.galerie-grid img,
.clipart-grid img,
.emoji-grid img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}


