/* ===== GLOBAL ===== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(180deg, #fff8f2 0%, #f7efe7 100%);
    color: #222;
}

/* ===== BANNER ===== */
.banner {
    background: linear-gradient(135deg, #ff6a00, #ff3c3c, #ffcc00);
    color: white;
    text-align: center;
    padding: 50px 20px 42px;
}

.banner img {
    width: 105px;
    height: 105px;
    object-fit: contain;
    border-radius: 22px;
    background: white;
    padding: 10px;
    margin-bottom: 18px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}

.banner h1 {
    margin: 0;
    font-size: 3rem;
}

.banner p {
    margin: 10px 0 0;
    font-size: 1.05rem;
}

/* ===== COMPACT MARKET SELECTOR ===== */
.kunsluva-market-wrap {
    width: min(560px, 94vw);
    margin: 18px auto 0;
}

.kunsluva-market-main {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #132235;
    border-radius: 999px;
    padding: 7px 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.kunsluva-market-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    padding: 0 10px;
    white-space: nowrap;
}

.kunsluva-globe {
    font-size: 18px;
}

.kunsluva-market-title {
    font-weight: 800;
    font-size: 13px;
}

.kunsluva-market-subtitle,
.kunsluva-market-benefits {
    display: none;
}

.kunsluva-market-select-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border-radius: 999px;
    padding: 8px 40px 8px 14px;
    position: relative;
    min-width: 0;
}

.kunsluva-flag {
    width: 32px;
    height: 24px;
    border-radius: 4px;
    display: inline-block;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.22);
}

.flag-nz { background-image: url("https://flagcdn.com/w40/nz.png"); }
.flag-au { background-image: url("https://flagcdn.com/w40/au.png"); }
.flag-us { background-image: url("https://flagcdn.com/w40/us.png"); }

.kunsluva-market-text {
    text-align: left;
    min-width: 0;
}

.kunsluva-market-country {
    font-size: 14px;
    font-weight: 800;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kunsluva-market-money {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kunsluva-market-select {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
}

.kunsluva-chevron {
    position: absolute;
    right: 15px;
    font-size: 18px;
    font-weight: 900;
    color: #222;
    pointer-events: none;
}

/* ===== SHARED LAYOUT ===== */
.main,
.container,
.wrapper {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 20px 60px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
}

.card {
    background: white;
    border: 1px solid #ead8c5;
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
    padding: 28px;
    margin-bottom: 22px;
}

.card h2 {
    margin-top: 0;
    font-size: 1.8rem;
}

/* ===== LANDING PAGE ===== */
.lead {
    color: #6f6f6f;
    line-height: 1.7;
    margin-bottom: 24px;
}

.upload-box {
    border: 2px dashed #ffc28f;
    border-radius: 18px;
    padding: 28px;
    background: #fffaf6;
}

.file-input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 16px;
    border-radius: 12px;
    border: 1px solid #e6d4c2;
    background: white;
    font-size: 15px;
}

.upload-help {
    margin-bottom: 16px;
    color: #6f6f6f;
    font-size: 13px;
    line-height: 1.5;
}

.points {
    display: grid;
    gap: 16px;
}

.point {
    background: #fff8f2;
    border: 1px solid #f1dfcd;
    border-radius: 16px;
    padding: 16px;
    line-height: 1.5;
}

.point strong {
    display: block;
    margin-bottom: 6px;
}

.social {
    margin-top: 30px;
    text-align: center;
}

/* ===== BUTTONS ===== */
button,
.select-btn,
.primary-btn {
    background: linear-gradient(135deg, #ff7a00, #ff9a1f);
    color: white;
    border: none;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
}

button:hover,
.select-btn:hover,
.primary-btn:hover {
    filter: brightness(1.04);
}

button:disabled,
.select-btn:disabled,
.primary-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.secondary-btn {
    background: white;
    color: #444;
    border: 1px solid #d8c6b3;
}

/* ===== ORDER PREVIEW PAGE ===== */
.status {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 18px;
    color: #7a4b1d;
}

.images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 18px;
    align-items: start;
}

.panel-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.panel-note {
    color: #6d6d6d;
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.image-box {
    background: #fffaf6;
    border: 2px dashed #e5d2bf;
    border-radius: 18px;
    min-height: 380px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    padding: 14px;
}

.composition-box {
    flex-direction: column;
    align-items: center;
}

.image-box img {
    max-width: 100%;
    max-height: 560px;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

/* ===== ARTWORK SELECTION ===== */
.artwork-choice {
    border: 2px solid transparent;
    border-radius: 18px;
    padding: 14px;
    background: #fffaf6;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.artwork-choice:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.artwork-choice.selected-choice {
    border-color: #ff7a00;
    box-shadow: 0 0 0 3px rgba(255,122,0,0.18), 0 12px 28px rgba(0,0,0,0.08);
    background: #fff4ea;
    transform: scale(1.02);
}

.artwork-choice .image-box {
    min-height: 0;
    height: auto;
    aspect-ratio: 1 / 1;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.artwork-choice .image-box img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.artwork-choice button {
    width: 100%;
    margin-top: auto;
}

.badge {
    background: linear-gradient(135deg, #ff7a00, #ff9a1f);
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    margin-left: 8px;
    font-weight: bold;
    white-space: nowrap;
}

.waiting-box {
    text-align: center;
    padding: 54px 20px;
}

.placeholder {
    color: #555;
    text-align: center;
    line-height: 1.7;
    font-size: 18px;
    max-width: 650px;
    margin: 0 auto;
}

.spinner {
    width: 52px;
    height: 52px;
    border: 5px solid #f3d8c0;
    border-top: 5px solid #ff7a00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.small-note {
    margin-top: 12px;
    color: #6d6d6d;
    font-size: 14px;
    text-align: center;
}

.meta-strip {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-pill {
    background: #fff7ef;
    border: 1px solid #f0dbc6;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 14px;
    color: #5f4a38;
}

.prep-note {
    margin-top: 18px;
    background: #fff7ef;
    border: 1px solid #f0dbc6;
    border-radius: 14px;
    padding: 14px 16px;
    color: #6b4f36;
    line-height: 1.6;
    font-size: 14px;
}

/* ===== CROPPER ===== */
.crop-stage {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.crop-frame {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #f4efe8;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.9);
    outline: 2px solid rgba(255,122,0,0.15);
    touch-action: none;
    user-select: none;
    cursor: grab;
}

.crop-frame.dragging {
    cursor: grabbing;
}

.crop-frame.no-drag {
    cursor: default;
}

.crop-image {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none !important;
    max-height: none !important;
    width: auto;
    height: auto;
    border-radius: 0 !important;
    will-change: transform;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.crop-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.7);
}

.crop-hint,
.crop-fit-note {
    margin-top: 12px;
    text-align: center;
    color: #6d6d6d;
    font-size: 14px;
}

/* ===== PRODUCT OPTIONS ===== */
.top-note {
    background: white;
    border: 1px solid #ead8c5;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    padding: 22px;
    margin-bottom: 24px;
    line-height: 1.7;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.product-card {
    background: white;
    border: 1px solid #ead8c5;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    padding: 22px;
    display: flex;
    flex-direction: column;
}

.mockup-stage {
    background: linear-gradient(180deg, #f5f2ee 0%, #ece6de 100%);
    border-radius: 18px;
    padding: 24px;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.canvas-mock {
    background: #f1e7d9;
    border-radius: 4px;
    padding: 12px;
    box-shadow: 0 14px 24px rgba(0,0,0,0.18);
    border: 10px solid #e8dac8;
}

.poster-mock {
    background: white;
    padding: 10px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}

.art-window {
    width: 180px;
    height: 220px;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.art-window.square {
    width: 190px;
    height: 190px;
}

.art-window.landscape {
    width: 220px;
    height: 160px;
}

.art-window img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #fff;
}

.product-card h2 {
    margin: 0 0 10px;
    font-size: 1.7rem;
}

.product-card p {
    color: #6a6a6a;
    line-height: 1.6;
    flex-grow: 1;
}

.product-note {
    background: #fff7ef;
    border: 1px solid #f0dbc6;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    color: #6b4f36;
    margin-bottom: 14px;
    line-height: 1.5;
}

/* ===== PRODUCT SIZES ===== */
.top-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
}

.right-stack {
    display: grid;
    gap: 18px;
}

.preview-box {
    background: #fffaf6;
    border: 2px dashed #e6d2bf;
    border-radius: 18px;
    height: 285px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
}

.preview-box img {
    max-width: 100%;
    max-height: 245px;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

.size-list {
    display: grid;
    gap: 16px;
}

.size-card {
    border: 1px solid #ead8c5;
    border-radius: 18px;
    background: #fffaf6;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
}

.size-name {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 6px;
}

.size-meta {
    color: #6f6f6f;
    font-size: 14px;
}

.price {
    font-size: 1.6rem;
    font-weight: bold;
    color: #1d6f36;
    text-align: right;
    margin-bottom: 10px;
}

.details-card {
    padding: 24px 28px;
}

.details-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.details-header h2 {
    margin: 0 0 6px;
}

.details-header p {
    margin: 0;
    color: #6f6f6f;
    line-height: 1.5;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.detail-tile {
    background: #fff8f2;
    border: 1px solid #f0dbc6;
    border-radius: 14px;
    padding: 14px;
}

.detail-tile span {
    display: block;
    font-size: 12px;
    color: #7a6654;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 7px;
}

.detail-tile strong {
    display: block;
    color: #111;
    font-size: 17px;
}

.prep-help {
    margin-top: 16px;
    background: #fff3e7;
    border: 1px solid #ffd9b7;
    border-radius: 14px;
    padding: 13px 15px;
    color: #5f4a38;
    line-height: 1.5;
    font-size: 14px;
}

.back-pill {
    flex: 0 0 auto;
    background: #fff8f2;
    border: 1px solid #ead8c5;
    color: #444;
    text-decoration: none;
    font-weight: bold;
    border-radius: 999px;
    padding: 10px 14px;
}

.back-pill:hover {
    background: #ffefe0;
}

@media (max-width: 900px) {
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .details-header {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== TOTE ===== */
.tote-preview-wrap {
    position: relative;
    width: 245px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
}

.tote-preview-base {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tote-colour-box {
    max-width: 520px;
}

.tote-colour-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.tote-colour-btn {
    border: 1px solid #f0c9a7;
    background: #fffaf5;
    color: #111827;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
}

.tote-colour-btn.active {
    background: linear-gradient(135deg, #ff7a00, #ff9f1a);
    color: white;
    border-color: #ff7a00;
}

.selected-tote-summary {
    border: 1px solid #f0d7bf;
    border-radius: 18px;
    background: #fffaf5;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.tote-desc {
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
}

.selected-tote-actions {
    text-align: right;
    min-width: 170px;
}

.tote-print-area {
    position: absolute;
    top: 100px;
    left: 74px;
    width: 88px;
    height: 88px;
    overflow: hidden;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tote-print-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.option-strip {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.option-btn {
    border: 1px solid #e7d8c8;
    background: #fffaf6;
    color: #222;
    border-radius: 14px;
    padding: 10px 14px;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.15s ease;
    font-weight: bold;
    width: auto;
}

.option-btn.active {
    border-color: #ff7a00;
    box-shadow: 0 0 0 2px rgba(255,122,0,0.14);
    background: #fff4ea;
}

.option-swatch {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.12);
    flex: 0 0 auto;
}

.summary-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 6px;
}

.summary-meta {
    color: #6f6f6f;
    font-size: 14px;
    margin-bottom: 18px;
}

.summary-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.summary-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1d6f36;
}

/* ===== ORDER SUMMARY ===== */
.summary-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 28px;
    align-items: start;
}

.art-box {
    background: #fafafa;
    border: 2px dashed #ddd;
    border-radius: 14px;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 14px;
}

.summary-list {
    display: grid;
    gap: 14px;
    margin-top: 10px;
}

.summary-row {
    background: #fffaf5;
    border: 1px solid #eadfce;
    border-radius: 12px;
    padding: 14px 16px;
}

.summary-label {
    font-size: 13px;
    color: #777;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.summary-value {
    font-size: 20px;
    font-weight: bold;
    color: #222;
}

.summary-value.price {
    color: #1f7a35;
}

.checkout-note {
    margin-top: 22px;
    padding: 16px 18px;
    background: #fff7ef;
    border: 1px solid #ffd7b0;
    border-radius: 12px;
    line-height: 1.7;
    color: #444;
}

.back-link {
    display: inline-block;
    margin-top: 18px;
    color: #555;
    text-decoration: none;
    font-weight: bold;
}

.reference {
    margin-top: 12px;
    color: #666;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* ===== ERROR BOX ===== */
.error-box {
    background: #fff1f0;
    border: 1px solid #f2c6c1;
    color: #8c2f23;
    border-radius: 16px;
    padding: 22px;
    line-height: 1.7;
    text-align: center;
}

.error-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 8px;
}

.error-sub {
    font-size: 14px;
    color: #6d4c41;
}

.error-actions {
    margin-top: 22px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== SOCIAL / FOOTER ===== */
.social-links {
    display: flex;
    justify-content: center;
    gap: 22px;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6a00;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    transition: 0.2s;
}

.social-link:hover {
    transform: translateY(-2px);
    background: #ff6a00;
    color: white;
}

.social-icon {
    width: 22px;
    height: 22px;
}

.footer {
    background: #222;
    color: #aaa;
    text-align: center;
    padding: 30px 20px;
}

.footer a {
    color: white;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ===== ANIMATION ===== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
    .summary-grid,
    .top-grid {
        grid-template-columns: 1fr;
    }

    .art-box {
        min-height: 300px;
    }
}

@media (max-width: 980px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .hero-grid,
    .images {
        grid-template-columns: 1fr;
    }

    .image-box {
        min-height: 280px;
    }

    .artwork-choice .image-box {
        min-height: 0;
        aspect-ratio: 1 / 1;
    }

    .placeholder {
        max-width: 100%;
        font-size: 17px;
    }
}

@media (max-width: 760px) {
    .banner {
        padding: 38px 14px 34px;
    }

    .banner h1 {
        font-size: 2.35rem;
    }

    .kunsluva-market-main {
        flex-direction: column;
        border-radius: 24px;
        gap: 6px;
    }

    .kunsluva-market-left {
        justify-content: center;
        padding: 6px 8px;
    }

    .kunsluva-market-select-card {
        width: 100%;
        border-radius: 18px;
    }

    .kunsluva-market-country {
        font-size: 13px;
    }

    .kunsluva-market-money {
        font-size: 11px;
    }

    .size-card {
        grid-template-columns: 1fr;
    }

    .price {
        text-align: left;
    }
}