/* ══════════════════════════════════════════════════════════
   Designer de Camisetas — Ateliê Terra de Axé
   ══════════════════════════════════════════════════════════ */

/* ── Reset local ── */
#designer-page * { box-sizing: border-box; }
#designer-page { display: flex; flex-direction: column; height: calc(100vh - 70px); background: #f5f0eb; font-family: inherit; }

/* ── Header ── */
.designer-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    background: #fff;
    border-bottom: 1px solid #ede8e3;
    flex-shrink: 0;
}
.designer-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: #f5f0eb;
    color: #4b2e2b;
    text-decoration: none;
    transition: background 0.2s;
}
.designer-back:hover { background: #e8e0d8; }
.designer-header-info { flex: 1; }
.designer-header-label { font-size: 12px; color: #9e8a82; text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.designer-header-title { font-size: 18px; font-weight: 700; color: #2d1a17; margin: 2px 0 0; }
.designer-header-price { text-align: right; }
.designer-price-label { display: block; font-size: 11px; color: #9e8a82; }
.designer-price-value { font-size: 20px; font-weight: 700; color: #4b2e2b; }

/* ── Body (3 colunas) ── */
.designer-body {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    flex: 1;
    overflow: hidden;
    gap: 0;
}

/* ── Painéis laterais ── */
.designer-panel {
    background: #fff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ede8e3;
    overflow: hidden;
}
.panel-controls { border-right: none; border-left: 1px solid #ede8e3; }
.panel-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9e8a82;
    padding: 16px 16px 10px;
    flex-shrink: 0;
}

/* ── Galeria de estampas ── */
.stamp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 12px 12px;
    flex-shrink: 0;
}
.filter-btn {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.filter-btn.active, .filter-btn:hover { background: #4b2e2b; border-color: #4b2e2b; color: #fff; }

.stamp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 12px 12px;
    overflow-y: auto;
    flex: 1;
}
.stamp-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 4px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #f8f4f0;
    cursor: pointer;
    transition: all 0.15s;
}
.stamp-card:hover { border-color: #c9a98d; transform: translateY(-1px); }
.stamp-card.selected { border-color: #4b2e2b; background: #fdf6f0; }
.stamp-card img { width: 54px; height: 54px; object-fit: contain; display: block; }
.stamp-card span { font-size: 10px; color: #666; text-align: center; line-height: 1.2; }
.stamp-card.hidden { display: none; }

.no-stamps-msg { padding: 20px 16px; color: #aaa; font-size: 13px; }

/* ── Canvas central ── */
.designer-canvas-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f0ebe5;
    overflow: hidden;
}

.side-tabs {
    display: flex;
    gap: 0;
    padding: 16px 20px 0;
    flex-shrink: 0;
}
.side-tab {
    padding: 9px 24px;
    border: 2px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    transition: all 0.2s;
    border-radius: 8px 8px 0 0;
    margin-right: -2px;
}
.side-tab.active { background: #4b2e2b; color: #fff; border-color: #4b2e2b; z-index: 1; }
.side-tab:hover:not(.active) { background: #f8f4f0; color: #4b2e2b; }

.canvas-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    padding: 12px;
    overflow: hidden;
}
#designerCanvas { border-radius: 12px; box-shadow: 0 8px 32px rgba(75,46,43,0.12); display: block; }
.canvas-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(75,46,43,0.85);
    color: #fff;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 12px;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.3s;
}
.canvas-hint.hidden { opacity: 0; }

/* ── Controles direitos ── */
.zone-group-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #9e8a82;
    margin: 0 0 8px;
}
.zone-group { padding: 0 16px 12px; }
.zone-option { display: block; margin-bottom: 6px; cursor: pointer; }
.zone-option input { display: none; }
.zone-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    transition: all 0.15s;
    background: #fafafa;
}
.zone-option input:checked + .zone-box,
.zone-box-selected {
    border-color: #4b2e2b;
    background: #fdf6f0;
    color: #4b2e2b;
    font-weight: 600;
}
.zone-box:hover { border-color: #c9a98d; }
.zone-box i { font-size: 14px; }
.zone-box small { font-size: 10px; font-weight: 400; color: #aaa; margin-left: auto; }

.controls-divider { border: none; border-top: 1px solid #ede8e3; margin: 8px 0; }

.control-group { padding: 0 16px 14px; }
.control-label { font-size: 12px; font-weight: 600; color: #555; display: block; margin-bottom: 10px; }
.btn-remove-stamp {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
    background: none;
    border: 1px solid #e57373;
    color: #c62828;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 4px;
}
.btn-remove-stamp:hover { background: #c62828; color: #fff; }

/* ── Resumo do design ── */
.design-summary { padding: 0 16px; }
.summary-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: #9e8a82; margin: 0 0 8px; }
.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 6px;
}
.summary-empty { background: #f8f4f0; color: #bbb; }
.summary-filled { background: #f0faf0; color: #2e7d32; font-weight: 500; }
.summary-filled i { color: #4caf50; }

/* ── Área de informações (descrição + medidas) ── */
.designer-info {
    display: grid;
    grid-template-columns: 58% 42%;
    gap: 0;
    background: #faf6f2;
    border-top: 1px solid #ede8e3;
}
.designer-info-section {
    padding: 20px 28px;
}
.designer-info-section:first-child {
    border-right: 1px solid #ede8e3;
}
.designer-info-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #9e8a82;
    margin: 0 0 12px;
}
.designer-info-section p {
    font-size: 15px;
    color: #444;
    line-height: 1.7;
    margin: 0;
    white-space: pre-line;
}
.designer-info-section img {
    display: block;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    border-radius: 8px;
    transition: opacity 0.2s;
}
.designer-info-section img:hover { opacity: 0.9; }


/* ── Footer ── */

.designer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: #fff;
    border-top: 1px solid #ede8e3;
    gap: 20px;
    flex-shrink: 0;
}

.size-selector { display: flex; align-items: center; gap: 12px; }
.size-label { font-size: 13px; font-weight: 600; color: #555; }
.size-btns { display: flex; gap: 6px; }
.size-btn {
    position: relative;
    padding: 8px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #444;
    transition: all 0.15s;
}
.size-btn:hover:not(:disabled) { border-color: #4b2e2b; color: #4b2e2b; }
.size-btn.active { border-color: #4b2e2b; background: #4b2e2b; color: #fff; }
.size-btn.out-of-stock { opacity: 0.4; cursor: not-allowed; }
.size-esgotado {
    position: absolute;
    top: -7px; right: -7px;
    background: #c62828;
    color: #fff;
    font-size: 7px;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 700;
}

.btn-add-to-cart {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #4b2e2b;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-add-to-cart:disabled { background: #bbb; cursor: not-allowed; }
.btn-add-to-cart:not(:disabled):hover { background: #3a2320; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(75,46,43,0.3); }
.btn-add-to-cart.loading { opacity: 0.7; pointer-events: none; }

/* ── Responsivo ── */
@media (max-width: 768px) {
    #designer-page { height: auto; }
    .designer-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    .designer-canvas-area { order: 1; min-height: 340px; }
    .panel-stamps { order: 2; border-right: none; border-top: 1px solid #ede8e3; max-height: 220px; }
    .panel-controls { order: 3; border-left: none; border-top: 1px solid #ede8e3; }
    .stamp-grid { grid-template-columns: repeat(4, 1fr); }
    .designer-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
    .btn-add-to-cart { width: 100%; justify-content: center; }
}
